1 // Created on: 1993-06-02
2 // Created by: Laurent BOURESCHE
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _Sweep_NumShapeTool_HeaderFile
18 #define _Sweep_NumShapeTool_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Sweep_NumShape.hxx>
25 #include <Standard_Integer.hxx>
26 #include <TopAbs_ShapeEnum.hxx>
27 #include <TopAbs_Orientation.hxx>
28 #include <Standard_Boolean.hxx>
29 class Standard_OutOfRange;
33 //! This class provides the indexation and type analysis
34 //! services required by the NumShape Directing Shapes of
36 class Sweep_NumShapeTool
43 //! Create a new NumShapeTool with <aShape>. The Tool
44 //! must prepare an indexation for all the subshapes
46 Standard_EXPORT Sweep_NumShapeTool(const Sweep_NumShape& aShape);
48 //! Returns the number of subshapes in the shape.
49 Standard_EXPORT Standard_Integer NbShapes() const;
51 //! Returns the index of <aShape>.
52 Standard_EXPORT Standard_Integer Index (const Sweep_NumShape& aShape) const;
54 //! Returns the Shape at index anIndex
55 Standard_EXPORT Sweep_NumShape Shape (const Standard_Integer anIndex) const;
57 //! Returns the type of <aShape>.
58 Standard_EXPORT TopAbs_ShapeEnum Type (const Sweep_NumShape& aShape) const;
60 //! Returns the orientation of <aShape>.
61 Standard_EXPORT TopAbs_Orientation Orientation (const Sweep_NumShape& aShape) const;
63 //! Returns true if there is a First Vertex in the Shape.
64 Standard_EXPORT Standard_Boolean HasFirstVertex() const;
66 //! Returns true if there is a Last Vertex in the Shape.
67 Standard_EXPORT Standard_Boolean HasLastVertex() const;
69 //! Returns the first vertex.
70 Standard_EXPORT Sweep_NumShape FirstVertex() const;
72 //! Returns the last vertex.
73 Standard_EXPORT Sweep_NumShape LastVertex() const;
88 Sweep_NumShape myNumShape;
99 #endif // _Sweep_NumShapeTool_HeaderFile