Open CASCADE Technology 7.8.0
BOPTools_AlgoTools Class Reference

Provides tools used in Boolean Operations algorithm: More...

#include <BOPTools_AlgoTools.hxx>

Static Public Member Functions

Constants
static Standard_Real DTolerance ()
 Additional tolerance (delta tolerance) is used in Boolean Operations to ensure that the tolerance of new/old entities obtained by intersection of two shapes is slightly bigger than the actual distances to these shapes. It helps to avoid numerical instability which may occur when comparing distances and tolerances.
 
Intersection of the vertices
static Standard_Integer ComputeVV (const TopoDS_Vertex &theV, const gp_Pnt &theP, const Standard_Real theTolP)
 Intersects the vertex <theV1> with the point <theP> with tolerance <theTolP>. Returns the error status:
 
static Standard_Integer ComputeVV (const TopoDS_Vertex &theV1, const TopoDS_Vertex &theV2, const Standard_Real theFuzz=Precision::Confusion())
 Intersects the given vertices with given fuzzy value. Returns the error status:
 
Vertices construction
static void MakeVertex (const TopTools_ListOfShape &theLV, TopoDS_Vertex &theV)
 Makes the vertex in the middle of given vertices with the tolerance covering all tolerance spheres of vertices.
 
static void MakeNewVertex (const gp_Pnt &aP1, const Standard_Real aTol, TopoDS_Vertex &aNewVertex)
 Make a vertex using 3D-point <aP1> and 3D-tolerance value <aTol>
 
static void MakeNewVertex (const TopoDS_Vertex &aV1, const TopoDS_Vertex &aV2, TopoDS_Vertex &aNewVertex)
 Make a vertex using couple of vertices <aV1, aV2>
 
static void MakeNewVertex (const TopoDS_Edge &aE1, const Standard_Real aP1, const TopoDS_Edge &aE2, const Standard_Real aP2, TopoDS_Vertex &aNewVertex)
 Make a vertex in place of intersection between two edges <aE1, aE2> with parameters <aP1, aP2>
 
static void MakeNewVertex (const TopoDS_Edge &aE1, const Standard_Real aP1, const TopoDS_Face &aF2, TopoDS_Vertex &aNewVertex)
 Make a vertex in place of intersection between the edge <aE1> with parameter <aP1> and the face <aF2>
 
Updating the vertex
static void UpdateVertex (const IntTools_Curve &aIC, const Standard_Real aT, const TopoDS_Vertex &aV)
 Update the tolerance value for vertex <aV> taking into account the fact that <aV> lays on the curve <aIC>
 
static void UpdateVertex (const TopoDS_Edge &aE, const Standard_Real aT, const TopoDS_Vertex &aV)
 Update the tolerance value for vertex <aV> taking into account the fact that <aV> lays on the edge <aE>
 
static void UpdateVertex (const TopoDS_Vertex &aVF, const TopoDS_Vertex &aVN)
 Update the tolerance value for vertex <aVN> taking into account the fact that <aVN> should cover tolerance zone of <aVF>
 
Edge construction
static void MakeEdge (const IntTools_Curve &theCurve, const TopoDS_Vertex &theV1, const Standard_Real theT1, const TopoDS_Vertex &theV2, const Standard_Real theT2, const Standard_Real theTolR3D, TopoDS_Edge &theE)
 Makes the edge based on the given curve with given bounding vertices.
 
static TopoDS_Edge CopyEdge (const TopoDS_Edge &theEdge)
 Makes a copy of <theEdge> with vertices.
 
static void MakeSplitEdge (const TopoDS_Edge &aE1, const TopoDS_Vertex &aV1, const Standard_Real aP1, const TopoDS_Vertex &aV2, const Standard_Real aP2, TopoDS_Edge &aNewEdge)
 Make the edge from base edge <aE1> and two vertices <aV1,aV2> at parameters <aP1,aP2>
 
static void MakeSectEdge (const IntTools_Curve &aIC, const TopoDS_Vertex &aV1, const Standard_Real aP1, const TopoDS_Vertex &aV2, const Standard_Real aP2, TopoDS_Edge &aNewEdge)
 Make the edge from 3D-Curve <aIC> and two vertices <aV1,aV2> at parameters <aP1,aP2>
 
Point/Edge/Face classification relatively solid
static TopAbs_State ComputeState (const gp_Pnt &thePoint, const TopoDS_Solid &theSolid, const Standard_Real theTol, const Handle< IntTools_Context > &theContext)
 Computes the 3-D state of the point thePoint toward solid theSolid. theTol - value of precision of computation theContext- cahed geometrical tools Returns 3-D state.
 
static TopAbs_State ComputeState (const TopoDS_Vertex &theVertex, const TopoDS_Solid &theSolid, const Standard_Real theTol, const Handle< IntTools_Context > &theContext)
 Computes the 3-D state of the vertex theVertex toward solid theSolid. theTol - value of precision of computation theContext- cahed geometrical tools Returns 3-D state.
 
static TopAbs_State ComputeState (const TopoDS_Edge &theEdge, const TopoDS_Solid &theSolid, const Standard_Real theTol, const Handle< IntTools_Context > &theContext)
 Computes the 3-D state of the edge theEdge toward solid theSolid. theTol - value of precision of computation theContext- cahed geometrical tools Returns 3-D state.
 
static TopAbs_State ComputeState (const TopoDS_Face &theFace, const TopoDS_Solid &theSolid, const Standard_Real theTol, const TopTools_IndexedMapOfShape &theBounds, const Handle< IntTools_Context > &theContext)
 Computes the 3-D state of the face theFace toward solid theSolid. theTol - value of precision of computation theBounds - set of edges of <theSolid> to avoid theContext- cahed geometrical tools Returns 3-D state.
 
static TopAbs_State ComputeStateByOnePoint (const TopoDS_Shape &theShape, const TopoDS_Solid &theSolid, const Standard_Real theTol, const Handle< IntTools_Context > &theContext)
 Computes the 3-D state of the shape theShape toward solid theSolid. theTol - value of precision of computation theContext- cahed geometrical tools Returns 3-D state.
 
Face classification relatively solid
static Standard_Boolean GetFaceOff (const TopoDS_Edge &theEdge, const TopoDS_Face &theFace, BOPTools_ListOfCoupleOfShape &theLCEF, TopoDS_Face &theFaceOff, const Handle< IntTools_Context > &theContext)
 For the face theFace and its edge theEdge finds the face suitable to produce shell. theLCEF - set of faces to search. All faces from theLCEF must share edge theEdge.
 
static Standard_Integer IsInternalFace (const TopoDS_Face &theFace, const TopoDS_Edge &theEdge, const TopoDS_Face &theFace1, const TopoDS_Face &theFace2, const Handle< IntTools_Context > &theContext)
 Returns True if the face theFace is inside of the couple of faces theFace1, theFace2. The faces theFace, theFace1, theFace2 must share the edge theEdge Return values:
 
static Standard_Integer IsInternalFace (const TopoDS_Face &theFace, const TopoDS_Edge &theEdge, TopTools_ListOfShape &theLF, const Handle< IntTools_Context > &theContext)
 Returns True if the face theFace is inside of the appropriate couple of faces (from the set theLF) . The faces of the set theLF and theFace must share the edge theEdge.
 
static Standard_Boolean IsInternalFace (const TopoDS_Face &theFace, const TopoDS_Solid &theSolid, TopTools_IndexedDataMapOfShapeListOfShape &theMEF, const Standard_Real theTol, const Handle< IntTools_Context > &theContext)
 Returns True if the face theFace is inside the solid theSolid. theMEF - Map Edge/Faces for theSolid theTol - value of precision of computation theContext- cahed geometrical tools.
 
PCurve construction
static void MakePCurve (const TopoDS_Edge &theE, const TopoDS_Face &theF1, const TopoDS_Face &theF2, const IntTools_Curve &theCurve, const Standard_Boolean thePC1, const Standard_Boolean thePC2, const Handle< IntTools_Context > &theContext=Handle< IntTools_Context >())
 Makes 2d curve of the edge <theE> on the faces <theF1> and <theF2>.
<theContext> - storage for caching the geometrical tools.
 
Wire classification relatively face
static Standard_Boolean IsHole (const TopoDS_Shape &theW, const TopoDS_Shape &theF)
 Checks if the wire is a hole for the face.
 
Choosing correct orientation for the split shape
static Standard_Boolean IsSplitToReverse (const TopoDS_Shape &theSplit, const TopoDS_Shape &theShape, const Handle< IntTools_Context > &theContext, Standard_Integer *theError=NULL)
 Checks if the direction of the split shape is opposite to the direction of the original shape. The method is an overload for (Edge,Edge) and (Face,Face) corresponding methods and checks only these types of shapes. For faces the method checks if normal directions are opposite. For edges the method checks if tangent vectors are opposite.
 
static Standard_Boolean IsSplitToReverseWithWarn (const TopoDS_Shape &theSplit, const TopoDS_Shape &theShape, const Handle< IntTools_Context > &theContext, const Handle< Message_Report > &theReport=NULL)
 Add-on for the IsSplitToReverse() to check for its errors and in case of any add the BOPAlgo_AlertUnableToOrientTheShape warning to the report.
 
static Standard_Boolean IsSplitToReverse (const TopoDS_Face &theSplit, const TopoDS_Face &theShape, const Handle< IntTools_Context > &theContext, Standard_Integer *theError=NULL)
 Checks if the normal direction of the split face is opposite to the normal direction of the original face. The normal directions for both faces are taken in the same point - point inside the split face is projected onto the original face. Returns TRUE if the normals do not coincide, meaning the necessity to revert the orientation of the split face to match the direction of the original face.
 
static Standard_Boolean IsSplitToReverse (const TopoDS_Edge &theSplit, const TopoDS_Edge &theShape, const Handle< IntTools_Context > &theContext, Standard_Integer *theError=NULL)
 Checks if the tangent vector of the split edge is opposite to the tangent vector of the original edge. The tangent vectors for both edges are computed in the same point - point inside the split edge is projected onto the original edge. Returns TRUE if the tangent vectors do not coincide, meaning the necessity to revert the orientation of the split edge to match the direction of the original edge.
 
static Standard_Integer Sense (const TopoDS_Face &theF1, const TopoDS_Face &theF2, const Handle< IntTools_Context > &theContext)
 Checks if the normals direction of the given faces computed near the shared edge coincide. Returns the status of operation:
 
Making connexity blocks
static void MakeConnexityBlock (TopTools_ListOfShape &theLS, TopTools_IndexedMapOfShape &theMapAvoid, TopTools_ListOfShape &theLSCB, const Handle< NCollection_BaseAllocator > &theAllocator)
 For the list of faces theLS build block theLSCB in terms of connexity by edges theMapAvoid - set of edges to avoid for the treatment.
 
static void MakeConnexityBlocks (const TopoDS_Shape &theS, const TopAbs_ShapeEnum theConnectionType, const TopAbs_ShapeEnum theElementType, TopTools_ListOfShape &theLCB)
 For the compound <theS> builds the blocks (compounds) of elements of type <theElementType> connected through the shapes of the type <theConnectionType>. The blocks are stored into the list <theLCB>.
 
static void MakeConnexityBlocks (const TopoDS_Shape &theS, const TopAbs_ShapeEnum theConnectionType, const TopAbs_ShapeEnum theElementType, TopTools_ListOfListOfShape &theLCB, TopTools_IndexedDataMapOfShapeListOfShape &theConnectionMap)
 For the compound <theS> builds the blocks (compounds) of elements of type <theElementType> connected through the shapes of the type <theConnectionType>. The blocks are stored into the list of lists <theLCB>. Returns also the connection map <theConnectionMap>, filled during operation.
 
static void MakeConnexityBlocks (const TopTools_ListOfShape &theLS, const TopAbs_ShapeEnum theConnectionType, const TopAbs_ShapeEnum theElementType, BOPTools_ListOfConnexityBlock &theLCB)
 Makes connexity blocks of elements of the given type with the given type of the connecting elements. The blocks are checked on regularity (multi-connectivity) and stored to the list of blocks <theLCB>.
 
Orienting elements in container
static void OrientEdgesOnWire (TopoDS_Shape &theWire)
 Correctly orients edges on the wire.
 
static void OrientFacesOnShell (TopoDS_Shape &theShell)
 Correctly orients faces on the shell.
 
Methods for shape validation (correction)
static void CorrectTolerances (const TopoDS_Shape &theS, const TopTools_IndexedMapOfShape &theMapToAvoid, const Standard_Real theTolMax=0.0001, const Standard_Boolean theRunParallel=Standard_False)
 Provides valid values of tolerances for the shape <theS> <theTolMax> is max value of the tolerance that can be accepted for correction. If real value of the tolerance will be greater than <aTolMax>, the correction does not perform.
 
static void CorrectCurveOnSurface (const TopoDS_Shape &theS, const TopTools_IndexedMapOfShape &theMapToAvoid, const Standard_Real theTolMax=0.0001, const Standard_Boolean theRunParallel=Standard_False)
 Provides valid values of tolerances for the shape <theS> in terms of BRepCheck_InvalidCurveOnSurface.
 
static void CorrectPointOnCurve (const TopoDS_Shape &theS, const TopTools_IndexedMapOfShape &theMapToAvoid, const Standard_Real theTolMax=0.0001, const Standard_Boolean theRunParallel=Standard_False)
 Provides valid values of tolerances for the shape <theS> in terms of BRepCheck_InvalidPointOnCurve.
 
static void CorrectShapeTolerances (const TopoDS_Shape &theS, const TopTools_IndexedMapOfShape &theMapToAvoid, const Standard_Boolean theRunParallel=Standard_False)
 Corrects tolerance values of the sub-shapes of the shape <theS> if needed.
 
static Standard_Boolean AreFacesSameDomain (const TopoDS_Face &theF1, const TopoDS_Face &theF2, const Handle< IntTools_Context > &theContext, const Standard_Real theFuzz=Precision::Confusion())
 Checking if the faces are coinciding.
 
Looking for the edge in the face
static Standard_Boolean GetEdgeOff (const TopoDS_Edge &theEdge, const TopoDS_Face &theFace, TopoDS_Edge &theEdgeOff)
 Returns True if the face theFace contains the edge theEdge but with opposite orientation. If the method returns True theEdgeOff is the edge founded.
 
static Standard_Boolean GetEdgeOnFace (const TopoDS_Edge &theEdge, const TopoDS_Face &theFace, TopoDS_Edge &theEdgeOnF)
 For the face theFace gets the edge theEdgeOnF that is the same as theEdge Returns True if such edge exists Returns False if there is no such edge.
 
Correction of the edges range
static void CorrectRange (const TopoDS_Edge &aE1, const TopoDS_Edge &aE2, const IntTools_Range &aSR, IntTools_Range &aNewSR)
 Correct shrunk range <aSR> taking into account 3D-curve resolution and corresponding tolerance values of <aE1>, <aE2>
 
static void CorrectRange (const TopoDS_Edge &aE, const TopoDS_Face &aF, const IntTools_Range &aSR, IntTools_Range &aNewSR)
 Correct shrunk range <aSR> taking into account 3D-curve resolution and corresponding tolerance values of <aE>, <aF>
 
Checking edge on micro status
static Standard_Boolean IsMicroEdge (const TopoDS_Edge &theEdge, const Handle< IntTools_Context > &theContext, const Standard_Boolean theCheckSplittable=Standard_True)
 Checks if it is possible to compute shrunk range for the edge <aE> Flag <theCheckSplittable> defines whether to take into account the possibility to split the edge or not.
 
Solid classification
static Standard_Boolean IsInvertedSolid (const TopoDS_Solid &theSolid)
 Returns true if the solid <theSolid> is inverted.
 
Edge/Face Deviation computation
static Standard_Boolean ComputeTolerance (const TopoDS_Face &theFace, const TopoDS_Edge &theEdge, Standard_Real &theMaxDist, Standard_Real &theMaxPar)
 Computes the necessary value of the tolerance for the edge.
 
Other methods
static void MakeContainer (const TopAbs_ShapeEnum theType, TopoDS_Shape &theShape)
 Makes empty container of requested type.
 
static void PointOnEdge (const TopoDS_Edge &aEdge, const Standard_Real aPrm, gp_Pnt &aP)
 Compute a 3D-point on the edge <aEdge> at parameter <aPrm>
 
static Standard_Boolean IsBlockInOnFace (const IntTools_Range &aShR, const TopoDS_Face &aF, const TopoDS_Edge &aE, const Handle< IntTools_Context > &aContext)
 Returns TRUE if PaveBlock <aPB> lays on the face <aF>, i.e the <PB> is IN or ON in 2D of <aF>
 
static void Dimensions (const TopoDS_Shape &theS, Standard_Integer &theDMin, Standard_Integer &theDMax)
 Returns the min and max dimensions of the shape <theS>.
 
static Standard_Integer Dimension (const TopoDS_Shape &theS)
 Returns dimension of the shape <theS>. If the shape contains elements of different dimension, -1 is returned.
 
static void TreatCompound (const TopoDS_Shape &theS, TopTools_ListOfShape &theList, TopTools_MapOfShape *theMap=NULL)
 Collects in the output list recursively all non-compound sub-shapes of the first level of the given shape theS. The optional map theMap is used to avoid the duplicates in the output list, so it will also contain all non-compound sub-shapes.
 
static Standard_Boolean IsOpenShell (const TopoDS_Shell &theShell)
 Returns true if the shell <theShell> is open.
 

Detailed Description

Provides tools used in Boolean Operations algorithm:

Member Function Documentation

◆ AreFacesSameDomain()

static Standard_Boolean BOPTools_AlgoTools::AreFacesSameDomain ( const TopoDS_Face theF1,
const TopoDS_Face theF2,
const Handle< IntTools_Context > &  theContext,
const Standard_Real  theFuzz = Precision::Confusion() 
)
static

Checking if the faces are coinciding.

Checks if the given faces are same-domain, i.e. coincide.

◆ ComputeState() [1/4]

static TopAbs_State BOPTools_AlgoTools::ComputeState ( const gp_Pnt thePoint,
const TopoDS_Solid theSolid,
const Standard_Real  theTol,
const Handle< IntTools_Context > &  theContext 
)
static

Computes the 3-D state of the point thePoint toward solid theSolid. theTol - value of precision of computation theContext- cahed geometrical tools Returns 3-D state.

◆ ComputeState() [2/4]

static TopAbs_State BOPTools_AlgoTools::ComputeState ( const TopoDS_Edge theEdge,
const TopoDS_Solid theSolid,
const Standard_Real  theTol,
const Handle< IntTools_Context > &  theContext 
)
static

Computes the 3-D state of the edge theEdge toward solid theSolid. theTol - value of precision of computation theContext- cahed geometrical tools Returns 3-D state.

◆ ComputeState() [3/4]

static TopAbs_State BOPTools_AlgoTools::ComputeState ( const TopoDS_Face theFace,
const TopoDS_Solid theSolid,
const Standard_Real  theTol,
const TopTools_IndexedMapOfShape theBounds,
const Handle< IntTools_Context > &  theContext 
)
static

Computes the 3-D state of the face theFace toward solid theSolid. theTol - value of precision of computation theBounds - set of edges of <theSolid> to avoid theContext- cahed geometrical tools Returns 3-D state.

◆ ComputeState() [4/4]

static TopAbs_State BOPTools_AlgoTools::ComputeState ( const TopoDS_Vertex theVertex,
const TopoDS_Solid theSolid,
const Standard_Real  theTol,
const Handle< IntTools_Context > &  theContext 
)
static

Computes the 3-D state of the vertex theVertex toward solid theSolid. theTol - value of precision of computation theContext- cahed geometrical tools Returns 3-D state.

◆ ComputeStateByOnePoint()

static TopAbs_State BOPTools_AlgoTools::ComputeStateByOnePoint ( const TopoDS_Shape theShape,
const TopoDS_Solid theSolid,
const Standard_Real  theTol,
const Handle< IntTools_Context > &  theContext 
)
static

Computes the 3-D state of the shape theShape toward solid theSolid. theTol - value of precision of computation theContext- cahed geometrical tools Returns 3-D state.

◆ ComputeTolerance()

static Standard_Boolean BOPTools_AlgoTools::ComputeTolerance ( const TopoDS_Face theFace,
const TopoDS_Edge theEdge,
Standard_Real theMaxDist,
Standard_Real theMaxPar 
)
static

Computes the necessary value of the tolerance for the edge.

◆ ComputeVV() [1/2]

static Standard_Integer BOPTools_AlgoTools::ComputeVV ( const TopoDS_Vertex theV,
const gp_Pnt theP,
const Standard_Real  theTolP 
)
static

Intersects the vertex <theV1> with the point <theP> with tolerance <theTolP>. Returns the error status:

  • 0 - no error, meaning that the vertex intersects the point;
  • 1 - the distance between vertex and point is grater than the sum of tolerances.

◆ ComputeVV() [2/2]

static Standard_Integer BOPTools_AlgoTools::ComputeVV ( const TopoDS_Vertex theV1,
const TopoDS_Vertex theV2,
const Standard_Real  theFuzz = Precision::Confusion() 
)
static

Intersects the given vertices with given fuzzy value. Returns the error status:

  • 0 - no error, meaning that the vertices interferes with given tolerance;
  • 1 - the distance between vertices is grater than the sum of their tolerances.

◆ CopyEdge()

static TopoDS_Edge BOPTools_AlgoTools::CopyEdge ( const TopoDS_Edge theEdge)
static

Makes a copy of <theEdge> with vertices.

◆ CorrectCurveOnSurface()

static void BOPTools_AlgoTools::CorrectCurveOnSurface ( const TopoDS_Shape theS,
const TopTools_IndexedMapOfShape theMapToAvoid,
const Standard_Real  theTolMax = 0.0001,
const Standard_Boolean  theRunParallel = Standard_False 
)
static

Provides valid values of tolerances for the shape <theS> in terms of BRepCheck_InvalidCurveOnSurface.

◆ CorrectPointOnCurve()

static void BOPTools_AlgoTools::CorrectPointOnCurve ( const TopoDS_Shape theS,
const TopTools_IndexedMapOfShape theMapToAvoid,
const Standard_Real  theTolMax = 0.0001,
const Standard_Boolean  theRunParallel = Standard_False 
)
static

Provides valid values of tolerances for the shape <theS> in terms of BRepCheck_InvalidPointOnCurve.

◆ CorrectRange() [1/2]

static void BOPTools_AlgoTools::CorrectRange ( const TopoDS_Edge aE,
const TopoDS_Face aF,
const IntTools_Range aSR,
IntTools_Range aNewSR 
)
static

Correct shrunk range <aSR> taking into account 3D-curve resolution and corresponding tolerance values of <aE>, <aF>

◆ CorrectRange() [2/2]

static void BOPTools_AlgoTools::CorrectRange ( const TopoDS_Edge aE1,
const TopoDS_Edge aE2,
const IntTools_Range aSR,
IntTools_Range aNewSR 
)
static

Correct shrunk range <aSR> taking into account 3D-curve resolution and corresponding tolerance values of <aE1>, <aE2>

◆ CorrectShapeTolerances()

static void BOPTools_AlgoTools::CorrectShapeTolerances ( const TopoDS_Shape theS,
const TopTools_IndexedMapOfShape theMapToAvoid,
const Standard_Boolean  theRunParallel = Standard_False 
)
static

Corrects tolerance values of the sub-shapes of the shape <theS> if needed.

◆ CorrectTolerances()

static void BOPTools_AlgoTools::CorrectTolerances ( const TopoDS_Shape theS,
const TopTools_IndexedMapOfShape theMapToAvoid,
const Standard_Real  theTolMax = 0.0001,
const Standard_Boolean  theRunParallel = Standard_False 
)
static

Provides valid values of tolerances for the shape <theS> <theTolMax> is max value of the tolerance that can be accepted for correction. If real value of the tolerance will be greater than <aTolMax>, the correction does not perform.

◆ Dimension()

static Standard_Integer BOPTools_AlgoTools::Dimension ( const TopoDS_Shape theS)
static

Returns dimension of the shape <theS>. If the shape contains elements of different dimension, -1 is returned.

◆ Dimensions()

static void BOPTools_AlgoTools::Dimensions ( const TopoDS_Shape theS,
Standard_Integer theDMin,
Standard_Integer theDMax 
)
static

Returns the min and max dimensions of the shape <theS>.

◆ DTolerance()

static Standard_Real BOPTools_AlgoTools::DTolerance ( )
inlinestatic

Additional tolerance (delta tolerance) is used in Boolean Operations to ensure that the tolerance of new/old entities obtained by intersection of two shapes is slightly bigger than the actual distances to these shapes. It helps to avoid numerical instability which may occur when comparing distances and tolerances.

◆ GetEdgeOff()

static Standard_Boolean BOPTools_AlgoTools::GetEdgeOff ( const TopoDS_Edge theEdge,
const TopoDS_Face theFace,
TopoDS_Edge theEdgeOff 
)
static

Returns True if the face theFace contains the edge theEdge but with opposite orientation. If the method returns True theEdgeOff is the edge founded.

◆ GetEdgeOnFace()

static Standard_Boolean BOPTools_AlgoTools::GetEdgeOnFace ( const TopoDS_Edge theEdge,
const TopoDS_Face theFace,
TopoDS_Edge theEdgeOnF 
)
static

For the face theFace gets the edge theEdgeOnF that is the same as theEdge Returns True if such edge exists Returns False if there is no such edge.

◆ GetFaceOff()

static Standard_Boolean BOPTools_AlgoTools::GetFaceOff ( const TopoDS_Edge theEdge,
const TopoDS_Face theFace,
BOPTools_ListOfCoupleOfShape theLCEF,
TopoDS_Face theFaceOff,
const Handle< IntTools_Context > &  theContext 
)
static

For the face theFace and its edge theEdge finds the face suitable to produce shell. theLCEF - set of faces to search. All faces from theLCEF must share edge theEdge.

◆ IsBlockInOnFace()

static Standard_Boolean BOPTools_AlgoTools::IsBlockInOnFace ( const IntTools_Range aShR,
const TopoDS_Face aF,
const TopoDS_Edge aE,
const Handle< IntTools_Context > &  aContext 
)
static

Returns TRUE if PaveBlock <aPB> lays on the face <aF>, i.e the <PB> is IN or ON in 2D of <aF>

◆ IsHole()

static Standard_Boolean BOPTools_AlgoTools::IsHole ( const TopoDS_Shape theW,
const TopoDS_Shape theF 
)
static

Checks if the wire is a hole for the face.

◆ IsInternalFace() [1/3]

static Standard_Integer BOPTools_AlgoTools::IsInternalFace ( const TopoDS_Face theFace,
const TopoDS_Edge theEdge,
const TopoDS_Face theFace1,
const TopoDS_Face theFace2,
const Handle< IntTools_Context > &  theContext 
)
static

Returns True if the face theFace is inside of the couple of faces theFace1, theFace2. The faces theFace, theFace1, theFace2 must share the edge theEdge Return values:

  • 0 state is not IN
  • 1 state is IN
  • 2 state can not be found by the method of angles

◆ IsInternalFace() [2/3]

static Standard_Integer BOPTools_AlgoTools::IsInternalFace ( const TopoDS_Face theFace,
const TopoDS_Edge theEdge,
TopTools_ListOfShape theLF,
const Handle< IntTools_Context > &  theContext 
)
static

Returns True if the face theFace is inside of the appropriate couple of faces (from the set theLF) . The faces of the set theLF and theFace must share the edge theEdge.

  • 0 state is not IN
  • 1 state is IN
  • 2 state can not be found by the method of angles

◆ IsInternalFace() [3/3]

static Standard_Boolean BOPTools_AlgoTools::IsInternalFace ( const TopoDS_Face theFace,
const TopoDS_Solid theSolid,
TopTools_IndexedDataMapOfShapeListOfShape theMEF,
const Standard_Real  theTol,
const Handle< IntTools_Context > &  theContext 
)
static

Returns True if the face theFace is inside the solid theSolid. theMEF - Map Edge/Faces for theSolid theTol - value of precision of computation theContext- cahed geometrical tools.

◆ IsInvertedSolid()

static Standard_Boolean BOPTools_AlgoTools::IsInvertedSolid ( const TopoDS_Solid theSolid)
static

Returns true if the solid <theSolid> is inverted.

◆ IsMicroEdge()

static Standard_Boolean BOPTools_AlgoTools::IsMicroEdge ( const TopoDS_Edge theEdge,
const Handle< IntTools_Context > &  theContext,
const Standard_Boolean  theCheckSplittable = Standard_True 
)
static

Checks if it is possible to compute shrunk range for the edge <aE> Flag <theCheckSplittable> defines whether to take into account the possibility to split the edge or not.

◆ IsOpenShell()

static Standard_Boolean BOPTools_AlgoTools::IsOpenShell ( const TopoDS_Shell theShell)
static

Returns true if the shell <theShell> is open.

◆ IsSplitToReverse() [1/3]

static Standard_Boolean BOPTools_AlgoTools::IsSplitToReverse ( const TopoDS_Edge theSplit,
const TopoDS_Edge theShape,
const Handle< IntTools_Context > &  theContext,
Standard_Integer theError = NULL 
)
static

Checks if the tangent vector of the split edge is opposite to the tangent vector of the original edge. The tangent vectors for both edges are computed in the same point - point inside the split edge is projected onto the original edge. Returns TRUE if the tangent vectors do not coincide, meaning the necessity to revert the orientation of the split edge to match the direction of the original edge.

If requested (<theError> is not null), the method returns the status of the operation:

  • 0 - no error;
  • 1 - degenerated edges are given;
  • 2 - unable to compute the tangent vector for the split edge;
  • 3 - unable to project the point inside the split edge on the original edge;
  • 4 - unable to compute the tangent vector for the original edge; In case of any error the method always returns FALSE.
Parameters
theSplit[in] Split edge
theShape[in] Original edge
theContext[in] cached geometrical tools
theError[out] Error Status of the operation

◆ IsSplitToReverse() [2/3]

static Standard_Boolean BOPTools_AlgoTools::IsSplitToReverse ( const TopoDS_Face theSplit,
const TopoDS_Face theShape,
const Handle< IntTools_Context > &  theContext,
Standard_Integer theError = NULL 
)
static

Checks if the normal direction of the split face is opposite to the normal direction of the original face. The normal directions for both faces are taken in the same point - point inside the split face is projected onto the original face. Returns TRUE if the normals do not coincide, meaning the necessity to revert the orientation of the split face to match the direction of the original face.

If requested (<theError> is not null), the method returns the status of the operation:

  • 0 - no error;
  • 1 - unable to find the point inside split face;
  • 2 - unable to compute the normal for the split face;
  • 3 - unable to project the point inside the split face on the original face;
  • 4 - unable to compute the normal for the original face. In case of any error the method always returns FALSE.
Parameters
theSplit[in] Split face
theShape[in] Original face
theContext[in] cached geometrical tools
theError[out] Error Status of the operation

◆ IsSplitToReverse() [3/3]

static Standard_Boolean BOPTools_AlgoTools::IsSplitToReverse ( const TopoDS_Shape theSplit,
const TopoDS_Shape theShape,
const Handle< IntTools_Context > &  theContext,
Standard_Integer theError = NULL 
)
static

Checks if the direction of the split shape is opposite to the direction of the original shape. The method is an overload for (Edge,Edge) and (Face,Face) corresponding methods and checks only these types of shapes. For faces the method checks if normal directions are opposite. For edges the method checks if tangent vectors are opposite.

In case the directions do not coincide, it returns TRUE, meaning that split shape has to be reversed to match the direction of the original shape.

If requested (<theError> is not null), the method returns the status of the operation:

  • 0 - no error;
  • Error from (Edge,Edge) or (Face,Face) corresponding method
  • 100 - bad types. In case of any error the method always returns FALSE.
Parameters
theSplit[in] Split shape
theShape[in] Original shape
theContext[in] cached geometrical tools
theError[out] Error Status of the operation

◆ IsSplitToReverseWithWarn()

static Standard_Boolean BOPTools_AlgoTools::IsSplitToReverseWithWarn ( const TopoDS_Shape theSplit,
const TopoDS_Shape theShape,
const Handle< IntTools_Context > &  theContext,
const Handle< Message_Report > &  theReport = NULL 
)
static

Add-on for the IsSplitToReverse() to check for its errors and in case of any add the BOPAlgo_AlertUnableToOrientTheShape warning to the report.

◆ MakeConnexityBlock()

static void BOPTools_AlgoTools::MakeConnexityBlock ( TopTools_ListOfShape theLS,
TopTools_IndexedMapOfShape theMapAvoid,
TopTools_ListOfShape theLSCB,
const Handle< NCollection_BaseAllocator > &  theAllocator 
)
static

For the list of faces theLS build block theLSCB in terms of connexity by edges theMapAvoid - set of edges to avoid for the treatment.

◆ MakeConnexityBlocks() [1/3]

static void BOPTools_AlgoTools::MakeConnexityBlocks ( const TopoDS_Shape theS,
const TopAbs_ShapeEnum  theConnectionType,
const TopAbs_ShapeEnum  theElementType,
TopTools_ListOfListOfShape theLCB,
TopTools_IndexedDataMapOfShapeListOfShape theConnectionMap 
)
static

For the compound <theS> builds the blocks (compounds) of elements of type <theElementType> connected through the shapes of the type <theConnectionType>. The blocks are stored into the list of lists <theLCB>. Returns also the connection map <theConnectionMap>, filled during operation.

◆ MakeConnexityBlocks() [2/3]

static void BOPTools_AlgoTools::MakeConnexityBlocks ( const TopoDS_Shape theS,
const TopAbs_ShapeEnum  theConnectionType,
const TopAbs_ShapeEnum  theElementType,
TopTools_ListOfShape theLCB 
)
static

For the compound <theS> builds the blocks (compounds) of elements of type <theElementType> connected through the shapes of the type <theConnectionType>. The blocks are stored into the list <theLCB>.

◆ MakeConnexityBlocks() [3/3]

static void BOPTools_AlgoTools::MakeConnexityBlocks ( const TopTools_ListOfShape theLS,
const TopAbs_ShapeEnum  theConnectionType,
const TopAbs_ShapeEnum  theElementType,
BOPTools_ListOfConnexityBlock theLCB 
)
static

Makes connexity blocks of elements of the given type with the given type of the connecting elements. The blocks are checked on regularity (multi-connectivity) and stored to the list of blocks <theLCB>.

◆ MakeContainer()

static void BOPTools_AlgoTools::MakeContainer ( const TopAbs_ShapeEnum  theType,
TopoDS_Shape theShape 
)
static

Makes empty container of requested type.

◆ MakeEdge()

static void BOPTools_AlgoTools::MakeEdge ( const IntTools_Curve theCurve,
const TopoDS_Vertex theV1,
const Standard_Real  theT1,
const TopoDS_Vertex theV2,
const Standard_Real  theT2,
const Standard_Real  theTolR3D,
TopoDS_Edge theE 
)
static

Makes the edge based on the given curve with given bounding vertices.

◆ MakeNewVertex() [1/4]

static void BOPTools_AlgoTools::MakeNewVertex ( const gp_Pnt aP1,
const Standard_Real  aTol,
TopoDS_Vertex aNewVertex 
)
static

Make a vertex using 3D-point <aP1> and 3D-tolerance value <aTol>

◆ MakeNewVertex() [2/4]

static void BOPTools_AlgoTools::MakeNewVertex ( const TopoDS_Edge aE1,
const Standard_Real  aP1,
const TopoDS_Edge aE2,
const Standard_Real  aP2,
TopoDS_Vertex aNewVertex 
)
static

Make a vertex in place of intersection between two edges <aE1, aE2> with parameters <aP1, aP2>

◆ MakeNewVertex() [3/4]

static void BOPTools_AlgoTools::MakeNewVertex ( const TopoDS_Edge aE1,
const Standard_Real  aP1,
const TopoDS_Face aF2,
TopoDS_Vertex aNewVertex 
)
static

Make a vertex in place of intersection between the edge <aE1> with parameter <aP1> and the face <aF2>

◆ MakeNewVertex() [4/4]

static void BOPTools_AlgoTools::MakeNewVertex ( const TopoDS_Vertex aV1,
const TopoDS_Vertex aV2,
TopoDS_Vertex aNewVertex 
)
static

Make a vertex using couple of vertices <aV1, aV2>

◆ MakePCurve()

static void BOPTools_AlgoTools::MakePCurve ( const TopoDS_Edge theE,
const TopoDS_Face theF1,
const TopoDS_Face theF2,
const IntTools_Curve theCurve,
const Standard_Boolean  thePC1,
const Standard_Boolean  thePC2,
const Handle< IntTools_Context > &  theContext = HandleIntTools_Context >() 
)
static

Makes 2d curve of the edge <theE> on the faces <theF1> and <theF2>.
<theContext> - storage for caching the geometrical tools.

◆ MakeSectEdge()

static void BOPTools_AlgoTools::MakeSectEdge ( const IntTools_Curve aIC,
const TopoDS_Vertex aV1,
const Standard_Real  aP1,
const TopoDS_Vertex aV2,
const Standard_Real  aP2,
TopoDS_Edge aNewEdge 
)
static

Make the edge from 3D-Curve <aIC> and two vertices <aV1,aV2> at parameters <aP1,aP2>

◆ MakeSplitEdge()

static void BOPTools_AlgoTools::MakeSplitEdge ( const TopoDS_Edge aE1,
const TopoDS_Vertex aV1,
const Standard_Real  aP1,
const TopoDS_Vertex aV2,
const Standard_Real  aP2,
TopoDS_Edge aNewEdge 
)
static

Make the edge from base edge <aE1> and two vertices <aV1,aV2> at parameters <aP1,aP2>

◆ MakeVertex()

static void BOPTools_AlgoTools::MakeVertex ( const TopTools_ListOfShape theLV,
TopoDS_Vertex theV 
)
static

Makes the vertex in the middle of given vertices with the tolerance covering all tolerance spheres of vertices.

◆ OrientEdgesOnWire()

static void BOPTools_AlgoTools::OrientEdgesOnWire ( TopoDS_Shape theWire)
static

Correctly orients edges on the wire.

◆ OrientFacesOnShell()

static void BOPTools_AlgoTools::OrientFacesOnShell ( TopoDS_Shape theShell)
static

Correctly orients faces on the shell.

◆ PointOnEdge()

static void BOPTools_AlgoTools::PointOnEdge ( const TopoDS_Edge aEdge,
const Standard_Real  aPrm,
gp_Pnt aP 
)
static

Compute a 3D-point on the edge <aEdge> at parameter <aPrm>

◆ Sense()

static Standard_Integer BOPTools_AlgoTools::Sense ( const TopoDS_Face theF1,
const TopoDS_Face theF2,
const Handle< IntTools_Context > &  theContext 
)
static

Checks if the normals direction of the given faces computed near the shared edge coincide. Returns the status of operation:

  • 0 - in case of error (shared edge not found or directions are not collinear)
  • 1 - normal directions coincide;
  • -1 - normal directions are opposite.

◆ TreatCompound()

static void BOPTools_AlgoTools::TreatCompound ( const TopoDS_Shape theS,
TopTools_ListOfShape theList,
TopTools_MapOfShape theMap = NULL 
)
static

Collects in the output list recursively all non-compound sub-shapes of the first level of the given shape theS. The optional map theMap is used to avoid the duplicates in the output list, so it will also contain all non-compound sub-shapes.

◆ UpdateVertex() [1/3]

static void BOPTools_AlgoTools::UpdateVertex ( const IntTools_Curve aIC,
const Standard_Real  aT,
const TopoDS_Vertex aV 
)
static

Update the tolerance value for vertex <aV> taking into account the fact that <aV> lays on the curve <aIC>

◆ UpdateVertex() [2/3]

static void BOPTools_AlgoTools::UpdateVertex ( const TopoDS_Edge aE,
const Standard_Real  aT,
const TopoDS_Vertex aV 
)
static

Update the tolerance value for vertex <aV> taking into account the fact that <aV> lays on the edge <aE>

◆ UpdateVertex() [3/3]

static void BOPTools_AlgoTools::UpdateVertex ( const TopoDS_Vertex aVF,
const TopoDS_Vertex aVN 
)
static

Update the tolerance value for vertex <aVN> taking into account the fact that <aVN> should cover tolerance zone of <aVF>


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