0025334: BRepOffsetAPI_MakeOffset algorithm crashes on some customer's shape
[occt.git] / src / MAT2d / MAT2d_Tool2d.cdl
CommitLineData
b311480e 1-- Created on: 1993-07-12
2-- Created by: Yves FRICAUD
3-- Copyright (c) 1993-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 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
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class Tool2d from MAT2d
18
19 ---Purpose: Set of the methods useful for the MAT's computation.
20 -- Tool2d contains the geometry of the bisecting locus.
21
22
23uses
c19dd45e 24 JoinType from GeomAbs,
7fd59977 25 Bisec from Bisector,
26 Side from MAT,
27 Bisector from MAT,
28 Connexion from MAT2d,
29 Circuit from MAT2d,
30 DataMapOfIntegerBisec from MAT2d,
31 DataMapOfIntegerPnt2d from MAT2d,
32 DataMapOfIntegerVec2d from MAT2d,
33 SequenceOfInteger from TColStd,
34 Pnt2d from gp,
35 Vec2d from gp,
36 TrimmedCurve from Geom2d,
37 Curve from Geom2d,
38 Geometry from Geom2d
39
40is
41 Create returns Tool2d from MAT2d;
42 --- Purpose : Empty Constructor.
43
44--- Category : Initialisation.
45
46 Sense(me : in out ; aside : Side from MAT)
47 --- Purpose :<aSide> defines the side of the computation of the map.
48 is static;
49
c19dd45e 50 SetJoinType(me : in out ; aJoinType : JoinType from GeomAbs)
51 is static;
52
7fd59977 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.
58 is static;
59
60--- Category : Set of the methods used by the algorithm MAT from MAT.
61
62 NumberOfItems(me)
63 --- Purpose : Returns the Number of Items .
64 returns Integer is static;
65
66 ToleranceOfConfusion(me) returns Real
67 ---Purpose: Returns tolerance to test the confusion of two points.
68 is static;
69
70 FirstPoint(me : in out ; anitem : Integer;
71 dist : out Real )
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;
77
0e0f7a7c 78 TangentBefore(me : in out ; anitem : Integer;
79 IsOpenResult : Boolean)
7fd59977 80 --- Purpose : Creates the Tangent at the end of the Item defined
81 -- by <anitem>. Returns the index of this vector in
82 -- <theGeomVecs>
83 returns Integer is static;
84
0e0f7a7c 85 TangentAfter(me : in out ; anitem : Integer;
86 IsOpenResult : Boolean)
7fd59977 87 --- Purpose : Creates the Reversed Tangent at the origin of the Item
88 -- defined by <anitem>. Returns the index of this vector in
89 -- <theGeomVecs>
90 returns Integer is static;
91
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
95 -- <theGeomVecs>
96 returns Integer is static;
97
6e33d3ce 98 CreateBisector(me : in out ; abisector : Bisector from MAT)
7fd59977 99 --- Purpose : Creates the geometric bisector defined by <abisector>.
100 is static;
101
6e33d3ce 102 TrimBisector(me : in out ; abisector : Bisector from MAT)
7fd59977 103 --- Purpose : Trims the geometric bisector by the <firstparameter>
104 -- of <abisector>.
105 -- If the parameter is out of the bisector, Return FALSE.
106 -- else Return True.
107 returns Boolean is static;
108
109 TrimBisector(me : in out ;
6e33d3ce 110 abisector : Bisector from MAT ;
7fd59977 111 apoint : Integer)
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.
115 -- else Return True.
116 returns Boolean is static;
117
118 IntersectBisector(me : in out ;
6e33d3ce 119 bisectorone : Bisector from MAT ;
120 bisectortwo : Bisector from MAT ;
7fd59977 121 intpnt : in out Integer)
122 --- Purpose : Computes the point of intersection between the
123 -- bisectors defined by <bisectorone> and
124 -- <bisectortwo> .
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;
129
130 Distance(me;
131 abisector : Bisector from MAT;
132 param1 : Real;
133 param2 : Real)
134 ---Purpose: Returns the distance between the two points designed
135 -- by their parameters on <abisector>.
136 returns Real is static;
137
138 Dump(me ; bisector , erease : Integer) is static;
139 --- Purpose : displays informations about the bisector defined by
140 -- <bisector>.
141
142--- Category : Querying.
143
144 GeomBis(me ; Index: Integer)
145 --- Purpose : Returns the <Bisec> of index <Index> in
146 -- <theGeomBisectors>.
147 --
148 ---C++: return const &
149 returns Bisec from Bisector
150 is static;
151
152 GeomElt(me ; Index: Integer)
153 --- Purpose : Returns the Geometry of index <Index> in <theGeomElts>.
154 returns Geometry from Geom2d
155 is static;
156
157 GeomPnt(me ; Index: Integer)
158 --- Purpose : Returns the point of index <Index> in the <theGeomPnts>.
159 --
160 ---C++: return const &
161 returns Pnt2d from gp
162 is static;
163
164 GeomVec(me ; Index: Integer)
165 --- Purpose : Returns the vector of index <Index> in the
166 -- <theGeomVecs>.
167 --
168 ---C++: return const &
169 returns Vec2d from gp
170 is static;
171
172 Circuit(me)
173 ---Purpose:
174 --
175 returns Circuit from MAT2d
176 is static;
177
178---Category: Modification
179
180 BisecFusion(me : in out;
181 Index1 : Integer;
182 Index2 : Integer)
183 is static;
184
185 ChangeGeomBis(me : in out ; Index: Integer)
186 --- Purpose : Returns the <Bisec> of index <Index> in
187 -- <theGeomBisectors>.
188 --
189 ---C++: return &
190 returns Bisec from Bisector
191 is static;
192
193---Category: Private
194
195 IsSameDistance(me ;
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
201 -- <bisectortwo>.
202 -- In this case <adistance> is the distance of the point
203 -- from the bisectors.
204 returns Boolean
205 is static private;
206
207 Projection (me ;
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.
215 returns Boolean
216 is static private;
217
218 TrimBisec (me ;
219 Bis : in out Bisec from Bisector ;
220 IndexEdge : Integer from Standard ;
221 OnLine : Boolean from Standard ;
222 StartOrEnd : Integer from Standard )
223 is static private;
224
225fields
226
227 theDirection : Real;
c19dd45e 228 theJoinType : JoinType from GeomAbs;
7fd59977 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;
237
238end Tool2d;
239
240
241