OCC.Core.BOPAlgo module

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

class BOPAlgo_Algo(*args, **kwargs)

Bases: OCC.Core.BOPAlgo.BOPAlgo_Options

  • Empty constructor

Return type

None* Constructor with allocator

Parameters

theAllocator (NCollection_BaseAllocator) –

Return type

None

Perform()
Return type

void

property thisown

The membership flag

class BOPAlgo_ArgumentAnalyzer(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_Algo

  • empty constructor
    rtype

    None

GetArgumentTypeMode(BOPAlgo_ArgumentAnalyzer self) → Standard_Boolean
GetCheckResult()
  • returns a result of test
    rtype

    BOPAlgo_ListOfCheckResult

GetContinuityMode(BOPAlgo_ArgumentAnalyzer self) → Standard_Boolean
GetCurveOnSurfaceMode(BOPAlgo_ArgumentAnalyzer self) → Standard_Boolean
GetMergeEdgeMode(BOPAlgo_ArgumentAnalyzer self) → Standard_Boolean
GetMergeVertexMode(BOPAlgo_ArgumentAnalyzer self) → Standard_Boolean
GetRebuildFaceMode(BOPAlgo_ArgumentAnalyzer self) → Standard_Boolean
GetSelfInterMode(BOPAlgo_ArgumentAnalyzer self) → Standard_Boolean
GetShape1()
  • returns object shape;
    rtype

    TopoDS_Shape

GetShape2()
  • returns tool shape
    rtype

    TopoDS_Shape

GetSmallEdgeMode(BOPAlgo_ArgumentAnalyzer self) → Standard_Boolean
GetStopOnFirstFaulty(BOPAlgo_ArgumentAnalyzer self) → Standard_Boolean
GetTangentMode(BOPAlgo_ArgumentAnalyzer self) → Standard_Boolean
HasFaulty()
  • result of test
    rtype

    bool

OperationType()
  • returns ref
    rtype

    BOPAlgo_Operation

SetArgumentTypeMode(BOPAlgo_ArgumentAnalyzer self, Standard_Boolean value)
SetContinuityMode(BOPAlgo_ArgumentAnalyzer self, Standard_Boolean value)
SetCurveOnSurfaceMode(BOPAlgo_ArgumentAnalyzer self, Standard_Boolean value)
SetMergeEdgeMode(BOPAlgo_ArgumentAnalyzer self, Standard_Boolean value)
SetMergeVertexMode(BOPAlgo_ArgumentAnalyzer self, Standard_Boolean value)
SetRebuildFaceMode(BOPAlgo_ArgumentAnalyzer self, Standard_Boolean value)
SetSelfInterMode(BOPAlgo_ArgumentAnalyzer self, Standard_Boolean value)
SetShape1()
  • sets object shape
    param TheShape

    type TheShape

    TopoDS_Shape

    rtype

    None

SetShape2()
  • sets tool shape
    param TheShape

    type TheShape

    TopoDS_Shape

    rtype

    None

SetSmallEdgeMode(BOPAlgo_ArgumentAnalyzer self, Standard_Boolean value)
SetStopOnFirstFaulty(BOPAlgo_ArgumentAnalyzer self, Standard_Boolean value)
SetTangentMode(BOPAlgo_ArgumentAnalyzer self, Standard_Boolean value)
property thisown

The membership flag

class BOPAlgo_BOP(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_ToolsProvider

  • Empty constructor
    rtype

    None:param theAllocator:

    type theAllocator

    NCollection_BaseAllocator

    rtype

    None

Operation()
Return type

BOPAlgo_Operation

SetOperation()
Parameters

theOperation

type theOperation

BOPAlgo_Operation

rtype

None

property thisown

The membership flag

class BOPAlgo_Builder(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_BuilderShape

  • Empty constructor.
    rtype

    None:param theAllocator:

    type theAllocator

    NCollection_BaseAllocator

    rtype

    None

AddArgument()
  • @name Arguments Adds the argument to the operation.
    param theShape

    type theShape

    TopoDS_Shape

    rtype

    void

Arguments()
  • Returns the list of arguments.
    rtype

    TopTools_ListOfShape

BuildBOP()
  • @name BOPs on open solids Builds the result shape according to the given states for the objects and tools. These states can be unambiguously converted into the Boolean operation type. Thus, it performs the Boolean operation on the given groups of shapes. //! The result is built basing on the result of Builder operation (GF or any other). The only condition for the Builder is that the splits of faces should be created and classified relatively solids. //! The method uses classification approach for choosing the faces which will participate in building the result shape: - All faces from each group having the given state for the opposite group will be taken into result. //! Such approach shows better results (in comparison with BOPAlgo_BuilderSolid approach) when working with open solids. However, the result may not be always correct on such data (at least, not as expected) as the correct classification of the faces relatively open solids is not always possible and may vary depending on the chosen classification point on the face. //! History is not created for the solids in this method. //! To avoid pollution of the report of Builder algorithm, there is a possibility to pass the different report to collect the alerts of the method only. But, if the new report is not given, the Builder report will be used. So, even if Builder passed without any errors, but some error has been stored into its report in this method, for the following calls the Builder report must be cleared. //! The method may set the following errors: - BOPAlgo_AlertBuilderFailed - Building operation has not been performed yet or failed; - BOPAlgo_AlertBOPNotSet - invalid BOP type is given (COMMON/FUSE/CUT/CUT21 are supported); - BOPAlgo_AlertTooFewArguments - arguments are not given; - BOPAlgo_AlertUnknownShape - the shape is unknown for the operation. //! Parameters: @param theObjects - The group of Objects for BOP; @param theObjState - State for objects faces to pass into result; @param theTools - The group of Tools for BOP; @param theObjState - State for tools faces to pass into result; @param theReport - The alternative report to avoid pollution of the main one.
    param theObjects

    type theObjects

    TopTools_ListOfShape

    param theObjState

    type theObjState

    TopAbs_State

    param theTools

    type theTools

    TopTools_ListOfShape

    param theToolsState

    type theToolsState

    TopAbs_State

    param theReport

    default value is NULL

    type theReport

    Message_Report

    rtype

    void* Builds the result of Boolean operation of given type basing on the result of Builder operation (GF or any other). //! The method converts the given type of operation into the states for the objects and tools required for their face to pass into result and performs the call to the same method, but with states instead of operation type. //! The conversion looks as follows: - COMMON is built from the faces of objects located IN any of the tools and vice versa. - FUSE is built from the faces OUT of all given shapes; - CUT is built from the faces of the objects OUT of the tools and faces of the tools located IN solids of the objects. //! @param theObjects - The group of Objects for BOP; @param theTools - The group of Tools for BOP; @param theOperation - The BOP type; @param theReport - The alternative report to avoid pollution of the global one.

    param theObjects

    type theObjects

    TopTools_ListOfShape

    param theTools

    type theTools

    TopTools_ListOfShape

    param theOperation

    type theOperation

    BOPAlgo_Operation

    param theReport

    default value is NULL

    type theReport

    Message_Report

    rtype

    None

CheckInverted()
  • Returns the flag defining whether the check for input solids on inverted status should be performed or not.
    rtype

    bool

Clear()
  • Clears the content of the algorithm.
    rtype

    void

Context()
  • Returns the Context, tool for cashing heavy algorithms.
    rtype

    opencascade::handle<IntTools_Context>

Glue()
  • Returns the glue option of the algorithm
    rtype

    BOPAlgo_GlueEnum

Images()
  • @name Images/Origins Returns the map of images.
    rtype

    TopTools_DataMapOfShapeListOfShape

NonDestructive()
  • Returns the flag that defines the mode of treatment. In non-destructive mode the argument shapes are not modified. Instead a copy of a sub-shape is created in the result if it is needed to be updated.
    rtype

    bool

Origins()
  • Returns the map of origins.
    rtype

    TopTools_DataMapOfShapeListOfShape

PDS()
  • Returns the Data Structure, holder of intersection information.
    rtype

    BOPDS_PDS

PPaveFiller()
  • Returns the PaveFiller, algorithm for sub-shapes intersection.
    rtype

    BOPAlgo_PPaveFiller

PerformWithFiller()
  • Performs the operation with the prepared filler. The intersection will not be performed in this case.
    param theFiller

    type theFiller

    BOPAlgo_PaveFiller

    rtype

    void

SetArguments()
  • Sets the list of arguments for the operation.
    param theLS

    type theLS

    TopTools_ListOfShape

    rtype

    void

SetCheckInverted()
  • Enables/Disables the check of the input solids for inverted status
    param theCheck

    type theCheck

    bool

    rtype

    None

SetGlue()
  • Sets the glue option for the algorithm
    param theGlue

    type theGlue

    BOPAlgo_GlueEnum

    rtype

    None

SetNonDestructive()
  • @name Options Sets the flag that defines the mode of treatment. In non-destructive mode the argument shapes are not modified. Instead a copy of a sub-shape is created in the result if it is needed to be updated. This flag is taken into account if internal PaveFiller is used only. In the case of calling PerformWithFiller the corresponding flag of that PaveFiller is in force.
    param theFlag

    type theFlag

    bool

    rtype

    None

ShapesSD()
  • Returns the map of Same Domain (SD) shapes - coinciding shapes from different arguments.
    rtype

    TopTools_DataMapOfShapeShape

property thisown

The membership flag

class BOPAlgo_BuilderArea(*args, **kwargs)

Bases: OCC.Core.BOPAlgo.BOPAlgo_Algo

  • Empty constructor

Return type

None* Constructor with allocator

Parameters

theAllocator (NCollection_BaseAllocator) –

Return type

None

Areas()
  • Returns the found areas
    rtype

    TopTools_ListOfShape

IsAvoidInternalShapes()
  • Returns the AvoidInternalShapes flag
    rtype

    bool

Loops()
  • Returns the found loops
    rtype

    TopTools_ListOfShape

SetAvoidInternalShapes()
  • Defines the preventing of addition of internal parts into result. The default value is False, i.e. the internal parts are added into result.
    param theAvoidInternal

    type theAvoidInternal

    bool

    rtype

    None

SetContext()
  • Sets the context for the algorithms
    param theContext

    type theContext

    IntTools_Context

    rtype

    None

SetShapes()
  • Sets the shapes for building areas
    param theLS

    type theLS

    TopTools_ListOfShape

    rtype

    None

Shapes()
  • Returns the input shapes
    rtype

    TopTools_ListOfShape

property thisown

The membership flag

class BOPAlgo_BuilderFace(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_BuilderArea

Return type

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

Face()
  • Returns the face generatix
    rtype

    TopoDS_Face

Orientation()
Return type

TopAbs_Orientation

SetFace()
  • Sets the face generatix
    param theFace

    type theFace

    TopoDS_Face

    rtype

    None

property thisown

The membership flag

class BOPAlgo_BuilderShape(*args, **kwargs)

Bases: OCC.Core.BOPAlgo.BOPAlgo_Algo

  • Empty constructor

Return type

None* Constructor with allocator

Parameters

theAllocator (NCollection_BaseAllocator) –

Return type

None

Generated()
  • Returns the list of shapes Generated from the shape theS.
    param theS

    type theS

    TopoDS_Shape

    rtype

    TopTools_ListOfShape

HasDeleted()
  • Returns true if any of the input shapes has been deleted during operation.
    rtype

    bool

HasGenerated()
  • Returns true if any of the input shapes has generated shapes during operation.
    rtype

    bool

HasHistory()
  • Returns flag of history availability
    rtype

    bool

HasModified()
  • Returns true if any of the input shapes has been modified during operation.
    rtype

    bool

History()
  • History Tool
    rtype

    opencascade::handle<BRepTools_History>

IsDeleted()
  • Returns true if the shape theS has been deleted. In this case the shape will have no Modified elements, but can have Generated elements.
    param theS

    type theS

    TopoDS_Shape

    rtype

    bool

Modified()
  • @name History methods Returns the list of shapes Modified from the shape theS.
    param theS

    type theS

    TopoDS_Shape

    rtype

    TopTools_ListOfShape

SetToFillHistory()
  • @name Enabling/Disabling the history collection. Allows disabling the history collection
    param theHistFlag

    type theHistFlag

    bool

    rtype

    None

Shape()
  • @name Getting the result Returns the result of algorithm
    rtype

    TopoDS_Shape

property thisown

The membership flag

class BOPAlgo_BuilderSolid(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_BuilderArea

  • @name Constructors Empty constructor
    rtype

    None* Constructor with allocator

    param theAllocator

    type theAllocator

    NCollection_BaseAllocator

    rtype

    None

GetBoxesMap()
  • @name Getting the bounding boxes of the created solids For classification purposes the algorithm builds the bounding boxes for all created solids. This method returns the data map of solid - box pairs.
    rtype

    TopTools_DataMapOfShapeBox

property thisown

The membership flag

class BOPAlgo_CellsBuilder(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_Builder

Return type

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

AddAllToResult()
  • Add all split parts to result. <theMaterial> defines the removal of internal boundaries; <theUpdate> parameter defines whether to remove boundaries now or not.
    param theMaterial

    default value is 0

    type theMaterial

    int

    param theUpdate

    default value is Standard_False

    type theUpdate

    bool

    rtype

    None

AddToResult()
  • Adding the parts to result. The parts are defined by two lists of shapes: <theLSToTake> defines the arguments which parts should be taken into result; <theLSToAvoid> defines the arguments which parts should not be taken into result; To be taken into result the part must be IN for all shapes from the list <theLSToTake> and must be OUT of all shapes from the list <theLSToAvoid>. To remove internal boundaries between any cells in the result <theMaterial> variable should be used. The boundaries between cells with the same material will be removed. Default value is 0. Thus, to remove any boundary the value of this variable should not be equal to 0. <theUpdate> parameter defines whether to remove boundaries now or not.
    param theLSToTake

    type theLSToTake

    TopTools_ListOfShape

    param theLSToAvoid

    type theLSToAvoid

    TopTools_ListOfShape

    param theMaterial

    default value is 0

    type theMaterial

    int

    param theUpdate

    default value is Standard_False

    type theUpdate

    bool

    rtype

    None

GetAllParts()
  • Get all split parts.
    rtype

    TopoDS_Shape

MakeContainers()
  • Makes the Containers of proper type from the parts added to result.
    rtype

    None

RemoveAllFromResult()
  • Remove all parts from result.
    rtype

    None

RemoveFromResult()
  • Removing the parts from result. The parts are defined by two lists of shapes: <theLSToTake> defines the arguments which parts should be removed from result; <theLSToAvoid> defines the arguments which parts should not be removed from result. To be removed from the result the part must be IN for all shapes from the list <theLSToTake> and must be OUT of all shapes from the list <theLSToAvoid>.
    param theLSToTake

    type theLSToTake

    TopTools_ListOfShape

    param theLSToAvoid

    type theLSToAvoid

    TopTools_ListOfShape

    rtype

    None

RemoveInternalBoundaries()
  • Removes internal boundaries between cells with the same material. If the result contains the cells with same material but of different dimension the removal of internal boundaries between these cells will not be performed. In case of some errors during the removal the method will set the appropriate warning status - use GetReport() to access them.
    rtype

    None

property thisown

The membership flag

class BOPAlgo_CheckResult(*args)

Bases: object

  • empty constructor
    rtype

    None

AddFaultyShape1()
  • adds faulty sub-shapes from object to a list
    param TheShape

    type TheShape

    TopoDS_Shape

    rtype

    None

AddFaultyShape2()
  • adds faulty sub-shapes from tool to a list
    param TheShape

    type TheShape

    TopoDS_Shape

    rtype

    None

GetCheckStatus()
  • gets status of faulty
    rtype

    BOPAlgo_CheckStatus

GetFaultyShapes1()
  • returns list of faulty shapes for object
    rtype

    TopTools_ListOfShape

GetFaultyShapes2()
  • returns list of faulty shapes for tool
    rtype

    TopTools_ListOfShape

GetMaxDistance1()
  • Returns the distance for the first shape
    rtype

    float

GetMaxDistance2()
  • Returns the distance for the second shape
    rtype

    float

GetMaxParameter1()
  • Returns the parameter for the fircst shape
    rtype

    float

GetMaxParameter2()
  • Returns the parameter for the second shape
    rtype

    float

GetShape1()
  • returns ancestor shape (object) for faulties
    rtype

    TopoDS_Shape

GetShape2()
  • returns ancestor shape (tool) for faulties
    rtype

    TopoDS_Shape

SetCheckStatus()
  • set status of faulty
    param TheStatus

    type TheStatus

    BOPAlgo_CheckStatus

    rtype

    None

SetMaxDistance1()
  • Sets max distance for the first shape
    param theDist

    type theDist

    float

    rtype

    None

SetMaxDistance2()
  • Sets max distance for the second shape
    param theDist

    type theDist

    float

    rtype

    None

SetMaxParameter1()
  • Sets the parameter for the first shape
    param thePar

    type thePar

    float

    rtype

    None

SetMaxParameter2()
  • Sets the parameter for the second shape
    param thePar

    type thePar

    float

    rtype

    None

SetShape1()
  • sets ancestor shape (object) for faulty sub-shapes
    param TheShape

    type TheShape

    TopoDS_Shape

    rtype

    None

SetShape2()
  • sets ancestor shape (tool) for faulty sub-shapes
    param TheShape

    type TheShape

    TopoDS_Shape

    rtype

    None

property thisown

The membership flag

class BOPAlgo_CheckerSI(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_PaveFiller

Return type

None

SetLevelOfCheck()
  • Sets the level of checking shape on self-interference. It defines which interferences will be checked: 0 - only V/V; 1 - V/V and V/E; 2 - V/V, V/E and E/E; 3 - V/V, V/E, E/E and V/F; 4 - V/V, V/E, E/E, V/F and E/F; 5 - V/V, V/E, E/E, V/F, E/F and F/F; 6 - V/V, V/E, E/E, V/F, E/F, F/F and V/S; 7 - V/V, V/E, E/E, V/F, E/F, F/F, V/S and E/S; 8 - V/V, V/E, E/E, V/F, E/F, F/F, V/S, E/S and F/S; 9 - V/V, V/E, E/E, V/F, E/F, F/F, V/S, E/S, F/S and S/S - all interferences (Default value)
    param theLevel

    type theLevel

    int

    rtype

    None

property thisown

The membership flag

class BOPAlgo_ListOfCheckResult(*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 BOPAlgo_MakeConnected(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_Options

  • @name Constructor Empty constructor
    rtype

    None

AddArgument()
  • Adds the shape to the arguments. @param theS [in] One of the argument shapes.
    param theS

    type theS

    TopoDS_Shape

    rtype

    None

Arguments()
  • Returns the list of arguments of the operation.
    rtype

    TopTools_ListOfShape

Clear()
  • @name Clearing the contents of the algorithm from previous runs Clears the contents of the algorithm.
    rtype

    None

ClearRepetitions()
  • Clears the repetitions performed on the periodic shape, keeping the shape periodic.
    rtype

    None

GetModified()
  • Returns the list of shapes modified from the given shape. @param theS [in] The shape for which the modified shapes are necessary.
    param theS

    type theS

    TopoDS_Shape

    rtype

    TopTools_ListOfShape

GetOrigins()
  • Returns the list of original shapes from which the current shape has been created. @param theS [in] The shape for which the origins are necessary.
    param theS

    type theS

    TopoDS_Shape

    rtype

    TopTools_ListOfShape

History()
  • @name History methods Returns the history of operations
    rtype

    opencascade::handle<BRepTools_History>

MakePeriodic()
  • @name Shape periodicity & repetition Makes the connected shape periodic. Repeated calls of this method overwrite the previous calls working with the basis connected shape. @param theParams [in] Periodic options.
    param theParams

    type theParams

    BOPAlgo_MakePeriodic::PeriodicityParams

    rtype

    None

MaterialsOnNegativeSide()
  • Returns the original shapes which images contain the the given shape with REVERSED orientation. @param theS [in] The shape for which the materials are necessary.
    param theS

    type theS

    TopoDS_Shape

    rtype

    TopTools_ListOfShape

MaterialsOnPositiveSide()
  • @name Material transitions Returns the original shapes which images contain the the given shape with FORWARD orientation. @param theS [in] The shape for which the materials are necessary.
    param theS

    type theS

    TopoDS_Shape

    rtype

    TopTools_ListOfShape

Perform()
  • @name Performing the operations Performs the operation, i.e. makes the input shapes connected.
    rtype

    None

PeriodicShape()
  • Returns the resulting periodic & repeated shape
    rtype

    TopoDS_Shape

PeriodicityTool()
  • Returns the periodicity tool.
    rtype

    BOPAlgo_MakePeriodic

RepeatShape()
  • Performs repetition of the periodic shape in specified direction required number of times. @param theDirectionID [in] The direction’s ID (0 for X, 1 for Y, 2 for Z); @param theTimes [in] Requested number of repetitions (sign of the value defines the side of the repetition direction (positive or negative)).
    param theDirectionID

    type theDirectionID

    int

    param theTimes

    type theTimes

    int

    rtype

    None

SetArguments()
  • @name Setters for the shapes to make connected Sets the shape for making them connected. @param theArgs [in] The arguments for the operation.
    param theArgs

    type theArgs

    TopTools_ListOfShape

    rtype

    None

Shape()
  • @name Getting the result shapes Returns the resulting connected shape
    rtype

    TopoDS_Shape

property thisown

The membership flag

class BOPAlgo_MakePeriodic(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_Options

  • @name Constructor Empty constructor
    rtype

    None

Clear()
  • @name Clearing the algorithm from previous runs Clears the algorithm from previous runs
    rtype

    None

ClearRepetitions()
  • Clears all performed repetitions. The next repetition will be performed on the base shape.
    rtype

    None

GetTwins()
  • @name Getting the identical shapes Returns the identical shapes for the given shape located on the opposite periodic side. Returns empty list in case the shape has no twin. //! @param theS [in] Shape to get the twins for.
    param theS

    type theS

    TopoDS_Shape

    rtype

    TopTools_ListOfShape

History()
  • @name Getting the History of the algorithm Returns the History of the algorithm
    rtype

    opencascade::handle<BRepTools_History>

IsInputTrimmed()
  • Returns whether the input shape was trimmed in the specified direction. @param theDirectionID [in] The direction’s ID.
    param theDirectionID

    type theDirectionID

    int

    rtype

    bool

IsInputXTrimmed()
  • Returns whether the input shape was already trimmed for X period.
    rtype

    bool

IsInputYTrimmed()
  • Returns whether the input shape was already trimmed for Y period.
    rtype

    bool

IsInputZTrimmed()
  • Returns whether the input shape was already trimmed for Z period.
    rtype

    bool

IsPeriodic()
  • Returns the info about Periodicity of the shape in specified direction. @param theDirectionID [in] The direction’s ID.
    param theDirectionID

    type theDirectionID

    int

    rtype

    bool

IsXPeriodic()
  • Returns the info about periodicity of the shape in X direction.
    rtype

    bool

IsYPeriodic()
  • Returns the info about periodicity of the shape in Y direction.
    rtype

    bool

IsZPeriodic()
  • Returns the info about periodicity of the shape in Z direction.
    rtype

    bool

MakePeriodic()
  • @name Methods for setting/getting periodicity info using ID as a direction Sets the flag to make the shape periodic in specified direction: - 0 - X direction; - 1 - Y direction; - 2 - Z direction. //! @param theDirectionID [in] The direction’s ID; @param theIsPeriodic [in] Flag defining periodicity in given direction; @param thePeriod [in] Required period in given direction.
    param theDirectionID

    type theDirectionID

    int

    param theIsPeriodic

    type theIsPeriodic

    bool

    param thePeriod

    default value is 0.0

    type thePeriod

    float

    rtype

    None

MakeXPeriodic()
  • @name Named methods for setting/getting info about shape’s periodicity Sets the flag to make the shape periodic in X direction. @param theIsPeriodic [in] Flag defining periodicity in X direction; @param thePeriod [in] Required period in X direction.
    param theIsPeriodic

    type theIsPeriodic

    bool

    param thePeriod

    default value is 0.0

    type thePeriod

    float

    rtype

    None

MakeYPeriodic()
  • Sets the flag to make the shape periodic in Y direction. @param theIsPeriodic [in] Flag defining periodicity in Y direction; @param thePeriod [in] Required period in Y direction.
    param theIsPeriodic

    type theIsPeriodic

    bool

    param thePeriod

    default value is 0.0

    type thePeriod

    float

    rtype

    None

MakeZPeriodic()
  • Sets the flag to make the shape periodic in Z direction. @param theIsPeriodic [in] Flag defining periodicity in Z direction; @param thePeriod [in] Required period in Z direction.
    param theIsPeriodic

    type theIsPeriodic

    bool

    param thePeriod

    default value is 0.0

    type thePeriod

    float

    rtype

    None

Perform()
  • @name Performing the operation Makes the shape periodic in necessary directions
    rtype

    None

Period()
  • Returns the Period of the shape in specified direction. @param theDirectionID [in] The direction’s ID.
    param theDirectionID

    type theDirectionID

    int

    rtype

    float

PeriodFirst()
  • Returns the first periodic parameter in the specified direction. @param theDirectionID [in] The direction’s ID.
    param theDirectionID

    type theDirectionID

    int

    rtype

    float

PeriodicityParameters()
Return type

PeriodicityParams

RepeatShape()
  • @name Using the algorithm to repeat the shape Performs repetition of the shape in specified direction required number of times. Negative value of times means that the repetition should be perform in negative direction. Makes the repeated shape a base for following repetitions. //! @param theDirectionID [in] The direction’s ID; @param theTimes [in] Requested number of repetitions.
    param theDirectionID

    type theDirectionID

    int

    param theTimes

    type theTimes

    int

    rtype

    TopoDS_Shape

RepeatedShape()
  • @name Starting the repetitions over Returns the repeated shape
    rtype

    TopoDS_Shape

SetPeriodicityParameters()
  • //!< Array of start parameters of the XYZ periods: required for trimming @name Setters/Getters for periodicity parameters structure Sets the periodicity parameters. @param theParams [in] Periodicity parameters
    param theParams

    type theParams

    PeriodicityParams

    rtype

    None

SetShape()
  • @name Setting the shape to make it periodic Sets the shape to make it periodic. @param theShape [in] The shape to make periodic.
    param theShape

    type theShape

    TopoDS_Shape

    rtype

    None

SetTrimmed()
  • @name Methods for setting/getting trimming info taking Direction ID as a parameter Defines whether the input shape is already trimmed in specified direction to fit the period in this direction. Direction is defined by an ID: - 0 - X direction; - 1 - Y direction; - 2 - Z direction. //! If the shape is not trimmed it is required to set the first parameter of the period in that direction. The algorithm will make the shape fit into the period. //! Before calling this method, the shape has to be set to be periodic in this direction. //! @param theDirectionID [in] The direction’s ID; @param theIsTrimmed [in] The flag defining trimming of the shape in given direction; @param theFirst [in] The first periodic parameter in the given direction.
    param theDirectionID

    type theDirectionID

    int

    param theIsTrimmed

    type theIsTrimmed

    bool

    param theFirst

    default value is 0.0

    type theFirst

    float

    rtype

    None

SetXTrimmed()
  • @name Named methods for setting/getting trimming info Defines whether the input shape is already trimmed in X direction to fit the X period. If the shape is not trimmed it is required to set the first parameter for the X period. The algorithm will make the shape fit into the period. //! Before calling this method, the shape has to be set to be periodic in this direction. //! @param theIsTrimmed [in] Flag defining whether the shape is already trimmed in X direction to fit the X period; @param theFirst [in] The first X periodic parameter.
    param theIsTrimmed

    type theIsTrimmed

    bool

    param theFirst

    default value is 0.0

    type theFirst

    bool

    rtype

    None

SetYTrimmed()
  • Defines whether the input shape is already trimmed in Y direction to fit the Y period. If the shape is not trimmed it is required to set the first parameter for the Y period. The algorithm will make the shape fit into the period. //! Before calling this method, the shape has to be set to be periodic in this direction. //! @param theIsTrimmed [in] Flag defining whether the shape is already trimmed in Y direction to fit the Y period; @param theFirst [in] The first Y periodic parameter.
    param theIsTrimmed

    type theIsTrimmed

    bool

    param theFirst

    default value is 0.0

    type theFirst

    bool

    rtype

    None

SetZTrimmed()
  • Defines whether the input shape is already trimmed in Z direction to fit the Z period. If the shape is not trimmed it is required to set the first parameter for the Z period. The algorithm will make the shape fit into the period. //! Before calling this method, the shape has to be set to be periodic in this direction. //! @param theIsTrimmed [in] Flag defining whether the shape is already trimmed in Z direction to fit the Z period; @param theFirst [in] The first Z periodic parameter.
    param theIsTrimmed

    type theIsTrimmed

    bool

    param theFirst

    default value is 0.0

    type theFirst

    bool

    rtype

    None

Shape()
  • @name Obtaining the result shape Returns the resulting periodic shape
    rtype

    TopoDS_Shape

static ToDirectionID()
  • @name Conversion of the integer to ID of periodic direction Converts the integer to ID of periodic direction
    param theDirectionID

    type theDirectionID

    int

    rtype

    int

XPeriod()
  • Returns the XPeriod of the shape
    rtype

    float

XPeriodFirst()
  • Returns the first parameter for the X period.
    rtype

    float

XRepeat()
  • Repeats the shape in X direction specified number of times. Negative value of times means that the repetition should be perform in negative X direction. Makes the repeated shape a base for following repetitions. //! @param theTimes [in] Requested number of repetitions.
    param theTimes

    type theTimes

    int

    rtype

    TopoDS_Shape

YPeriod()
  • Returns the YPeriod of the shape.
    rtype

    float

YPeriodFirst()
  • Returns the first parameter for the Y period.
    rtype

    float

YRepeat()
  • Repeats the shape in Y direction specified number of times. Negative value of times means that the repetition should be perform in negative Y direction. Makes the repeated shape a base for following repetitions. //! @param theTimes [in] Requested number of repetitions.
    param theTimes

    type theTimes

    int

    rtype

    TopoDS_Shape

ZPeriod()
  • Returns the ZPeriod of the shape.
    rtype

    float

ZPeriodFirst()
  • Returns the first parameter for the Z period.
    rtype

    float

ZRepeat()
  • Repeats the shape in Z direction specified number of times. Negative value of times means that the repetition should be perform in negative Z direction. Makes the repeated shape a base for following repetitions. //! @param theTimes [in] Requested number of repetitions.
    param theTimes

    type theTimes

    int

    rtype

    TopoDS_Shape

property thisown

The membership flag

class BOPAlgo_MakerVolume(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_Builder

  • Empty contructor.
    rtype

    None* Empty contructor.

    param theAllocator

    type theAllocator

    NCollection_BaseAllocator

    rtype

    None

Box()
  • Returns the solid box <mySBox>.
    rtype

    TopoDS_Solid

Faces()
  • Returns the processed faces <myFaces>.
    rtype

    TopTools_ListOfShape

IsAvoidInternalShapes()
  • Returns the AvoidInternalShapes flag
    rtype

    bool

IsIntersect()
  • Returns the flag <myIntersect>.
    rtype

    bool

SetAvoidInternalShapes()
  • Defines the preventing of addition of internal for solid parts into the result. By default the internal parts are added into result.
    param theAvoidInternal

    type theAvoidInternal

    bool

    rtype

    None

SetIntersect()
  • Sets the flag myIntersect: if <bIntersect> is True the shapes from <myArguments> will be intersected. if <bIntersect> is False no intersection will be done.
    param bIntersect

    type bIntersect

    bool

    rtype

    None

property thisown

The membership flag

class BOPAlgo_Options(*args)

Bases: object

  • Empty constructor
    rtype

    None* Constructor with allocator

    param theAllocator

    type theAllocator

    NCollection_BaseAllocator

    rtype

    None

AddError()
  • //!@name Error reporting mechanism Adds the alert as error (fail)
    param theAlert

    type theAlert

    Message_Alert

    rtype

    None

AddWarning()
  • Adds the alert as warning
    param theAlert

    type theAlert

    Message_Alert

    rtype

    None

Allocator()
  • Returns allocator
    rtype

    opencascade::handle<NCollection_BaseAllocator>

Clear()
  • Clears all warnings and errors, and any data cached by the algorithm. User defined options are not cleared.
    rtype

    None

ClearWarnings()
  • Clears the warnings of the algorithm
    rtype

    None

DumpErrorsToString(BOPAlgo_Options self) → std::string
DumpWarningsToString(BOPAlgo_Options self) → std::string
FuzzyValue()
  • Returns the additional tolerance
    rtype

    float

static GetParallelMode()
  • //!@name Parallel processing mode Gets the global parallel mode
    rtype

    bool

GetReport()
  • Returns report collecting all errors and warnings
    rtype

    opencascade::handle<Message_Report>

HasError()
  • Returns true if algorithm has generated error of specified type
    param theType

    type theType

    Standard_Type

    rtype

    bool

HasErrors()
  • Returns true if algorithm has failed
    rtype

    bool

HasWarning()
  • Returns true if algorithm has generated warning of specified type
    param theType

    type theType

    Standard_Type

    rtype

    bool

HasWarnings()
  • Returns true if algorithm has generated some warning alerts
    rtype

    bool

RunParallel()
  • Returns the flag of parallel processing
    rtype

    bool

SetFuzzyValue()
  • //!@name Fuzzy tolerance Sets the additional tolerance
    param theFuzz

    type theFuzz

    float

    rtype

    None

static SetParallelMode()
  • Sets the global parallel mode
    param theNewMode

    type theNewMode

    bool

    rtype

    void

SetProgressIndicator()
  • //!@name Progress indicator Set the Progress Indicator object.
    param theObj

    type theObj

    Message_ProgressIndicator

    rtype

    None

SetRunParallel()
  • Set the flag of parallel processing if <theFlag> is true the parallel processing is switched on if <theFlag> is false the parallel processing is switched off
    param theFlag

    type theFlag

    bool

    rtype

    None

SetUseOBB()
  • //!@name Usage of Oriented Bounding boxes Enables/Disables the usage of OBB
    param theUseOBB

    type theUseOBB

    bool

    rtype

    None

UseOBB()
  • Returns the flag defining usage of OBB
    rtype

    bool

property thisown

The membership flag

class BOPAlgo_PaveFiller(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_Algo

Return type

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

AddArgument()
  • Adds the argument for operation
    param theShape

    type theShape

    TopoDS_Shape

    rtype

    None

Arguments()
  • Returns the list of arguments
    rtype

    TopTools_ListOfShape

Context()
Return type

opencascade::handle<IntTools_Context>

DS()
Return type

BOPDS_DS

Glue()
  • Returns the glue option of the algorithm
    rtype

    BOPAlgo_GlueEnum

IsAvoidBuildPCurve()
  • Returns the flag to avoid building of p-curves of edges on faces
    rtype

    bool

NonDestructive()
  • Returns the flag that defines the mode of treatment. In non-destructive mode the argument shapes are not modified. Instead a copy of a sub-shape is created in the result if it is needed to be updated.
    rtype

    bool

PDS()
Return type

BOPDS_PDS

SetArguments()
  • Sets the arguments for operation
    param theLS

    type theLS

    TopTools_ListOfShape

    rtype

    None

SetAvoidBuildPCurve()
  • Sets the flag to avoid building of p-curves of edges on faces
    param theValue

    type theValue

    bool

    rtype

    None

SetGlue()
  • Sets the glue option for the algorithm
    param theGlue

    type theGlue

    BOPAlgo_GlueEnum

    rtype

    None

SetNonDestructive()
  • Sets the flag that defines the mode of treatment. In non-destructive mode the argument shapes are not modified. Instead a copy of a sub-shape is created in the result if it is needed to be updated.
    param theFlag

    type theFlag

    bool

    rtype

    None

SetSectionAttribute()
Parameters

theSecAttr

type theSecAttr

BOPAlgo_SectionAttribute

rtype

None

property thisown

The membership flag

class BOPAlgo_RemoveFeatures(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_BuilderShape

  • @name Constructors Empty constructor
    rtype

    None

AddFaceToRemove()
  • Adds the face to remove from the input shape. @param theFace [in] The shape to extract the faces for removal.
    param theFace

    type theFace

    TopoDS_Shape

    rtype

    None

AddFacesToRemove()
  • Adds the faces to remove from the input shape. @param theFaces [in] The list of shapes to extract the faces for removal.
    param theFaces

    type theFaces

    TopTools_ListOfShape

    rtype

    None

Clear()
  • @name Clearing the contents of the algorithm Clears the contents of the algorithm from previous run, allowing reusing it for following removals.
    rtype

    None

FacesToRemove()
  • Returns the list of faces which have been requested for removal from the input shape.
    rtype

    TopTools_ListOfShape

InputShape()
  • Returns the input shape
    rtype

    TopoDS_Shape

SetShape()
  • @name Setting input data for the algorithm Sets the shape for processing. @param theShape [in] The shape to remove the faces from. It should either be the SOLID, COMPSOLID or COMPOUND of Solids.
    param theShape

    type theShape

    TopoDS_Shape

    rtype

    None

property thisown

The membership flag

class BOPAlgo_Section(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_Builder

  • Empty constructor
    rtype

    None* Constructor with allocator

    param theAllocator

    type theAllocator

    NCollection_BaseAllocator

    rtype

    None

property thisown

The membership flag

class BOPAlgo_SectionAttribute(*args)

Bases: object

  • Default constructor
    rtype

    None* Constructor

    param theAproximation

    type theAproximation

    bool

    param thePCurveOnS1

    type thePCurveOnS1

    bool

    param thePCurveOnS2

    type thePCurveOnS2

    bool

    rtype

    None

Approximation()
  • Sets the Approximation flag
    param theApprox

    type theApprox

    bool

    rtype

    None* Returns the Approximation flag

    rtype

    bool

PCurveOnS1()
  • Sets the PCurveOnS1 flag
    param thePCurveOnS1

    type thePCurveOnS1

    bool

    rtype

    None* Returns the PCurveOnS1 flag

    rtype

    bool

PCurveOnS2()
  • Sets the PCurveOnS2 flag
    param thePCurveOnS2

    type thePCurveOnS2

    bool

    rtype

    None* Returns the PCurveOnS2 flag

    rtype

    bool

property thisown

The membership flag

class BOPAlgo_ShellSplitter(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_Algo

  • empty constructor
    rtype

    None* constructor

    param theAllocator

    type theAllocator

    NCollection_BaseAllocator

    rtype

    None

AddStartElement()
  • adds a face <theS> to process
    param theS

    type theS

    TopoDS_Shape

    rtype

    None

Shells()
  • returns the loops
    rtype

    TopTools_ListOfShape

static SplitBlock()
Parameters

theCB

type theCB

BOPTools_ConnexityBlock

rtype

void

StartElements()
  • return the faces to process
    rtype

    TopTools_ListOfShape

property thisown

The membership flag

class BOPAlgo_Splitter(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_ToolsProvider

  • Empty constructor
    rtype

    None:param theAllocator:

    type theAllocator

    NCollection_BaseAllocator

    rtype

    None

property thisown

The membership flag

class BOPAlgo_Tools

Bases: object

static ClassifyFaces()
  • Classifies the faces <theFaces> relatively solids <theSolids>. The IN faces for solids are stored into output data map <theInParts>. //! The map <theSolidsIF> contains INTERNAL faces of the solids, to avoid their additional classification. //! Firstly, it checks the intersection of bounding boxes of the shapes. If the Box is not stored in the <theShapeBoxMap> map, it builds the box. If the bounding boxes of solid and face are interfering the classification is performed. //! It is assumed that all faces and solids are already intersected and do not have any geometrically coinciding parts without topological sharing of these parts
    param theFaces

    type theFaces

    TopTools_ListOfShape

    param theSolids

    type theSolids

    TopTools_ListOfShape

    param theRunParallel

    type theRunParallel

    bool

    param theContext

    type theContext

    IntTools_Context

    param theInParts

    type theInParts

    TopTools_IndexedDataMapOfShapeListOfShape

    param theShapeBoxMap

    default value is TopTools_DataMapOfShapeBox()

    type theShapeBoxMap

    TopTools_DataMapOfShapeBox

    param theSolidsIF

    default value is TopTools_DataMapOfShapeListOfShape()

    type theSolidsIF

    TopTools_DataMapOfShapeListOfShape

    rtype

    void

static ComputeToleranceOfCB()
Parameters

theCB

type theCB

BOPDS_CommonBlock

param theDS

type theDS

BOPDS_PDS

param theContext

type theContext

IntTools_Context

rtype

float

static EdgesToWires()
  • Creates planar wires from the given edges. The input edges are expected to be planar. And for the performance sake the method does not check if the edges are really planar. Thus, the result wires will also be not planar if the input edges are not planar. The edges may be not shared, but the resulting wires will be sharing the coinciding parts and intersecting parts. The output wires may be non-manifold and contain free and multi-connected vertices. Parameters: <theEdges> - input edges; <theWires> - output wires; <theShared> - boolean flag which defines whether the input edges are already shared or have to be intersected; <theAngTol> - the angular tolerance which will be used for distinguishing the planes in which the edges are located. Default value is 1.e-8 which is used for intersection of planes in IntTools_FaceFace. Method returns the following error statuses: 0 - in case of success (at least one wire has been built); 1 - in case there are no edges in the given shape; 2 - sharing of the edges has failed.
    param theEdges

    type theEdges

    TopoDS_Shape

    param theWires

    type theWires

    TopoDS_Shape

    param theShared

    default value is Standard_False

    type theShared

    bool

    param theAngTol

    default value is 1e-8

    type theAngTol

    float

    rtype

    int

static FillInternals()
  • Classifies the given parts relatively the given solids and fills the solids with the parts classified as INTERNAL. //! @param theSolids - The solids to put internals to @param theParts - The parts to classify relatively solids @param theImages - Possible images of the parts that has to be classified @param theContext - Cashed geometrical tools to speed-up classifications
    param theSolids

    type theSolids

    TopTools_ListOfShape

    param theParts

    type theParts

    TopTools_ListOfShape

    param theImages

    type theImages

    TopTools_DataMapOfShapeListOfShape

    param theContext

    type theContext

    IntTools_Context

    rtype

    void

static IntersectVertices()
  • Finds chains of intersecting vertices
    param theVertices

    type theVertices

    TopTools_IndexedDataMapOfShapeReal

    param theFuzzyValue

    type theFuzzyValue

    float

    param theChains

    type theChains

    TopTools_ListOfListOfShape

    rtype

    void

static PerformCommonBlocks()
  • Create Common Blocks from the groups of pave blocks of <theMBlocks> connection map.
    param theMBlocks

    type theMBlocks

    BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock

    param theAllocator

    type theAllocator

    NCollection_BaseAllocator

    param theDS

    type theDS

    BOPDS_PDS

    param theContext

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

    type theContext

    IntTools_Context

    rtype

    void* Create Common Blocks on faces using the PB->Faces connection map <theMBlocks>.

    param theMBlocks

    type theMBlocks

    BOPDS_IndexedDataMapOfPaveBlockListOfInteger

    param theAllocator

    type theAllocator

    NCollection_BaseAllocator

    param pDS

    type pDS

    BOPDS_PDS

    param theContext

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

    type theContext

    IntTools_Context

    rtype

    void

static TreatCompound()
  • Collect in the output list recursively all non-compound subshapes of the first level of the given shape theS. If a shape presents in the map theMFence it is skipped. All shapes put in the output are also added into theMFence.
    param theS

    type theS

    TopoDS_Shape

    param theMFence

    type theMFence

    TopTools_MapOfShape

    param theLS

    type theLS

    TopTools_ListOfShape

    rtype

    void

static WiresToFaces()
  • Creates planar faces from given planar wires. The method does not check if the wires are really planar. The input wires may be non-manifold but should be shared. The wires located in the same planes and included into other wires will create holes in the faces built from outer wires. The tolerance values of the input shapes may be modified during the operation due to projection of the edges on the planes for creation of 2D curves. Parameters: <theWires> - the given wires; <theFaces> - the output faces; <theAngTol> - the angular tolerance for distinguishing the planes in which the wires are located. Default value is 1.e-8 which is used for intersection of planes in IntTools_FaceFace. Method returns True in case of success, i.e. at least one face has been built.
    param theWires

    type theWires

    TopoDS_Shape

    param theFaces

    type theFaces

    TopoDS_Shape

    param theAngTol

    default value is 1e-8

    type theAngTol

    float

    rtype

    bool

property thisown

The membership flag

class BOPAlgo_ToolsProvider(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_Builder

  • Empty constructor
    rtype

    None:param theAllocator:

    type theAllocator

    NCollection_BaseAllocator

    rtype

    None

AddTool()
  • Adds Tool argument of the operation
    param theShape

    type theShape

    TopoDS_Shape

    rtype

    void

SetTools()
  • Adds the Tool arguments of the operation
    param theShapes

    type theShapes

    TopTools_ListOfShape

    rtype

    void

Tools()
  • Returns the Tool arguments of the operation
    rtype

    TopTools_ListOfShape

property thisown

The membership flag

class BOPAlgo_WireEdgeSet(*args)

Bases: object

Return type

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

AddShape()
Parameters

sS

type sS

TopoDS_Shape

rtype

None

AddStartElement()
Parameters

sS

type sS

TopoDS_Shape

rtype

None

Clear()
Return type

None

Face()
Return type

TopoDS_Face

SetFace()
Parameters

aF

type aF

TopoDS_Face

rtype

None

Shapes()
Return type

TopTools_ListOfShape

StartElements()
Return type

TopTools_ListOfShape

property thisown

The membership flag

class BOPAlgo_WireSplitter(*args)

Bases: OCC.Core.BOPAlgo.BOPAlgo_Algo

Return type

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

Context()
  • Returns the context
    rtype

    opencascade::handle<IntTools_Context>

static MakeWire()
Parameters

theLE

type theLE

TopTools_ListOfShape

param theW

type theW

TopoDS_Wire

rtype

None

SetContext()
  • Sets the context for the algorithm
    param theContext

    type theContext

    IntTools_Context

    rtype

    None

SetWES()
Parameters

theWES

type theWES

BOPAlgo_WireEdgeSet

rtype

None

static SplitBlock()
Parameters

theF

type theF

TopoDS_Face

param theCB

type theCB

BOPTools_ConnexityBlock

param theContext

type theContext

IntTools_Context

rtype

void

WES()
Return type

BOPAlgo_WireEdgeSet

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()