Version: 6.5.0
Home
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
Repairing Operations
Transforming geometrical objects

Functions

def geompy.ChangeOrientation
 Reverses an orientation the given shape.
def geompy.OrientationChange
 See ChangeOrientation() method for details.
def geompy.ProcessShape
 Apply a sequence of Shape Healing operators to the given object.
def geompy.SuppressFaces
 Remove faces from the given object (shape).
def geompy.MakeSewing
 Sewing of some shapes into single shape.
def geompy.Sew
 Sewing of the given object.
def geompy.SuppressInternalWires
 Remove internal wires and edges from the given object (face).
def geompy.SuppressHoles
 Remove internal closed contours (holes) from the given object.
def geompy.CloseContour
 Close an open wire.
def geompy.DivideEdge
 Addition of a point to a given edge object.
def geompy.ChangeOrientationShell
 Change orientation of the given object.
def geompy.ChangeOrientationShellCopy
 Change orientation of the given object.
def geompy.LimitTolerance
 Try to limit tolerance of the given object by value theTolerance.
def geompy.GetFreeBoundary
 Get a list of wires (wrapped in GEOM.GEOM_Object-s), that constitute a free boundary of the given shape.
def geompy.MakeGlueFaces
 Replace coincident faces in theShape by one face.
def geompy.GetGlueFaces
 Find coincident faces in theShape for possible gluing.
def geompy.MakeGlueFacesByList
 Replace coincident faces in theShape by one face in compliance with given list of faces.
def geompy.MakeGlueEdges
 Replace coincident edges in theShape by one edge.
def geompy.GetGlueEdges
 Find coincident edges in theShape for possible gluing.
def geompy.MakeGlueEdgesByList
 Replace coincident edges in theShape by one edge in compliance with given list of edges.

Detailed Description

Function Documentation

def geompy.ChangeOrientation (   self,
  theShape 
)

Reverses an orientation the given shape.

Parameters
theShapeShape to be reversed.
Returns
The reversed copy of theShape.

Example

References geompy.RaiseIfFailed().

def geompy.OrientationChange (   self,
  theShape 
)

See ChangeOrientation() method for details.

Example

def geompy.ProcessShape (   self,
  theShape,
  theOperators,
  theParameters,
  theValues 
)

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.

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.
  • 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 geompy.ParseList(), and geompy.RaiseIfFailed().

def geompy.SuppressFaces (   self,
  theObject,
  theFaces 
)

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.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geompy.RaiseIfFailed().

def geompy.MakeSewing (   self,
  ListShape,
  theTolerance 
)

Sewing of some shapes into single shape.

Parameters
ListShapeShapes to be processed.
theToleranceRequired tolerance value.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

def geompy.Sew (   self,
  theObject,
  theTolerance 
)

Sewing of the given object.

Parameters
theObjectShape to be processed.
theToleranceRequired tolerance value.
Returns
New GEOM.GEOM_Object, containing processed shape.

References geompy.ParseParameters(), and geompy.RaiseIfFailed().

def geompy.SuppressInternalWires (   self,
  theObject,
  theWires 
)

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.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geompy.RaiseIfFailed().

def geompy.SuppressHoles (   self,
  theObject,
  theWires 
)

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
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geompy.RaiseIfFailed().

def geompy.CloseContour (   self,
  theObject,
  theWires,
  isCommonVertex 
)

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.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geompy.RaiseIfFailed().

def geompy.DivideEdge (   self,
  theObject,
  theEdgeIndex,
  theValue,
  isByParameter 
)

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]
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geompy.ParseParameters(), and geompy.RaiseIfFailed().

def geompy.ChangeOrientationShell (   self,
  theObject 
)

Change orientation of the given object.

Updates given shape.

Parameters
theObjectShape to be processed.
Returns
Updated theObject

Example

References geompy.RaiseIfFailed().

def geompy.ChangeOrientationShellCopy (   self,
  theObject 
)

Change orientation of the given object.

Parameters
theObjectShape to be processed.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geompy.RaiseIfFailed().

def geompy.LimitTolerance (   self,
  theObject,
  theTolerance = 1e-07 
)

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

Parameters
theObjectShape to be processed.
theToleranceRequired tolerance value.
Returns
New GEOM.GEOM_Object, containing processed shape.

Example

References geompy.RaiseIfFailed().

def geompy.GetFreeBoundary (   self,
  theObject 
)

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

def geompy.MakeGlueFaces (   self,
  theShape,
  theTolerance,
  doKeepNonSolids = True 
)

Replace coincident faces in theShape by one face.

Parameters
theShapeInitial shape.
theToleranceMaximum distance between faces, which can be considered as coincident.
doKeepNonSolidsIf FALSE, only solids will present in the result, otherwise all initial shapes.
Returns
New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.

Example

References geompy.ParseParameters().

def geompy.GetGlueFaces (   self,
  theShape,
  theTolerance 
)

Find coincident faces in theShape for possible gluing.

Parameters
theShapeInitial shape.
theToleranceMaximum distance between faces, which can be considered as coincident.
Returns
GEOM.ListOfGO

Example

References geompy.MakeGlueFacesByList(), and geompy.RaiseIfFailed().

def geompy.MakeGlueFacesByList (   self,
  theShape,
  theTolerance,
  theFaces,
  doKeepNonSolids = True,
  doGlueAllEdges = True 
)

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

Parameters
theShapeInitial shape.
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.
Returns
New GEOM.GEOM_Object, containing a copy of theShape without some faces.

Example

def geompy.MakeGlueEdges (   self,
  theShape,
  theTolerance 
)

Replace coincident edges in theShape by one edge.

Parameters
theShapeInitial shape.
theToleranceMaximum distance between edges, which can be considered as coincident.
Returns
New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.

Example

References geompy.ParseParameters().

def geompy.GetGlueEdges (   self,
  theShape,
  theTolerance 
)

Find coincident edges in theShape for possible gluing.

Parameters
theShapeInitial shape.
theToleranceMaximum distance between edges, which can be considered as coincident.
Returns
GEOM.ListOfGO

Example

References geompy.RaiseIfFailed().

def geompy.MakeGlueEdgesByList (   self,
  theShape,
  theTolerance,
  theEdges 
)

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

Parameters
theShapeInitial shape.
theToleranceMaximum distance between edges, which can be considered as coincident.
theEdgesList of edges for gluing.
Returns
New GEOM.GEOM_Object, containing a copy of theShape without some edges.

Example

Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS