b311480e |
1 | -- Created on: 1994-10-04 |
2 | -- Created by: Yves FRICAUD |
3 | -- Copyright (c) 1994-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
10 | -- |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | -- |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | |
23 | class Explorer from BRepMAT2d |
24 | |
25 | ---Purpose: Construct an explorer from wires, face, set of curves |
26 | -- from Geom2d to compute the bisecting Locus. |
27 | |
28 | uses |
29 | SequenceOfCurve from TColGeom2d, |
30 | SequenceOfSequenceOfCurve from MAT2d, |
31 | SequenceOfBoolean from TColStd, |
32 | Curve from Geom2d, |
33 | Wire from TopoDS, |
34 | Face from TopoDS, |
35 | Shape from TopoDS, |
36 | IndexedDataMapOfShapeShape from TopTools |
37 | |
38 | is |
39 | Create returns Explorer from BRepMAT2d; |
40 | |
41 | Create (aFace : Face from TopoDS) returns Explorer from BRepMAT2d; |
42 | |
43 | Clear (me : in out) |
44 | --- Purpose : Clear the contents of <me>. |
45 | is static; |
46 | |
47 | ---Category: Construction from a face |
48 | |
49 | Perform ( me : in out ;aFace : Face from TopoDS) |
50 | is static; |
51 | |
52 | -- Modified by Sergey KHROMOV - Tue Nov 26 15:48:41 2002 Begin |
53 | -- Correction of a face. Creation of a new face where all wires are |
54 | -- connected in 2d. |
55 | |
56 | -- Add (me : in out; Spine : Wire from TopoDS; aFace : Face from TopoDS) |
57 | -- is static private; |
58 | |
59 | Add (me : in out; Spine : Wire from TopoDS; aFace : Face from TopoDS; |
60 | aNewFace: in out Face from TopoDS) |
61 | is static private; |
62 | -- Modified by Sergey KHROMOV - Tue Nov 26 15:48:43 2002 End |
63 | |
64 | ---Purpose: Construction from a set of cuves from Geom2d. |
65 | -- Assume the orientation of the closed lines are |
66 | -- compatible. (ie if A is in B, the orientation of A and B |
67 | -- has to be different. |
68 | -- |
69 | -- Assume the explo contains only lines located in the |
70 | -- area where the bisecting locus will be computed. |
71 | -- |
72 | -- Assume a line don't cross itself or an other line. |
73 | -- |
74 | -- A contour has to be construct in adding each curve in |
75 | -- respect to the sense of the contour. |
76 | -- |
77 | -- afirst point of a curve in a contour is equal to the last |
78 | -- point of the precedent curve. |
79 | -- |
80 | -- No control of this rules is done in the construction |
81 | -- of the explorer |
82 | |
83 | -- Modified by Sergey KHROMOV - Tue Nov 26 17:19:09 2002 Begin |
84 | --This method is useless. All its functionality is |
85 | --in the previous method Add(..) now. |
86 | -- CheckConnection (me : in out) |
87 | -- is static private; |
88 | -- Modified by Sergey KHROMOV - Tue Nov 26 17:19:09 2002 End |
89 | |
90 | NewContour (me : in out) |
91 | is static private; |
92 | |
93 | Add (me : in out ; aCurve : Curve from Geom2d) |
94 | --- Purpose : Add the curve <aCurve> at me. |
95 | is static private; |
96 | |
97 | ---Category: Querying |
98 | |
99 | NumberOfContours(me) returns Integer |
100 | --- Purpose : Returns the Number of contours. |
101 | is static; |
102 | |
103 | NumberOfCurves(me ; IndexContour : Integer) returns Integer |
104 | --- Purpose : Returns the Number of Curves in the Contour number |
105 | -- <IndexContour>. |
106 | is static; |
107 | |
108 | Init(me : in out ; IndexContour : Integer) |
109 | --- Purpose : Initialisation of an Iterator on the curves of |
110 | -- the Contour number <IndexContour>. |
111 | is static; |
112 | |
113 | More(me) returns Boolean from Standard |
114 | --- Purpose : Return False if there is no more curves on the Contour |
115 | -- initialised by the method Init. |
116 | is static; |
117 | |
118 | Next(me : in out) |
119 | --- Purpose : Move to the next curve of the current Contour. |
120 | is static; |
121 | |
122 | Value(me) returns Curve from Geom2d |
123 | --- Purpose : Returns the current curve on the current Contour. |
124 | is static; |
125 | |
126 | Shape (me) returns Shape from TopoDS |
127 | is static ; |
128 | |
129 | Contour (me; IndexContour : Integer from Standard) |
130 | returns SequenceOfCurve from TColGeom2d |
131 | ---C++: return const& |
132 | is static; |
133 | |
134 | -- Modified by Sergey KHROMOV - Tue Nov 26 15:51:56 2002 |
135 | IsModified(me; aShape: Shape from TopoDS) |
136 | returns Boolean from Standard |
137 | is static; |
138 | |
139 | ModifiedShape(me; aShape: Shape from TopoDS) |
140 | --- Purpose : If the shape is not modified, returns the shape itself. |
141 | returns Shape from TopoDS |
142 | is static; |
143 | |
144 | GetIsClosed (me) |
145 | returns SequenceOfBoolean from TColStd |
146 | ---C++: return const& |
147 | is static; |
148 | -- Modified by Sergey KHROMOV - Wed Mar 6 16:05:52 2002 |
149 | |
150 | fields |
151 | |
152 | theCurves : SequenceOfSequenceOfCurve from MAT2d; |
153 | current : Integer; |
154 | currentContour : Integer; |
155 | myShape : Shape from TopoDS; |
156 | myIsClosed : SequenceOfBoolean from TColStd; |
157 | -- Modified by Sergey KHROMOV - Tue Nov 26 15:48:02 2002 Begin |
158 | myModifShapes : IndexedDataMapOfShapeShape from TopTools; |
159 | -- Modified by Sergey KHROMOV - Tue Nov 26 15:48:03 2002 End |
160 | |
161 | end Explorer; |