summaryrefslogtreecommitdiff
path: root/inc/BOPTools_Tools2D.hxx
blob: a5c0c588d8164c332d9e3bdc864b64026d3c3fbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _BOPTools_Tools2D_HeaderFile
#define _BOPTools_Tools2D_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Handle_Geom2d_Curve_HeaderFile
#include <Handle_Geom2d_Curve.hxx>
#endif
#ifndef _Handle_Geom_Curve_HeaderFile
#include <Handle_Geom_Curve.hxx>
#endif
class TopoDS_Edge;
class TopoDS_Face;
class gp_Vec;
class Geom2d_Curve;
class Geom_Curve;
class ProjLib_ProjectedCurve;
class gp_Dir;
class TopoDS_Vertex;



//!  The class contains handy static functions <br>
//!  dealing with the topology <br>
class BOPTools_Tools2D  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  
//! Remove P-Curve of the edge <aE> on the face <aF> <br>
  Standard_EXPORT   static  void RemovePCurveForEdgeOnFace(const TopoDS_Edge& aE,const TopoDS_Face& aF) ;
  
//! Compute P-Curve for the edge <aE> on the face <aF> <br>
  Standard_EXPORT   static  void BuildPCurveForEdgeOnFace(const TopoDS_Edge& aE,const TopoDS_Face& aF) ;
  
//! Compute tangent for the edge  <aE> [in 3D]  at parameter <aT> <br>
  Standard_EXPORT   static  Standard_Boolean EdgeTangent(const TopoDS_Edge& anE,const Standard_Real aT,gp_Vec& Tau) ;
  
//! Compute normal for the face <aF> at parameters <U,V> <br>
//! of the corresp. surface. <br>
  Standard_EXPORT   static  void FaceNormal(const TopoDS_Face& aF,const Standard_Real U,const Standard_Real V,gp_Vec& aN) ;
  
//! Compute surface parameters <U,V> of the face <aF> <br>
//! for  the point from the edge <aE> at parameter <aT>. <br>
  Standard_EXPORT   static  void PointOnSurface(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Standard_Real aT,Standard_Real& U,Standard_Real& V) ;
  
//! Get P-Curve <aC>  for the edge <aE> on surface <aF> . <br>
//! If the P-Curve does not exist, build  it using Make2D(). <br>
//! [aToler] - reached tolerance <br>
//! [aTrim3d] - trimming flag. <br>
  Standard_EXPORT   static  void CurveOnSurface(const TopoDS_Edge& aE,const TopoDS_Face& aF,Handle(Geom2d_Curve)& aC,Standard_Real& aToler,const Standard_Boolean aTrim3d) ;
  
//! Get P-Curve <aC>  for the edge <aE> on surface <aF> . <br>
//! If the P-Curve does not exist, build  it using Make2D(). <br>
//! [aFirst, aLast] - range of the P-Curve <br>
//! [aToler] - reached tolerance <br>
//! [aTrim3d] - trimming flag. <br>
  Standard_EXPORT   static  void CurveOnSurface(const TopoDS_Edge& aE,const TopoDS_Face& aF,Handle(Geom2d_Curve)& aC,Standard_Real& aFirst,Standard_Real& aLast,Standard_Real& aToler,const Standard_Boolean aTrim3d) ;
  
//! Returns TRUE if the edge <aE>  has  P-Curve <aC> <br>
//! on surface <aF> . <br>
//! [aFirst, aLast] - range of the P-Curve <br>
//! [aToler] - reached tolerance <br>
//! If the P-Curve does not exist, aC.IsNull()=TRUE. <br>
  Standard_EXPORT   static  Standard_Boolean HasCurveOnSurface(const TopoDS_Edge& aE,const TopoDS_Face& aF,Handle(Geom2d_Curve)& aC,Standard_Real& aFirst,Standard_Real& aLast,Standard_Real& aToler) ;
  
//! Returns TRUE if the edge <aE>  has  P-Curve <aC> <br>
//! on surface <aF> . <br>
//! If the P-Curve does not exist, aC.IsNull()=TRUE. <br>
  Standard_EXPORT   static  Standard_Boolean HasCurveOnSurface(const TopoDS_Edge& aE,const TopoDS_Face& aF) ;
  
//! Same  as   Make2D() <br>
  Standard_EXPORT   static  void MakeCurveOnSurface(const TopoDS_Edge& aE,const TopoDS_Face& aF,Handle(Geom2d_Curve)& aC,Standard_Real& aFirst,Standard_Real& aLast,Standard_Real& aToler,const Standard_Boolean aTrim3d) ;
  
//! Make P-Curve <aC> for the edge <aE> on surface <aF> . <br>
//! [aFirst, aLast] - range of the P-Curve <br>
//! [aToler] - reached tolerance <br>
//! [aTrim3d] - trimming flag. <br>
  Standard_EXPORT   static  void Make2D(const TopoDS_Edge& aE,const TopoDS_Face& aF,Handle(Geom2d_Curve)& aC,Standard_Real& aFirst,Standard_Real& aLast,Standard_Real& aToler,const Standard_Boolean aTrim3d) ;
  
//! Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> . <br>
//! [aToler] - reached tolerance <br>
  Standard_EXPORT   static  void MakePCurveOnFace(const TopoDS_Face& aF,const Handle(Geom_Curve)& C3D,Handle(Geom2d_Curve)& aC,Standard_Real& aToler) ;
  
//! Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> . <br>
//! [aT1,  aT2] - range to build <br>
//! [aToler] - reached tolerance <br>
  Standard_EXPORT   static  void MakePCurveOnFace(const TopoDS_Face& aF,const Handle(Geom_Curve)& C3D,const Standard_Real aT1,const Standard_Real aT2,Handle(Geom2d_Curve)& aC,Standard_Real& aToler) ;
  
//! Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> . <br>
  Standard_EXPORT   static  void AdjustPCurveOnFace(const TopoDS_Face& aF,const Handle(Geom_Curve)& C3D,const Handle(Geom2d_Curve)& aC2D,Handle(Geom2d_Curve)& aC2DA) ;
  
//! Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> . <br>
//! [aT1,  aT2] - range to adjust <br>
  Standard_EXPORT   static  void AdjustPCurveOnFace(const TopoDS_Face& aF,const Standard_Real aT1,const Standard_Real aT2,const Handle(Geom2d_Curve)& aC2D,Handle(Geom2d_Curve)& aC2DA) ;
  
//! Make empty  P-Curve <aC> of relevant to <PC> type <br>
  Standard_EXPORT   static  void MakePCurveOfType(const ProjLib_ProjectedCurve& PC,Handle(Geom2d_Curve)& aC) ;
  
//! Compute tangent for the edge <anE> at parameter <aParm> <br>
  Standard_EXPORT   static  Standard_Boolean TangentOnEdge(const Standard_Real aParm,const TopoDS_Edge& anE,gp_Vec& aTang) ;
  
//! Compute tangent for the edge <anE> at arbitrary intermediate parameter. <br>
  Standard_EXPORT   static  Standard_Boolean TangentOnEdge(const TopoDS_Edge& anE,gp_Dir& aDTang) ;
  
//! Compute tangent for the vertex point <aVF> for the edge <anE>. <br>
//! <aVL> is opposite vertex of the edge <br>
  Standard_EXPORT   static  Standard_Boolean TangentOnVertex(const TopoDS_Vertex& aVF,const TopoDS_Vertex& aVL,const TopoDS_Edge& anE,gp_Vec& aTang) ;
  
//! Returns parametric range for the edge <anE>. <br>
  Standard_EXPORT   static  void EdgeBounds(const TopoDS_Edge& anE,Standard_Real& aFirst,Standard_Real& aLast) ;
  
//! Compute intermediate  value in  between [aFirst, aLast] . <br>
  Standard_EXPORT   static  Standard_Real IntermediatePoint(const Standard_Real aFirst,const Standard_Real aLast) ;
  
//! Compute intermediate value of parameter for the edge <anE>. <br>
  Standard_EXPORT   static  Standard_Real IntermediatePoint(const TopoDS_Edge& anE) ;





protected:





private:





};





// other Inline functions and methods (like "C++: function call" methods)


#endif