BOPAlgo
OCCT package BOPAlgo: BOPAlgo_AlertAcquiredSelfIntersection, BOPAlgo_AlertBadPositioning, BOPAlgo_AlertBOPNotAllowed, BOPAlgo_AlertBOPNotSet, and 68 more…
BOPAlgo_AlertAcquiredSelfIntersection
Constructors(1)
- Parameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertBadPositioning
Constructors(1)
- constructor(theShape: TopoDS_Shape): BOPAlgo_AlertBadPositioningParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertBOPNotAllowed
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertBOPNotSet
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertBuilderFailed
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertBuildingPCurveFailed
Constructors(1)
- constructor(theShape: TopoDS_Shape): BOPAlgo_AlertBuildingPCurveFailedParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertEmptyShape
Constructors(1)
- constructor(theShape: TopoDS_Shape): BOPAlgo_AlertEmptyShapeParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertFaceBuilderUnusedEdges
Constructors(1)
- Parameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertIntersectionFailed
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertIntersectionOfPairOfShapesFailed
Constructors(1)
- Parameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertMultiDimensionalArguments
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertMultipleArguments
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertNoFacesToRemove
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertNoFiller
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertNoPeriodicityRequired
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertNotSplittableEdge
Constructors(1)
- constructor(theShape: TopoDS_Shape): BOPAlgo_AlertNotSplittableEdgeParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertNullInputShapes
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertPostTreatFF
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertRemovalOfIBForEdgesFailed
Constructors(1)
- Parameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertRemovalOfIBForFacesFailed
Constructors(1)
- Parameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertRemovalOfIBForMDimShapes
Constructors(1)
- Parameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertRemovalOfIBForSolidsFailed
Constructors(1)
- Parameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertRemoveFeaturesFailed
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertSelfInterferingShape
Constructors(1)
- constructor(theShape: TopoDS_Shape): BOPAlgo_AlertSelfInterferingShapeParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertShapeIsNotPeriodic
Constructors(1)
- constructor(theShape: TopoDS_Shape): BOPAlgo_AlertShapeIsNotPeriodicParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertShellSplitterFailed
Constructors(1)
- constructor(theShape: TopoDS_Shape): BOPAlgo_AlertShellSplitterFailedParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertSolidBuilderFailed
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertSolidBuilderUnusedFaces
Constructors(1)
- Parameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertTooFewArguments
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertTooSmallEdge
Constructors(1)
- constructor(theShape: TopoDS_Shape): BOPAlgo_AlertTooSmallEdgeParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertUnableToGlue
Constructors(1)
- constructor(theShape: TopoDS_Shape): BOPAlgo_AlertUnableToGlueParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertUnableToMakeClosedEdgeOnFace
Constructors(1)
- Parameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertUnableToMakeIdentical
Constructors(1)
- Parameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertUnableToMakePeriodic
Constructors(1)
- constructor(theShape: TopoDS_Shape): BOPAlgo_AlertUnableToMakePeriodicParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertUnableToOrientTheShape
Constructors(1)
- Parameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertUnableToRemoveTheFeature
Constructors(1)
- Parameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertUnableToRepeat
Constructors(1)
- constructor(theShape: TopoDS_Shape): BOPAlgo_AlertUnableToRepeatParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertUnableToTrim
Constructors(1)
- constructor(theShape: TopoDS_Shape): BOPAlgo_AlertUnableToTrimParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertUnknownShape
Constructors(1)
- constructor(theShape: TopoDS_Shape): BOPAlgo_AlertUnknownShapeParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertUnsupportedType
Constructors(1)
- constructor(theShape: TopoDS_Shape): BOPAlgo_AlertUnsupportedTypeParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_AlertUserBreak
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(1)
BOPAlgo_Algo
The class provides the root interface for the algorithms in Boolean Component.
Instance methods(1)
- Perform(theRange?: Message_ProgressRange): void
The main method to implement the operation Providing the range allows to enable Progress indicator User break functionalities.
Parameters (1)theRange
BOPAlgo_ArgumentAnalyzer
check the validity of argument(s) for Boolean Operations
Constructors(1)
empty constructor
Instance methods(18)
- SetShape1(TheShape: TopoDS_Shape): void
sets object shape
Parameters (1)TheShape
- SetShape2(TheShape: TopoDS_Shape): void
sets tool shape
Parameters (1)TheShape
returns object shape;
returns tool shape
returns ref
- StopOnFirstFaulty(): boolean
returns ref
- ArgumentTypeMode(): boolean
Returns (modifiable) mode that means checking types of shapes.
- SelfInterMode(): boolean
Returns (modifiable) mode that means checking of self-intersection of shapes.
- SmallEdgeMode(): boolean
Returns (modifiable) mode that means checking of small edges.
- RebuildFaceMode(): boolean
Returns (modifiable) mode that means checking of possibility to split or rebuild faces.
- TangentMode(): boolean
Returns (modifiable) mode that means checking of tangency between subshapes.
- MergeVertexMode(): boolean
Returns (modifiable) mode that means checking of problem of merging vertices.
- MergeEdgeMode(): boolean
Returns (modifiable) mode that means checking of problem of merging edges.
- ContinuityMode(): boolean
Returns (modifiable) mode that means checking of problem of continuity of the shape.
- CurveOnSurfaceMode(): boolean
Returns (modifiable) mode that means checking of problem of invalid curve on surface.
- Perform(theRange?: Message_ProgressRange): void
performs analysis
Parameters (1)theRange
- HasFaulty(): boolean
result of test
returns a result of test
BOPAlgo_BOP
The class represents the Building part of the Boolean Operations algorithm. The arguments of the algorithms are divided in two groups - Objects and Tools. The algorithm builds the splits of the given arguments using the intersection results and combines the result of Boolean Operation of given type:
- FUSE - union of two groups of objects;
- COMMON - intersection of two groups of objects;
- CUT - subtraction of one group from the other.
The rules for the arguments and type of the operation are the following: - For Boolean operation FUSE all arguments should have equal dimensions;
- For Boolean operation CUT the minimal dimension of Tools should not be less than the maximal dimension of Objects;
- For Boolean operation COMMON the arguments can have any dimension.
The class is a General Fuse based algorithm. Thus, all options of the General Fuse algorithm such as Fuzzy mode, safe processing mode, parallel processing mode, gluing mode and history support are also available in this algorithm.
Additionally to the Warnings of the parent class the algorithm returns the following warnings: - BOPAlgo_AlertEmptyShape - in case some of the input shapes are empty shapes.
Additionally to Errors of the parent class the algorithm returns the following Error statuses: - BOPAlgo_AlertBOPIsNotSet - in case the type of Boolean operation is not set;
- BOPAlgo_AlertBOPNotAllowed - in case the operation of given type is not allowed on given inputs;
- BOPAlgo_AlertSolidBuilderFailed - in case the BuilderSolid algorithm failed to produce the Fused solid.
Constructors(2)
Empty constructor.
- constructor(theAllocator: NCollection_BaseAllocator): BOPAlgo_BOPParameters (1)
theAllocator
Instance methods(3)
- SetOperation(theOperation: BOPAlgo_Operation): voidParameters (1)
theOperation
- Perform(theRange?: Message_ProgressRange): void
The main method to implement the operation Providing the range allows to enable Progress indicator User break functionalities.
Parameters (1)theRange
BOPAlgo_Builder
The class is a General Fuse algorithm - base algorithm for the algorithms in the Boolean Component. Its main purpose is to build the split parts of the argument shapes from which the result of the operations is combined. The result of the General Fuse algorithm itself is a compound containing all split parts of the arguments.
Additionally to the options of the base classes, the algorithm has the following options:
- Safe processing mode - allows to avoid modification of the input shapes during the operation (by default it is off);
- Gluing options - allows to speed up the calculation of the intersections on the special cases, in which some sub-shapes are coinciding.
- Disabling the check for inverted solids - Disables/Enables the check of the input solids for inverted status (holes in the space). The default value is TRUE, i.e. the check is performed. Setting this flag to FALSE for inverted solids, most likely will lead to incorrect results.
The algorithm returns the following warnings: - BOPAlgo_AlertUnableToOrientTheShape - in case the check on the orientation of the split shape to match the orientation of the original shape has failed.
The algorithm returns the following Error statuses: - BOPAlgo_AlertTooFewArguments - in case there are no enough arguments to perform the operation;
- BOPAlgo_AlertNoFiller - in case the intersection tool has not been created;
- BOPAlgo_AlertIntersectionFailed - in case the intersection of the arguments has failed;
- BOPAlgo_AlertBuilderFailed - in case building splits of arguments has failed with some unexpected error.
Constructors(2)
Empty constructor.
- constructor(theAllocator: NCollection_BaseAllocator): BOPAlgo_BuilderParameters (1)
theAllocator
Instance methods(17)
Returns the Data Structure, holder of intersection information.
Returns the Context, tool for cashing heavy algorithms.
- AddArgument(theShape: TopoDS_Shape): voidParameters (1)
theShape
- SetArguments(theLS: NCollection_List_TopoDS_Shape): voidParameters (1)
theLS
- SetNonDestructive(theFlag: boolean): voidParameters (1)
theFlag
- NonDestructive(): boolean
- SetGlue(theGlue: BOPAlgo_GlueEnum): voidParameters (1)
theGlue
- SetCheckInverted(theCheck: boolean): voidParameters (1)
theCheck
- CheckInverted(): boolean
- Perform(theRange?: Message_ProgressRange): voidParameters (1)
theRange
- BuildBOP(theObjects: NCollection_List_TopoDS_Shape, theObjState: TopAbs_State, theTools: NCollection_List_TopoDS_Shape, theToolsState: TopAbs_State, theRange: Message_ProgressRange, theReport: Message_Report): voidParameters (6)
theObjectstheObjStatetheToolstheToolsStatetheRangetheReport
- BuildBOP(theObjects: NCollection_List_TopoDS_Shape, theTools: NCollection_List_TopoDS_Shape, theOperation: BOPAlgo_Operation, theRange: Message_ProgressRange, theReport: Message_Report): voidParameters (5)
theObjectstheToolstheOperationtheRangetheReport
BOPAlgo_BuilderArea
The root class for algorithms to build faces/solids from set of edges/faces.
Instance methods(7)
- SetContext(theContext: IntTools_Context): void
Sets the context for the algorithms.
Parameters (1)theContext
Returns the input shapes.
- SetShapes(theLS: NCollection_List_TopoDS_Shape): void
Sets the shapes for building areas.
Parameters (1)theLS
Returns the found loops.
Returns the found areas.
- SetAvoidInternalShapes(theAvoidInternal: boolean): void
Defines the preventing of addition of internal parts into result. The default value is FALSE, i.e. the internal parts are added into result.
Parameters (1)theAvoidInternal
- IsAvoidInternalShapes(): boolean
Returns the AvoidInternalShapes flag.
BOPAlgo_BuilderFace
The algorithm to build new faces from the given faces and set of edges lying on this face.
The algorithm returns the following Error statuses:
- BOPAlgo_AlertNullInputShapes - in case the given face is a null shape.
Constructors(2)
- constructor(theAllocator: NCollection_BaseAllocator): BOPAlgo_BuilderFaceParameters (1)
theAllocator
Instance methods(4)
- SetFace(theFace: TopoDS_Face): void
Sets the face generatix.
Parameters (1)theFace
- Face(): TopoDS_Face
Returns the face generatix.
- Perform(theRange?: Message_ProgressRange): void
Performs the algorithm.
Parameters (1)theRange
BOPAlgo_BuilderShape
Root class for algorithms that has shape as result.
The class provides the History mechanism, which allows tracking the modification of the input shapes during the operation. It uses the BRepTools_History tool as a storer for history objects.
Instance methods(10)
- Parameters (1)
theS
- Parameters (1)
theS
- IsDeleted(theS: TopoDS_Shape): booleanParameters (1)
theS
- HasModified(): boolean
- HasGenerated(): boolean
- HasDeleted(): boolean
- SetToFillHistory(theHistFlag: boolean): voidParameters (1)
theHistFlag
- HasHistory(): boolean
BOPAlgo_BuilderSolid
Solid Builder is the algorithm for building solids from set of faces. The given faces should be non-intersecting, i.e. all coinciding parts of the faces should be shared among them.
The algorithm performs the following steps to build the solids:
- Find:faces orientated INTERNAL;alone faces given twice with different orientation;
- Build all possible closed shells from the rest of the faces (
BOPAlgo_ShellSplitteris used for that); - Classify the obtained shells on the Holes and Growths;
- Build solids from the Growth shells, put Hole shells into closest Growth solids;
- Classify all unused faces relatively created solids and put them as internal shells into the closest solids;
- Find all unclassified faces, i.e. faces outside of all created solids, make internal shells from them and put these shells into a warning.
It is possible to avoid all internal shells in the resulting solids. For that it is necessary to use the method SetAvoidInternalShapes(true) of the base class. In this case the steps 5 and 6 will not be performed at all.
The algorithm may return the following warnings:
- BOPAlgo_AlertShellSplitterFailed in case the ShellSplitter algorithm has failed;
- BOPAlgo_AlertSolidBuilderUnusedFaces in case there are some faces outside of created solids left.
Example of usage of the algorithm:
Constructors(2)
- constructor(theAllocator: NCollection_BaseAllocator): BOPAlgo_BuilderSolidParameters (1)
theAllocator
Instance methods(2)
- Perform(theRange?: Message_ProgressRange): voidParameters (1)
theRange
BOPAlgo_CellsBuilder
The algorithm is based on the General Fuse algorithm (GFA). The result of GFA is all split parts of the Arguments.
The purpose of this algorithm is to provide the result with the content of:
- Cells (parts) defined by the user;
- Internal boundaries defined by the user.
In other words the algorithm should provide the possibility for the user to add or remove any part to (from) result and remove any internal boundaries between parts.
All the requirements of GFA for the DATA are inherited in this algorithm. The arguments could be of any type (dimension) and should be valid in terms ofBRepCheck_AnalyzerandBOPAlgo_ArgumentAnalyzer.
Results:
The result of the algorithm is compound containing selected parts of the basic types (VERTEX, EDGE, FACE or SOLID). The default result is empty compound. It is possible to add any split part to the result by using the methods AddToRessult() andAddAllToResult(). It is also possible to remove any part from the result by using methodsRemoveFromResult()andRemoveAllFromResult(). The methodRemoveAllFromResult()is also suitable for clearing the result.
To remove Internal boundaries it is necessary to set the same material to the parts between which the boundaries should be removed and call the methodRemoveInternalBoundaries(). The material should not be equal to 0, as this is default material value. The boundaries between parts with this value will not be removed. One part cannot be added with the different materials. It is also possible to remove the boundaries during combining the result. To do this it is necessary to set the material for parts (not equal to 0) and set the flag bUpdate to TRUE.
For the arguments of the types FACE or EDGE it is recommended to remove the boundaries in the end when the result is completely built. It will help to avoid self-intersections in the result.
Note, that if the result contains the parts with same material but of different dimension the boundaries between such parts will not be removed. Currently, the removal of the internal boundaries between multi-dimensional shapes is not supported.
It is possible to create typed Containers from the parts added to result by using methodMakeContainers().
The type of the containers will depend on the type of the arguments: WIRES for EEDGE, SHELLS for FACES and COMPSOLIDS for SOLIDS. The result will be compound containing containers. Adding of the parts to such result will not update containers. The result compound will contain the containers and new added parts (of basic type). Removing of the parts from such result may affect some containers if the parts that should be removed is in container. In this case this container will be rebuilt without that part.
History:
The algorithm supports history information for basic types of the shapes - VERTEX, EDGE, FACE. This information available through the methodsIsDeleted()andModified().
In DRAW Test Harness it is available through the same commands as for Boolean Operations (bmodified, bgenerated and bisdeleted).
The algorithm can return the following Error Statuses:
- Error status acquired in the General Fuse algorithm. The Error status can be checked with
HasErrors()method. If the Error status is not equal to zero, the result cannot be trustworthy.
The algorithm can set the following Warning Statuses: - Warning status acquired in the General Fuse algorithm;
- BOPAlgo_AlertRemovalOfIBForMDimShapes
- BOPAlgo_AlertRemovalOfIBForFacesFailed
- BOPAlgo_AlertRemovalOfIBForEdgesFailed
- BOPAlgo_AlertRemovalOfIBForSolidsFailed
The Warning status can be checked withHasWarnings()method or printed with theDumpWarnings()method. If warnings are recorded, the result may be not as expected.
Examples:
API BOPAlgo_CellsBuilderaCBuilder; NCollection_List<TopoDS_Shape>aLS=...;//arguments //parallelorsinglemode(thedefaultvalueisFALSE) booltoRunParallel=false; //fuzzyoption(defaultvalueis0) doubleaTol=0.0; // aCBuilder.SetArguments(aLS); aCBuilder.SetRunParallel(toRunParallel); aCBuilder.SetFuzzyValue(aTol); // aCBuilder.Perform(); if(aCBuilder.HasErrors())//checkerrorstatus { return; } //emptycompound,asnothinghasbeenaddedyet constTopoDS_Shape&aRes=aCBuilder.Shape(); //allsplitparts constTopoDS_Shape&aRes=aCBuilder.GetAllParts(); // NCollection_List<TopoDS_Shape>aLSToTake=...;//partsoftheseargumentswillbetakeninto resultNCollection_List<TopoDS_Shape>aLSToAvoid=...;//partsoftheseargumentswillnotbe takenintoresult // //definesthematerialcommonforthecells, //i.e.theboundariesbetweencellswiththesamematerialwillberemoved. //Bydefaultitissetto0. //Thus,toremovesomeboundarythevalueofthisvariableshouldnotbeequalto0. intiMaterial=...;
//defineswhethertoupdatetheresultrightnowornot booltoUpdate=...; //addingtoresult aCBuilder.AddToResult(aLSToTake,aLSToAvoid,iMaterial,toUpdate); aR=aCBuilder.Shape();//theresult //removingoftheboundaries(shouldbecalledonlyiftoUpdateisfalse) aCBuilder.RemoveInternalBoundaries(); // //removingfromresult aCBuilder.AddAllToResult(); aCBuilder.RemoveFromResult(aLSToTake,aLSToAvoid); aR=aCBuilder.Shape();//theresult
2. DRAW Test Harness pspheres115 pspheres215 pspheres315 ttranslates10010 ttranslates220010 ttranslates31000 #addingarguments bclearobjects;bcleartools baddobjectss1s2s3 #intersection bfillds #rxwillcontainallsplitparts bcbuildrx #addtoresultthepartthatiscommonforallthreespheres bcaddress11s21s31-m1 #addtoresultthepartthatiscommononlyforfirstandthirdspheres bcaddress11s20s31-m1 #removeinternalboundaries bcremoveintres
Constructors(2)
- constructor(theAllocator: NCollection_BaseAllocator): BOPAlgo_CellsBuilderParameters (1)
theAllocator
Instance methods(7)
- AddToResult(theLSToTake: NCollection_List_TopoDS_Shape, theLSToAvoid: NCollection_List_TopoDS_Shape, theMaterial?: number, theUpdate?: boolean): void
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.Parameters (4)theLSToTaketheLSToAvoidtheMaterialtheUpdate
- AddAllToResult(theMaterial?: number, theUpdate?: boolean): void
Add all split parts to result. <theMaterial> defines the removal of internal boundaries; <theUpdate> parameter defines whether to remove boundaries now or not.
Parameters (2)theMaterialtheUpdate
- RemoveFromResult(theLSToTake: NCollection_List_TopoDS_Shape, theLSToAvoid: NCollection_List_TopoDS_Shape): void
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>.
Parameters (2)theLSToTaketheLSToAvoid
- RemoveAllFromResult(): void
Remove all parts from result.
- RemoveInternalBoundaries(): void
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. Get all split parts.
- MakeContainers(): void
Makes the Containers of proper type from the parts added to result.
BOPAlgo_CheckerSI
Checks the shape on self-interference.
The algorithm can set the following errors:
- BOPAlgo_AlertMultipleArguments - The number of the input arguments is not one;
- BOPALgo_ErrorIntersectionFailed - The check has been aborted during intersection of sub-shapes. In case the error has occurred during intersection of sub-shapes, i.e. in
BOPAlgo_PaveFiller::PerformInternal()method, the errors from this method directly will be returned.
Constructors(1)
Instance methods(2)
- Perform(theRange?: Message_ProgressRange): void
The main method to implement the operation Providing the range allows to enable Progress indicator User break functionalities.
Parameters (1)theRange
- SetLevelOfCheck(theLevel: number): void
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).
Parameters (1)theLevel
BOPAlgo_CheckResult
contains information about faulty shapes and faulty types can't be processed by Boolean Operations
Constructors(1)
empty constructor
Instance methods(18)
- SetShape1(TheShape: TopoDS_Shape): void
sets ancestor shape (object) for faulty sub-shapes
Parameters (1)TheShape
- AddFaultyShape1(TheShape: TopoDS_Shape): void
adds faulty sub-shapes from object to a list
Parameters (1)TheShape
- SetShape2(TheShape: TopoDS_Shape): void
sets ancestor shape (tool) for faulty sub-shapes
Parameters (1)TheShape
- AddFaultyShape2(TheShape: TopoDS_Shape): void
adds faulty sub-shapes from tool to a list
Parameters (1)TheShape
returns ancestor shape (object) for faulties
returns ancestor shape (tool) for faulties
returns list of faulty shapes for object
returns list of faulty shapes for tool
- SetCheckStatus(TheStatus: BOPAlgo_CheckStatus): void
set status of faulty
Parameters (1)TheStatus
gets status of faulty
- SetMaxDistance1(theDist: number): void
Sets max distance for the first shape.
Parameters (1)theDist
- SetMaxDistance2(theDist: number): void
Sets max distance for the second shape.
Parameters (1)theDist
- SetMaxParameter1(thePar: number): void
Sets the parameter for the first shape.
Parameters (1)thePar
- SetMaxParameter2(thePar: number): void
Sets the parameter for the second shape.
Parameters (1)thePar
- GetMaxDistance1(): number
Returns the distance for the first shape.
- GetMaxDistance2(): number
Returns the distance for the second shape.
- GetMaxParameter1(): number
Returns the parameter for the fircst shape.
- GetMaxParameter2(): number
Returns the parameter for the second shape.
BOPAlgo_CheckStatus
Properties(12)
BOPAlgo_EdgeInfo
Constructors(1)
Instance methods(10)
- SetEdge(theE: TopoDS_Edge): voidParameters (1)
theE
- Edge(): TopoDS_Edge
- SetPassed(theFlag: boolean): voidParameters (1)
theFlag
- Passed(): boolean
- SetInFlag(theFlag: boolean): voidParameters (1)
theFlag
- IsIn(): boolean
- SetAngle(theAngle: number): voidParameters (1)
theAngle
- Angle(): number
- IsInside(): boolean
- SetIsInside(theIsInside: boolean): voidParameters (1)
theIsInside
BOPAlgo_GlueEnum
Properties(3)
BOPAlgo_MakeConnected
BOPAlgo_MakeConnected is the algorithm for making the touching shapes connected or glued, i.e. for making the coinciding geometries be topologically shared among the shapes.
The input shapes should be of the same dimension, otherwise the gluing will not make any sense.
After the shapes are made connected, the border elements of input shapes are associated with the shapes to which they belong. At that, the orientation of the border element in the shape is taken into account. The associations are made for the following types:
- For input SOLIDS, the resulting FACES are associated with the input solids;
- For input FACES, the resulting EDGES are associated with the input faces;
- For input EDGES, the resulting VERTICES are associated with the input edges.
In frames of this algorithm the input shapes are called materials, and the association process is called the material association. The material association allows finding the coinciding elements for the opposite input shapes. These elements will be associated to at least two materials.
After making the shapes connected, it is possible to make the connected shape periodic using theBOPAlgo_MakePeriodictool. After making the shape periodic, the material associations will be updated to correspond to the actual state of the result shape. Repetition of the periodic shape is also possible here. Material associations are not going to be lost.
The algorithm supports history of shapes modification, thus it is possible to track the modification of the input shapes during the operations. Additionally to standard history methods, the algorithm provides the the methodGetOrigins()which allows obtaining the input shapes from which the resulting shape has been created.
The algorithm supports the parallel processing mode, which allows faster completion of the operations.
The algorithm returns the following Error/Warning messages: - BOPAlgo_AlertTooFewArguments - error alert is given on the attempt to run the algorithm without the arguments;
- BOPAlgo_AlertMultiDimensionalArguments - error alert is given on the attempt to run the algorithm on multi-dimensional arguments;
- BOPAlgo_AlertUnableToGlue - error alert is given if the gluer algorithm is unable to glue the given arguments;
- BOPAlgo_AlertUnableToMakePeriodic - warning alert is given if the periodicity maker is unable to make the connected shape periodic with given options;
- BOPAlgo_AlertShapeIsNotPeriodic - warning alert is given on the attempt to repeat the shape before making it periodic.
Here is the example of usage of the algorithm:
Constructors(1)
Instance methods(16)
- SetArguments(theArgs: NCollection_List_TopoDS_Shape): voidParameters (1)
theArgs
- AddArgument(theS: TopoDS_Shape): voidParameters (1)
theS
- Perform(): void
- MakePeriodic(theParams: BOPAlgo_MakePeriodic_PeriodicityParams): voidParameters (1)
theParams
- RepeatShape(theDirectionID: number, theTimes: number): voidParameters (2)
theDirectionIDtheTimes
- ClearRepetitions(): void
- Parameters (1)
theS
- Parameters (1)
theS
- Parameters (1)
theS
- Parameters (1)
theS
- Clear(): void
BOPAlgo_MakePeriodic
BOPAlgo_MakePeriodic is the tool for making an arbitrary shape periodic in 3D space in specified directions.
Periodicity of the shape means that the shape can be repeated in any periodic direction any number of times without creation of the new geometry or splits.
The idea is to make the shape look identical on the opposite sides of the periodic directions, so when translating the copy of a shape on the period there will be no coinciding parts of different dimensions.
If necessary the algorithm will trim the shape to fit it into the requested period by splitting it by the planes limiting the shape's requested period.
For making the shape periodic in certain direction the algorithm performs the following steps:
- Creates the copy of the shape and moves it on the period into negative side of the requested direction;
- Splits the negative side of the shape by the moved copy, ensuring copying of the geometry from positive side to negative;
- Creates the copy of the shape (with already split negative side) and moves it on the period into the positive side of the requested direction;
- Splits the positive side of the shape by the moved copy, ensuring copying of the geometry from negative side to positive.
The algorithm also associates the identical (or twin) shapes located on the opposite sides of the result shape. Using theGetTwins()method it is possible to get the twin shapes from the opposite sides.
Algorithm also provides the methods to repeat the periodic shape in periodic directions. The subsequent repetitions are performed on the repeated shape, thus repeating the shape two times in X direction will create result in three shapes (original plus two copies). Single subsequent repetition will result already in 6 shapes. The repetitions can be cleared and started over.
The algorithm supports History of shapes modifications, thus it is possible to track how the shape has been changed to make it periodic and what new shapes have been created during repetitions.
The algorithm supports the parallel processing mode, which allows faster completion of the operations.
The algorithm supports the Error/Warning system and returns the following alerts: - BOPAlgo_AlertNoPeriodicityRequired - Error alert is given if no periodicity has been requested in any direction;
- BOPAlgo_AlertUnableToTrim - Error alert is given if the trimming of the shape for fitting it into requested period has failed;
- BOPAlgo_AlertUnableToMakeIdentical - Error alert is given if splitting of the shape by its moved copies has failed;
- BOPAlgo_AlertUnableToRepeat - Warning alert is given if the gluing of the repeated shapes has failed.
Example of usage of the algorithm:
Constructors(1)
Static methods(1)
- ToDirectionID(theDirectionID: number): numberParameters (1)
theDirectionID
Instance methods(38)
- SetShape(theShape: TopoDS_Shape): voidParameters (1)
theShape
- SetPeriodicityParameters(theParams: BOPAlgo_MakePeriodic_PeriodicityParams): voidParameters (1)
theParams
- MakePeriodic(theDirectionID: number, theIsPeriodic: boolean, thePeriod?: number): voidParameters (3)
theDirectionIDtheIsPeriodicthePeriod
- IsPeriodic(theDirectionID: number): booleanParameters (1)
theDirectionID
- Period(theDirectionID: number): numberParameters (1)
theDirectionID
- MakeXPeriodic(theIsPeriodic: boolean, thePeriod?: number): voidParameters (2)
theIsPeriodicthePeriod
- IsXPeriodic(): boolean
- XPeriod(): number
- MakeYPeriodic(theIsPeriodic: boolean, thePeriod?: number): voidParameters (2)
theIsPeriodicthePeriod
- IsYPeriodic(): boolean
- YPeriod(): number
- MakeZPeriodic(theIsPeriodic: boolean, thePeriod?: number): voidParameters (2)
theIsPeriodicthePeriod
- IsZPeriodic(): boolean
- ZPeriod(): number
- SetTrimmed(theDirectionID: number, theIsTrimmed: boolean, theFirst?: number): voidParameters (3)
theDirectionIDtheIsTrimmedtheFirst
- IsInputTrimmed(theDirectionID: number): booleanParameters (1)
theDirectionID
- PeriodFirst(theDirectionID: number): numberParameters (1)
theDirectionID
- SetXTrimmed(theIsTrimmed: boolean, theFirst?: boolean): voidParameters (2)
theIsTrimmedtheFirst
- IsInputXTrimmed(): boolean
- XPeriodFirst(): number
- SetYTrimmed(theIsTrimmed: boolean, theFirst?: boolean): voidParameters (2)
theIsTrimmedtheFirst
- IsInputYTrimmed(): boolean
- YPeriodFirst(): number
- SetZTrimmed(theIsTrimmed: boolean, theFirst?: boolean): voidParameters (2)
theIsTrimmedtheFirst
- IsInputZTrimmed(): boolean
- ZPeriodFirst(): number
- Perform(): void
- RepeatShape(theDirectionID: number, theTimes: number): TopoDS_ShapeParameters (2)
theDirectionIDtheTimes
- XRepeat(theTimes: number): TopoDS_ShapeParameters (1)
theTimes
- YRepeat(theTimes: number): TopoDS_ShapeParameters (1)
theTimes
- ZRepeat(theTimes: number): TopoDS_ShapeParameters (1)
theTimes
- ClearRepetitions(): void
- Parameters (1)
theS
- Clear(): void
BOPAlgo_MakePeriodic_PeriodicityParams
Constructors(1)
Instance methods(1)
- Clear(): void
BOPAlgo_MakerVolume
The algorithm is to build solids from set of shapes. It uses the BOPAlgo_Builder algorithm to intersect the given shapes and build the images of faces (if needed) and BOPAlgo_BuilderSolid algorithm to build the solids.
Steps of the algorithm:
- Collect all faces: intersect the shapes if necessary and collect the images of faces, otherwise just collect the faces to the <myFaces> list; All faces on this step added twice, with orientation FORWARD and REVERSED;
- Create bounding box covering all the faces from <myFaces> and create solid box from corner points of that bounding box (myBBox, mySBox). Add faces from that box to <myFaces>;
- Build solids from <myFaces> using
BOPAlgo_BuilderSolidalgorithm; - Treat the result: Eliminate solid containing faces from <mySBox>;
- Fill internal shapes: add internal vertices and edges into created solids;
- Prepare the history.
Fields: <myIntersect> - boolean flag. It defines whether intersect shapes from <myArguments> (if set to TRUE) or not (FALSE). The default value is TRUE. By setting it to FALSE the user should guarantee that shapes in <myArguments> do not interfere with each other, otherwise the result is unpredictable.
<myBBox> - bounding box, covering all faces from <myFaces>.
<mySBox> - Solid box created from the corner points of <myBBox>.
<myFaces> - the list is to keep the "final" faces, that will be given to theBOPAlgo_BuilderSolidalgorithm. If the shapes have been interfered it should contain the images of the source shapes, otherwise its just the original faces. It also contains the faces from <mySBox>.
Fields inherited fromBOPAlgo_Builder:
<myArguments> - list of the source shapes. The source shapes can have any type, but each shape must not be self-interfered.
<myShape> - Result shape:
- empty compound - if no solids were created;
- solid - if created only one solid;
- compound of solids - if created more than one solid.
Fields inherited fromBOPAlgo_Algo:
<myRunParallel> - Defines whether the parallel processing is switched on or not. <myReport> - Error status of the operation. Additionally to the errors of the parent algorithm it can have the following values: - BOPAlgo_AlertSolidBuilderFailed -
BOPAlgo_BuilderSolidalgorithm has failed.
Example:
BOPAlgo_MakerVolumeaMV; // aMV.SetArguments(aLS); //source shapes aMV.SetRunParallel(bRunParallel); //parallel or single mode aMV.SetIntersect(bIntersect); //intersect or not the shapes from <aLS> // aMV.Perform(); //perform the operation if (aMV.HasErrors()) { //check error status return; } // constTopoDS_Shape& aResult = aMV.Shape(); //result of the operation
Constructors(2)
Empty constructor.
- constructor(theAllocator: NCollection_BaseAllocator): BOPAlgo_MakerVolume
Empty constructor.
Parameters (1)theAllocator
Instance methods(7)
- SetIntersect(bIntersect: boolean): void
Sets the flag myIntersect: if <bIntersect> is TRUE the shapes from <myArguments> will be intersected. if <bIntersect> is FALSE no intersection will be done.
Parameters (1)bIntersect
- IsIntersect(): boolean
Returns the flag <myIntersect>.
- Box(): TopoDS_Solid
Returns the solid box <mySBox>.
Returns the processed faces <myFaces>.
- SetAvoidInternalShapes(theAvoidInternal: boolean): void
Defines the preventing of addition of internal for solid parts into the result. By default the internal parts are added into result.
Parameters (1)theAvoidInternal
- IsAvoidInternalShapes(): boolean
Returns the AvoidInternalShapes flag.
- Perform(theRange?: Message_ProgressRange): void
Performs the operation.
Parameters (1)theRange
BOPAlgo_Operation
Properties(6)
BOPAlgo_Options
The class provides the following options for the algorithms in Boolean Component:
- Memory allocation tool - tool for memory allocations;
- Error and warning reporting - allows recording warnings and errors occurred during the operation. Error means that the algorithm has failed.
- Parallel processing mode - provides the possibility to perform operation in parallel mode;
- Fuzzy tolerance - additional tolerance for the operation to detect touching or coinciding cases;
- Using the Oriented Bounding Boxes - Allows using the Oriented Bounding Boxes of the shapes for filtering the intersections.
Constructors(2)
Empty constructor.
- constructor(theAllocator: NCollection_BaseAllocator): BOPAlgo_Options
Constructor with allocator.
Parameters (1)theAllocator
Static methods(2)
- GetParallelMode(): boolean
- SetParallelMode(theNewMode: boolean): voidParameters (1)
theNewMode
Instance methods(16)
Returns allocator.
- Clear(): void
Clears all warnings and errors, and any data cached by the algorithm. User defined options are not cleared.
- AddError(theAlert: Message_Alert): voidParameters (1)
theAlert
- AddWarning(theAlert: Message_Alert): voidParameters (1)
theAlert
- HasErrors(): boolean
- HasError(theType: Standard_Type): booleanParameters (1)
theType
- HasWarnings(): boolean
- HasWarning(theType: Standard_Type): booleanParameters (1)
theType
- ClearWarnings(): void
- SetRunParallel(theFlag: boolean): voidParameters (1)
theFlag
- RunParallel(): boolean
- SetFuzzyValue(theFuzz: number): voidParameters (1)
theFuzz
- FuzzyValue(): number
- SetUseOBB(theUseOBB: boolean): voidParameters (1)
theUseOBB
- UseOBB(): boolean
BOPAlgo_ParallelAlgo
Additional root class to provide interface to be launched from parallel vector. It already has the range as a field, and has to be used with caution to create scope from the range only once.
Instance methods(3)
- Perform(): void
The main method to implement the operation.
- Perform(theRange: Message_ProgressRange): void
The main method to implement the operation.
Parameters (1)theRange
- SetProgressRange(theRange: Message_ProgressRange): void
Sets the range for a single run.
Parameters (1)theRange
BOPAlgo_PISteps
Class for representing the relative contribution of each step of the operation to the whole progress.
Constructors(1)
- constructor(theNbOp: number): BOPAlgo_PISteps
Constructor.
Parameters (1)theNbOp
Instance methods(4)
BOPAlgo_RemoveFeatures
The RemoveFeatures algorithm is intended for reconstruction of the shape by removal of the unwanted parts from it. These parts can be holes, protrusions, spikes, fillets etc. The shape itself is not modified, the new shape is built in the result.
Currently, only the shapes of type SOLID, COMPSOLID, and COMPOUND of Solids are supported. And only the FACEs can be removed from the shape.
On the input the algorithm accepts the shape itself and the faces which have to be removed. It does not matter how the faces are given. It could be the separate faces or the collections of faces. The faces should belong to the initial shape, and those that do not belong will be ignored. Before reconstructing the shape, the algorithm will sort all the given faces on the connected blocks (features).
The features will be removed from the shape one by one. It will allow removing all possible features even if there were problems with the removal of some of them.
The removed feature is filled by the extension of the faces adjacent to the feature. In general, the algorithm of removing of the single feature from the shape looks as follows:
- Find the faces adjacent to the feature;
- Extend the adjacent faces to cover the feature;
- Trim the extended faces by the bounds of original face (except for bounds common with the feature), so it will cover the feature only;
- Rebuild the solids with reconstructed adjacent faces avoiding the faces from the feature.
If the removal is successful, the result is overwritten with the new shape and the next feature is treated. Otherwise, the warning will be given.
The algorithm has the following options: - History support;
and the options available from base class: - Error/Warning reporting system;
- Parallel processing mode.
Please note that the other options of the base class are not supported here and will have no effect.
History support allows tracking modification of the input shape in terms of Modified, IsDeleted and Generated. The history is available through the methods of the history toolBRepTools_History, which can be accessed here through the methodHistory(). By default, the history is collected, but it is possible to disable it using the method SetToFillHistory(false);
Error/Warning reporting system - allows obtaining the extended overview of the Errors/Warnings occurred during the operation. As soon as any error appears the algorithm stops working. The warnings allow continuing the job, informing the user that something went wrong. The algorithm returns the following errors/warnings: - BOPAlgo_AlertTooFewArguments - the error alert is given if the input shape does not contain any solids;
- BOPAlgo_AlertUnsupportedType - the warning alert is given if the input shape contains not only solids, but also other shapes;
- BOPAlgo_AlertNoFacesToRemove - the error alert is given in case there are no faces to remove from the shape (nothing to do);
- BOPAlgo_AlertUnableToRemoveTheFeature - the warning alert is given to inform the user the removal of the feature is not possible. The algorithm will still try to remove the other features;
- BOPAlgo_AlertRemoveFeaturesFailed - the error alert is given in case if the operation was aborted by the unknown reason.
Parallel processing mode - allows running the algorithm in parallel mode obtaining the result faster.
The algorithm has certain limitations: - Intersection of the connected faces adjacent to the feature should not be empty. It means, that such faces should not be tangent to each other. If the intersection of the adjacent faces will be empty, the algorithm will be unable to trim the faces correctly and, most likely, the feature will not be removed.
- The algorithm does not process the INTERNAL parts of the solids, they are simply removed during reconstruction.
Note that for successful removal of the feature, the extended faces adjacent to the feature should cover the feature completely, otherwise the solids will not be rebuild.
Here is the example of usage of the algorithm:
The algorithm preserves the type of the input shape in the result shape. Thus, if the input shape is a COMPSOLID, the resulting solids will also be put into a COMPSOLID.
When all possible features are removed, the shape is simplified by removing extra edges and vertices, created during operation, from the result shape.
Constructors(1)
Instance methods(7)
- SetShape(theShape: TopoDS_Shape): voidParameters (1)
theShape
- AddFaceToRemove(theFace: TopoDS_Shape): voidParameters (1)
theFace
- AddFacesToRemove(theFaces: NCollection_List_TopoDS_Shape): voidParameters (1)
theFaces
- Perform(theRange?: Message_ProgressRange): voidParameters (1)
theRange
- Clear(): void
BOPAlgo_Section
The algorithm to build a Section between the arguments. The Section consists of vertices and edges. The Section contains:
- new vertices that are subjects of V/V, E/E, E/F, F/F interferences
- vertices that are subjects of V/E, V/F interferences
- new edges that are subjects of F/F interferences
- edges that are Common Blocks
Constructors(2)
Empty constructor.
- constructor(theAllocator: NCollection_BaseAllocator): BOPAlgo_Section
Constructor with allocator.
Parameters (1)theAllocator
BOPAlgo_SectionAttribute
Class is a container of the flags used by intersection algorithm.
Constructors(2)
Default constructor.
- constructor(theAproximation: boolean, thePCurveOnS1: boolean, thePCurveOnS2: boolean): BOPAlgo_SectionAttribute
Constructor.
Parameters (3)theAproximationthePCurveOnS1thePCurveOnS2
Instance methods(6)
- Approximation(theApprox: boolean): void
Sets the Approximation flag.
Parameters (1)theApprox
- Approximation(): boolean
Returns the Approximation flag.
- PCurveOnS1(thePCurveOnS1: boolean): void
Sets the PCurveOnS1 flag.
Parameters (1)thePCurveOnS1
- PCurveOnS1(): boolean
Returns the PCurveOnS1 flag.
- PCurveOnS2(thePCurveOnS2: boolean): void
Sets the PCurveOnS2 flag.
Parameters (1)thePCurveOnS2
- PCurveOnS2(): boolean
Returns the PCurveOnS2 flag.
BOPAlgo_ShellSplitter
The class provides the splitting of the set of connected faces on separate loops.
Constructors(2)
empty constructor
- constructor(theAllocator: NCollection_BaseAllocator): BOPAlgo_ShellSplitter
constructor
Parameters (1)theAllocator
Static methods(1)
- SplitBlock(theCB: BOPTools_ConnexityBlock): voidParameters (1)
theCB
Instance methods(4)
- AddStartElement(theS: TopoDS_Shape): void
adds a face <theS> to process
Parameters (1)theS
return the faces to process
- Perform(theRange?: Message_ProgressRange): void
performs the algorithm
Parameters (1)theRange
returns the loops
BOPAlgo_Splitter
The Splitter algorithm is the algorithm for splitting a group of arbitrary shapes by the other group of arbitrary shapes. The arguments of the operation are divided on two groups: Objects - shapes that will be split; Tools - shapes by which the Objects will be split. The result of the operation contains only the split parts of the shapes from the group of Objects. The split parts of the shapes from the group of Tools are excluded from the result. The shapes can be split by the other shapes from the same group (in case these shapes are interfering).
The class is a General Fuse based algorithm. Thus, all options of the General Fuse algorithm such as Fuzzy mode, safe processing mode, parallel processing mode, gluing mode and history support are also available in this algorithm. There is no requirement on the existence of the Tools shapes. And if there are no Tools shapes, the result of the splitting operation will be equivalent to the General Fuse result.
The implementation of the algorithm is minimal - only the methods CheckData() and Perform() have been overridden. The method BOPAlgo_Builder::BuildResult(), which adds the split parts of the arguments into result, does not have to be overridden, because its native implementation performs the necessary actions for the Splitter algorithm - it adds the split parts of only Objects into result, avoiding the split parts of Tools.
Constructors(2)
Empty constructor.
- constructor(theAllocator: NCollection_BaseAllocator): BOPAlgo_SplitterParameters (1)
theAllocator
Instance methods(1)
- Perform(theRange?: Message_ProgressRange): void
Performs the operation.
Parameters (1)theRange
BOPAlgo_Tools
Provides tools used in the intersection part of Boolean operations.
Constructors(1)
Static methods(8)
- FillMap(thePB1: BOPDS_PaveBlock, theF: number, theMILI: NCollection_IndexedDataMap_handle_BOPDS_PaveBlock_NCollection_List_int, theAllocator: NCollection_BaseAllocator): void
Fills the map with the connected entities.
Parameters (4)thePB1theFtheMILI—Mutated in place; read the updated value from this argument after the call.theAllocator
- ComputeToleranceOfCB(theCB: BOPDS_CommonBlock, theDS: BOPDS_DS, theContext: IntTools_Context): numberParameters (3)
theCBtheDStheContext
- EdgesToWires(theEdges: TopoDS_Shape, theWires: TopoDS_Shape, theShared: boolean, theAngTol: number): number
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 inIntTools_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.Parameters (4)theEdgestheWires—Mutated in place; read the updated value from this argument after the call.theSharedtheAngTol
- WiresToFaces(theWires: TopoDS_Shape, theFaces: TopoDS_Shape, theAngTol: number): boolean
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 inIntTools_FaceFace. Method returns TRUE in case of success, i.e. at least one face has been built.Parameters (3)theWirestheFaces—Mutated in place; read the updated value from this argument after the call.theAngTol
- IntersectVertices(theVertices: NCollection_IndexedDataMap_TopoDS_Shape_double_TopTools_ShapeMapHasher, theFuzzyValue: number, theChains: NCollection_List_NCollection_List_TopoDS_Shape): void
Finds chains of intersecting vertices.
Parameters (3)theVerticestheFuzzyValuetheChains—Mutated in place; read the updated value from this argument after the call.
- ClassifyFaces(theFaces: NCollection_List_TopoDS_Shape, theSolids: NCollection_List_TopoDS_Shape, theRunParallel: boolean, theInParts: NCollection_IndexedDataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher, theShapeBoxMap: NCollection_DataMap_TopoDS_Shape_Bnd_Box_TopTools_ShapeMapHasher, theSolidsIF: NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher, theRange: Message_ProgressRange): { theContext: IntTools_Context; [Symbol.dispose](): void }
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 partsParameters (7)theFacestheSolidstheRunParalleltheInParts—Mutated in place; read the updated value from this argument after the call.theShapeBoxMaptheSolidsIFtheRange
ReturnsA result object with fields:
theContext: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- FillInternals(theSolids: NCollection_List_TopoDS_Shape, theParts: NCollection_List_TopoDS_Shape, theImages: NCollection_DataMap_TopoDS_Shape_NCollection_List_TopoDS_Shape_TopTools_ShapeMapHasher, theContext: IntTools_Context): void
Classifies the given parts relatively the given solids and fills the solids with the parts classified as INTERNAL.
Parameters (4)theSolids—- The solids to put internals to
theParts—- The parts to classify relatively solids
theImages—- Possible images of the parts that has to be classified
theContext—- cached geometrical tools to speed-up classifications
- TrsfToPoint(theBox1: Bnd_Box, theBox2: Bnd_Box, theTrsf: gp_Trsf, thePoint: gp_Pnt, theCriteria: number): boolean
Computes the transformation needed to move the objects to the given point to increase the quality of computations. Returns true if the objects are located far from the given point (relatively given criteria), false otherwise.
Parameters (5)theBox1—the AABB of the first objecttheBox2—the AABB of the second objecttheTrsf—the computed transformation Mutated in place; read the updated value from this argument after the call.thePoint—the Point to compute transformation totheCriteria—the Criteria to check whether thranformation is required
BOPAlgo_ToolsProvider
Auxiliary class providing API to operate tool arguments.
Constructors(2)
Empty constructor.
- constructor(theAllocator: NCollection_BaseAllocator): BOPAlgo_ToolsProviderParameters (1)
theAllocator
Instance methods(4)
- Clear(): void
Clears internal fields and arguments.
- AddTool(theShape: TopoDS_Shape): void
Adds Tool argument of the operation.
Parameters (1)theShape
- SetTools(theShapes: NCollection_List_TopoDS_Shape): void
Adds the Tool arguments of the operation.
Parameters (1)theShapes
Returns the Tool arguments of the operation.
BOPAlgo_WireEdgeSet
Constructors(2)
- constructor(theAllocator: NCollection_BaseAllocator): BOPAlgo_WireEdgeSetParameters (1)
theAllocator
Instance methods(7)
- Clear(): void
- SetFace(aF: TopoDS_Face): voidParameters (1)
aF
- Face(): TopoDS_Face
- AddStartElement(sS: TopoDS_Shape): voidParameters (1)
sS
- AddShape(sS: TopoDS_Shape): voidParameters (1)
sS
BOPAlgo_WireSplitter
The class is to build loops from the given set of edges.
It returns the following Error statuses
- BOPAlgo_AlertNullInputShapes - in case there no input edges to build the loops.
Constructors(2)
- constructor(theAllocator: NCollection_BaseAllocator): BOPAlgo_WireSplitterParameters (1)
theAllocator
Static methods(2)
- MakeWire(theLE: NCollection_List_TopoDS_Shape, theW: TopoDS_Wire): voidParameters (2)
theLEtheW
- SplitBlock(theF: TopoDS_Face, theCB: BOPTools_ConnexityBlock, theContext: IntTools_Context): voidParameters (3)
theFtheCBtheContext
Instance methods(5)
- SetWES(theWES: BOPAlgo_WireEdgeSet): voidParameters (1)
theWES
- SetContext(theContext: IntTools_Context): void
Sets the context for the algorithm.
Parameters (1)theContext
Returns the context.
- Perform(theRange?: Message_ProgressRange): void
The main method to implement the operation Providing the range allows to enable Progress indicator User break functionalities.
Parameters (1)theRange