0def9e9f73dfad6a5afdb242e09e177e0074021e
[occt.git] / src / Sweep / Sweep_NumShapeTool.cdl
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
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class NumShapeTool from Sweep  -- as Tool from Sweep
18
19     ---Purpose: This class provides  the indexation and  type analysis
20     --          services required by  the NumShape Directing Shapes of
21     --          Swept Primitives.
22     --          
23
24 uses
25     NumShape from Sweep,
26     ShapeEnum from TopAbs,
27     Orientation from TopAbs
28     
29 raises
30
31     OutOfRange from Standard
32 is
33
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
37         --          of this shape.
38
39     NbShapes(me) returns Integer
40         ---Purpose: Returns the number of subshapes in the shape.
41     is static;
42
43     Index(me; aShape : NumShape from Sweep) returns Integer
44         ---Purpose: Returns the index of <aShape>.
45     is static;
46     
47     Shape(me; anIndex : Integer from Standard) returns NumShape from Sweep
48         ---Purpose: Returns the Shape at index anIndex
49     is static;
50     
51     Type(me; aShape : NumShape from Sweep) returns ShapeEnum from TopAbs
52         ---Purpose: Returns the type of <aShape>.
53     is static;
54
55     Orientation(me; aShape : NumShape from Sweep) 
56     returns Orientation from TopAbs
57         ---Purpose: Returns the orientation of <aShape>.
58     is static;
59
60     HasFirstVertex(me) returns Boolean from Standard
61         ---Purpose: Returns true if there is a First Vertex in the Shape.
62     is static;
63
64     HasLastVertex(me) returns Boolean from Standard
65         ---Purpose: Returns true if there is a Last Vertex in the Shape.
66     is static;
67
68     FirstVertex(me) returns NumShape from Sweep
69         ---Purpose: Returns the first vertex.
70     is static;
71
72     LastVertex(me) returns NumShape from Sweep
73         ---Purpose: Returns the last vertex.
74     is static;
75 fields
76
77     myNumShape : NumShape from Sweep;
78     
79 end NumShapeTool from Sweep;