1 -- Created on: 2001-07-06
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 BeanBeanIntersector from IntTools
23 ---Purpose: The class BeanBeanIntersector computes ranges of parameters on
24 --- the curve of a first bean (part of edge) that bounds the parts of bean which
25 --- are on the other bean according to tolerance of edges.
28 SequenceOfRoots from IntTools,
29 MarkedRangeSet from IntTools,
30 SequenceOfRanges from IntTools,
33 ProjectPointOnCurve from GeomAPI,
35 Curve from BRepAdaptor,
40 Create returns BeanBeanIntersector from IntTools;
42 Create(theEdge1: Edge from TopoDS;
43 theEdge2: Edge from TopoDS)
44 returns BeanBeanIntersector from IntTools;
46 --- Initializes the algorithm
49 Create(theCurve1 : Curve from BRepAdaptor;
50 theCurve2 : Curve from BRepAdaptor;
51 theBeanTolerance1: Real from Standard;
52 theBeanTolerance2: Real from Standard)
53 returns BeanBeanIntersector from IntTools;
55 --- Initializes the algorithm
58 Create(theCurve1 : Curve from BRepAdaptor;
59 theCurve2 : Curve from BRepAdaptor;
60 theFirstParOnCurve1: Real from Standard;
61 theLastParOnCurve1 : Real from Standard;
62 theFirstParOnCurve2: Real from Standard;
63 theLastParOnCurve2 : Real from Standard;
64 theBeanTolerance1 : Real from Standard;
65 theBeanTolerance2 : Real from Standard)
66 returns BeanBeanIntersector from IntTools;
68 --- Initializes the algorithm
71 Init(me: in out;theEdge1: Edge from TopoDS;
72 theEdge2: Edge from TopoDS);
74 --- Initializes the algorithm
79 Init(me: in out;theCurve1 : Curve from BRepAdaptor;
80 theCurve2 : Curve from BRepAdaptor;
81 theBeanTolerance1: Real from Standard;
82 theBeanTolerance2: Real from Standard);
84 --- Initializes the algorithm
87 Init(me: in out;theCurve1 : Curve from BRepAdaptor;
88 theCurve2 : Curve from BRepAdaptor;
89 theFirstParOnCurve1: Real from Standard;
90 theLastParOnCurve1 : Real from Standard;
91 theFirstParOnCurve2: Real from Standard;
92 theLastParOnCurve2 : Real from Standard;
93 theBeanTolerance1 : Real from Standard;
94 theBeanTolerance2 : Real from Standard);
96 --- Initializes the algorithm
99 SetBeanParameters(me: in out;IsFirstBean : Boolean from Standard;
100 theFirstParOnCurve: Real from Standard;
101 theLastParOnCurve : Real from Standard);
103 --- Sets bounding parameters for first bean if IsFirstBean is true
104 --- and for second bean if IsFirstBean is false
110 --- Launches the algorithm
113 IsDone(me) returns Boolean from Standard;
116 --- Returns true if the computations was successfull
117 --- otherwise returns false
120 returns SequenceOfRanges from IntTools;
121 ---C++: return const &
123 Result(me; theResults: out SequenceOfRanges from IntTools);
128 ComputeRoughIntersection(me: in out)
131 FastComputeIntersection(me: in out)
132 returns Boolean from Standard is private;
134 ComputeUsingExtrema(me: in out; theRange2: Range from IntTools)
137 ComputeNearRangeBoundaries(me: in out; theRange2: Range from IntTools)
140 ComputeRangeFromStartPoint(me: in out; ToIncreaseParameter : Boolean from Standard;
141 theParameter : Real from Standard;
142 theIndex : Integer from Standard;
143 theParameter2 : Real from Standard;
144 theRange2 : Range from IntTools)
147 Distance(me: in out; theArg : Real from Standard;
148 theArgOnOtherBean: out Real from Standard)
149 returns Real from Standard
155 myCurve1 : Curve from BRepAdaptor;
156 myCurve2 : Curve from BRepAdaptor;
157 myTrsfCurve1 : Curve from Geom;
158 myTrsfCurve2 : Curve from Geom;
160 myFirstParameter1 : Real from Standard;
161 myLastParameter1 : Real from Standard;
162 myFirstParameter2 : Real from Standard;
163 myLastParameter2 : Real from Standard;
165 myBeanTolerance1 : Real from Standard;
166 myBeanTolerance2 : Real from Standard;
168 myCurveResolution1: Real from Standard;
169 myCriteria : Real from Standard;
172 myProjector : ProjectPointOnCurve from GeomAPI;
173 myRangeManager : MarkedRangeSet from IntTools;
174 myDeflection : Real from Standard;
177 myResults : SequenceOfRanges from IntTools;
179 myIsDone : Boolean from Standard;
181 end BeanBeanIntersector from IntTools;