1 -- Created on: 1993-07-12
2 -- Created by: Yves FRICAUD
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 Tool2d from MAT2d
19 ---Purpose: Set of the methods useful for the MAT's computation.
20 -- Tool2d contains the geometry of the bisecting locus.
24 JoinType from GeomAbs,
30 DataMapOfIntegerBisec from MAT2d,
31 DataMapOfIntegerPnt2d from MAT2d,
32 DataMapOfIntegerVec2d from MAT2d,
33 SequenceOfInteger from TColStd,
36 TrimmedCurve from Geom2d,
41 Create returns Tool2d from MAT2d;
42 --- Purpose : Empty Constructor.
44 --- Category : Initialisation.
46 Sense(me : in out ; aside : Side from MAT)
47 --- Purpose :<aSide> defines the side of the computation of the map.
50 SetJoinType(me : in out ; aJoinType : JoinType from GeomAbs)
53 InitItems(me : in out ;
54 aCircuit : Circuit from MAT2d )
55 --- Purpose : InitItems cuts the line in Items.
56 -- this Items are the geometrics representations of
57 -- the BasicElts from MAT.
60 --- Category : Set of the methods used by the algorithm MAT from MAT.
63 --- Purpose : Returns the Number of Items .
64 returns Integer is static;
66 ToleranceOfConfusion(me) returns Real
67 ---Purpose: Returns tolerance to test the confusion of two points.
70 FirstPoint(me : in out ; anitem : Integer;
72 --- Purpose : Creates the point at the origin of the bisector between
73 -- anitem and the previous item.
74 -- dist is the distance from the FirstPoint to <anitem>.
75 -- Returns the index of this point in <theGeomPnts>.
76 returns Integer is static;
78 TangentBefore(me : in out ; anitem : Integer;
79 IsOpenResult : Boolean)
80 --- Purpose : Creates the Tangent at the end of the Item defined
81 -- by <anitem>. Returns the index of this vector in
83 returns Integer is static;
85 TangentAfter(me : in out ; anitem : Integer;
86 IsOpenResult : Boolean)
87 --- Purpose : Creates the Reversed Tangent at the origin of the Item
88 -- defined by <anitem>. Returns the index of this vector in
90 returns Integer is static;
92 Tangent(me : in out ; bisector : Integer)
93 --- Purpose : Creates the Tangent at the end of the bisector defined
94 -- by <bisector>. Returns the index of this vector in
96 returns Integer is static;
98 CreateBisector(me : in out ; abisector : Bisector from MAT)
99 --- Purpose : Creates the geometric bisector defined by <abisector>.
102 TrimBisector(me : in out ; abisector : Bisector from MAT)
103 --- Purpose : Trims the geometric bisector by the <firstparameter>
105 -- If the parameter is out of the bisector, Return FALSE.
107 returns Boolean is static;
109 TrimBisector(me : in out ;
110 abisector : Bisector from MAT ;
112 --- Purpose : Trims the geometric bisector by the point of index
113 -- <apoint> in <theGeomPnts>.
114 -- If the point is out of the bisector, Return FALSE.
116 returns Boolean is static;
118 IntersectBisector(me : in out ;
119 bisectorone : Bisector from MAT ;
120 bisectortwo : Bisector from MAT ;
121 intpnt : in out Integer)
122 --- Purpose : Computes the point of intersection between the
123 -- bisectors defined by <bisectorone> and
125 -- If this point exists, <intpnt> is its index
126 -- in <theGeomPnts> and Return the distance of the point
127 -- from the bisector else Return <RealLast>.
128 returns Real is static;
131 abisector : Bisector from MAT;
134 ---Purpose: Returns the distance between the two points designed
135 -- by their parameters on <abisector>.
136 returns Real is static;
138 Dump(me ; bisector , erease : Integer) is static;
139 --- Purpose : displays informations about the bisector defined by
142 --- Category : Querying.
144 GeomBis(me ; Index: Integer)
145 --- Purpose : Returns the <Bisec> of index <Index> in
146 -- <theGeomBisectors>.
148 ---C++: return const &
149 returns Bisec from Bisector
152 GeomElt(me ; Index: Integer)
153 --- Purpose : Returns the Geometry of index <Index> in <theGeomElts>.
154 returns Geometry from Geom2d
157 GeomPnt(me ; Index: Integer)
158 --- Purpose : Returns the point of index <Index> in the <theGeomPnts>.
160 ---C++: return const &
161 returns Pnt2d from gp
164 GeomVec(me ; Index: Integer)
165 --- Purpose : Returns the vector of index <Index> in the
168 ---C++: return const &
169 returns Vec2d from gp
175 returns Circuit from MAT2d
178 ---Category: Modification
180 BisecFusion(me : in out;
185 ChangeGeomBis(me : in out ; Index: Integer)
186 --- Purpose : Returns the <Bisec> of index <Index> in
187 -- <theGeomBisectors>.
190 returns Bisec from Bisector
196 bisectorone , bisectortwo : any Bisector from MAT ;
197 apoint : Pnt2d from gp;
198 adistance : out Real)
199 --- Purpose : Returns True if the point <apoint> is equidistant to
200 -- the elements separated by bisectors <bisectorone> and
202 -- In this case <adistance> is the distance of the point
203 -- from the bisectors.
208 IndexElt : Integer from Standard;
209 Point : Pnt2d from gp ;
210 Distance : out Real from Standard)
211 ---Purpose: Return <True> if the Point can be projected
212 -- on the element designed by <IndexElt>.
213 -- In this case <Distance> is the minimum of distance
214 -- between Point and its projections.
219 Bis : in out Bisec from Bisector ;
220 IndexEdge : Integer from Standard ;
221 OnLine : Boolean from Standard ;
222 StartOrEnd : Integer from Standard )
228 theJoinType : JoinType from GeomAbs;
229 theNumberOfBisectors : Integer;
230 theNumberOfPnts : Integer;
231 theNumberOfVecs : Integer;
232 theCircuit : Circuit from MAT2d;
233 theGeomBisectors : DataMapOfIntegerBisec from MAT2d;
234 theGeomPnts : DataMapOfIntegerPnt2d from MAT2d;
235 theGeomVecs : DataMapOfIntegerVec2d from MAT2d;
236 theLinesLength : SequenceOfInteger from TColStd;