1 -- Created on: 2001-06-29
2 -- Created by: Michael KLOKOV
3 -- Copyright (c) 2001-2012 OPEN CASCADE SAS
5 -- The content of this file is subject to the Open CASCADE Technology Public
6 -- License Version 6.5 (the "License"). You may not use the content of this file
7 -- except in compliance with the License. Please obtain a copy of the License
8 -- at http://www.opencascade.org and read it completely before using this file.
10 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 -- The Original Code and all software distributed under the License is
14 -- distributed on an "AS IS" basis, without warranty of any kind, and the
15 -- Initial Developer hereby disclaims all such warranties, including without
16 -- limitation, any warranties of merchantability, fitness for a particular
17 -- purpose or non-infringement. Please see the License for the specific terms
18 -- and conditions governing the rights and limitations under the License.
21 class BeanFaceIntersector from IntTools
23 ---Purpose: The class BeanFaceIntersector computes ranges of parameters on
24 -- the curve of a bean(part of edge) that bound the parts of bean which
25 -- are on the surface of a face according to edge and face tolerances.
26 -- Warning: The real boundaries of the face are not taken into account,
27 -- Most of the result parts of the bean lays only inside the region of the surface,
28 -- which includes the inside of the face. And the parts which are out of this region can be
29 -- excluded from the result.
33 SequenceOfRoots from IntTools,
34 MarkedRangeSet from IntTools,
35 SequenceOfRanges from IntTools,
38 ProjectPointOnSurf from GeomAPI,
41 Curve from BRepAdaptor,
42 Surface from BRepAdaptor,
44 CurveRangeSample from IntTools,
45 SurfaceRangeSample from IntTools,
46 ListOfCurveRangeSample from IntTools,
47 ListOfSurfaceRangeSample from IntTools,
48 CurveRangeLocalizeData from IntTools,
49 SurfaceRangeLocalizeData from IntTools,
53 Create returns BeanFaceIntersector from IntTools;
55 Create(theEdge: Edge from TopoDS;
56 theFace: Face from TopoDS)
57 returns BeanFaceIntersector from IntTools;
59 --- Initializes the algorithm
62 --- The parts of the edge which are on
63 --- the surface of the face and belong to
64 --- the whole in the face (if there is)
65 --- is considered as result
68 Create(theCurve : Curve from BRepAdaptor;
69 theSurface : Surface from BRepAdaptor;
70 theBeanTolerance: Real from Standard;
71 theFaceTolerance: Real from Standard)
72 returns BeanFaceIntersector from IntTools;
74 --- Initializes the algorithm
77 Create(theCurve : Curve from BRepAdaptor;
78 theSurface : Surface from BRepAdaptor;
79 theFirstParOnCurve: Real from Standard;
80 theLastParOnCurve : Real from Standard;
81 theUMinParameter : Real from Standard;
82 theUMaxParameter : Real from Standard;
83 theVMinParameter : Real from Standard;
84 theVMaxParameter : Real from Standard;
85 theBeanTolerance : Real from Standard;
86 theFaceTolerance : Real from Standard)
87 returns BeanFaceIntersector from IntTools;
89 --- Initializes the algorithm
90 --- theUMinParameter, ... are used for
91 --- optimization purposes
94 Init(me: in out;theEdge: Edge from TopoDS;
95 theFace: Face from TopoDS);
97 --- Initializes the algorithm
100 --- The parts of the edge which are on
101 --- the surface of the face and belong to
102 --- the whole in the face (if there is)
103 --- is considered as result
106 Init(me: in out;theCurve : Curve from BRepAdaptor;
107 theSurface : Surface from BRepAdaptor;
108 theBeanTolerance: Real from Standard;
109 theFaceTolerance: Real from Standard);
111 --- Initializes the algorithm
114 Init(me: in out;theCurve : Curve from BRepAdaptor;
115 theSurface : Surface from BRepAdaptor;
116 theFirstParOnCurve: Real from Standard;
117 theLastParOnCurve : Real from Standard;
118 theUMinParameter : Real from Standard;
119 theUMaxParameter : Real from Standard;
120 theVMinParameter : Real from Standard;
121 theVMaxParameter : Real from Standard;
122 theBeanTolerance : Real from Standard;
123 theFaceTolerance : Real from Standard);
125 --- Initializes the algorithm
126 --- theUMinParameter, ... are used for
127 --- optimization purposes
130 SetContext(me: in out;
131 theContext: Context from BOPInt);
133 --- Sets the intersecton context
136 returns Context from BOPInt;
137 ---C++: return const &
139 --- Gets the intersecton context
141 SetBeanParameters(me: in out;theFirstParOnCurve : Real from Standard;
142 theLastParOnCurve : Real from Standard);
144 --- Set restrictions for curve
147 SetSurfaceParameters(me: in out;theUMinParameter : Real from Standard;
148 theUMaxParameter : Real from Standard;
149 theVMinParameter : Real from Standard;
150 theVMaxParameter : Real from Standard);
152 --- Set restrictions for surface
157 --- Launches the algorithm
160 IsDone(me) returns Boolean from Standard;
164 returns SequenceOfRanges from IntTools;
165 ---C++: return const &
167 Result(me; theResults: out SequenceOfRanges from IntTools);
171 ComputeAroundExactIntersection(me: in out)
174 ComputeLinePlane(me: in out)
177 FastComputeExactIntersection(me: in out)
178 returns Integer from Standard is private;
180 ComputeUsingExtremum(me: in out)
183 ComputeNearRangeBoundaries(me: in out)
186 ComputeLocalized(me: in out)
187 returns Boolean from Standard is private;
189 ComputeRangeFromStartPoint(me: in out; ToIncreaseParameter : Boolean from Standard;
190 theParameter : Real from Standard;
191 theUParameter : Real from Standard;
192 theVParameter : Real from Standard)
195 ComputeRangeFromStartPoint(me: in out; ToIncreaseParameter : Boolean from Standard;
196 theParameter : Real from Standard;
197 theUParameter : Real from Standard;
198 theVParameter : Real from Standard;
199 theIndex : Integer from Standard)
202 Distance(me: in out; theArg : Real from Standard;
203 theUParameter: out Real from Standard;
204 theVParameter: out Real from Standard)
205 returns Real from Standard
208 Distance(me: in out; theArg: Real from Standard)
209 returns Real from Standard
212 LocalizeSolutions(me: in out; theCurveRange : CurveRangeSample from IntTools;
213 theBoxCurve : Box from Bnd;
214 theSurfaceRange: SurfaceRangeSample from IntTools;
215 theBoxSurface : Box from Bnd;
216 theCurveData : in out CurveRangeLocalizeData from IntTools;
217 theSurfaceData : in out SurfaceRangeLocalizeData from IntTools;
218 theListCurveRange: in out ListOfCurveRangeSample from IntTools;
219 theListSurfaceRange: in out ListOfSurfaceRangeSample from IntTools)
220 returns Boolean from Standard
223 TestComputeCoinside(me: in out)
224 returns Boolean from Standard
230 myCurve : Curve from BRepAdaptor;
231 mySurface : Surface from BRepAdaptor;
232 myTrsfSurface : Surface from Geom;
233 myFirstParameter : Real from Standard;
234 myLastParameter : Real from Standard;
235 myUMinParameter : Real from Standard;
236 myUMaxParameter : Real from Standard;
237 myVMinParameter : Real from Standard;
238 myVMaxParameter : Real from Standard;
239 myBeanTolerance : Real from Standard;
240 myFaceTolerance : Real from Standard;
242 myCurveResolution: Real from Standard;
243 myCriteria : Real from Standard;
246 myExtrema : ExtCS from Extrema;
247 myProjector : ProjectPointOnSurf from GeomAPI;
248 myRangeManager : MarkedRangeSet from IntTools;
249 myDeflection : Real from Standard;
250 myContext : Context from BOPInt;
253 myResults : SequenceOfRanges from IntTools;
254 myIsDone : Boolean from Standard;
256 end BeanFaceIntersector from IntTools;