1 -- Created on: 1993-07-07
2 -- Created by: Remi LEQUETTE
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
9 -- under the terms of the GNU Lesser General Public 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.
19 ---Purpose: Provides class methods to access to the geometry
36 Triangulation from Poly,
39 PolygonOnTriangulation from Poly,
40 HArray1OfInteger from TColStd,
41 HArray1OfReal from TColStd
44 NullObject from Standard,
45 NoSuchObject from Standard
50 -----------------------------------------------------------
51 -----------------------------------------------------------
53 -----------------------------------------------------------
54 -----------------------------------------------------------
55 IsClosed (myclass; S : Shape from TopoDS) returns Boolean from Standard;
57 ---Purpose: Returns <True> if S if flaged Closed, if S is a
58 -- Solid,Shell or Compound returns <True> is S has no free boundaries.
61 -----------------------------------------------------------
62 -----------------------------------------------------------
64 -----------------------------------------------------------
65 -----------------------------------------------------------
69 -----------------------------------------------------------
71 -----------------------------------------------------------
74 Surface(myclass; F : Face from TopoDS;
75 L : out Location from TopLoc) returns Surface from Geom
77 ---Purpose: Returns the geometric surface of the face. Returns
78 -- in <L> the location for the surface.
79 ---C++: return const &
81 NullObject from Standard;
83 Surface(myclass; F : Face from TopoDS) returns Surface from Geom
85 ---Purpose: Returns the geometric surface of the face. It can
86 -- be a copy if there is a Location.
89 NullObject from Standard;
91 Triangulation(myclass; F : Face from TopoDS;
92 L : out Location from TopLoc) returns Triangulation from Poly
94 ---Purpose: Returns the Triangulation of the face. It is a
95 -- null handle if there is no triangulation.
97 ---C++: return const &
99 NullObject from Standard;
103 -----------------------------------------------------------
105 -----------------------------------------------------------
107 Tolerance(myclass; F : Face from TopoDS) returns Real
109 ---Purpose: Returns the tolerance of the face.
111 NullObject from Standard;
113 -----------------------------------------------------------
114 -- Face natural restriction flag
115 -----------------------------------------------------------
117 NaturalRestriction(myclass; F : Face from TopoDS) returns Boolean
119 ---Purpose: Returns the NaturalRestriction flag of the face.
121 NullObject from Standard;
126 -----------------------------------------------------------
127 -----------------------------------------------------------
129 -----------------------------------------------------------
130 -----------------------------------------------------------
132 IsGeometric(myclass; E: Edge from TopoDS)
133 ---Purpose: Returns True if <E> is a 3d curve or a curve on
137 -----------------------------------------------------------
139 -----------------------------------------------------------
141 Curve(myclass; E : Edge from TopoDS;
142 L : out Location from TopLoc;
143 First, Last : out Real)
144 returns Curve from Geom
146 ---Purpose: Returns the 3D curve of the edge. May be a Null
147 -- handle. Returns in <L> the location for the curve.
148 -- In <First> and <Last> the parameter range.
150 ---C++: return const &
152 NullObject from Standard;
155 Curve(myclass; E : Edge from TopoDS;
156 First, Last : out Real)
157 returns Curve from Geom
159 ---Purpose: Returns the 3D curve of the edge. May be a Null handle.
160 -- In <First> and <Last> the parameter range.
161 -- It can be a copy if there is a Location.
163 NullObject from Standard;
165 -----------------------------------------------------------
167 -----------------------------------------------------------
169 Polygon3D(myclass; E : Edge from TopoDS;
170 L : out Location from TopLoc)
171 returns Polygon3D from Poly
173 ---Purpose: Returns the 3D polygon of the edge. May be a Null
174 -- handle. Returns in <L> the location for the polygon.
176 ---C++: return const &
178 NullObject from Standard;
181 -----------------------------------------------------------
182 -- Edge curve on surface
183 -----------------------------------------------------------
185 CurveOnSurface(myclass; E : Edge from TopoDS;
186 F : Face from TopoDS;
187 First, Last : out Real)
188 returns Curve from Geom2d
190 ---Purpose: Returns the curve associated to the edge in the
191 -- parametric space of the face. Returns a NULL
192 -- handle if this curve does not exist. Returns in
193 -- <First> and <Last> the parameter range.
195 NullObject from Standard;
198 CurveOnSurface(myclass; E : Edge from TopoDS;
199 S : Surface from Geom;
200 L : Location from TopLoc;
201 First, Last : out Real)
202 returns Curve from Geom2d
204 ---Purpose: Returns the curve associated to the edge in the
205 -- parametric space of the surface. Returns a NULL
206 -- handle if this curve does not exist. Returns in
207 -- <First> and <Last> the parameter range.
209 NullObject from Standard;
212 CurveOnSurface(myclass; E : Edge from TopoDS;
213 C : out Curve from Geom2d;
214 S : out Surface from Geom;
215 L : out Location from TopLoc;
216 First, Last : out Real)
218 ---Purpose: Returns in <C>, <S>, <L> a 2d curve, a surface and
219 -- a location for the edge <E>. <C> and <S> are null
220 -- if the edge has no curve on surface. Returns in
221 -- <First> and <Last> the parameter range.
223 NullObject from Standard;
225 CurveOnSurface(myclass; E : Edge from TopoDS;
226 C : out Curve from Geom2d;
227 S : out Surface from Geom;
228 L : out Location from TopLoc;
229 First, Last : out Real;
232 ---Purpose: Returns in <C>, <S>, <L> the 2d curve, the surface
233 -- and the location for the edge <E> of rank <Index>.
234 -- <C> and <S> are null if the index is out of range.
235 -- Returns in <First> and <Last> the parameter range.
237 NullObject from Standard;
239 -----------------------------------------------------------
240 -- Edge polygon on surface
241 -----------------------------------------------------------
243 PolygonOnSurface(myclass; E : Edge from TopoDS;
244 F : Face from TopoDS)
245 returns Polygon2D from Poly
247 ---Purpose: Returns the polygon associated to the edge in the
248 -- parametric space of the face. Returns a NULL
249 -- handle if this polygon does not exist.
251 NullObject from Standard;
253 PolygonOnSurface(myclass; E : Edge from TopoDS;
254 S : Surface from Geom;
255 L : Location from TopLoc)
256 returns Polygon2D from Poly
258 ---Purpose: Returns the polygon associated to the edge in the
259 -- parametric space of the surface. Returns a NULL
260 -- handle if this polygon does not exist.
262 NullObject from Standard;
265 PolygonOnSurface(myclass; E : Edge from TopoDS;
266 C : out Polygon2D from Poly;
267 S : out Surface from Geom;
268 L : out Location from TopLoc)
270 ---Purpose: Returns in <C>, <S>, <L> a 2d curve, a surface and
271 -- a location for the edge <E>. <C> and <S> are null
272 -- if the edge has no polygon on surface.
274 NullObject from Standard;
276 PolygonOnSurface(myclass; E : Edge from TopoDS;
277 C : out Polygon2D from Poly;
278 S : out Surface from Geom;
279 L : out Location from TopLoc;
282 ---Purpose: Returns in <C>, <S>, <L> the 2d curve, the surface
283 -- and the location for the edge <E> of rank <Index>.
284 -- <C> and <S> are null if the index is out of range.
286 NullObject from Standard;
290 -----------------------------------------------------------
291 -- Edge polygon on triangulation
292 -----------------------------------------------------------
294 PolygonOnTriangulation(myclass; E : Edge from TopoDS;
295 T : Triangulation from Poly;
296 L : Location from TopLoc)
297 ---C++: return const &
298 returns PolygonOnTriangulation from Poly;
300 ---Purpose: Returns the polygon associated to the edge in the
301 -- parametric space of the face. Returns a NULL
302 -- handle if this polygon does not exist.
305 PolygonOnTriangulation(myclass; E : Edge from TopoDS;
306 P : out PolygonOnTriangulation from Poly;
307 T : out Triangulation from Poly;
308 L : out Location from TopLoc)
310 ---Purpose: Returns in <P>, <T>, <L> a polygon on triangulation, a
311 -- triangulation and a location for the edge <E>.
312 -- <P> and <T> are null if the edge has no
313 -- polygon on triangulation.
315 NullObject from Standard;
317 PolygonOnTriangulation(myclass; E : Edge from TopoDS;
318 P : out PolygonOnTriangulation from Poly;
319 T : out Triangulation from Poly;
320 L : out Location from TopLoc;
322 ---Purpose: Returns in <P>, <T>, <L> a polygon on
323 -- triangulation, a triangulation and a location for
324 -- the edge <E> for the range index. <C> and <S> are
325 -- null if the edge has no polygon on triangulation.
328 NullObject from Standard;
331 -----------------------------------------------------------
332 -- Edge closed on surface
333 -----------------------------------------------------------
335 IsClosed(myclass; E : Edge from TopoDS;
336 F : Face from TopoDS)
339 ---Purpose: Returns True if <E> has two PCurves in the
340 -- parametric space of <F>. i.e. <F> is on a closed
341 -- surface and <E> is on the closing curve.
344 NullObject from Standard;
347 -----------------------------------------------------------
348 -- Edge closed on surface
349 -----------------------------------------------------------
351 IsClosed(myclass; E : Edge from TopoDS;
352 S : Surface from Geom;
353 L : Location from TopLoc)
356 ---Purpose: Returns True if <E> has two PCurves in the
357 -- parametric space of <S>. i.e. <S> is a closed
358 -- surface and <E> is on the closing curve.
361 NullObject from Standard;
363 -----------------------------------------------------------
364 -- Edge closed on triangulation
365 -----------------------------------------------------------
367 IsClosed(myclass; E : Edge from TopoDS;
368 T : Triangulation from Poly)
371 ---Purpose: Returns True if <E> has two arrays of indices in
372 -- the triangulation <T>.
374 NullObject from Standard;
376 -----------------------------------------------------------
378 -----------------------------------------------------------
380 Tolerance(myclass; E : Edge from TopoDS) returns Real
382 ---Purpose: Returns the tolerance for <E>.
384 NullObject from Standard;
386 -----------------------------------------------------------
388 -----------------------------------------------------------
390 SameParameter(myclass; E : Edge from TopoDS) returns Boolean
392 ---Purpose: Returns the SameParameter flag for the edge.
394 NullObject from Standard;
396 SameRange(myclass; E : Edge from TopoDS) returns Boolean
398 ---Purpose: Returns the SameRange flag for the edge.
400 NullObject from Standard;
402 Degenerated(myclass; E : Edge from TopoDS)
405 ---Purpose: Returns True if the edge is degenerated.
407 NullObject from Standard;
409 -------------------------------------------------------
410 -- Edge parameter range
411 -------------------------------------------------------
413 Range(myclass; E : Edge from TopoDS;
414 First, Last : out Real)
415 ---Purpose: Gets the range of the 3d curve.
417 NullObject from Standard; -- If <E> is Null
420 Range(myclass; E : Edge from TopoDS;
421 S : Surface from Geom;
422 L : Location from TopLoc;
423 First, Last : out Real)
424 ---Purpose: Gets the range of the edge on the pcurve on the
427 NullObject from Standard; -- If <E> is Null
430 Range(myclass; E : Edge from TopoDS;
431 F : Face from TopoDS;
432 First, Last : out Real)
433 ---Purpose: Gets the range of the edge on the pcurve on the face.
435 NullObject from Standard; -- If <E> is Null
438 -------------------------------------------------------
441 -- The data structures records a location in UV for the two
442 -- extremities of an edge.
444 -- By default these location are computed from the PCurve.
446 -- They can be updated to ensure their identity on connected edges.
447 -- (See the package BRepTools)
449 -------------------------------------------------------
451 UVPoints(myclass; E : Edge from TopoDS;
452 S : Surface from Geom;
453 L : Location from TopLoc;
454 PFirst, PLast : out Pnt2d from gp)
455 ---Purpose: Gets the UV locations of the extremities of the edge.
457 NullObject from Standard; -- If <E> is Null
460 UVPoints(myclass; E : Edge from TopoDS;
461 F : Face from TopoDS;
462 PFirst, PLast : out Pnt2d from gp)
463 ---Purpose: Gets the UV locations of the extremities of the edge.
465 NullObject from Standard; -- If <E> is Null
467 SetUVPoints(myclass; E : Edge from TopoDS;
468 S : Surface from Geom;
469 L : Location from TopLoc;
470 PFirst, PLast : Pnt2d from gp)
471 ---Purpose: Sets the UV locations of the extremities of the edge.
473 NullObject from Standard; -- If <E> is Null
476 SetUVPoints(myclass; E : Edge from TopoDS;
477 F : Face from TopoDS;
478 PFirst, PLast : Pnt2d from gp)
479 ---Purpose: Sets the UV locations of the extremities of the edge.
481 NullObject from Standard; -- If <E> is Null
483 -----------------------------------------------------------
485 -----------------------------------------------------------
487 HasContinuity(myclass; E : Edge from TopoDS;
488 F1, F2 : Face from TopoDS)
491 ---Purpose: Returns True if the edge is on the surfaces of the
494 NullObject from Standard; -- If the edge or the faces are null.
497 Continuity(myclass; E : Edge from TopoDS;
498 F1, F2 : Face from TopoDS)
499 returns Shape from GeomAbs
501 ---Purpose: Returns the continuity.
503 NullObject from Standard; -- If the edge or the faces are null.
505 HasContinuity(myclass; E : Edge from TopoDS;
506 S1, S2 : Surface from Geom;
507 L1, L2 : Location from TopLoc)
510 ---Purpose: Returns True if the edge is on the surfaces.
512 NullObject from Standard; -- If the edge or the surfaces are null.
515 Continuity(myclass; E : Edge from TopoDS;
516 S1, S2 : Surface from Geom;
517 L1, L2 : Location from TopLoc)
518 returns Shape from GeomAbs
520 ---Purpose: Returns the continuity.
522 NullObject from Standard; -- If the edge or the faces are null.
524 HasContinuity(myclass; E : Edge from TopoDS)
527 ---Purpose: Returns True if the edge has regularity on some
530 NullObject from Standard; -- If the edge is null.
532 -----------------------------------------------------------
533 -----------------------------------------------------------
535 -----------------------------------------------------------
536 -----------------------------------------------------------
540 -----------------------------------------------------------
542 -----------------------------------------------------------
544 Pnt(myclass; V : Vertex from TopoDS) returns Pnt from gp
546 ---Purpose: Returns the 3d point.
548 NullObject from Standard; -- if <V> is Null or has no geometry.
550 -----------------------------------------------------------
552 -----------------------------------------------------------
554 Tolerance(myclass; V : Vertex from TopoDS) returns Real
556 ---Purpose: Returns the tolerance.
558 NullObject from Standard; -- if <V> is Null or has no geometry.
560 -----------------------------------------------------------
561 -- Vertex parameter on edge
562 -----------------------------------------------------------
564 Parameter(myclass; V : Vertex from TopoDS;
565 E : Edge from TopoDS)
568 ---Purpose: Returns the parameter of <V> on <E>.
570 NullObject from Standard;
574 Parameter(myclass; V : Vertex from TopoDS;
575 E : Edge from TopoDS;
576 F : Face from TopoDS)
579 ---Purpose: Returns the parameters of the vertex on the
580 -- pcurve of the edge on the face.
582 NullObject from Standard;
586 Parameter(myclass; V : Vertex from TopoDS;
587 E : Edge from TopoDS;
588 S : Surface from Geom;
589 L : Location from TopLoc)
592 ---Purpose: Returns the parameters of the vertex on the
593 -- pcurve of the edge on the surface.
595 NullObject from Standard;
598 Parameters(myclass; V : Vertex from TopoDS;
599 F : Face from TopoDS)
600 returns Pnt2d from gp
602 ---Purpose: Returns the parameters of the vertex on the face.
604 NullObject from Standard;