b311480e |
1 | -- Created on: 1995-01-27 |
2 | -- Created by: Jacques GOUSSARD |
3 | -- Copyright (c) 1995-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 IntSS from GeomInt |
18 | |
19 | ---Purpose: |
20 | |
21 | |
22 | uses Intersection from IntPatch, |
23 | LineConstructor from GeomInt, |
24 | SequenceOfCurve from TColGeom, |
25 | SequenceOfCurve from TColGeom2d, |
26 | Pnt from gp, |
27 | Pnt2d from gp, |
28 | Curve from Geom, |
29 | Curve from Geom2d, |
30 | Surface from Geom, |
31 | HSurface from GeomAdaptor, |
32 | TopolTool from Adaptor3d, |
d4b867e6 |
33 | Line from IntPatch, |
34 | RLine from IntPatch, |
35 | Box2d from Bnd, |
36 | VectorOfReal from GeomInt |
37 | |
7fd59977 |
38 | |
39 | raises NotDone from StdFail, |
40 | OutOfRange from Standard |
41 | |
42 | is |
43 | |
44 | Create |
45 | returns IntSS from GeomInt; |
46 | ---C++: inline |
47 | |
48 | Create(S1,S2: Surface from Geom; Tol: Real from Standard; |
49 | Approx : Boolean from Standard = Standard_True; |
50 | ApproxS1 : Boolean from Standard = Standard_False; |
51 | ApproxS2 : Boolean from Standard = Standard_False) |
52 | ---Purpose: performs general intersection of two surfaces just now |
53 | returns IntSS from GeomInt; |
54 | ---C++: inline |
55 | |
56 | Perform(me: in out;S1,S2 : Surface from Geom; Tol: Real from Standard; |
57 | Approx : Boolean from Standard = Standard_True; |
58 | ApproxS1 : Boolean from Standard = Standard_False; |
59 | ApproxS2 : Boolean from Standard = Standard_False) |
60 | ---Purpose: general intersection of two surfaces |
61 | is static; |
62 | |
63 | Perform(me: in out;HS1,HS2: HSurface from GeomAdaptor; Tol: Real from Standard; |
64 | Approx : Boolean from Standard = Standard_True; |
65 | ApproxS1 : Boolean from Standard = Standard_False; |
66 | ApproxS2 : Boolean from Standard = Standard_False) |
67 | ---Purpose: intersection of adapted surfaces |
68 | is static; |
69 | ---C++: inline |
70 | |
71 | Perform(me: in out;S1,S2: Surface from Geom; Tol: Real from Standard; |
72 | U1,V1,U2,V2: Real from Standard; |
73 | Approx : Boolean from Standard = Standard_True; |
74 | ApproxS1 : Boolean from Standard = Standard_False; |
75 | ApproxS2 : Boolean from Standard = Standard_False) |
76 | ---Purpose: general intersection using a starting point |
77 | is static; |
78 | |
79 | Perform(me: in out;HS1,HS2: HSurface from GeomAdaptor; Tol: Real from Standard; |
80 | U1,V1,U2,V2: Real from Standard; |
81 | Approx : Boolean from Standard = Standard_True; |
82 | ApproxS1 : Boolean from Standard = Standard_False; |
83 | ApproxS2 : Boolean from Standard = Standard_False) |
84 | ---Purpose: intersection of adapted surfaces using a starting point |
85 | is static; |
86 | ---C++: inline |
87 | |
88 | IsDone(me) |
89 | returns Boolean from Standard |
90 | is static; |
91 | ---C++: inline |
92 | |
93 | TolReached3d(me) returns Real from Standard |
94 | is static; |
95 | ---C++: inline |
96 | |
97 | TolReached2d(me) returns Real from Standard |
98 | is static; |
99 | ---C++: inline |
100 | |
101 | NbLines(me) |
102 | |
103 | returns Integer from Standard |
104 | ---C++: inline |
105 | raises NotDone from StdFail |
106 | is static; |
107 | |
108 | |
109 | Line(me; Index: Integer from Standard) |
110 | |
111 | returns any Curve from Geom |
112 | ---C++: return const& |
113 | raises NotDone from StdFail, |
114 | OutOfRange from Standard |
115 | |
116 | is static; |
117 | |
118 | |
119 | HasLineOnS1(me; Index: Integer from Standard) |
120 | returns Boolean from Standard; |
121 | |
122 | LineOnS1(me; Index: Integer from Standard) |
123 | |
124 | returns any Curve from Geom2d |
125 | ---C++: return const& |
126 | raises NotDone from StdFail, |
127 | OutOfRange from Standard |
128 | |
129 | is static; |
130 | |
131 | HasLineOnS2(me; Index: Integer from Standard) |
132 | returns Boolean from Standard; |
133 | |
134 | LineOnS2(me; Index: Integer from Standard) |
135 | |
136 | returns any Curve from Geom2d |
137 | ---C++: return const& |
138 | raises NotDone from StdFail, |
139 | OutOfRange from Standard |
140 | |
141 | is static; |
142 | |
143 | |
144 | NbBoundaries(me) |
145 | |
146 | returns Integer from Standard |
147 | ---C++: inline |
148 | raises NotDone from StdFail |
149 | is static; |
150 | |
151 | |
152 | Boundary(me; Index: Integer from Standard) |
153 | |
154 | returns any Curve from Geom |
155 | ---C++: return const& |
156 | raises NotDone from StdFail, |
157 | OutOfRange from Standard |
158 | |
159 | is static; |
160 | |
161 | |
162 | |
163 | NbPoints(me) |
164 | |
165 | returns Integer from Standard |
166 | ---C++: inline |
167 | raises NotDone from StdFail |
168 | is static; |
169 | |
170 | |
171 | Point(me; Index: Integer from Standard) |
172 | |
173 | returns Pnt from gp |
174 | ---C++: inline |
175 | raises NotDone from StdFail, |
176 | OutOfRange from Standard |
177 | |
178 | is static; |
179 | |
180 | |
181 | Pnt2d(me; Index: Integer from Standard; |
182 | OnFirst: Boolean from Standard) |
183 | |
184 | returns Pnt2d from gp |
185 | raises NotDone from StdFail, |
186 | OutOfRange from Standard |
187 | is static; |
188 | |
189 | SetTolFixTangents(me:out; |
190 | aTolCheck:Real from Standard; |
191 | aTolAngCheck:Real from Standard); |
192 | |
193 | TolFixTangents(me:out; |
194 | aTolCheck:out Real from Standard; |
195 | aTolAngCheck:out Real from Standard); |
196 | |
d4b867e6 |
197 | TreatRLine(myclass; theRL: RLine from IntPatch; |
198 | theHS1, theHS2: HSurface from GeomAdaptor; |
199 | theC3d: out Curve from Geom; |
200 | theC2d1, theC2d2: out Curve from Geom2d; |
201 | theTolReached: out Real from Standard); |
202 | ---Purpose: converts RLine to Geom(2d)_Curve. |
203 | |
204 | BuildPCurves(myclass; f, l : Real from Standard; |
205 | Tol: out Real from Standard; |
206 | S: Surface from Geom; |
207 | C: Curve from Geom; |
208 | C2d: out Curve from Geom2d); |
209 | ---Purpose: creates 2D-curve on given surface from given 3D-curve |
210 | |
211 | TrimILineOnSurfBoundaries(myclass; theC2d1, theC2d2: Curve from Geom2d; |
212 | theBound1, theBound2: Box2d from Bnd; |
213 | theArrayOfParameters: out VectorOfReal from GeomInt); |
214 | ---Purpose: puts into theArrayOfParameters the parameters of intersection |
215 | -- points of given theC2d1 and theC2d2 curves with the boundaries |
216 | -- of the source surface. |
217 | |
7fd59977 |
218 | --- Private methods |
219 | -- |
220 | -- |
221 | InternalPerform(me: in out; Tol: Real from Standard; |
222 | Approx,ApproxS1,ApproxS2 : Boolean from Standard; |
223 | useStart : Boolean from Standard; |
224 | U1,V1,U2,V2: Real from Standard) |
225 | is static protected; |
226 | |
227 | MakeCurve(me: in out; Ind : Integer from Standard; |
228 | D1,D2 : TopolTool from Adaptor3d; |
229 | Tol : Real from Standard; |
230 | Approx : Boolean from Standard; |
231 | Approx1 : Boolean from Standard; |
232 | Approx2 : Boolean from Standard) |
233 | is protected; |
234 | |
235 | fields |
236 | |
237 | myIntersector : Intersection from IntPatch; |
238 | myLConstruct : LineConstructor from GeomInt; |
239 | myHS1 : HSurface from GeomAdaptor; |
240 | myHS2 : HSurface from GeomAdaptor; |
241 | myNbrestr : Integer from Standard; |
242 | sline : SequenceOfCurve from TColGeom; |
243 | slineS1 : SequenceOfCurve from TColGeom2d; |
244 | slineS2 : SequenceOfCurve from TColGeom2d; |
245 | myTolReached2d : Real from Standard; |
246 | myTolReached3d : Real from Standard; |
247 | -- |
248 | myTolCheck : Real from Standard; |
249 | myTolAngCheck : Real from Standard; |
250 | -- |
251 | end IntSS; |