1 -- File: BRepExtrema_SolutionElem.cdl
2 -- Created: Thu Apr 18 10:00:04 1996
3 -- Author: Maria PUMBORIOS
4 -- Author: Herve LOUESSARD
6 ---Copyright: Matra Datavision 1996
8 class SolutionElem from BRepExtrema
10 ---Purpose: This class is used to store information relative to the
11 -- minimum distance between two shapes.
19 SupportType from BRepExtrema
24 Create returns SolutionElem from BRepExtrema;
26 Create( d: Real from Standard;
28 SolType: SupportType from BRepExtrema ;
29 vertex: Vertex from TopoDS) returns SolutionElem from BRepExtrema;
30 --- Purpose: initialisation of the fields
31 -- This creator is used when the solution of a distance is a Vertex.
32 -- The different initialized fields are: _ the distance d
33 -- _ the solution point
34 -- _ the type of solution
38 Create( d: Real from Standard;
40 SolType: SupportType from BRepExtrema ;
41 edge: Edge from TopoDS;
42 t: Real from Standard ) returns SolutionElem from BRepExtrema;
43 ---Purpose: initialisation of the fiels.
44 -- This constructor is used when the solution of distance is on
45 -- an Edge. The different initialized fields are:
47 -- _ the solution point,
48 -- _ the type of solution,
50 -- _ and the parameter t to locate the solution.
53 Create( d: Real from Standard;
55 SolType: SupportType from BRepExtrema ;
56 face: Face from TopoDS;
57 u: Real from Standard;
58 v: Real from Standard ) returns SolutionElem from BRepExtrema;
59 --- Purpose: initialisation of the fields
60 -- This constructor is used when the solution of distance is in
61 -- a Face. The different initialized fields are:
63 -- _ the solution point,
64 -- _ the type of solution,
66 -- _ and the parameter u et v to locate the solution.
68 Dist(me) returns Real from Standard;
70 -- returns the value of the minimum distance.
72 Point(me) returns Pnt from gp;
74 -- returns the solution point.
77 SupportKind(me) returns SupportType from BRepExtrema;
79 -- returns the Support type :
80 -- IsVertex => The solution is a vertex.
81 -- IsOnEdge => The solution belongs to an Edge.
82 -- IsInFace => The solution is inside a Face.
84 Vertex(me) returns Vertex from TopoDS;
86 -- returns the vertex if the solution is a Vertex.
88 Edge(me) returns Edge from TopoDS;
90 -- returns the vertex if the solution is an Edge.
92 Face(me) returns Face from TopoDS;
94 -- returns the vertex if the solution is an Face.
96 EdgeParameter(me; par1:out Real from Standard);
98 -- returns the parameter t if the solution is on Edge.
100 FaceParameter(me; par1: out Real from Standard; par2:out Real from Standard);
102 -- returns the parameters u et v if the solution is in a Face.
105 myDist : Real from Standard;
106 myPoint : Pnt from gp;
107 mySupType : SupportType from BRepExtrema;
108 myVertex : Vertex from TopoDS;
109 myEdge : Edge from TopoDS;
110 myFace : Face from TopoDS;
111 myPar1 : Real from Standard;
112 myPar2 : Real from Standard;