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 class NumShapeTool from Sweep -- as Tool from Sweep
19 ---Purpose: This class provides the indexation and type analysis
20 -- services required by the NumShape Directing Shapes of
26 ShapeEnum from TopAbs,
27 Orientation from TopAbs
31 OutOfRange from Standard
34 Create(aShape: NumShape from Sweep);
35 ---Purpose: Create a new NumShapeTool with <aShape>. The Tool
36 -- must prepare an indexation for all the subshapes
39 NbShapes(me) returns Integer
40 ---Purpose: Returns the number of subshapes in the shape.
43 Index(me; aShape : NumShape from Sweep) returns Integer
44 ---Purpose: Returns the index of <aShape>.
47 Shape(me; anIndex : Integer from Standard) returns NumShape from Sweep
48 ---Purpose: Returns the Shape at index anIndex
51 Type(me; aShape : NumShape from Sweep) returns ShapeEnum from TopAbs
52 ---Purpose: Returns the type of <aShape>.
55 Orientation(me; aShape : NumShape from Sweep)
56 returns Orientation from TopAbs
57 ---Purpose: Returns the orientation of <aShape>.
60 HasFirstVertex(me) returns Boolean from Standard
61 ---Purpose: Returns true if there is a First Vertex in the Shape.
64 HasLastVertex(me) returns Boolean from Standard
65 ---Purpose: Returns true if there is a Last Vertex in the Shape.
68 FirstVertex(me) returns NumShape from Sweep
69 ---Purpose: Returns the first vertex.
72 LastVertex(me) returns NumShape from Sweep
73 ---Purpose: Returns the last vertex.
77 myNumShape : NumShape from Sweep;
79 end NumShapeTool from Sweep;