1 -- Created on: 1993-01-21
2 -- Created by: Jacques GOUSSARD
3 -- Copyright (c) 1993-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 Intersection from IntPatch
19 ---Purpose: This class provides a generic algorithm to intersect
23 HVertex from Adaptor3d,
24 HCurve2d from Adaptor2d,
25 HSurface from Adaptor3d,
27 SequenceOfPoint from IntPatch,
28 TopolTool from Adaptor3d,
29 SequenceOfLine from IntPatch,
31 SurfaceType from GeomAbs,
32 ListOfPntOn2S from IntSurf
34 raises NotDone from StdFail,
35 OutOfRange from Standard,
36 DomainError from Standard,
37 ConstructionError from Standard
42 returns Intersection from IntPatch;
45 Create (S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
46 S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
47 TolArc,TolTang: Real from Standard)
49 returns Intersection from IntPatch
50 raises ConstructionError from Standard;
52 Create (S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
53 TolArc,TolTang: Real from Standard)
55 returns Intersection from IntPatch
56 raises ConstructionError from Standard;
59 SetTolerances(me : in out;
60 TolArc : Real from Standard;
61 TolTang : Real from Standard;
62 UVMaxStep: Real from Standard;
63 Fleche : Real from Standard)
65 ---Purpose: Set the tolerances used by the algorithms:
66 -- --- Implicit - Parametric
67 -- --- Parametric - Parametric
68 -- --- Implicit - Implicit
70 -- TolArc is used to compute the intersections
71 -- between the restrictions of a surface and a
74 -- TolTang is used to compute the points on a walking
75 -- line, and in geometric algorithms.
77 -- Fleche is a parameter used in the walking
78 -- algorithms to provide small curvatures on a line.
80 -- UVMaxStep is a parameter used in the walking
81 -- algorithms to compute the distance between to
82 -- points in their respective parametrtic spaces.
88 S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
89 S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
90 TolArc,TolTang: Real from Standard;
91 isGeomInt : Boolean from Standard = Standard_True)
93 raises ConstructionError from Standard
98 S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
99 S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
100 TolArc,TolTang: Real from Standard;
101 LOfPnts: in out ListOfPntOn2S from IntSurf;
102 RestrictLine: Boolean from Standard = Standard_True;
103 isGeomInt : Boolean from Standard = Standard_True)
105 ---Purpose: If isGeomInt == Standard_False, then method
106 -- Param-Param intersection will be used.
108 raises ConstructionError from Standard
111 Perform ( me: in out;
112 S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
113 S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
114 U1,V1,U2,V2 : Real from Standard;
115 TolArc,TolTang: Real from Standard)
117 raises ConstructionError from Standard
121 S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
122 TolArc,TolTang: Real from Standard)
124 raises ConstructionError from Standard
127 ParamParamPerfom( me: in out;
128 S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
129 S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
130 TolArc,TolTang: Real from Standard;
131 LOfPnts: in out ListOfPntOn2S from IntSurf;
132 RestrictLine: Boolean from Standard;
133 typs1, typs2: SurfaceType from GeomAbs)
137 GeomGeomPerfom( me: in out;
138 S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
139 S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
140 TolArc,TolTang: Real from Standard;
141 LOfPnts: in out ListOfPntOn2S from IntSurf;
142 RestrictLine: Boolean from Standard;
143 typs1, typs2: SurfaceType from GeomAbs)
147 GeomGeomPerfomTrimSurf( me: in out;
148 S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
149 S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
150 TolArc,TolTang: Real from Standard;
151 LOfPnts: in out ListOfPntOn2S from IntSurf;
152 RestrictLine: Boolean from Standard;
153 typs1, typs2: SurfaceType from GeomAbs)
157 GeomParamPerfom(me: in out;
158 S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
159 S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
160 isNotAnalitical: Boolean from Standard;
161 typs1, typs2: SurfaceType from GeomAbs)
167 ---Purpose: Returns True if the calculus was succesfull.
169 returns Boolean from Standard
176 ---Purpose: Returns true if the is no intersection.
178 returns Boolean from Standard
179 raises NotDone from StdFail
184 ---Purpose: Returns True if the two patches are considered as
185 -- entierly tangent, i-e every restriction arc of one
186 -- patch is inside the geometric base of the other patch.
189 returns Boolean from Standard
190 raises NotDone from StdFail
194 ---Purpose: Returns True when the TangentFaces returns True and the
195 -- normal vectors evaluated at a point on the first and the
196 -- second surface are opposite.
197 -- The exception DomainError is raised if TangentFaces
201 returns Boolean from Standard
202 raises NotDone from StdFail,
203 DomainError from Standard
208 ---Purpose: Returns the number of "single" points.
211 returns Integer from Standard
212 raises NotDone from StdFail
216 Point(me; Index: Integer from Standard)
218 ---Purpose: Returns the point of range Index.
219 -- An exception is raised if Index<=0 or Index>NbPnt.
220 ---C++: return const&
223 returns Point from IntPatch
224 raises NotDone from StdFail,
225 OutOfRange from Standard
231 ---Purpose: Returns the number of intersection lines.
234 returns Integer from Standard
235 raises NotDone from StdFail
238 Line(me; Index: Integer from Standard)
239 ---Purpose: Returns the line of range Index.
240 -- An exception is raised if Index<=0 or Index>NbLine.
241 ---C++: return const&
244 returns Line from IntPatch
245 raises NotDone from StdFail,
246 OutOfRange from Standard
251 ---C++: return const&
253 returns SequenceOfLine from IntPatch
254 raises NotDone from StdFail
257 Dump(me; Mode : Integer from Standard;
258 S1 : HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
259 S2 : HSurface from Adaptor3d; D2: TopolTool from Adaptor3d)
260 ---Purpose: Dump of each result line.
261 --- Mode for more accurate dumps.
267 done : Boolean from Standard;
268 empt : Boolean from Standard;
269 tgte : Boolean from Standard;
270 oppo : Boolean from Standard;
271 spnt : SequenceOfPoint from IntPatch;
272 slin : SequenceOfLine from IntPatch;
273 myTolArc : Real from Standard;
274 myTolTang : Real from Standard;
275 myUVMaxStep: Real from Standard;
276 myFleche : Real from Standard;
277 myIsStartPnt: Boolean from Standard;
278 myU1Start : Real from Standard;
279 myV1Start : Real from Standard;
280 myU2Start : Real from Standard;
281 myV2Start : Real from Standard;