OCC.Core.BOPTools module

BOPTools module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_boptools.html

class BOPTools_AlgoTools

Bases: object

static AreFacesSameDomain()
  • Checking if the faces are coinciding Checks if the given faces are same-domain, i.e. coincide.
    param theF1

    type theF1

    TopoDS_Face

    param theF2

    type theF2

    TopoDS_Face

    param theContext

    type theContext

    IntTools_Context

    param theFuzz

    default value is Precision::Confusion()

    type theFuzz

    float

    rtype

    bool

static ComputeState()
  • @name Point/Edge/Face classification relatively solid 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.
    param thePoint

    type thePoint

    gp_Pnt

    param theSolid

    type theSolid

    TopoDS_Solid

    param theTol

    type theTol

    float

    param theContext

    type theContext

    IntTools_Context

    rtype

    TopAbs_State* 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.

    param theVertex

    type theVertex

    TopoDS_Vertex

    param theSolid

    type theSolid

    TopoDS_Solid

    param theTol

    type theTol

    float

    param theContext

    type theContext

    IntTools_Context

    rtype

    TopAbs_State* 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.

    param theEdge

    type theEdge

    TopoDS_Edge

    param theSolid

    type theSolid

    TopoDS_Solid

    param theTol

    type theTol

    float

    param theContext

    type theContext

    IntTools_Context

    rtype

    TopAbs_State* 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.

    param theFace

    type theFace

    TopoDS_Face

    param theSolid

    type theSolid

    TopoDS_Solid

    param theTol

    type theTol

    float

    param theBounds

    type theBounds

    TopTools_IndexedMapOfShape

    param theContext

    type theContext

    IntTools_Context

    rtype

    TopAbs_State

static ComputeStateByOnePoint()
  • 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.
    param theShape

    type theShape

    TopoDS_Shape

    param theSolid

    type theSolid

    TopoDS_Solid

    param theTol

    type theTol

    float

    param theContext

    type theContext

    IntTools_Context

    rtype

    TopAbs_State

static ComputeTolerance()
  • @name Edge/Face Deviation computation Computes the necessary value of the tolerance for the edge
    param theFace

    type theFace

    TopoDS_Face

    param theEdge

    type theEdge

    TopoDS_Edge

    param theMaxDist

    type theMaxDist

    float

    param theMaxPar

    type theMaxPar

    float

    rtype

    bool

static ComputeVV()
  • @name Intersection of the vertices 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.
    param theV

    type theV

    TopoDS_Vertex

    param theP

    type theP

    gp_Pnt

    param theTolP

    type theTolP

    float

    rtype

    int* 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.

    param theV1

    type theV1

    TopoDS_Vertex

    param theV2

    type theV2

    TopoDS_Vertex

    param theFuzz

    default value is Precision::Confusion()

    type theFuzz

    float

    rtype

    int

static CopyEdge()
  • Makes a copy of <theEdge> with vertices.
    param theEdge

    type theEdge

    TopoDS_Edge

    rtype

    TopoDS_Edge

static CorrectCurveOnSurface()
  • Provides valid values of tolerances for the shape <theS> in terms of BRepCheck_InvalidCurveOnSurface.
    param theS

    type theS

    TopoDS_Shape

    param theMapToAvoid

    type theMapToAvoid

    TopTools_IndexedMapOfShape

    param theTolMax

    default value is 0.0001

    type theTolMax

    float

    param theRunParallel

    default value is Standard_False

    type theRunParallel

    bool

    rtype

    void

static CorrectPointOnCurve()
  • Provides valid values of tolerances for the shape <theS> in terms of BRepCheck_InvalidPointOnCurve.
    param theS

    type theS

    TopoDS_Shape

    param theMapToAvoid

    type theMapToAvoid

    TopTools_IndexedMapOfShape

    param theTolMax

    default value is 0.0001

    type theTolMax

    float

    param theRunParallel

    default value is Standard_False

    type theRunParallel

    bool

    rtype

    void

static CorrectRange()
  • @name Correction of the edges range Correct shrunk range <aSR> taking into account 3D-curve resolution and corresponding tolerance values of <aE1>, <aE2>
    param aE1

    type aE1

    TopoDS_Edge

    param aE2

    type aE2

    TopoDS_Edge

    param aSR

    type aSR

    IntTools_Range

    param aNewSR

    type aNewSR

    IntTools_Range

    rtype

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

    param aE

    type aE

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    param aSR

    type aSR

    IntTools_Range

    param aNewSR

    type aNewSR

    IntTools_Range

    rtype

    void

static CorrectShapeTolerances()
  • Corrects tolerance values of the sub-shapes of the shape <theS> if needed.
    param theS

    type theS

    TopoDS_Shape

    param theMapToAvoid

    type theMapToAvoid

    TopTools_IndexedMapOfShape

    param theRunParallel

    default value is Standard_False

    type theRunParallel

    bool

    rtype

    void

static CorrectTolerances()
  • @name Methods for shape validation (correction) 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.
    param theS

    type theS

    TopoDS_Shape

    param theMapToAvoid

    type theMapToAvoid

    TopTools_IndexedMapOfShape

    param theTolMax

    default value is 0.0001

    type theTolMax

    float

    param theRunParallel

    default value is Standard_False

    type theRunParallel

    bool

    rtype

    void

static Dimension()
  • Retutns dimension of the shape <theS>.
    param theS

    type theS

    TopoDS_Shape

    rtype

    int

static GetEdgeOff()
  • @name Looking for the edge in the face Returns True if the face theFace contains the edge theEdge but with opposite orientation. If the method returns True theEdgeOff is the edge founded
    param theEdge

    type theEdge

    TopoDS_Edge

    param theFace

    type theFace

    TopoDS_Face

    param theEdgeOff

    type theEdgeOff

    TopoDS_Edge

    rtype

    bool

static GetEdgeOnFace()
  • 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
    param theEdge

    type theEdge

    TopoDS_Edge

    param theFace

    type theFace

    TopoDS_Face

    param theEdgeOnF

    type theEdgeOnF

    TopoDS_Edge

    rtype

    bool

static GetFaceOff()
  • @name Face classification relatively solid 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
    param theEdge

    type theEdge

    TopoDS_Edge

    param theFace

    type theFace

    TopoDS_Face

    param theLCEF

    type theLCEF

    BOPTools_ListOfCoupleOfShape

    param theFaceOff

    type theFaceOff

    TopoDS_Face

    param theContext

    type theContext

    IntTools_Context

    rtype

    bool

static IsBlockInOnFace()
  • Returns True if PaveBlock <aPB> lays on the face <aF>, i.e the <PB> is IN or ON in 2D of <aF>
    param aShR

    type aShR

    IntTools_Range

    param aF

    type aF

    TopoDS_Face

    param aE

    type aE

    TopoDS_Edge

    param aContext

    type aContext

    IntTools_Context

    rtype

    bool

static IsHole()
  • @name Wire classification relatively face Checks if the wire is a hole for the face.
    param theW

    type theW

    TopoDS_Shape

    param theF

    type theF

    TopoDS_Shape

    rtype

    bool

static IsInternalFace()
  • 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
    param theFace

    type theFace

    TopoDS_Face

    param theEdge

    type theEdge

    TopoDS_Edge

    param theFace1

    type theFace1

    TopoDS_Face

    param theFace2

    type theFace2

    TopoDS_Face

    param theContext

    type theContext

    IntTools_Context

    rtype

    int* 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

    param theFace

    type theFace

    TopoDS_Face

    param theEdge

    type theEdge

    TopoDS_Edge

    param theLF

    type theLF

    TopTools_ListOfShape

    param theContext

    type theContext

    IntTools_Context

    rtype

    int* 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

    param theFace

    type theFace

    TopoDS_Face

    param theSolid

    type theSolid

    TopoDS_Solid

    param theMEF

    type theMEF

    TopTools_IndexedDataMapOfShapeListOfShape

    param theTol

    type theTol

    float

    param theContext

    type theContext

    IntTools_Context

    rtype

    bool

static IsInvertedSolid()
  • @name Solid classification Returns true if the solid <theSolid> is inverted
    param theSolid

    type theSolid

    TopoDS_Solid

    rtype

    bool

static IsMicroEdge()
  • @name Checking edge on micro status 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.
    param theEdge

    type theEdge

    TopoDS_Edge

    param theContext

    type theContext

    IntTools_Context

    param theCheckSplittable

    default value is Standard_True

    type theCheckSplittable

    bool

    rtype

    bool

static IsOpenShell()
  • Returns true if the shell <theShell> is open
    param theShell

    type theShell

    TopoDS_Shell

    rtype

    bool

static IsSplitToReverse()
  • @name Choosing correct orientation for the split shape 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. //! @param theSplit [in] Split shape @param theShape [in] Original shape @param theContext [in] Cashed geometrical tools @param theError [out] Error Status of the operation
    param theSplit

    type theSplit

    TopoDS_Shape

    param theShape

    type theShape

    TopoDS_Shape

    param theContext

    type theContext

    IntTools_Context

    param theError

    default value is NULL

    type theError

    int *

    rtype

    bool* 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. //! @param theSplit [in] Split face @param theShape [in] Original face @param theContext [in] Cashed geometrical tools @param theError [out] Error Status of the operation

    param theSplit

    type theSplit

    TopoDS_Face

    param theShape

    type theShape

    TopoDS_Face

    param theContext

    type theContext

    IntTools_Context

    param theError

    default value is NULL

    type theError

    int *

    rtype

    bool* 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. //! @param theSplit [in] Split edge @param theShape [in] Original edge @param theContext [in] Cashed geometrical tools @param theError [out] Error Status of the operation

    param theSplit

    type theSplit

    TopoDS_Edge

    param theShape

    type theShape

    TopoDS_Edge

    param theContext

    type theContext

    IntTools_Context

    param theError

    default value is NULL

    type theError

    int *

    rtype

    bool

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

    type theSplit

    TopoDS_Shape

    param theShape

    type theShape

    TopoDS_Shape

    param theContext

    type theContext

    IntTools_Context

    param theReport

    default value is NULL

    type theReport

    Message_Report

    rtype

    bool

static MakeConnexityBlock()
  • @name Making connexity blocks For the list of faces theLS build block theLSCB in terms of connexity by edges theMapAvoid - set of edges to avoid for the treatment
    param theLS

    type theLS

    TopTools_ListOfShape

    param theMapAvoid

    type theMapAvoid

    TopTools_IndexedMapOfShape

    param theLSCB

    type theLSCB

    TopTools_ListOfShape

    param theAllocator

    type theAllocator

    NCollection_BaseAllocator

    rtype

    void

static MakeConnexityBlocks()
  • 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>.
    param theS

    type theS

    TopoDS_Shape

    param theConnectionType

    type theConnectionType

    TopAbs_ShapeEnum

    param theElementType

    type theElementType

    TopAbs_ShapeEnum

    param theLCB

    type theLCB

    TopTools_ListOfShape

    rtype

    void* 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.

    param theS

    type theS

    TopoDS_Shape

    param theConnectionType

    type theConnectionType

    TopAbs_ShapeEnum

    param theElementType

    type theElementType

    TopAbs_ShapeEnum

    param theLCB

    type theLCB

    TopTools_ListOfListOfShape

    param theConnectionMap

    type theConnectionMap

    TopTools_IndexedDataMapOfShapeListOfShape

    rtype

    void* 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>.

    param theLS

    type theLS

    TopTools_ListOfShape

    param theConnectionType

    type theConnectionType

    TopAbs_ShapeEnum

    param theElementType

    type theElementType

    TopAbs_ShapeEnum

    param theLCB

    type theLCB

    BOPTools_ListOfConnexityBlock

    rtype

    void

static MakeContainer()
  • @name Other methods Makes empty container of requested type
    param theType

    type theType

    TopAbs_ShapeEnum

    param theShape

    type theShape

    TopoDS_Shape

    rtype

    void

static MakeEdge()
  • @name Edge construction Makes the edge based on the given curve with given bounding vertices.
    param theCurve

    type theCurve

    IntTools_Curve

    param theV1

    type theV1

    TopoDS_Vertex

    param theT1

    type theT1

    float

    param theV2

    type theV2

    TopoDS_Vertex

    param theT2

    type theT2

    float

    param theTolR3D

    type theTolR3D

    float

    param theE

    type theE

    TopoDS_Edge

    rtype

    void

static MakeNewVertex()
  • Make a vertex using 3D-point <aP1> and 3D-tolerance value <aTol>
    param aP1

    type aP1

    gp_Pnt

    param aTol

    type aTol

    float

    param aNewVertex

    type aNewVertex

    TopoDS_Vertex

    rtype

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

    param aV1

    type aV1

    TopoDS_Vertex

    param aV2

    type aV2

    TopoDS_Vertex

    param aNewVertex

    type aNewVertex

    TopoDS_Vertex

    rtype

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

    param aE1

    type aE1

    TopoDS_Edge

    param aP1

    type aP1

    float

    param aE2

    type aE2

    TopoDS_Edge

    param aP2

    type aP2

    float

    param aNewVertex

    type aNewVertex

    TopoDS_Vertex

    rtype

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

    param aE1

    type aE1

    TopoDS_Edge

    param aP1

    type aP1

    float

    param aF2

    type aF2

    TopoDS_Face

    param aNewVertex

    type aNewVertex

    TopoDS_Vertex

    rtype

    void

static MakePCurve()
  • @name PCurve construction Makes 2d curve of the edge <theE> on the faces <theF1> and <theF2>. <theContext> - storage for caching the geometrical tools
    param theE

    type theE

    TopoDS_Edge

    param theF1

    type theF1

    TopoDS_Face

    param theF2

    type theF2

    TopoDS_Face

    param theCurve

    type theCurve

    IntTools_Curve

    param thePC1

    type thePC1

    bool

    param thePC2

    type thePC2

    bool

    param theContext

    default value is opencascade::handle<IntTools_Context>()

    type theContext

    IntTools_Context

    rtype

    void

static MakeSectEdge()
  • Make the edge from 3D-Curve <aIC> and two vertices <aV1,aV2> at parameters <aP1,aP2>
    param aIC

    type aIC

    IntTools_Curve

    param aV1

    type aV1

    TopoDS_Vertex

    param aP1

    type aP1

    float

    param aV2

    type aV2

    TopoDS_Vertex

    param aP2

    type aP2

    float

    param aNewEdge

    type aNewEdge

    TopoDS_Edge

    rtype

    void

static MakeSplitEdge()
  • Make the edge from base edge <aE1> and two vertices <aV1,aV2> at parameters <aP1,aP2>
    param aE1

    type aE1

    TopoDS_Edge

    param aV1

    type aV1

    TopoDS_Vertex

    param aP1

    type aP1

    float

    param aV2

    type aV2

    TopoDS_Vertex

    param aP2

    type aP2

    float

    param aNewEdge

    type aNewEdge

    TopoDS_Edge

    rtype

    void

static MakeVertex()
  • @name Vertices construction Makes the vertex in the middle of given vertices with the tolerance covering all tolerance spheres of vertices.
    param theLV

    type theLV

    TopTools_ListOfShape

    param theV

    type theV

    TopoDS_Vertex

    rtype

    void

static OrientEdgesOnWire()
  • @name Orienting elements in container Correctly orients edges on the wire
    param theWire

    type theWire

    TopoDS_Shape

    rtype

    void

static OrientFacesOnShell()
  • Correctly orients faces on the shell
    param theShell

    type theShell

    TopoDS_Shape

    rtype

    void

static PointOnEdge()
  • Compute a 3D-point on the edge <aEdge> at parameter <aPrm>
    param aEdge

    type aEdge

    TopoDS_Edge

    param aPrm

    type aPrm

    float

    param aP

    type aP

    gp_Pnt

    rtype

    void

static Sense()
  • 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.
    param theF1

    type theF1

    TopoDS_Face

    param theF2

    type theF2

    TopoDS_Face

    param theContext

    type theContext

    IntTools_Context

    rtype

    int

static UpdateVertex()
  • @name Updating the vertex Update the tolerance value for vertex <aV> taking into account the fact that <aV> lays on the curve <aIC>
    param aIC

    type aIC

    IntTools_Curve

    param aT

    type aT

    float

    param aV

    type aV

    TopoDS_Vertex

    rtype

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

    param aE

    type aE

    TopoDS_Edge

    param aT

    type aT

    float

    param aV

    type aV

    TopoDS_Vertex

    rtype

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

    param aVF

    type aVF

    TopoDS_Vertex

    param aVN

    type aVN

    TopoDS_Vertex

    rtype

    void

property thisown

The membership flag

class BOPTools_AlgoTools2D

Bases: object

static AdjustPCurveOnFace()
  • Adjust P-Curve <theC2D> (3D-curve <theC3D>) on surface of the face <theF>. <theContext> - storage for caching the geometrical tools
    param theF

    type theF

    TopoDS_Face

    param theC3D

    type theC3D

    Geom_Curve

    param theC2D

    type theC2D

    Geom2d_Curve

    param theC2DA

    type theC2DA

    Geom2d_Curve

    param theContext

    default value is opencascade::handle<IntTools_Context>()

    type theContext

    IntTools_Context

    rtype

    void* Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> . [aT1, aT2] - range to adjust <theContext> - storage for caching the geometrical tools

    param theF

    type theF

    TopoDS_Face

    param theFirst

    type theFirst

    float

    param theLast

    type theLast

    float

    param theC2D

    type theC2D

    Geom2d_Curve

    param theC2DA

    type theC2DA

    Geom2d_Curve

    param theContext

    default value is opencascade::handle<IntTools_Context>()

    type theContext

    IntTools_Context

    rtype

    void

static AdjustPCurveOnSurf()
  • Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> . [aT1, aT2] - range to adjust
    param aF

    type aF

    BRepAdaptor_Surface

    param aT1

    type aT1

    float

    param aT2

    type aT2

    float

    param aC2D

    type aC2D

    Geom2d_Curve

    param aC2DA

    type aC2DA

    Geom2d_Curve

    rtype

    void

static AttachExistingPCurve()
  • Attach P-Curve from the edge <aEold> on surface <aF> to the edge <aEnew> Returns 0 in case of success
    param aEold

    type aEold

    TopoDS_Edge

    param aEnew

    type aEnew

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    param aCtx

    type aCtx

    IntTools_Context

    rtype

    int

static BuildPCurveForEdgeOnFace()
  • Compute P-Curve for the edge <aE> on the face <aF>. Raises exception Standard_ConstructionError if projection algorithm fails. <theContext> - storage for caching the geometrical tools
    param aE

    type aE

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    param theContext

    default value is opencascade::handle<IntTools_Context>()

    type theContext

    IntTools_Context

    rtype

    void

static EdgeTangent()
  • Compute tangent for the edge <aE> [in 3D] at parameter <aT>
    param anE

    type anE

    TopoDS_Edge

    param aT

    type aT

    float

    param Tau

    type Tau

    gp_Vec

    rtype

    bool

static HasCurveOnSurface()
  • Returns True if the edge <aE> has P-Curve <aC> on surface <aF> . [aFirst, aLast] - range of the P-Curve [aToler] - reached tolerance If the P-Curve does not exist, aC.IsNull()=True.
    param aE

    type aE

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    param aC

    type aC

    Geom2d_Curve

    param aFirst

    type aFirst

    float

    param aLast

    type aLast

    float

    param aToler

    type aToler

    float

    rtype

    bool* Returns True if the edge <aE> has P-Curve <aC> on surface <aF> . If the P-Curve does not exist, aC.IsNull()=True.

    param aE

    type aE

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    rtype

    bool

static IntermediatePoint()
  • Compute intermediate value in between [aFirst, aLast] .
    param aFirst

    type aFirst

    float

    param aLast

    type aLast

    float

    rtype

    float* Compute intermediate value of parameter for the edge <anE>.

    param anE

    type anE

    TopoDS_Edge

    rtype

    float

static IsEdgeIsoline()
  • Checks if CurveOnSurface of theE on theF matches with isoline of theF surface. Sets corresponding values for isTheUIso and isTheVIso variables. ATTENTION!!! This method is based on comparation between direction of surface (which theF is based on) iso-lines and the direction of the edge p-curve (on theF) in middle-point of the p-curve. This method should be used carefully (e.g. BRep_Tool::IsClosed(…) together) in order to avoid false classification some p-curves as isoline (e.g. circle on a plane).
    param theE

    type theE

    TopoDS_Edge

    param theF

    type theF

    TopoDS_Face

    param isTheUIso

    type isTheUIso

    bool

    param isTheVIso

    type isTheVIso

    bool

    rtype

    void

static Make2D()
  • Make P-Curve <aC> for the edge <aE> on surface <aF> . [aFirst, aLast] - range of the P-Curve [aToler] - reached tolerance Raises exception Standard_ConstructionError if algorithm fails. <theContext> - storage for caching the geometrical tools
    param aE

    type aE

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    param aC

    type aC

    Geom2d_Curve

    param aFirst

    type aFirst

    float

    param aLast

    type aLast

    float

    param aToler

    type aToler

    float

    param theContext

    default value is opencascade::handle<IntTools_Context>()

    type theContext

    IntTools_Context

    rtype

    void

static MakePCurveOnFace()
  • Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> . [aToler] - reached tolerance Raises exception Standard_ConstructionError if projection algorithm fails. <theContext> - storage for caching the geometrical tools
    param aF

    type aF

    TopoDS_Face

    param C3D

    type C3D

    Geom_Curve

    param aC

    type aC

    Geom2d_Curve

    param aToler

    type aToler

    float

    param theContext

    default value is opencascade::handle<IntTools_Context>()

    type theContext

    IntTools_Context

    rtype

    void* Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> . [aT1, aT2] - range to build [aToler] - reached tolerance Raises exception Standard_ConstructionError if projection algorithm fails. <theContext> - storage for caching the geometrical tools

    param aF

    type aF

    TopoDS_Face

    param C3D

    type C3D

    Geom_Curve

    param aT1

    type aT1

    float

    param aT2

    type aT2

    float

    param aC

    type aC

    Geom2d_Curve

    param aToler

    type aToler

    float

    param theContext

    default value is opencascade::handle<IntTools_Context>()

    type theContext

    IntTools_Context

    rtype

    void

static PointOnSurface()
  • Compute surface parameters <U,V> of the face <aF> for the point from the edge <aE> at parameter <aT>. If <aE> has’t pcurve on surface, algorithm tries to get it by projection and can raise exception Standard_ConstructionError if projection algorithm fails. <theContext> - storage for caching the geometrical tools
    param aE

    type aE

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    param aT

    type aT

    float

    param U

    type U

    float

    param V

    type V

    float

    param theContext

    default value is opencascade::handle<IntTools_Context>()

    type theContext

    IntTools_Context

    rtype

    void

property thisown

The membership flag

class BOPTools_AlgoTools3D

Bases: object

static DoSplitSEAMOnFace()
  • Make the edge <aSp> seam edge for the face <aF>
    param aSp

    type aSp

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    rtype

    void

static GetApproxNormalToFaceOnEdge()
  • 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.
    param aE

    type aE

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    param aT

    type aT

    float

    param aPx

    type aPx

    gp_Pnt

    param aD

    type aD

    gp_Dir

    param theContext

    type theContext

    IntTools_Context

    rtype

    bool* 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.

    param theE

    type theE

    TopoDS_Edge

    param theF

    type theF

    TopoDS_Face

    param aT

    type aT

    float

    param aP

    type aP

    gp_Pnt

    param aDNF

    type aDNF

    gp_Dir

    param aDt2D

    type aDt2D

    float

    rtype

    bool* 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.

    param theE

    type theE

    TopoDS_Edge

    param theF

    type theF

    TopoDS_Face

    param aT

    type aT

    float

    param aDt2D

    type aDt2D

    float

    param aP

    type aP

    gp_Pnt

    param aDNF

    type aDNF

    gp_Dir

    param theContext

    type theContext

    IntTools_Context

    rtype

    bool

static GetNormalToFaceOnEdge()
  • Computes normal to the face <aF> for the point on the edge <aE> at parameter <aT>. <theContext> - storage for caching the geometrical tools
    param aE

    type aE

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    param aT

    type aT

    float

    param aD

    type aD

    gp_Dir

    param theContext

    default value is opencascade::handle<IntTools_Context>()

    type theContext

    IntTools_Context

    rtype

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

    param aE

    type aE

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    param aD

    type aD

    gp_Dir

    param theContext

    default value is opencascade::handle<IntTools_Context>()

    type theContext

    IntTools_Context

    rtype

    void

static GetNormalToSurface()
  • Compute normal <aD> to surface <aS> in point (U,V) Returns True if directions aD1U, aD1V coincide
    param aS

    type aS

    Geom_Surface

    param U

    type U

    float

    param V

    type V

    float

    param aD

    type aD

    gp_Dir

    rtype

    bool

static IsEmptyShape()
  • Returns True if the shape <aS> does not contain geometry information (e.g. empty compound)
    param aS

    type aS

    TopoDS_Shape

    rtype

    bool

static MinStepIn2d()
  • Returns simple step value that is used in 2D-computations = 1.e-5
    rtype

    float

static OrientEdgeOnFace()
  • Get the edge <aER> from the face <aF> that is the same as the edge <aE>
    param aE

    type aE

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    param aER

    type aER

    TopoDS_Edge

    rtype

    void

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

    type theF

    TopoDS_Face

    param theP

    type theP

    gp_Pnt

    param theP2D

    type theP2D

    gp_Pnt2d

    param theContext

    type theContext

    IntTools_Context

    rtype

    int* 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.

    param theF

    type theF

    TopoDS_Face

    param theE

    type theE

    TopoDS_Edge

    param theT

    type theT

    float

    param theDt2D

    type theDt2D

    float

    param theP

    type theP

    gp_Pnt

    param theP2D

    type theP2D

    gp_Pnt2d

    param theContext

    type theContext

    IntTools_Context

    rtype

    int* 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.

    param theF

    type theF

    TopoDS_Face

    param theL

    type theL

    Geom2d_Curve

    param theP

    type theP

    gp_Pnt

    param theP2D

    type theP2D

    gp_Pnt2d

    param theContext

    type theContext

    IntTools_Context

    param theDt2D

    default value is 0.0

    type theDt2D

    float

    rtype

    int

static PointNearEdge()
  • 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.
    param aE

    type aE

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    param aT

    type aT

    float

    param aDt2D

    type aDt2D

    float

    param aP2D

    type aP2D

    gp_Pnt2d

    param aPx

    type aPx

    gp_Pnt

    param theContext

    type theContext

    IntTools_Context

    rtype

    int* 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>.

    param aE

    type aE

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    param aT

    type aT

    float

    param aDt2D

    type aDt2D

    float

    param aP2D

    type aP2D

    gp_Pnt2d

    param aPx

    type aPx

    gp_Pnt

    rtype

    int* 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.

    param aE

    type aE

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    param aT

    type aT

    float

    param aP2D

    type aP2D

    gp_Pnt2d

    param aPx

    type aPx

    gp_Pnt

    param theContext

    type theContext

    IntTools_Context

    rtype

    int* 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.

    param aE

    type aE

    TopoDS_Edge

    param aF

    type aF

    TopoDS_Face

    param aP2D

    type aP2D

    gp_Pnt2d

    param aPx

    type aPx

    gp_Pnt

    param theContext

    type theContext

    IntTools_Context

    rtype

    int

static SenseFlag()
  • Returns 1 if scalar product aNF1* aNF2>0. Returns 0 if directions aNF1 aNF2 coincide Returns -1 if scalar product aNF1* aNF2<0.
    param aNF1

    type aNF1

    gp_Dir

    param aNF2

    type aNF2

    gp_Dir

    rtype

    int

property thisown

The membership flag

class BOPTools_ConnexityBlock(*args)

Bases: object

Return type

None:param theAllocator: :type theAllocator: NCollection_BaseAllocator :rtype: None

ChangeLoops()
Return type

TopTools_ListOfShape

ChangeShapes()
Return type

TopTools_ListOfShape

IsRegular()
Return type

bool

Loops()
Return type

TopTools_ListOfShape

SetRegular()
Parameters

theFlag

type theFlag

bool

rtype

None

Shapes()
Return type

TopTools_ListOfShape

property thisown

The membership flag

class BOPTools_CoupleOfShape(*args)

Bases: object

Return type

None

SetShape1()
Parameters

theShape

type theShape

TopoDS_Shape

rtype

None

SetShape2()
Parameters

theShape

type theShape

TopoDS_Shape

rtype

None

Shape1()
Return type

TopoDS_Shape

Shape2()
Return type

TopoDS_Shape

property thisown

The membership flag

class BOPTools_IndexedDataMapOfSetShape(*args)

Bases: object

Add()
Assign()
ChangeFromIndex()
ChangeFromKey()
ChangeSeek()
Clear()
Contains()
Exchange()
FindFromIndex()
FindFromKey()
FindIndex()
FindKey()
ReSize()
RemoveFromIndex()
RemoveKey()
RemoveLast()
Seek()
Set()
Size()
Substitute()
Swap()
begin()
cbegin()
cend()
end()
property thisown

The membership flag

class BOPTools_ListOfConnexityBlock(*args)

Bases: object

Append()
Assign()
Clear()
First()
InsertAfter()
InsertBefore()
Last()
Prepend()
Remove()
RemoveFirst()
Reverse()
Set()
Size()
begin()
cbegin()
cend()
end()
property thisown

The membership flag

class BOPTools_ListOfCoupleOfShape(*args)

Bases: object

Append()
Assign()
Clear()
First()
InsertAfter()
InsertBefore()
Last()
Prepend()
Remove()
RemoveFirst()
Reverse()
Set()
Size()
begin()
cbegin()
cend()
end()
property thisown

The membership flag

class BOPTools_MapOfSet(*args)

Bases: object

Add()
Added()
Assign()
Clear()
Contains()
Differ()
Difference()
Exchange()
HasIntersection()
Intersect()
Intersection()
IsEqual()
ReSize()
Remove()
Set()
Size()
Subtract()
Subtraction()
Union()
Unite()
cbegin()
cend()
property thisown

The membership flag

class BOPTools_Set(*args)

Bases: object

Return type

None:param theAllocator: :type theAllocator: NCollection_BaseAllocator :rtype: None

Add()
Parameters

theS

type theS

TopoDS_Shape

param theType

type theType

TopAbs_ShapeEnum

rtype

None

Assign()
Parameters

Other

type Other

BOPTools_Set

rtype

BOPTools_Set

HashCode()
  • Computes a hash code for this set, in the range [1, theUpperBound] @param theUpperBound the upper bound of the range a computing hash code must be within returns a computed hash code, in the range [1, theUpperBound]
    param theUpperBound

    type theUpperBound

    int

    rtype

    int

IsEqual()
Parameters

aOther

type aOther

BOPTools_Set

rtype

bool

NbShapes()
Return type

int

Set()
Parameters

Other

type Other

BOPTools_Set

rtype

BOPTools_Set

Shape()
Return type

TopoDS_Shape

property thisown

The membership flag

class BOPTools_SetMapHasher

Bases: object

static HashCode()
  • Computes a hash code for the given set, in the range [1, theUpperBound] @param theSet the set which hash code is to be computed @param theUpperBound the upper bound of the range a computing hash code must be within returns a computed hash code, in the range [1, theUpperBound]
    param theSet

    type theSet

    BOPTools_Set

    param theUpperBound

    type theUpperBound

    int

    rtype

    int

static IsEqual()
Parameters

aSet1

type aSet1

BOPTools_Set

param aSet2

type aSet2

BOPTools_Set

rtype

bool

property thisown

The membership flag

class SwigPyIterator(*args, **kwargs)

Bases: object

advance()
copy()
decr()
distance()
equal()
incr()
next()
previous()
property thisown

The membership flag

value()