Open CASCADE Technology  7.3.1.dev
Static Public Member Functions
BOPTools_AlgoTools3D Class Reference

The class contains handy static functions dealing with the topology This is the copy of BOPTools_AlgoTools3D.cdl file. More...

#include <BOPTools_AlgoTools3D.hxx>

Static Public Member Functions

static void DoSplitSEAMOnFace (const TopoDS_Edge &aSp, const TopoDS_Face &aF)
 Make the edge <aSp> seam edge for the face <aF> More...
 
static void GetNormalToFaceOnEdge (const TopoDS_Edge &aE, const TopoDS_Face &aF, const Standard_Real aT, gp_Dir &aD, const Handle< IntTools_Context > &theContext=Handle< IntTools_Context >())
 Computes normal to the face <aF> for the point on the edge <aE> at parameter <aT>.
<theContext> - storage for caching the geometrical tools. More...
 
static void GetNormalToFaceOnEdge (const TopoDS_Edge &aE, const TopoDS_Face &aF, gp_Dir &aD, const Handle< IntTools_Context > &theContext=Handle< IntTools_Context >())
 Computes normal to the face <aF> for the point on the edge <aE> at arbitrary intermediate parameter.
<theContext> - storage for caching the geometrical tools. More...
 
static Standard_Integer SenseFlag (const gp_Dir &aNF1, const gp_Dir &aNF2)
 Returns 1 if scalar product aNF1* aNF2>0.
Returns 0 if directions aNF1 aNF2 coincide
Returns -1 if scalar product aNF1* aNF2<0. More...
 
static Standard_Boolean GetNormalToSurface (const Handle< Geom_Surface > &aS, const Standard_Real U, const Standard_Real V, gp_Dir &aD)
 Compute normal <aD> to surface <aS> in point (U,V) Returns TRUE if directions aD1U, aD1V coincide. More...
 
static Standard_Boolean GetApproxNormalToFaceOnEdge (const TopoDS_Edge &aE, const TopoDS_Face &aF, const Standard_Real aT, gp_Pnt &aPx, gp_Dir &aD, const Handle< IntTools_Context > &theContext)
 Computes normal to the face <aF> for the 3D-point that belongs to the edge <aE> at parameter <aT>.
Output:
aPx - the 3D-point where the normal computed
aD - the normal;
Warning:
The normal is computed not exactly in the point on the edge, but in point that is near to the edge towards to the face material (so, we'll have approx. normal);
The point is computed using PointNearEdge function, with the shifting value BOPTools_AlgoTools3D::MinStepIn2d(), from the edge, but if this value is too big, the point will be computed using Hatcher (PointInFace function).
Returns TRUE in case of success. More...
 
static Standard_Boolean GetApproxNormalToFaceOnEdge (const TopoDS_Edge &theE, const TopoDS_Face &theF, const Standard_Real aT, gp_Pnt &aP, gp_Dir &aDNF, const Standard_Real aDt2D)
 Computes normal to the face <aF> for the 3D-point that belongs to the edge <aE> at parameter <aT>.
Output:
aPx - the 3D-point where the normal computed
aD - the normal;
Warning:
The normal is computed not exactly in the point on the edge, but in point that is near to the edge towards to the face material (so, we'll have approx. normal);
The point is computed using PointNearEdge function with the shifting value <aDt2D> from the edge;
No checks on this value will be done.
Returns TRUE in case of success. More...
 
static Standard_Boolean GetApproxNormalToFaceOnEdge (const TopoDS_Edge &theE, const TopoDS_Face &theF, const Standard_Real aT, const Standard_Real aDt2D, gp_Pnt &aP, gp_Dir &aDNF, const Handle< IntTools_Context > &theContext)
 Computes normal to the face <aF> for the 3D-point that belongs to the edge <aE> at parameter <aT>.
Output:
aPx - the 3D-point where the normal computed
aD - the normal;
Warning:
The normal is computed not exactly in the point on the edge, but in point that is near to the edge towards to the face material (so, we'll have approx. normal);
The point is computed using PointNearEdge function with the shifting value <aDt2D> from the edge, but if this value is too big the point will be computed using Hatcher (PointInFace function).
Returns TRUE in case of success. More...
 
static Standard_Integer PointNearEdge (const TopoDS_Edge &aE, const TopoDS_Face &aF, const Standard_Real aT, const Standard_Real aDt2D, gp_Pnt2d &aP2D, gp_Pnt &aPx, const Handle< IntTools_Context > &theContext)
 Compute the point <aPx>, (<aP2D>) that is near to the edge <aE> at parameter <aT> towards to the material of the face <aF>. The value of shifting in 2D is <aDt2D>
If the value of shifting is too big the point will be computed using Hatcher (PointInFace function).
Returns error status:
0 - in case of success;
1 - <aE> does not have 2d curve on the face <aF>;
2 - the computed point is out of the face. More...
 
static Standard_Integer PointNearEdge (const TopoDS_Edge &aE, const TopoDS_Face &aF, const Standard_Real aT, const Standard_Real aDt2D, gp_Pnt2d &aP2D, gp_Pnt &aPx)
 Compute the point <aPx>, (<aP2D>) that is near to the edge <aE> at parameter <aT> towards to the material of the face <aF>. The value of shifting in 2D is <aDt2D>. No checks on this value will be done.
Returns error status:
0 - in case of success;
1 - <aE> does not have 2d curve on the face <aF>. More...
 
static Standard_Integer PointNearEdge (const TopoDS_Edge &aE, const TopoDS_Face &aF, const Standard_Real aT, gp_Pnt2d &aP2D, gp_Pnt &aPx, const Handle< IntTools_Context > &theContext)
 Computes the point <aPx>, (<aP2D>) that is near to the edge <aE> at parameter <aT> towards to the material of the face <aF>. The value of shifting in 2D is dt2D=BOPTools_AlgoTools3D::MinStepIn2d()
If the value of shifting is too big the point will be computed using Hatcher (PointInFace function).
Returns error status:
0 - in case of success;
1 - <aE> does not have 2d curve on the face <aF>;
2 - the computed point is out of the face. More...
 
static Standard_Integer PointNearEdge (const TopoDS_Edge &aE, const TopoDS_Face &aF, gp_Pnt2d &aP2D, gp_Pnt &aPx, const Handle< IntTools_Context > &theContext)
 Compute the point <aPx>, (<aP2D>) that is near to the edge <aE> at arbitrary parameter towards to the material of the face <aF>. The value of shifting in 2D is dt2D=BOPTools_AlgoTools3D::MinStepIn2d().
If the value of shifting is too big the point will be computed using Hatcher (PointInFace function).
Returns error status:
0 - in case of success;
1 - <aE> does not have 2d curve on the face <aF>;
2 - the computed point is out of the face. More...
 
static Standard_Real MinStepIn2d ()
 Returns simple step value that is used in 2D-computations = 1.e-5. More...
 
static Standard_Boolean IsEmptyShape (const TopoDS_Shape &aS)
 Returns TRUE if the shape <aS> does not contain geometry information (e.g. empty compound) More...
 
static void OrientEdgeOnFace (const TopoDS_Edge &aE, const TopoDS_Face &aF, TopoDS_Edge &aER)
 Get the edge <aER> from the face <aF> that is the same as the edge <aE> More...
 
static Standard_Integer PointInFace (const TopoDS_Face &theF, gp_Pnt &theP, gp_Pnt2d &theP2D, const Handle< IntTools_Context > &theContext)
 Computes arbitrary point <theP> inside the face <theF>.
<theP2D> - 2D representation of <theP> on the surface of <theF>
Returns 0 in case of success. More...
 
static Standard_Integer PointInFace (const TopoDS_Face &theF, const TopoDS_Edge &theE, const Standard_Real theT, const Standard_Real theDt2D, gp_Pnt &theP, gp_Pnt2d &theP2D, const Handle< IntTools_Context > &theContext)
 Computes a point <theP> inside the face <theF> using starting point taken by the parameter <theT> from the 2d curve of the edge <theE> on the face <theF> in the direction perpendicular to the tangent vector of the 2d curve of the edge.
The point will be distanced on <theDt2D> from the 2d curve. <theP2D> - 2D representation of <theP> on the surface of <theF>
Returns 0 in case of success. More...
 
static Standard_Integer PointInFace (const TopoDS_Face &theF, const Handle< Geom2d_Curve > &theL, gp_Pnt &theP, gp_Pnt2d &theP2D, const Handle< IntTools_Context > &theContext, const Standard_Real theDt2D=0.0)
 Computes a point <theP> inside the face <theF> using the line <theL> so that 2D point <theP2D>, 2D representation of <theP> on the surface of <theF>, lies on that line.
Returns 0 in case of success. More...
 

Detailed Description

The class contains handy static functions dealing with the topology This is the copy of BOPTools_AlgoTools3D.cdl file.

Member Function Documentation

◆ DoSplitSEAMOnFace()

static void BOPTools_AlgoTools3D::DoSplitSEAMOnFace ( const TopoDS_Edge aSp,
const TopoDS_Face aF 
)
static

Make the edge <aSp> seam edge for the face <aF>

◆ GetApproxNormalToFaceOnEdge() [1/3]

static Standard_Boolean BOPTools_AlgoTools3D::GetApproxNormalToFaceOnEdge ( const TopoDS_Edge aE,
const TopoDS_Face aF,
const Standard_Real  aT,
gp_Pnt aPx,
gp_Dir aD,
const Handle< IntTools_Context > &  theContext 
)
static

Computes normal to the face <aF> for the 3D-point that belongs to the edge <aE> at parameter <aT>.
Output:
aPx - the 3D-point where the normal computed
aD - the normal;
Warning:
The normal is computed not exactly in the point on the edge, but in point that is near to the edge towards to the face material (so, we'll have approx. normal);
The point is computed using PointNearEdge function, with the shifting value BOPTools_AlgoTools3D::MinStepIn2d(), from the edge, but if this value is too big, the point will be computed using Hatcher (PointInFace function).
Returns TRUE in case of success.

◆ GetApproxNormalToFaceOnEdge() [2/3]

static Standard_Boolean BOPTools_AlgoTools3D::GetApproxNormalToFaceOnEdge ( const TopoDS_Edge theE,
const TopoDS_Face theF,
const Standard_Real  aT,
gp_Pnt aP,
gp_Dir aDNF,
const Standard_Real  aDt2D 
)
static

Computes normal to the face <aF> for the 3D-point that belongs to the edge <aE> at parameter <aT>.
Output:
aPx - the 3D-point where the normal computed
aD - the normal;
Warning:
The normal is computed not exactly in the point on the edge, but in point that is near to the edge towards to the face material (so, we'll have approx. normal);
The point is computed using PointNearEdge function with the shifting value <aDt2D> from the edge;
No checks on this value will be done.
Returns TRUE in case of success.

◆ GetApproxNormalToFaceOnEdge() [3/3]

static Standard_Boolean BOPTools_AlgoTools3D::GetApproxNormalToFaceOnEdge ( const TopoDS_Edge theE,
const TopoDS_Face theF,
const Standard_Real  aT,
const Standard_Real  aDt2D,
gp_Pnt aP,
gp_Dir aDNF,
const Handle< IntTools_Context > &  theContext 
)
static

Computes normal to the face <aF> for the 3D-point that belongs to the edge <aE> at parameter <aT>.
Output:
aPx - the 3D-point where the normal computed
aD - the normal;
Warning:
The normal is computed not exactly in the point on the edge, but in point that is near to the edge towards to the face material (so, we'll have approx. normal);
The point is computed using PointNearEdge function with the shifting value <aDt2D> from the edge, but if this value is too big the point will be computed using Hatcher (PointInFace function).
Returns TRUE in case of success.

◆ GetNormalToFaceOnEdge() [1/2]

static void BOPTools_AlgoTools3D::GetNormalToFaceOnEdge ( const TopoDS_Edge aE,
const TopoDS_Face aF,
const Standard_Real  aT,
gp_Dir aD,
const Handle< IntTools_Context > &  theContext = HandleIntTools_Context >() 
)
static

Computes normal to the face <aF> for the point on the edge <aE> at parameter <aT>.
<theContext> - storage for caching the geometrical tools.

◆ GetNormalToFaceOnEdge() [2/2]

static void BOPTools_AlgoTools3D::GetNormalToFaceOnEdge ( const TopoDS_Edge aE,
const TopoDS_Face aF,
gp_Dir aD,
const Handle< IntTools_Context > &  theContext = HandleIntTools_Context >() 
)
static

Computes normal to the face <aF> for the point on the edge <aE> at arbitrary intermediate parameter.
<theContext> - storage for caching the geometrical tools.

◆ GetNormalToSurface()

static Standard_Boolean BOPTools_AlgoTools3D::GetNormalToSurface ( const Handle< Geom_Surface > &  aS,
const Standard_Real  U,
const Standard_Real  V,
gp_Dir aD 
)
static

Compute normal <aD> to surface <aS> in point (U,V) Returns TRUE if directions aD1U, aD1V coincide.

◆ IsEmptyShape()

static Standard_Boolean BOPTools_AlgoTools3D::IsEmptyShape ( const TopoDS_Shape aS)
static

Returns TRUE if the shape <aS> does not contain geometry information (e.g. empty compound)

◆ MinStepIn2d()

static Standard_Real BOPTools_AlgoTools3D::MinStepIn2d ( )
static

Returns simple step value that is used in 2D-computations = 1.e-5.

◆ OrientEdgeOnFace()

static void BOPTools_AlgoTools3D::OrientEdgeOnFace ( const TopoDS_Edge aE,
const TopoDS_Face aF,
TopoDS_Edge aER 
)
static

Get the edge <aER> from the face <aF> that is the same as the edge <aE>

◆ PointInFace() [1/3]

static Standard_Integer BOPTools_AlgoTools3D::PointInFace ( const TopoDS_Face theF,
gp_Pnt theP,
gp_Pnt2d theP2D,
const Handle< IntTools_Context > &  theContext 
)
static

Computes arbitrary point <theP> inside the face <theF>.
<theP2D> - 2D representation of <theP> on the surface of <theF>
Returns 0 in case of success.

◆ PointInFace() [2/3]

static Standard_Integer BOPTools_AlgoTools3D::PointInFace ( const TopoDS_Face theF,
const TopoDS_Edge theE,
const Standard_Real  theT,
const Standard_Real  theDt2D,
gp_Pnt theP,
gp_Pnt2d theP2D,
const Handle< IntTools_Context > &  theContext 
)
static

Computes a point <theP> inside the face <theF> using starting point taken by the parameter <theT> from the 2d curve of the edge <theE> on the face <theF> in the direction perpendicular to the tangent vector of the 2d curve of the edge.
The point will be distanced on <theDt2D> from the 2d curve. <theP2D> - 2D representation of <theP> on the surface of <theF>
Returns 0 in case of success.

◆ PointInFace() [3/3]

static Standard_Integer BOPTools_AlgoTools3D::PointInFace ( const TopoDS_Face theF,
const Handle< Geom2d_Curve > &  theL,
gp_Pnt theP,
gp_Pnt2d theP2D,
const Handle< IntTools_Context > &  theContext,
const Standard_Real  theDt2D = 0.0 
)
static

Computes a point <theP> inside the face <theF> using the line <theL> so that 2D point <theP2D>, 2D representation of <theP> on the surface of <theF>, lies on that line.
Returns 0 in case of success.

◆ PointNearEdge() [1/4]

static Standard_Integer BOPTools_AlgoTools3D::PointNearEdge ( const TopoDS_Edge aE,
const TopoDS_Face aF,
const Standard_Real  aT,
const Standard_Real  aDt2D,
gp_Pnt2d aP2D,
gp_Pnt aPx,
const Handle< IntTools_Context > &  theContext 
)
static

Compute the point <aPx>, (<aP2D>) that is near to the edge <aE> at parameter <aT> towards to the material of the face <aF>. The value of shifting in 2D is <aDt2D>
If the value of shifting is too big the point will be computed using Hatcher (PointInFace function).
Returns error status:
0 - in case of success;
1 - <aE> does not have 2d curve on the face <aF>;
2 - the computed point is out of the face.

◆ PointNearEdge() [2/4]

static Standard_Integer BOPTools_AlgoTools3D::PointNearEdge ( const TopoDS_Edge aE,
const TopoDS_Face aF,
const Standard_Real  aT,
const Standard_Real  aDt2D,
gp_Pnt2d aP2D,
gp_Pnt aPx 
)
static

Compute the point <aPx>, (<aP2D>) that is near to the edge <aE> at parameter <aT> towards to the material of the face <aF>. The value of shifting in 2D is <aDt2D>. No checks on this value will be done.
Returns error status:
0 - in case of success;
1 - <aE> does not have 2d curve on the face <aF>.

◆ PointNearEdge() [3/4]

static Standard_Integer BOPTools_AlgoTools3D::PointNearEdge ( const TopoDS_Edge aE,
const TopoDS_Face aF,
const Standard_Real  aT,
gp_Pnt2d aP2D,
gp_Pnt aPx,
const Handle< IntTools_Context > &  theContext 
)
static

Computes the point <aPx>, (<aP2D>) that is near to the edge <aE> at parameter <aT> towards to the material of the face <aF>. The value of shifting in 2D is dt2D=BOPTools_AlgoTools3D::MinStepIn2d()
If the value of shifting is too big the point will be computed using Hatcher (PointInFace function).
Returns error status:
0 - in case of success;
1 - <aE> does not have 2d curve on the face <aF>;
2 - the computed point is out of the face.

◆ PointNearEdge() [4/4]

static Standard_Integer BOPTools_AlgoTools3D::PointNearEdge ( const TopoDS_Edge aE,
const TopoDS_Face aF,
gp_Pnt2d aP2D,
gp_Pnt aPx,
const Handle< IntTools_Context > &  theContext 
)
static

Compute the point <aPx>, (<aP2D>) that is near to the edge <aE> at arbitrary parameter towards to the material of the face <aF>. The value of shifting in 2D is dt2D=BOPTools_AlgoTools3D::MinStepIn2d().
If the value of shifting is too big the point will be computed using Hatcher (PointInFace function).
Returns error status:
0 - in case of success;
1 - <aE> does not have 2d curve on the face <aF>;
2 - the computed point is out of the face.

◆ SenseFlag()

static Standard_Integer BOPTools_AlgoTools3D::SenseFlag ( const gp_Dir aNF1,
const gp_Dir aNF2 
)
static

Returns 1 if scalar product aNF1* aNF2>0.
Returns 0 if directions aNF1 aNF2 coincide
Returns -1 if scalar product aNF1* aNF2<0.


The documentation for this class was generated from the following file: