Version: 8.3.0
Home
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

Functions

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

Detailed Description

Function Documentation

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.

def OrientationChange (   self,
  theShape,
  theName = None 
)
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.ManageTransactions(), geomBuilder.ParseList(), and geomBuilder.RaiseIfFailed().

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

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 geomBuilder.ManageTransactions(), and geomBuilder.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.ManageTransactions(), geomBuilder.ParseParameters(), geomBuilder.RaiseIfFailed(), and geomBuilder.ToList().

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.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ToList().

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, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().

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, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().

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, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().

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.ManageTransactions(), geomBuilder.ParseParameters(), and geomBuilder.RaiseIfFailed().

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.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ToList().

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, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().

def ChangeOrientationShell (   self,
  theObject 
)

Change orientation of the given object.

Updates given shape.

Parameters
theObjectShape to be processed.
Returns
Updated theObject

Example

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

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, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().

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, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().

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) occured 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.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ToList().

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.ManageTransactions(), geomBuilder.ParseParameters(), and geomBuilder.ToList().

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.MakeGlueFacesByList(), geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), geomBuilder.ShapesOp, and geomBuilder.ToList().

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.ManageTransactions(), and geomBuilder.ToList().

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.ManageTransactions(), geomBuilder.ParseParameters(), and geomBuilder.ToList().

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.ManageTransactions(), geomBuilder.RaiseIfFailed(), geomBuilder.ShapesOp, and geomBuilder.ToList().

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.ManageTransactions(), and geomBuilder.ToList().