1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 // This file is generated by WOK (CPPExt).
15 // Please do not edit this file; modify original file instead.
16 // The copyright and license terms as defined for the original file apply to
17 // this header file considered to be the "object code" form of the original source.
19 #ifndef _BRepExtrema_SolutionElem_HeaderFile
20 #define _BRepExtrema_SolutionElem_HeaderFile
22 #ifndef _Standard_HeaderFile
23 #include <Standard.hxx>
25 #ifndef _Standard_DefineAlloc_HeaderFile
26 #include <Standard_DefineAlloc.hxx>
28 #ifndef _Standard_Macro_HeaderFile
29 #include <Standard_Macro.hxx>
32 #ifndef _Standard_Real_HeaderFile
33 #include <Standard_Real.hxx>
35 #ifndef _gp_Pnt_HeaderFile
38 #ifndef _BRepExtrema_SupportType_HeaderFile
39 #include <BRepExtrema_SupportType.hxx>
41 #ifndef _TopoDS_Vertex_HeaderFile
42 #include <TopoDS_Vertex.hxx>
44 #ifndef _TopoDS_Edge_HeaderFile
45 #include <TopoDS_Edge.hxx>
47 #ifndef _TopoDS_Face_HeaderFile
48 #include <TopoDS_Face.hxx>
56 //! This class is used to store information relative to the <br>
57 //! minimum distance between two shapes. <br>
58 class BRepExtrema_SolutionElem
64 Standard_EXPORT BRepExtrema_SolutionElem()
65 : myDist(0.), myPoint(0.,0.,0.), mySupType(BRepExtrema_IsVertex), myPar1(0.), myPar2(0.)
68 //! initialisation of the fields <br>
69 //! This constructor is used when the solution of a distance is a Vertex. <br>
70 //! The different initialized fields are: <br>
71 //! _ the distance d <br>
72 //! _ the solution point <br>
73 //! _ the type of solution <br>
74 //! _ and the Vertex. <br>
75 Standard_EXPORT BRepExtrema_SolutionElem(const Standard_Real d,const gp_Pnt& Pt,const BRepExtrema_SupportType SolType,const TopoDS_Vertex& vertex)
76 : myDist(d), myPoint(Pt), mySupType(SolType), myVertex(vertex), myPar1(0.), myPar2(0.)
79 //! initialisation of the fiels. <br>
80 //! This constructor is used when the solution of distance is on an Edge. <br>
81 //! The different initialized fields are: <br>
82 //! _ the distance d, <br>
83 //! _ the solution point, <br>
84 //! _ the type of solution, <br>
86 //! _ and the parameter t to locate the solution. <br>
87 Standard_EXPORT BRepExtrema_SolutionElem(const Standard_Real d,const gp_Pnt& Pt,const BRepExtrema_SupportType SolType,const TopoDS_Edge& edge,const Standard_Real t)
88 : myDist(d), myPoint(Pt), mySupType(SolType), myEdge(edge), myPar1(t), myPar2(0.)
91 //! initialisation of the fields <br>
92 //! This constructor is used when the solution of distance is in <br>
93 //! a Face. The different initialized fields are: <br>
94 //! _ the distance d, <br>
95 //! _ the solution point, <br>
96 //! _ the type of solution, <br>
98 //! _ and the parameter u et v to locate the solution. <br>
99 Standard_EXPORT BRepExtrema_SolutionElem(const Standard_Real d,const gp_Pnt& Pt,const BRepExtrema_SupportType SolType,const TopoDS_Face& face,const Standard_Real u,const Standard_Real v)
100 : myDist(d), myPoint(Pt), mySupType(SolType), myFace(face), myPar1(u), myPar2(v)
103 //! returns the value of the minimum distance. <br>
104 Standard_EXPORT Standard_Real Dist() const
108 //! returns the solution point. <br>
109 Standard_EXPORT const gp_Pnt & Point() const
113 //! returns the Support type : <br>
114 //! IsVertex => The solution is a vertex. <br>
115 //! IsOnEdge => The solution belongs to an Edge. <br>
116 //! IsInFace => The solution is inside a Face. <br>
117 Standard_EXPORT BRepExtrema_SupportType SupportKind() const
121 //! returns the vertex if the solution is a Vertex. <br>
122 Standard_EXPORT const TopoDS_Vertex & Vertex() const
126 //! returns the vertex if the solution is an Edge. <br>
127 Standard_EXPORT const TopoDS_Edge & Edge() const
131 //! returns the vertex if the solution is an Face. <br>
132 Standard_EXPORT const TopoDS_Face & Face() const
136 //! returns the parameter t if the solution is on Edge. <br>
137 Standard_EXPORT void EdgeParameter(Standard_Real& par1) const
141 //! returns the parameters u et v if the solution is in a Face. <br>
142 Standard_EXPORT void FaceParameter(Standard_Real& par1,Standard_Real& par2) const
150 Standard_Real myDist;
152 BRepExtrema_SupportType mySupType;
153 TopoDS_Vertex myVertex;
156 Standard_Real myPar1;
157 Standard_Real myPar2;