OCC.Core.BRepAlgoAPI module¶
BRepAlgoAPI module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_brepalgoapi.html
-
class
BRepAlgoAPI_Algo
(*args, **kwargs)¶ Bases:
OCC.Core.BRepBuilderAPI.BRepBuilderAPI_MakeShape
-
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
-
FuzzyValue
()¶ - Returns the additional tolerance
- rtype
float
-
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
-
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
-
property
thisown
¶ The membership flag
-
-
class
BRepAlgoAPI_BooleanOperation
(*args)¶ Bases:
OCC.Core.BRepAlgoAPI.BRepAlgoAPI_BuilderAlgo
- @name Constructors Empty constructor
- rtype
None* Constructor with precomputed intersections of arguments.
- param thePF
- type thePF
BOPAlgo_PaveFiller
- rtype
None
-
Operation
()¶ - Returns the type of Boolean Operation
- rtype
BOPAlgo_Operation
-
SetOperation
()¶ - @name Setting/Getting the type of Boolean operation Sets the type of Boolean operation
- param theBOP
- type theBOP
BOPAlgo_Operation
- rtype
None
-
SetTools
()¶ - Sets the Tool arguments
- param theLS
- type theLS
TopTools_ListOfShape
- rtype
None
-
Shape1
()¶ - @name Setting/getting arguments Returns the first argument involved in this Boolean operation. Obsolete
- rtype
TopoDS_Shape
-
Shape2
()¶ - Returns the second argument involved in this Boolean operation. Obsolete
- rtype
TopoDS_Shape
-
Tools
()¶ - Returns the Tools arguments
- rtype
TopTools_ListOfShape
-
property
thisown
¶ The membership flag
-
class
BRepAlgoAPI_BuilderAlgo
(*args)¶ Bases:
OCC.Core.BRepAlgoAPI.BRepAlgoAPI_Algo
- @name Constructors Empty constructor
- rtype
None* Constructor with prepared Filler object
- param thePF
- type thePF
BOPAlgo_PaveFiller
- rtype
None
-
Arguments
()¶ - Gets the arguments
- rtype
TopTools_ListOfShape
-
Builder
()¶ - Returns the Building tool
- rtype
BOPAlgo_PBuilder
-
CheckInverted
()¶ - Returns the flag defining whether the check for input solids on inverted status should be performed or not.
- rtype
bool
-
DSFiller
()¶ - @name Getting tools performing the job Returns the Intersection tool
- rtype
BOPAlgo_PPaveFiller
-
Glue
()¶ - Returns the glue option of the algorithm
- rtype
BOPAlgo_GlueEnum
-
HasDeleted
()¶ - Returns true if any of the input shapes has been deleted during operation. Normally, General Fuse operation should not have Deleted elements, but all derived operation can have.
- 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>
-
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
-
SectionEdges
()¶ - @name Getting the section edges Returns a list of section edges. The edges represent the result of intersection between arguments of operation.
- rtype
TopTools_ListOfShape
-
SetArguments
()¶ - @name Setting/Getting data for the algorithm Sets the arguments
- param theLS
- type theLS
TopTools_ListOfShape
- rtype
None
-
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, which allows increasing performance of the intersection of the input shapes.
- param theGlue
- type theGlue
BOPAlgo_GlueEnum
- rtype
None
-
SetNonDestructive
()¶ - @name Setting 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.
- param theFlag
- type theFlag
bool
- rtype
None
-
SetToFillHistory
()¶ - @name Enabling/Disabling the history collection. Allows disabling the history collection
- param theHistFlag
- type theHistFlag
bool
- rtype
None
-
SimplifyResult
()¶ - @name Result simplification Simplification of the result shape is performed by the means of ShapeUpgrade_UnifySameDomain algorithm. The result of the operation will be overwritten with the simplified result. //! The simplification is performed without creation of the Internal shapes, i.e. shapes connections will never be broken. //! Simplification is performed on the whole result shape. Thus, if the input shapes contained connected tangent edges or faces unmodified during the operation they will also be unified. //! After simplification, the History of result simplification is merged into the main history of operation. So, it is taken into account when asking for Modified, Generated and Deleted shapes. //! Some options of the main operation are passed into the Unifier: - Fuzzy tolerance of the operation is given to the Unifier as the linear tolerance. - Non destructive mode here controls the safe input mode in Unifier. //! @param theUnifyEdges Controls the edges unification. True by default. @param theUnifyFaces Controls the faces unification. True by default. @param theAngularTol Angular criteria for tangency of edges and faces. Precision::Angular() by default.
- param theUnifyEdges
default value is Standard_True
- type theUnifyEdges
bool
- param theUnifyFaces
default value is Standard_True
- type theUnifyFaces
bool
- param theAngularTol
default value is Precision::Angular()
- type theAngularTol
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
BRepAlgoAPI_Check
(*args)¶ Bases:
OCC.Core.BOPAlgo.BOPAlgo_Options
- @name Constructors Empty constructor.
- rtype
None* Constructor for checking single shape. //! @param theS [in] - the shape to check; @param bTestSE [in] - flag which specifies whether to check the shape on small edges or not; by default it is set to True; @param bTestSI [in] - flag which specifies whether to check the shape on self-interference or not; by default it is set to True;
- param theS
- type theS
TopoDS_Shape
- param bTestSE
default value is Standard_True
- type bTestSE
bool
- param bTestSI
default value is Standard_True
- type bTestSI
bool
- rtype
None* Constructor for checking the couple of shapes. Additionally to the validity checks of each given shape, the types of the given shapes will be checked on validity for Boolean operation of given type. //! @param theS1 [in] - the first shape to check; @param theS2 [in] - the second shape to check; @param theOp [in] - the type of Boolean Operation for which the validity of given shapes should be checked. @param bTestSE [in] - flag which specifies whether to check the shape on small edges or not; by default it is set to True; @param bTestSI [in] - flag which specifies whether to check the shape on self-interference or not; by default it is set to True;
- param theS1
- type theS1
TopoDS_Shape
- param theS2
- type theS2
TopoDS_Shape
- param theOp
default value is BOPAlgo_UNKNOWN
- type theOp
BOPAlgo_Operation
- param bTestSE
default value is Standard_True
- type bTestSE
bool
- param bTestSI
default value is Standard_True
- type bTestSI
bool
- rtype
None
-
IsValid
()¶ - @name Getting the results. Shows whether shape(s) valid or not.
- rtype
bool
-
Perform
()¶ - @name Performing the operation Performs the check.
- rtype
None
-
Result
()¶ - Returns faulty shapes.
- rtype
BOPAlgo_ListOfCheckResult
-
SetData
()¶ - @name Initializing the algorithm Initializes the algorithm with single shape. //! @param theS [in] - the shape to check; @param bTestSE [in] - flag which specifies whether to check the shape on small edges or not; by default it is set to True; @param bTestSI [in] - flag which specifies whether to check the shape on self-interference or not; by default it is set to True;
- param theS
- type theS
TopoDS_Shape
- param bTestSE
default value is Standard_True
- type bTestSE
bool
- param bTestSI
default value is Standard_True
- type bTestSI
bool
- rtype
None* Initializes the algorithm with couple of shapes. Additionally to the validity checks of each given shape, the types of the given shapes will be checked on validity for Boolean operation of given type. //! @param theS1 [in] - the first shape to check; @param theS2 [in] - the second shape to check; @param theOp [in] - the type of Boolean Operation for which the validity of given shapes should be checked. @param bTestSE [in] - flag which specifies whether to check the shape on small edges or not; by default it is set to True; @param bTestSI [in] - flag which specifies whether to check the shape on self-interference or not; by default it is set to True;
- param theS1
- type theS1
TopoDS_Shape
- param theS2
- type theS2
TopoDS_Shape
- param theOp
default value is BOPAlgo_UNKNOWN
- type theOp
BOPAlgo_Operation
- param bTestSE
default value is Standard_True
- type bTestSE
bool
- param bTestSI
default value is Standard_True
- type bTestSI
bool
- rtype
None
-
property
thisown
¶ The membership flag
-
class
BRepAlgoAPI_Common
(*args)¶ Bases:
OCC.Core.BRepAlgoAPI.BRepAlgoAPI_BooleanOperation
- Empty constructor
- rtype
None* Empty constructor <PF> - PaveFiller object that is carried out
- param PF
- type PF
BOPAlgo_PaveFiller
- rtype
None* Constructor with two shapes <S1> -argument <S2> -tool <anOperation> - the type of the operation Obsolete
- param S1
- type S1
TopoDS_Shape
- param S2
- type S2
TopoDS_Shape
- rtype
None* Constructor with two shapes <S1> -argument <S2> -tool <anOperation> - the type of the operation <PF> - PaveFiller object that is carried out Obsolete
- param S1
- type S1
TopoDS_Shape
- param S2
- type S2
TopoDS_Shape
- param PF
- type PF
BOPAlgo_PaveFiller
- rtype
None
-
property
thisown
¶ The membership flag
-
class
BRepAlgoAPI_Cut
(*args)¶ Bases:
OCC.Core.BRepAlgoAPI.BRepAlgoAPI_BooleanOperation
- Empty constructor
- rtype
None* Empty constructor <PF> - PaveFiller object that is carried out
- param PF
- type PF
BOPAlgo_PaveFiller
- rtype
None* Constructor with two shapes <S1> -argument <S2> -tool <anOperation> - the type of the operation Obsolete
- param S1
- type S1
TopoDS_Shape
- param S2
- type S2
TopoDS_Shape
- rtype
None* Constructor with two shapes <S1> -argument <S2> -tool <anOperation> - the type of the operation <PF> - PaveFiller object that is carried out Obsolete
- param S1
- type S1
TopoDS_Shape
- param S2
- type S2
TopoDS_Shape
- param aDSF
- type aDSF
BOPAlgo_PaveFiller
- param bFWD
default value is Standard_True
- type bFWD
bool
- rtype
None
-
property
thisown
¶ The membership flag
-
class
BRepAlgoAPI_Defeaturing
(*args)¶ Bases:
OCC.Core.BRepAlgoAPI.BRepAlgoAPI_Algo
- @name Constructors Empty constructor
- rtype
None
-
AddFaceToRemove
()¶ - Adds the features 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
-
FacesToRemove
()¶ - Returns the list of faces which have been requested for removal from the input 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 whether the history was requested or not.
- rtype
bool
-
HasModified
()¶ - Returns true if any of the input shapes has been modified during operation.
- rtype
bool
-
History
()¶ - Returns the History of shapes modifications
- rtype
opencascade::handle<BRepTools_History>
-
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 features from. It should either be the SOLID, COMPSOLID or COMPOUND of Solids.
- param theShape
- type theShape
TopoDS_Shape
- rtype
None
-
SetToFillHistory
()¶ - @name History Methods Defines whether to track the modification of the shapes or not.
- param theFlag
- type theFlag
bool
- rtype
None
-
property
thisown
¶ The membership flag
-
class
BRepAlgoAPI_Fuse
(*args)¶ Bases:
OCC.Core.BRepAlgoAPI.BRepAlgoAPI_BooleanOperation
- Empty constructor
- rtype
None* Empty constructor <PF> - PaveFiller object that is carried out
- param PF
- type PF
BOPAlgo_PaveFiller
- rtype
None* Constructor with two shapes <S1> -argument <S2> -tool <anOperation> - the type of the operation Obsolete
- param S1
- type S1
TopoDS_Shape
- param S2
- type S2
TopoDS_Shape
- rtype
None* Constructor with two shapes <S1> -argument <S2> -tool <anOperation> - the type of the operation <PF> - PaveFiller object that is carried out Obsolete
- param S1
- type S1
TopoDS_Shape
- param S2
- type S2
TopoDS_Shape
- param aDSF
- type aDSF
BOPAlgo_PaveFiller
- rtype
None
-
property
thisown
¶ The membership flag
-
class
BRepAlgoAPI_Section
(*args)¶ Bases:
OCC.Core.BRepAlgoAPI.BRepAlgoAPI_BooleanOperation
- Empty constructor
- rtype
None* Empty constructor <PF> - PaveFiller object that is carried out
- param PF
- type PF
BOPAlgo_PaveFiller
- rtype
None* Constructor with two shapes <S1> -argument <S2> -tool <PerformNow> - the flag: if <PerformNow>=True - the algorithm is performed immediatly Obsolete
- param S1
- type S1
TopoDS_Shape
- param S2
- type S2
TopoDS_Shape
- param PerformNow
default value is Standard_True
- type PerformNow
bool
- rtype
None* Constructor with two shapes <S1> -argument <S2> -tool <PF> - PaveFiller object that is carried out <PerformNow> - the flag: if <PerformNow>=True - the algorithm is performed immediatly Obsolete
- param S1
- type S1
TopoDS_Shape
- param S2
- type S2
TopoDS_Shape
- param aDSF
- type aDSF
BOPAlgo_PaveFiller
- param PerformNow
default value is Standard_True
- type PerformNow
bool
- rtype
None* Constructor with two shapes <S1> - argument <Pl> - tool <PerformNow> - the flag: if <PerformNow>=True - the algorithm is performed immediatly Obsolete
- param S1
- type S1
TopoDS_Shape
- param Pl
- type Pl
gp_Pln
- param PerformNow
default value is Standard_True
- type PerformNow
bool
- rtype
None* Constructor with two shapes <S1> - argument <Sf> - tool <PerformNow> - the flag: if <PerformNow>=True - the algorithm is performed immediatly Obsolete
- param S1
- type S1
TopoDS_Shape
- param Sf
- type Sf
Geom_Surface
- param PerformNow
default value is Standard_True
- type PerformNow
bool
- rtype
None* Constructor with two shapes <Sf> - argument <S2> - tool <PerformNow> - the flag: if <PerformNow>=True - the algorithm is performed immediatly Obsolete
- param Sf
- type Sf
Geom_Surface
- param S2
- type S2
TopoDS_Shape
- param PerformNow
default value is Standard_True
- type PerformNow
bool
- rtype
None* Constructor with two shapes <Sf1> - argument <Sf2> - tool <PerformNow> - the flag: if <PerformNow>=True - the algorithm is performed immediatly Obsolete
- param Sf1
- type Sf1
Geom_Surface
- param Sf2
- type Sf2
Geom_Surface
- param PerformNow
default value is Standard_True
- type PerformNow
bool
- rtype
None
-
Approximation
()¶ - Parameters
B –
- type B
bool
- rtype
None
-
ComputePCurveOn1
()¶ - Indicates whether the P-Curve should be (or not) performed on the argument. By default, no parametric 2D curve (pcurve) is defined for the edges of the result. If ComputePCurve1 equals true, further computations performed to attach an P-Curve in the parametric space of the argument to the constructed edges. Obsolete
- param B
- type B
bool
- rtype
None
-
ComputePCurveOn2
()¶ - Indicates whether the P-Curve should be (or not) performed on the tool. By default, no parametric 2D curve (pcurve) is defined for the edges of the result. If ComputePCurve1 equals true, further computations performed to attach an P-Curve in the parametric space of the tool to the constructed edges. Obsolete
- param B
- type B
bool
- rtype
None
-
HasAncestorFaceOn1
()¶ - get the face of the first part giving section edge <E>. Returns True on the 3 following conditions1/ <E> is an edge returned by the Shape() metwod. 2/ First part of section performed is a shape. 3/ <E> is built on a intersection curve (i.e <E> is not the result of common edges) When False, F remains untouched. Obsolete
- param E
- type E
TopoDS_Shape
- param F
- type F
TopoDS_Shape
- rtype
bool
-
HasAncestorFaceOn2
()¶ - Identifies the ancestor faces of the intersection edge E resulting from the last computation performed in this framework, that is, the faces of the two original shapes on which the edge E lies: - HasAncestorFaceOn1 gives the ancestor face in the first shape, and - HasAncestorFaceOn2 gives the ancestor face in the second shape. These functions return true if an ancestor face F is found, or false if not. An ancestor face is identifiable for the edge E if the following conditions are satisfied: - the first part on which this algorithm performed its last computation is a shape, that is, it was not given as a surface or a plane at the time of construction of this algorithm or at a later time by the Init1 function, - E is one of the elementary edges built by the last computation of this section algorithm. To use these functions properly, you have to test the returned Boolean value before using the ancestor face: F is significant only if the returned Boolean value equals true. Obsolete
- param E
- type E
TopoDS_Shape
- param F
- type F
TopoDS_Shape
- rtype
bool
-
Init1
()¶ - initialize the argument <S1> - argument Obsolete
- param S1
- type S1
TopoDS_Shape
- rtype
None* initialize the argument <Pl> - argument Obsolete
- param Pl
- type Pl
gp_Pln
- rtype
None* initialize the argument <Sf> - argument Obsolete
- param Sf
- type Sf
Geom_Surface
- rtype
None
-
Init2
()¶ - initialize the tool <S2> - tool Obsolete
- param S2
- type S2
TopoDS_Shape
- rtype
None* initialize the tool <Pl> - tool Obsolete
- param Pl
- type Pl
gp_Pln
- rtype
None* initialize the tool <Sf> - tool Obsolete
- param Sf
- type Sf
Geom_Surface
- rtype
None
-
property
thisown
¶ The membership flag
-
class
BRepAlgoAPI_Splitter
(*args)¶ Bases:
OCC.Core.BRepAlgoAPI.BRepAlgoAPI_BuilderAlgo
- @name Constructors Empty constructor
- rtype
None* Constructor with already prepared intersection tool - PaveFiller
- param thePF
- type thePF
BOPAlgo_PaveFiller
- rtype
None
-
SetTools
()¶ - @name Setters/Getters for the Tools Sets the Tool arguments
- param theLS
- type theLS
TopTools_ListOfShape
- rtype
None
-
Tools
()¶ - Returns the Tool arguments
- rtype
TopTools_ListOfShape
-
property
thisown
¶ The membership flag