Integration of OCCT 6.5.0 from SVN
[occt.git] / src / ShapeAnalysis / ShapeAnalysis_Edge.cdl
CommitLineData
7fd59977 1-- File: ShapeAnalysis_Edge.cdl
2-- Created: Mon Jun 8 10:40:58 1998
3-- Author: data exchange team
4-- <det@nnov.matra-dtv.fr>
5---Copyright: Matra Datavision 1998
6
7
8class Edge from ShapeAnalysis
9
10 ---Purpose: Tool for analyzing the edge.
11 -- Queries geometrical representations of the edge (3d curve, pcurve
12 -- on the given face or surface) and topological sub-shapes (bounding
13 -- vertices).
14 -- Provides methods for analyzing geometry and topology consistency
15 -- (3d and pcurve(s) consistency, their adjacency to the vertices).
16
17uses
18 Pnt from gp,
19 Pnt2d from gp,
20 Vec2d from gp,
21 Curve from Geom2d,
22 Curve from Geom,
23 Surface from Geom,
24 Vertex from TopoDS,
25 Edge from TopoDS,
26 Face from TopoDS,
27 Location from TopLoc,
28 Status from ShapeExtend
29
30is
31
32 Create returns Edge from ShapeAnalysis;
33 ---Purpose: Empty constructor; initialises Status to OK
34
35 HasCurve3d (me; edge: Edge from TopoDS) returns Boolean;
36 ---Purpose: Tells if the edge has a 3d curve
37
38 Curve3d (me; edge : Edge from TopoDS;
39 C3d : out Curve from Geom;
40 cf, cl: out Real;
41 orient: Boolean = Standard_True)
42 returns Boolean;
43 ---Purpose: Returns the 3d curve and bounding parameteres for the edge
44 -- Returns False if no 3d curve.
45 -- If <orient> is True (default), takes orientation into account:
46 -- if the edge is reversed, cf and cl are toggled
47
48 IsClosed3d (me; edge: Edge from TopoDS) returns Boolean;
49 ---Purpose: Gives True if the edge has a 3d curve, this curve is closed,
50 -- and the edge has the same vertex at start and end
51
52 HasPCurve (me; edge: Edge from TopoDS;
53 face: Face from TopoDS)
54 returns Boolean;
55 ---Purpose: Tells if the Edge has a pcurve on the face.
56
57 HasPCurve (me; edge : Edge from TopoDS;
58 surface : Surface from Geom;
59 location: Location from TopLoc)
60 returns Boolean;
61 ---Purpose: Tells if the edge has a pcurve on the surface (with location).
62
63 PCurve (me; edge : Edge from TopoDS;
64 face : Face from TopoDS;
65 C2d : out Curve from Geom2d;
66 cf, cl: out Real;
67 orient: Boolean = Standard_True)
68 returns Boolean;
69
70 PCurve (me; edge : Edge from TopoDS;
71 surface : Surface from Geom;
72 location: Location from TopLoc;
73 C2d : out Curve from Geom2d;
74 cf, cl : out Real;
75 orient : Boolean = Standard_True)
76 returns Boolean;
77 ---Purpose: Returns the pcurve and bounding parameteres for the edge
78 -- lying on the surface.
79 -- Returns False if the edge has no pcurve on this surface.
80 -- If <orient> is True (default), takes orientation into account:
81 -- if the edge is reversed, cf and cl are toggled
82
83 BoundUV (me; edge : Edge from TopoDS;
84 face : Face from TopoDS;
85 first, last: out Pnt2d from gp)
86 returns Boolean;
87
88 BoundUV (me; edge : Edge from TopoDS;
89 surface : Surface from Geom;
90 location: Location from TopLoc;
91 first, last: out Pnt2d from gp)
92 returns Boolean;
93 ---Purpose: Returns the ends of pcurve
94 -- Calls method PCurve with <orient> equal to True
95
96 IsSeam (me; edge: Edge from TopoDS;
97 face: Face from TopoDS)
98 returns Boolean;
99
100 IsSeam (me; edge : Edge from TopoDS;
101 surface : Surface from Geom;
102 location: Location from TopLoc)
103 returns Boolean;
104 ---Purpose: Returns True if the edge has two pcurves on one surface
105 ---Remark : Calls BRep_Tool::IsClosed()
106
107 FirstVertex (me; edge: Edge from TopoDS) returns Vertex from TopoDS;
108 ---Purpose: Returns start vertex of the edge (taking edge orientation
109 -- into account).
110 ---Remark: Vertex orientation is always FORWARD
111
112 LastVertex (me; edge: Edge from TopoDS) returns Vertex from TopoDS;
113 ---Purpose: Returns end vertex of the edge (taking edge orientation
114 -- into account).
115 ---Remark: Vertex orientation is always REVERSED
116
117 GetEndTangent2d (me; edge: Edge from TopoDS;
118 face: Face from TopoDS;
119 atEnd: Boolean;
120 pos : out Pnt2d from gp;
121 tang: out Vec2d from gp;
122 dparam: Real from Standard =0.0)
123 returns Boolean;
124
125 GetEndTangent2d (me; edge: Edge from TopoDS;
126 surface : Surface from Geom;
127 location: Location from TopLoc;
128 atEnd: Boolean;
129 pos : out Pnt2d from gp;
130 tang: out Vec2d from gp;
131 dparam: Real from Standard =0.0)
132 returns Boolean;
133 ---Purpose: Returns tangent of the edge pcurve at its start (if atEnd is
134 -- False) or end (if True), regarding the orientation of edge.
135 -- If edge is REVERSED, tangent is reversed before return.
136 -- Returns True if pcurve is available and tangent is computed
137 -- and is not null, else False.
138
139 CheckVerticesWithCurve3d (me: in out; edge : Edge from TopoDS;
140 preci: Real = -1;
141 vtx : Integer = 0)
142 returns Boolean;
143 ---Purpose: Checks the start and/or end vertex of the edge for matching
144 -- with 3d curve with the given precision.
145 -- <vtx> = 1 : start vertex only
146 -- <vtx> = 2 : end vertex only
147 -- <vtx> = 0 : both (default)
148 -- If preci < 0 the vertices are considered with their own
149 -- tolerances, else with the given <preci>.
150 ---Returns: True if mismatching of the vertex to the curve was detected
151 -- else returns False (OK)
152 ---Status : OK - ends of the 3d curve are comprised by checked vertices
153 -- FAIL1 - edge has no 3d curve
154 -- DONE1 - if first vertex of the edge does not comprise start of 3d curve
155 -- DONE2 - if last vertex of the edge does not comprise end of 3d curve
156
157 CheckVerticesWithPCurve (me: in out; edge : Edge from TopoDS;
158 face : Face from TopoDS;
159 preci: Real = -1;
160 vtx : Integer = 0)
161 returns Boolean;
162
163 CheckVerticesWithPCurve (me: in out; edge : Edge from TopoDS;
164 surface : Surface from Geom;
165 location: Location from TopLoc;
166 preci : Real = -1;
167 vtx : Integer = 0)
168 returns Boolean;
169 ---Purpose: Checks the start and/or end vertex of the edge for matching
170 -- with pcurve with the given precision.
171 -- <vtx> = 1 : start vertex
172 -- <vtx> = 2 : end vertex
173 -- <vtx> = 0 : both
174 -- If preci < 0 the vertices are considered with their own
175 -- tolerances, else with the given <preci>.
176 ---Returns: True if mismatching of the curves to the vertex was detected
177 -- else returns False (OK)
178 ---Status : OK - ends of the 3d curve are comprised by checked vertices
179 -- FAIL1 - edge has no pcurve on a given (sur)face
180 -- DONE1 - if first vertex of the edge does not comprise start of pcurve
181 -- DONE2 - if last vertex of the edge does not comprise end of pcurve
182
183 CheckVertexTolerance(me: in out; edge : Edge from TopoDS;
184 face : Face from TopoDS;
185 toler1: out Real;
186 toler2: out Real)
187 returns Boolean;
188 CheckVertexTolerance(me: in out; edge : Edge from TopoDS;
189 toler1: out Real;
190 toler2: out Real)
191 returns Boolean;
192 ---Purpose: Checks if it is necessary to increase tolerances of the edge
193 -- vertices to comprise the ends of 3d curve and pcurve on
194 -- the given face (first method) or all pcurves stored in an edge
195 -- (second one)
196 -- toler1 returns necessary tolerance for first vertex,
197 -- toler2 returns necessary tolerance for last vertex.
198 ---Returns: True, if tolerances should be increased, otherwise False
199 ---Status:
200 -- OK : the original tolerances are sufficient
201 -- DONE1: the tolerance of first vertex should be increased
202 -- DONE2: the tolerance of last vertex should be increased
203 -- FAIL1: edge has no vertice(s), no check is done
204 -- FAIL2: edge has no 3d curve, only pcurves are checked
205 -- FAIL3: edge has no pcurve on a given face, only 3d curve is checked
206
207 CheckCurve3dWithPCurve (me: in out; edge: Edge from TopoDS;
208 face: Face from TopoDS)
209 returns Boolean;
210
211 CheckCurve3dWithPCurve (me: in out; edge :Edge from TopoDS;
212 surface : Surface from Geom;
213 location: Location from TopLoc)
214 returns Boolean;
215 ---Purpose: Checks mutual orientation of 3d curve and pcurve on the
216 -- analysis of curves bounding points
217 ---Returns: Returns True if mismatching of orientation was detected,
218 -- else returns False (if OK or no curve)
219 ---Status:
220 -- OK : orientations match each other (both go in the same
221 -- directions), or edge is closed
222 -- DONE1: orientations mismatch each other (curves go in
223 -- opposite directions)
224 -- FAIL1: no pcurve
225 -- FAIL2: no 3d curve
226
227 CheckPoints (me: in out; P1A, P1B: Pnt from gp;
228 P2A, P2B: Pnt from gp;
229 preci1, preci2: Real)
230 returns Boolean is private;
231 ---Purpose: Check points by pairs (A and A, B and B) with precisions
232 -- (preci1 and preci2).
233 -- P1 are the points either from 3d curve or from vertices,
234 -- P2 are the points from pcurve
235 ---Returns: False if status is OK, else True
236 --- Status:
237 -- OK : distances (P1A, P2A) and (P1B, P2B) are within
238 -- precisions
239 -- DONE1: distance (P1A, P2B) + (P1B, P2A) is less than
240 -- distance (P1A, P2A) + (P1B, P2B),
241 -- the precisions are not taken into account in this case
242
243
244
245 Status (me; status: Status from ShapeExtend) returns Boolean;
246 ---Purpose: Returns the status (in the form of True/False) of last Check
247 ---Returns: True if status contains bit corresponding to enumerated argument
248
249 CheckSameParameter (me: in out; edge : Edge from TopoDS;
250 maxdev: out Real;
251 NbControl: Integer = 23)
252 returns Boolean;
253 ---Purpose: Checks the edge to be SameParameter.
254 -- Calculates the maximal deviation between 3d curve and each
255 -- pcurve of the edge on <NbControl> equidistant points (the same
256 -- algorithm as in BRepCheck; default value is 23 as in BRepCheck).
257 -- This deviation is returned in <maxdev> parameter.
258 -- If deviation is greater than tolerance of the edge (i.e.
259 -- incorrect flag) returns False, else returns True.
260 ---Returns: True if edge has either SameParameter False and/or its real
261 -- deviation of curves is more than tolerance
262 ---Status : OK - Edge is SameParameter with the associated tolerance
263 -- DONE1 - if deviation of the pcurves from 3d curve is greater
264 -- than tolerance of edge
265 -- DONE2 - if SameParameter flag in edge is False
266 -- FAIL1 - edge does not have 3d curve
267 -- FAIL2 - if some computational problems were encountered (when
268 -- projecting points on curves)
269
270 CheckOverlapping(me :in out; theEdge1, theEdge2 : Edge from TopoDS;
271 theTolOverlap:in out Real; theDomainDist : Real =0.0) returns Boolean;
272 ---Purpose: Checks the first edge is overlapped with second edge.
273 -- If distance between two edges is less then theTolOverlap
274 -- edges is overlapped.
275 -- theDomainDis - length of part of edges on wich edges is overlapped.
276 ---Status : DONE3 - edges is overlapped on whole length
277 -- : DONE4 - edges is overlapped on the length equal to theDomainDist
278
279
280fields
281
282 myStatus: Integer is protected;
283
284end Edge;