Version: 9.12.0
Home

Functions

def ChangeOrientation (self, theShape, theName=None)
 Reverses an orientation the given shape. More...
 
def OrientationChange (self, theShape, theName=None)
 See ChangeOrientation() method for details. More...
 
def ProcessShape (self, theShape, theOperators, theParameters, theValues, theName=None)
 Apply a sequence of Shape Healing operators to the given object. More...
 
def SuppressFaces (self, theObject, theFaces, theName=None)
 Remove faces from the given object (shape). More...
 
def MakeSewing (self, ListShape, theTolerance, AllowNonManifold=False, theName=None)
 Sewing of faces into a single shell. More...
 
def Sew (self, ListShape, theTolerance, AllowNonManifold=False, theName=None)
 Sewing of faces into a single shell. More...
 
def RemoveInternalFaces (self, theSolids, theName=None)
 Rebuild the topology of theSolids by removing the faces that are shared by several solids. More...
 
def SuppressInternalWires (self, theObject, theWires, theName=None)
 Remove internal wires and edges from the given object (face). More...
 
def SuppressHoles (self, theObject, theWires, theName=None)
 Remove internal closed contours (holes) from the given object. More...
 
def CloseContour (self, theObject, theWires, isCommonVertex, theName=None)
 Close an open wire. More...
 
def DivideEdge (self, theObject, theEdgeIndex, theValue, isByParameter, theName=None)
 Addition of a point to a given edge object. More...
 
def DivideEdgeByPoint (self, theObject, theEdgeIndex, thePoints, theName=None)
 Addition of points to a given edge of theObject by projecting other points to the given edge. More...
 
def FuseCollinearEdgesWithinWire (self, theWire, theVertices=[], theName=None)
 Suppress the vertices in the wire in case if adjacent edges are C1 continuous. More...
 
def ChangeOrientationShell (self, theObject)
 Change orientation of the given object. More...
 
def ChangeOrientationShellCopy (self, theObject, theName=None)
 Change orientation of the given object. More...
 
def LimitTolerance (self, theObject, theTolerance=1e-07, theName=None)
 Try to limit tolerance of the given object by value theTolerance. More...
 
def GetFreeBoundary (self, theObject, theName=None)
 Get a list of wires (wrapped in GEOM.GEOM_Object-s), that constitute a free boundary of the given shape. More...
 
def MakeGlueFaces (self, theShapes, theTolerance, doKeepNonSolids=True, theName=None)
 Replace coincident faces in theShapes by one face. More...
 
def GetGlueFaces (self, theShapes, theTolerance, theName=None)
 Find coincident faces in theShapes for possible gluing. More...
 
def MakeGlueFacesByList (self, theShapes, theTolerance, theFaces, doKeepNonSolids=True, doGlueAllEdges=True, theName=None)
 Replace coincident faces in theShapes by one face in compliance with given list of faces. More...
 
def MakeGlueEdges (self, theShapes, theTolerance, theName=None)
 Replace coincident edges in theShapes by one edge. More...
 
def GetGlueEdges (self, theShapes, theTolerance, theName=None)
 Find coincident edges in theShapes for possible gluing. More...
 
def MakeGlueEdgesByList (self, theShapes, theTolerance, theEdges, theName=None)
 Replace coincident edges in theShapes by one edge in compliance with given list of edges. More...
 

Detailed Description

Function Documentation

◆ ChangeOrientation()

def ChangeOrientation (   self,
  theShape,
  theName = None 
)

Reverses an orientation the given shape.

Parameters
theShapeShape to be reversed.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
The reversed copy of theShape.

Example

References geomBuilder._autoPublish(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.

◆ OrientationChange()

def OrientationChange (   self,
  theShape,
  theName = None 
)

◆ ProcessShape()

def ProcessShape (   self,
  theShape,
  theOperators,
  theParameters,
  theValues,
  theName = None 
)

Apply a sequence of Shape Healing operators to the given object.

Parameters
theShapeShape to be processed.
theOperatorsList of names of operators ("FixShape", "SplitClosedFaces", etc.).
theParametersList of names of parameters ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
theValuesList of values of parameters, in the same order as parameters are listed in theParameters list.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.

Operators and Parameters:

  • FixShape - corrects invalid shapes.
  • FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
  • FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
  • FixFaceSize - removes small faces, such as spots and strips.
  • FixFaceSize.Tolerance - defines minimum possible face size.
  • DropSmallEdges - removes edges, which merge with neighbouring edges.
  • DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
  • DropSmallSolids - either removes small solids or merges them with neighboring ones.
  • DropSmallSolids.WidthFactorThreshold - defines maximum value of 2V/S of a solid which is considered small, where V is volume and S is surface area of the solid.
  • DropSmallSolids.VolumeThreshold - defines maximum volume of a solid which is considered small. If the both tolerances are privided a solid is considered small if it meets the both criteria.
  • DropSmallSolids.MergeSolids - if "1", small solids are removed; if "0" small solids are merged to adjacent non-small solids or left untouched if cannot be merged.
  • SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces in segments using a certain angle.
  • SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments if Angle=180, four if Angle=90, etc).
  • SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
  • SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of splitting points.
  • SplitClosedFaces.NbSplitPoints - the number of splitting points.
  • SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
  • SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
  • SplitContinuity.SurfaceContinuity - required continuity for surfaces.
  • SplitContinuity.CurveContinuity - required continuity for curves.
    This and the previous parameters can take the following values:
    Parametric Continuity
    C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).
    C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel, ruling out sharp edges).
    C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces are of the same magnitude).
    CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves or surfaces (d/du C(u)) are the same at junction.
    Geometric Continuity
    G1: first derivatives are proportional at junction.
    The curve tangents thus have the same direction, but not necessarily the same magnitude. i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
    G2: first and second derivatives are proportional at junction. As the names imply, geometric continuity requires the geometry to be continuous, while parametric continuity requires that the underlying parameterization was continuous as well. Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.
  • BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
  • BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
  • BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
  • BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
  • BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with the specified parameters.
  • BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with the specified parameters.
  • BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
  • BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
  • BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
  • BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
  • ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
  • ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
  • ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
  • ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
  • ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
  • SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
  • SameParameter.Tolerance3d - defines tolerance for fixing of edges.
Returns
New GEOM.GEOM_Object, containing processed shape.


Example

References geomBuilder._autoPublish(), geomBuilder.HealOp, geomBuilder.ParseList(), and geomBuilder.RaiseIfFailed().

◆ SuppressFaces()

def SuppressFaces (   self,
  theObject,
  theFaces,
  theName = None 
)

Remove faces from the given object (shape).

Parameters
theObjectShape to be processed.
theFacesIndices of faces to be removed, if EMPTY then the method removes ALL faces of the given object.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geomBuilder._autoPublish(), geomBuilder.HealOp, and geomBuilder.RaiseIfFailed().

◆ MakeSewing()

def MakeSewing (   self,
  ListShape,
  theTolerance,
  AllowNonManifold = False,
  theName = None 
)

Sewing of faces into a single shell.

Parameters
ListShapeShapes to be processed.
theToleranceRequired tolerance value.
AllowNonManifoldFlag that allows non-manifold sewing.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing a result shell.

Example

References GEOM_IHealingOperations.Sew(), and geomBuilder.Sew().

◆ Sew()

def Sew (   self,
  ListShape,
  theTolerance,
  AllowNonManifold = False,
  theName = None 
)

Sewing of faces into a single shell.

Parameters
ListShapeShapes to be processed.
theToleranceRequired tolerance value.
AllowNonManifoldFlag that allows non-manifold sewing.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing a result shell.

References geomBuilder._autoPublish(), geomBuilder.HealOp, geomBuilder.ParseParameters(), geomBuilder.RaiseIfFailed(), and geomBuilder.ToList().

◆ RemoveInternalFaces()

def RemoveInternalFaces (   self,
  theSolids,
  theName = None 
)

Rebuild the topology of theSolids by removing the faces that are shared by several solids.

Parameters
theSolidsA compound or a list of solids to be processed.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geomBuilder._autoPublish(), geomBuilder.HealOp, geomBuilder.RaiseIfFailed(), and geomBuilder.ToList().

◆ SuppressInternalWires()

def SuppressInternalWires (   self,
  theObject,
  theWires,
  theName = None 
)

Remove internal wires and edges from the given object (face).

Parameters
theObjectShape to be processed.
theWiresIndices of wires to be removed, if EMPTY then the method removes ALL internal wires of the given object.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geomBuilder._autoPublish(), geomBuilder.HealOp, and geomBuilder.RaiseIfFailed().

◆ SuppressHoles()

def SuppressHoles (   self,
  theObject,
  theWires,
  theName = None 
)

Remove internal closed contours (holes) from the given object.

Parameters
theObjectShape to be processed.
theWiresIndices of wires to be removed, if EMPTY then the method removes ALL internal holes of the given object
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geomBuilder._autoPublish(), geomBuilder.HealOp, and geomBuilder.RaiseIfFailed().

◆ CloseContour()

def CloseContour (   self,
  theObject,
  theWires,
  isCommonVertex,
  theName = None 
)

Close an open wire.

Parameters
theObjectShape to be processed.
theWiresIndexes of edge(s) and wire(s) to be closed within theObject's shape, if [ ], then theObject itself is a wire.
isCommonVertexIf True : closure by creation of a common vertex, If False : closure by creation of an edge between ends.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geomBuilder._autoPublish(), geomBuilder.HealOp, and geomBuilder.RaiseIfFailed().

◆ DivideEdge()

def DivideEdge (   self,
  theObject,
  theEdgeIndex,
  theValue,
  isByParameter,
  theName = None 
)

Addition of a point to a given edge object.

Parameters
theObjectShape to be processed.
theEdgeIndexIndex of edge to be divided within theObject's shape, if -1, then theObject itself is the edge.
theValueValue of parameter on edge or length parameter, depending on isByParameter.
isByParameterIf TRUE : theValue is treated as a curve parameter [0..1],
if FALSE : theValue is treated as a length parameter [0..1]
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geomBuilder._autoPublish(), geomBuilder.HealOp, geomBuilder.ParseParameters(), and geomBuilder.RaiseIfFailed().

◆ DivideEdgeByPoint()

def DivideEdgeByPoint (   self,
  theObject,
  theEdgeIndex,
  thePoints,
  theName = None 
)

Addition of points to a given edge of theObject by projecting other points to the given edge.

Parameters
theObjectShape to be processed.
theEdgeIndexIndex of edge to be divided within theObject's shape, if -1, then theObject itself is the edge.
thePointsList of points to project to theEdgeIndex-th edge.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geomBuilder._autoPublish(), geomBuilder.GetSubShapeID(), geomBuilder.HealOp, geomBuilder.RaiseIfFailed(), and geomBuilder.ToList().

◆ FuseCollinearEdgesWithinWire()

def FuseCollinearEdgesWithinWire (   self,
  theWire,
  theVertices = [],
  theName = None 
)

Suppress the vertices in the wire in case if adjacent edges are C1 continuous.

Parameters
theWireWire to minimize the number of C1 continuous edges in.
theVerticesA list of vertices to suppress. If the list is empty, all vertices in a wire will be assumed.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object with modified wire.

Example

References geomBuilder._autoPublish(), geomBuilder.HealOp, and geomBuilder.RaiseIfFailed().

◆ ChangeOrientationShell()

def ChangeOrientationShell (   self,
  theObject 
)

Change orientation of the given object.

Updates given shape.

Parameters
theObjectShape to be processed.
Returns
Updated theObject

Example

References geomBuilder.ChangeOrientation(), geomBuilder.HealOp, and geomBuilder.RaiseIfFailed().

◆ ChangeOrientationShellCopy()

def ChangeOrientationShellCopy (   self,
  theObject,
  theName = None 
)

Change orientation of the given object.

Parameters
theObjectShape to be processed.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geomBuilder._autoPublish(), geomBuilder.HealOp, and geomBuilder.RaiseIfFailed().

◆ LimitTolerance()

def LimitTolerance (   self,
  theObject,
  theTolerance = 1e-07,
  theName = None 
)

Try to limit tolerance of the given object by value theTolerance.

Parameters
theObjectShape to be processed.
theToleranceRequired tolerance value.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geomBuilder._autoPublish(), geomBuilder.HealOp, and geomBuilder.RaiseIfFailed().

◆ GetFreeBoundary()

def GetFreeBoundary (   self,
  theObject,
  theName = None 
)

Get a list of wires (wrapped in GEOM.GEOM_Object-s), that constitute a free boundary of the given shape.

Parameters
theObjectShape to get free boundary of.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
[status, theClosedWires, theOpenWires]
status: FALSE, if an error(s) occurred during the method execution.
theClosedWires: Closed wires on the free boundary of the given shape.
theOpenWires: Open wires on the free boundary of the given shape.

Example

References geomBuilder._autoPublish(), geomBuilder.HealOp, geomBuilder.RaiseIfFailed(), and geomBuilder.ToList().

◆ MakeGlueFaces()

def MakeGlueFaces (   self,
  theShapes,
  theTolerance,
  doKeepNonSolids = True,
  theName = None 
)

Replace coincident faces in theShapes by one face.

Parameters
theShapesInitial shapes, either a list or compound of shapes.
theToleranceMaximum distance between faces, which can be considered as coincident.
doKeepNonSolidsIf FALSE, only solids will present in the result, otherwise all initial shapes.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.

Example

References geomBuilder._autoPublish(), geomBuilder.ParseParameters(), geomBuilder.ShapesOp, and geomBuilder.ToList().

◆ GetGlueFaces()

def GetGlueFaces (   self,
  theShapes,
  theTolerance,
  theName = None 
)

Find coincident faces in theShapes for possible gluing.

Parameters
theShapesInitial shapes, either a list or compound of shapes.
theToleranceMaximum distance between faces, which can be considered as coincident.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
GEOM.ListOfGO

Example

References geomBuilder._autoPublish(), geomBuilder.RaiseIfFailed(), geomBuilder.ShapesOp, and geomBuilder.ToList().

◆ MakeGlueFacesByList()

def MakeGlueFacesByList (   self,
  theShapes,
  theTolerance,
  theFaces,
  doKeepNonSolids = True,
  doGlueAllEdges = True,
  theName = None 
)

Replace coincident faces in theShapes by one face in compliance with given list of faces.

Parameters
theShapesInitial shapes, either a list or compound of shapes.
theToleranceMaximum distance between faces, which can be considered as coincident.
theFacesList of faces for gluing.
doKeepNonSolidsIf FALSE, only solids will present in the result, otherwise all initial shapes.
doGlueAllEdgesIf TRUE, all coincident edges of theShape will be glued, otherwise only the edges, belonging to theFaces.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.

Example

References geomBuilder._autoPublish(), geomBuilder.ShapesOp, and geomBuilder.ToList().

◆ MakeGlueEdges()

def MakeGlueEdges (   self,
  theShapes,
  theTolerance,
  theName = None 
)

Replace coincident edges in theShapes by one edge.

Parameters
theShapesInitial shapes, either a list or compound of shapes.
theToleranceMaximum distance between edges, which can be considered as coincident.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.

Example

References geomBuilder._autoPublish(), geomBuilder.ParseParameters(), geomBuilder.ShapesOp, and geomBuilder.ToList().

◆ GetGlueEdges()

def GetGlueEdges (   self,
  theShapes,
  theTolerance,
  theName = None 
)

Find coincident edges in theShapes for possible gluing.

Parameters
theShapesInitial shapes, either a list or compound of shapes.
theToleranceMaximum distance between edges, which can be considered as coincident.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
GEOM.ListOfGO

Example

References geomBuilder._autoPublish(), geomBuilder.RaiseIfFailed(), geomBuilder.ShapesOp, and geomBuilder.ToList().

◆ MakeGlueEdgesByList()

def MakeGlueEdgesByList (   self,
  theShapes,
  theTolerance,
  theEdges,
  theName = None 
)

Replace coincident edges in theShapes by one edge in compliance with given list of edges.

Parameters
theShapesInitial shapes, either a list or compound of shapes.
theToleranceMaximum distance between edges, which can be considered as coincident.
theEdgesList of edges for gluing.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.

Example

References geomBuilder._autoPublish(), geomBuilder.ShapesOp, and geomBuilder.ToList().