b311480e |
1 | -- Created on: 1994-10-04 |
2 | -- Created by: Yves FRICAUD |
3 | -- Copyright (c) 1994-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class Explorer from BRepMAT2d |
18 | |
19 | ---Purpose: Construct an explorer from wires, face, set of curves |
20 | -- from Geom2d to compute the bisecting Locus. |
21 | |
22 | uses |
23 | SequenceOfCurve from TColGeom2d, |
24 | SequenceOfSequenceOfCurve from MAT2d, |
25 | SequenceOfBoolean from TColStd, |
26 | Curve from Geom2d, |
27 | Wire from TopoDS, |
28 | Face from TopoDS, |
29 | Shape from TopoDS, |
30 | IndexedDataMapOfShapeShape from TopTools |
31 | |
32 | is |
33 | Create returns Explorer from BRepMAT2d; |
34 | |
35 | Create (aFace : Face from TopoDS) returns Explorer from BRepMAT2d; |
36 | |
37 | Clear (me : in out) |
38 | --- Purpose : Clear the contents of <me>. |
39 | is static; |
40 | |
41 | ---Category: Construction from a face |
42 | |
43 | Perform ( me : in out ;aFace : Face from TopoDS) |
44 | is static; |
45 | |
46 | -- Modified by Sergey KHROMOV - Tue Nov 26 15:48:41 2002 Begin |
47 | -- Correction of a face. Creation of a new face where all wires are |
48 | -- connected in 2d. |
49 | |
50 | -- Add (me : in out; Spine : Wire from TopoDS; aFace : Face from TopoDS) |
51 | -- is static private; |
52 | |
53 | Add (me : in out; Spine : Wire from TopoDS; aFace : Face from TopoDS; |
54 | aNewFace: in out Face from TopoDS) |
55 | is static private; |
56 | -- Modified by Sergey KHROMOV - Tue Nov 26 15:48:43 2002 End |
57 | |
58 | ---Purpose: Construction from a set of cuves from Geom2d. |
59 | -- Assume the orientation of the closed lines are |
60 | -- compatible. (ie if A is in B, the orientation of A and B |
61 | -- has to be different. |
62 | -- |
63 | -- Assume the explo contains only lines located in the |
64 | -- area where the bisecting locus will be computed. |
65 | -- |
66 | -- Assume a line don't cross itself or an other line. |
67 | -- |
68 | -- A contour has to be construct in adding each curve in |
69 | -- respect to the sense of the contour. |
70 | -- |
71 | -- afirst point of a curve in a contour is equal to the last |
72 | -- point of the precedent curve. |
73 | -- |
74 | -- No control of this rules is done in the construction |
75 | -- of the explorer |
76 | |
77 | -- Modified by Sergey KHROMOV - Tue Nov 26 17:19:09 2002 Begin |
78 | --This method is useless. All its functionality is |
79 | --in the previous method Add(..) now. |
80 | -- CheckConnection (me : in out) |
81 | -- is static private; |
82 | -- Modified by Sergey KHROMOV - Tue Nov 26 17:19:09 2002 End |
83 | |
84 | NewContour (me : in out) |
85 | is static private; |
86 | |
87 | Add (me : in out ; aCurve : Curve from Geom2d) |
88 | --- Purpose : Add the curve <aCurve> at me. |
89 | is static private; |
90 | |
91 | ---Category: Querying |
92 | |
93 | NumberOfContours(me) returns Integer |
94 | --- Purpose : Returns the Number of contours. |
95 | is static; |
96 | |
97 | NumberOfCurves(me ; IndexContour : Integer) returns Integer |
98 | --- Purpose : Returns the Number of Curves in the Contour number |
99 | -- <IndexContour>. |
100 | is static; |
101 | |
102 | Init(me : in out ; IndexContour : Integer) |
103 | --- Purpose : Initialisation of an Iterator on the curves of |
104 | -- the Contour number <IndexContour>. |
105 | is static; |
106 | |
107 | More(me) returns Boolean from Standard |
108 | --- Purpose : Return False if there is no more curves on the Contour |
109 | -- initialised by the method Init. |
110 | is static; |
111 | |
112 | Next(me : in out) |
113 | --- Purpose : Move to the next curve of the current Contour. |
114 | is static; |
115 | |
116 | Value(me) returns Curve from Geom2d |
117 | --- Purpose : Returns the current curve on the current Contour. |
118 | is static; |
119 | |
120 | Shape (me) returns Shape from TopoDS |
121 | is static ; |
122 | |
123 | Contour (me; IndexContour : Integer from Standard) |
124 | returns SequenceOfCurve from TColGeom2d |
125 | ---C++: return const& |
126 | is static; |
127 | |
128 | -- Modified by Sergey KHROMOV - Tue Nov 26 15:51:56 2002 |
129 | IsModified(me; aShape: Shape from TopoDS) |
130 | returns Boolean from Standard |
131 | is static; |
132 | |
133 | ModifiedShape(me; aShape: Shape from TopoDS) |
134 | --- Purpose : If the shape is not modified, returns the shape itself. |
135 | returns Shape from TopoDS |
136 | is static; |
137 | |
138 | GetIsClosed (me) |
139 | returns SequenceOfBoolean from TColStd |
140 | ---C++: return const& |
141 | is static; |
142 | -- Modified by Sergey KHROMOV - Wed Mar 6 16:05:52 2002 |
143 | |
144 | fields |
145 | |
146 | theCurves : SequenceOfSequenceOfCurve from MAT2d; |
147 | current : Integer; |
148 | currentContour : Integer; |
149 | myShape : Shape from TopoDS; |
150 | myIsClosed : SequenceOfBoolean from TColStd; |
151 | -- Modified by Sergey KHROMOV - Tue Nov 26 15:48:02 2002 Begin |
152 | myModifShapes : IndexedDataMapOfShapeShape from TopTools; |
153 | -- Modified by Sergey KHROMOV - Tue Nov 26 15:48:03 2002 End |
154 | |
155 | end Explorer; |