Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-02 09:14:11

0001 // Created on: 1993-02-03
0002 // Created by: Laurent BOURESCHE
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Sweep_NumShape_HeaderFile
0018 #define _Sweep_NumShape_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TopAbs_ShapeEnum.hxx>
0025 #include <Standard_Boolean.hxx>
0026 #include <TopAbs_Orientation.hxx>
0027 
0028 //! Gives a simple indexed representation of a
0029 //! Directing Edge topology.
0030 class Sweep_NumShape
0031 {
0032 public:
0033   DEFINE_STANDARD_ALLOC
0034 
0035   //! Creates a dummy indexed edge.
0036   Standard_EXPORT Sweep_NumShape();
0037 
0038   //! Creates a new simple indexed edge.
0039   //!
0040   //! For an Edge : Index is the number of vertices (0,
0041   //! 1 or 2),Type is TopAbs_EDGE, Closed is true if it
0042   //! is a closed edge, BegInf is true if the Edge is
0043   //! infinite at the beginning, EndInf is true if the
0044   //! edge is infinite at the end.
0045   //!
0046   //! For a Vertex : Index is the index of the vertex in
0047   //! the edge (1 or 2), Type is TopAbsVERTEX, all the
0048   //! other fields have no meanning.
0049   Standard_EXPORT Sweep_NumShape(const int              Index,
0050                                  const TopAbs_ShapeEnum Type,
0051                                  const bool             Closed = false,
0052                                  const bool             BegInf = false,
0053                                  const bool             EndInf = false);
0054 
0055   //! Reinitialize a simple indexed edge.
0056   //!
0057   //! For an Edge : Index is the number of vertices (0,
0058   //! 1 or 2),Type is TopAbs_EDGE, Closed is true if it
0059   //! is a closed edge, BegInf is true if the Edge is
0060   //! infinite at the beginning, EndInf is true if the
0061   //! edge is infinite at the end.
0062   //!
0063   //! For a Vertex : Index is the index of the vertex in
0064   //! the edge (1 or 2), Type is TopAbsVERTEX, Closed is
0065   //! true if it is the vertex of a closed edge, all the
0066   //! other fields have no meanning.
0067   Standard_EXPORT void Init(const int              Index,
0068                             const TopAbs_ShapeEnum Type,
0069                             const bool             Closed = false,
0070                             const bool             BegInf = false,
0071                             const bool             EndInf = false);
0072 
0073   int Index() const;
0074 
0075   TopAbs_ShapeEnum Type() const;
0076 
0077   bool Closed() const;
0078 
0079   bool BegInfinite() const;
0080 
0081   bool EndInfinite() const;
0082 
0083   Standard_EXPORT TopAbs_Orientation Orientation() const;
0084 
0085 private:
0086   TopAbs_ShapeEnum myType;
0087   int              myIndex;
0088   bool             myClosed;
0089   bool             myBegInf;
0090   bool             myEndInf;
0091 };
0092 
0093 #include <Sweep_NumShape.lxx>
0094 
0095 #endif // _Sweep_NumShape_HeaderFile