1 -- Created on: 1995-01-27
2 -- Created by: Jacques GOUSSARD
3 -- Copyright (c) 1995-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 IntSS from GeomInt
22 uses Intersection from IntPatch,
23 LineConstructor from GeomInt,
24 SequenceOfCurve from TColGeom,
25 SequenceOfCurve from TColGeom2d,
31 HSurface from GeomAdaptor,
32 TopolTool from Adaptor3d,
36 VectorOfReal from GeomInt
39 raises NotDone from StdFail,
40 OutOfRange from Standard
45 returns IntSS from GeomInt;
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;
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
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
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
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
89 returns Boolean from Standard
93 TolReached3d(me) returns Real from Standard
97 TolReached2d(me) returns Real from Standard
103 returns Integer from Standard
105 raises NotDone from StdFail
109 Line(me; Index: Integer from Standard)
111 returns any Curve from Geom
112 ---C++: return const&
113 raises NotDone from StdFail,
114 OutOfRange from Standard
119 HasLineOnS1(me; Index: Integer from Standard)
120 returns Boolean from Standard;
122 LineOnS1(me; Index: Integer from Standard)
124 returns any Curve from Geom2d
125 ---C++: return const&
126 raises NotDone from StdFail,
127 OutOfRange from Standard
131 HasLineOnS2(me; Index: Integer from Standard)
132 returns Boolean from Standard;
134 LineOnS2(me; Index: Integer from Standard)
136 returns any Curve from Geom2d
137 ---C++: return const&
138 raises NotDone from StdFail,
139 OutOfRange from Standard
146 returns Integer from Standard
148 raises NotDone from StdFail
152 Boundary(me; Index: Integer from Standard)
154 returns any Curve from Geom
155 ---C++: return const&
156 raises NotDone from StdFail,
157 OutOfRange from Standard
165 returns Integer from Standard
167 raises NotDone from StdFail
171 Point(me; Index: Integer from Standard)
175 raises NotDone from StdFail,
176 OutOfRange from Standard
181 Pnt2d(me; Index: Integer from Standard;
182 OnFirst: Boolean from Standard)
184 returns Pnt2d from gp
185 raises NotDone from StdFail,
186 OutOfRange from Standard
189 SetTolFixTangents(me:out;
190 aTolCheck:Real from Standard;
191 aTolAngCheck:Real from Standard);
193 TolFixTangents(me:out;
194 aTolCheck:out Real from Standard;
195 aTolAngCheck:out Real from Standard);
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.
204 BuildPCurves(myclass; f, l : Real from Standard;
205 Tol: out Real from Standard;
206 S: Surface from Geom;
208 C2d: out Curve from Geom2d);
209 ---Purpose: creates 2D-curve on given surface from given 3D-curve
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.
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)
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)
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;
248 myTolCheck : Real from Standard;
249 myTolAngCheck : Real from Standard;