Version: 9.15.0
Home

Functions

def NumberOfFaces (self, theShape)
 Gives quantity of faces in the given shape. More...
 
def NumberOfEdges (self, theShape)
 Gives quantity of edges in the given shape. More...
 
def NumberOfSubShapes (self, theShape, theShapeType)
 Gives quantity of sub-shapes of type theShapeType in the given shape. More...
 
def NumberOfSolids (self, theShape)
 Gives quantity of solids in the given shape. More...
 
def PointCoordinates (self, Point)
 Get point coordinates. More...
 
def VectorCoordinates (self, Vector)
 Get vector coordinates. More...
 
def CrossProduct (self, Vector1, Vector2)
 Compute cross product. More...
 
def DotProduct (self, Vector1, Vector2)
 Compute cross product. More...
 
def BasicProperties (self, theShape, theTolerance=1.e-6)
 Get summarized length of all wires, area of surface and volume of the given shape. More...
 
def BoundingBox (self, theShape, precise=False)
 Get parameters of bounding box of the given shape. More...
 
def MakeBoundingBox (self, theShape, precise=False, theName=None)
 Get bounding box of the given shape. More...
 
def Inertia (self, theShape)
 Get inertia matrix and moments of inertia of theShape. More...
 
def AreCoordsInside (self, theShape, coords, tolerance=1.e-7)
 Get if coords are included in the shape (ST_IN or ST_ON) More...
 
def MinDistance (self, theShape1, theShape2)
 Get minimal distance between the given shapes. More...
 
def MinDistanceComponents (self, theShape1, theShape2)
 Get minimal distance between the given shapes. More...
 
def ClosestPoints (self, theShape1, theShape2)
 Get closest points of the given shapes. More...
 
def GetAngle (self, theShape1, theShape2)
 Get angle between the given shapes in degrees. More...
 
def GetAngleRadians (self, theShape1, theShape2)
 Get angle between the given shapes in radians. More...
 
def GetAngleVectors (self, theShape1, theShape2, theFlag=True)
 Get angle between the given vectors in degrees. More...
 
def GetAngleRadiansVectors (self, theShape1, theShape2, theFlag=True)
 The same as GetAngleVectors, but the result is in radians. More...
 
def CurvatureOnFace (self, theSurf, thePoint, theDirection, theName=None)
 Measure curvature radius of surface in the given point along the given direction. More...
 
def XYZtoUV (self, theSurf, theXYZlist, theIsNormalized=True)
 Convert X,Y,Z points coordinates to UV parameters on the given surface. More...
 
def UVtoXYZ (self, theSurf, theUVlist, theIsNormalized=True)
 Convert UV parameters on the given surface to 3D points coordinates. More...
 
def Tolerance (self, theShape)
 Get min and max tolerances of sub-shapes of theShape. More...
 
def WhatIs (self, theShape)
 Obtain description of the given shape (number of sub-shapes of each type) More...
 
def NbShapes (self, theShape, theType)
 Obtain quantity of shapes of the given type in theShape. More...
 
def ShapeInfo (self, theShape)
 Obtain quantity of shapes of each type in theShape. More...
 
def GetCreationInformation (self, theShape)
 
def MakeCDG (self, theShape, theName=None)
 Get a point, situated at the centre of mass of theShape. More...
 
def GetVertexByIndex (self, theShape, theIndex, theUseOri=True, theName=None)
 Get a vertex sub-shape by index. More...
 
def GetFirstVertex (self, theShape, theName=None)
 Get the first vertex of wire/edge depended orientation. More...
 
def GetLastVertex (self, theShape, theName=None)
 Get the last vertex of wire/edge depended orientation. More...
 
def GetNormal (self, theFace, theOptionalPoint=None, theName=None)
 Get a normale to the given face. More...
 
def PrintShapeErrors (self, theShape, theShapeErrors, theReturnStatus=0)
 Print shape errors obtained from CheckShape. More...
 
def CheckShape (self, theShape, theIsCheckGeom=0, theReturnStatus=0)
 Check a topology of the given shape. More...
 
def CheckSelfIntersections (self, theShape, theCheckLevel=GEOM.SI_ALL)
 Detect self-intersections in the given shape. More...
 
def CheckSelfIntersectionsFast (self, theShape, theDeflection=0.001, theTolerance=0.0)
 Detect self-intersections of the given shape with algorithm based on mesh intersections. More...
 
def CheckBOPArguments (self, theShape)
 Check boolean and partition operations arguments. More...
 
def ExtractBOPFailure (self, theShapes, theTimer=False, theTopo=False, theParallel=False, theExact=False, theVerbose=False, theName=None)
 Performs general fuse BOP on the given list of shapes and extracts CheckShape information from its invalid result. More...
 
def FastIntersect (self, theShape1, theShape2, theTolerance=0.0, theDeflection=0.001)
 Detect intersections of the given shapes with algorithm based on mesh intersections. More...
 
def GetPosition (self, theShape)
 Get position (LCS) of theShape. More...
 
def KindOfShape (self, theShape)
 Get kind of theShape. More...
 
def PatchFace (self, theShape)
 The function takes a single face with holes and returns a list of faces, first of them is the original face without holes, and the other faces are placed on the same surface as the original face but bounded by each hole wire. More...
 
def _IsGoodForSolid (self, theShell)
 Returns the string that describes if the shell is good for solid. More...
 
def CanonicalRecognition (self)
 Obtain a canonical recognition interface. More...
 

Curve Curvature Measurement

Methods for receiving radius of curvature of curves in the given point

def CurveCurvatureByParam (self, theCurve, theParam)
 Measure curvature of a curve at a point, set by parameter. More...
 
def CurveCurvatureByPoint (self, theCurve, thePoint)
 Measure curvature of a curve at a point. More...
 

Surface Curvature Measurement

Methods for receiving max and min radius of curvature of surfaces in the given point

def MaxSurfaceCurvatureByParam (self, theSurf, theUParam, theVParam)
 Measure max radius of curvature of surface. More...
 
def MaxSurfaceCurvatureByPoint (self, theSurf, thePoint)
 Measure max radius of curvature of surface in the given point. More...
 
def MinSurfaceCurvatureByParam (self, theSurf, theUParam, theVParam)
 Measure min radius of curvature of surface. More...
 
def MinSurfaceCurvatureByPoint (self, theSurf, thePoint)
 Measure min radius of curvature of surface in the given point. More...
 

Detailed Description

Function Documentation

◆ NumberOfFaces()

def NumberOfFaces (   self,
  theShape 
)

Gives quantity of faces in the given shape.

Parameters
theShapeShape to count faces of.
Returns
Quantity of faces.

Example

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

◆ NumberOfEdges()

def NumberOfEdges (   self,
  theShape 
)

Gives quantity of edges in the given shape.

Parameters
theShapeShape to count edges of.
Returns
Quantity of edges.

Example

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

◆ NumberOfSubShapes()

def NumberOfSubShapes (   self,
  theShape,
  theShapeType 
)

Gives quantity of sub-shapes of type theShapeType in the given shape.

Parameters
theShapeShape to count sub-shapes of.
theShapeTypeType of sub-shapes to count (see ShapeType())
Returns
Quantity of sub-shapes of given type.

Example

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

◆ NumberOfSolids()

def NumberOfSolids (   self,
  theShape 
)

Gives quantity of solids in the given shape.

Parameters
theShapeShape to count solids in.
Returns
Quantity of solids.

Example

References geomBuilder.NumberOfSubShapes(), geomBuilder.RaiseIfFailed(), geomBuilder.ShapesOp, and geomBuilder.ShapeType.

◆ PointCoordinates()

def PointCoordinates (   self,
  Point 
)

Get point coordinates.

Returns
[x, y, z]

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ VectorCoordinates()

def VectorCoordinates (   self,
  Vector 
)

◆ CrossProduct()

def CrossProduct (   self,
  Vector1,
  Vector2 
)

◆ DotProduct()

def DotProduct (   self,
  Vector1,
  Vector2 
)

Compute cross product.

Returns
dot product p=u.v

Example

References geomBuilder.VectorCoordinates().

◆ BasicProperties()

def BasicProperties (   self,
  theShape,
  theTolerance = 1.e-6 
)

Get summarized length of all wires, area of surface and volume of the given shape.

Parameters
theShapeShape to define properties of.
theTolerancemaximal relative error of area and volume computation.
Returns
[theLength, theSurfArea, theVolume]
theLength: Summarized length of all wires of the given shape.
theSurfArea: Area of surface of the given shape.
theVolume: Volume of the given shape.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ BoundingBox()

def BoundingBox (   self,
  theShape,
  precise = False 
)

Get parameters of bounding box of the given shape.

Parameters
theShapeShape to obtain bounding box of.
preciseTRUE for precise computation; FALSE for fast one.
Returns
[Xmin,Xmax, Ymin,Ymax, Zmin,Zmax] Xmin,Xmax: Limits of shape along OX axis. Ymin,Ymax: Limits of shape along OY axis. Zmin,Zmax: Limits of shape along OZ axis.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ MakeBoundingBox()

def MakeBoundingBox (   self,
  theShape,
  precise = False,
  theName = None 
)

Get bounding box of the given shape.

Parameters
theShapeShape to obtain bounding box of.
preciseTRUE for precise computation; FALSE for fast one.
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 the created box.

Example

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

◆ Inertia()

def Inertia (   self,
  theShape 
)

Get inertia matrix and moments of inertia of theShape.

Parameters
theShapeShape to calculate inertia of.
Returns
[I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz] I(1-3)(1-3): Components of the inertia matrix of the given shape. Ix,Iy,Iz: Moments of inertia of the given shape.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ AreCoordsInside()

def AreCoordsInside (   self,
  theShape,
  coords,
  tolerance = 1.e-7 
)

Get if coords are included in the shape (ST_IN or ST_ON)

Parameters
theShapeShape
coordslist of points coordinates [x1, y1, z1, x2, y2, z2, ...]
toleranceto be used (default is 1.0e-7)
Returns
list_of_boolean = [res1, res2, ...]

References geomBuilder.MeasuOp.

◆ MinDistance()

def MinDistance (   self,
  theShape1,
  theShape2 
)

Get minimal distance between the given shapes.

Parameters
theShape1,theShape2Shapes to find minimal distance between.
Returns
Value of the minimal distance between the given shapes.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ MinDistanceComponents()

def MinDistanceComponents (   self,
  theShape1,
  theShape2 
)

Get minimal distance between the given shapes.

Parameters
theShape1,theShape2Shapes to find minimal distance between.
Returns
Value of the minimal distance between the given shapes, in form of list [Distance, DX, DY, DZ].

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ ClosestPoints()

def ClosestPoints (   self,
  theShape1,
  theShape2 
)

Get closest points of the given shapes.

Parameters
theShape1,theShape2Shapes to find closest points of.
Returns
The number of found solutions (-1 in case of infinite number of solutions) and a list of (X, Y, Z) coordinates for all couples of points.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ GetAngle()

def GetAngle (   self,
  theShape1,
  theShape2 
)

Get angle between the given shapes in degrees.

Parameters
theShape1,theShape2Lines or linear edges to find angle between.
Note
If both arguments are vectors, the angle is computed in accordance with their orientations, otherwise the minimum angle is computed.
Returns
Value of the angle between the given shapes in degrees.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ GetAngleRadians()

def GetAngleRadians (   self,
  theShape1,
  theShape2 
)

Get angle between the given shapes in radians.

Parameters
theShape1,theShape2Lines or linear edges to find angle between.
Note
If both arguments are vectors, the angle is computed in accordance with their orientations, otherwise the minimum angle is computed.
Returns
Value of the angle between the given shapes in radians.

Example

References geomBuilder.GetAngle(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ GetAngleVectors()

def GetAngleVectors (   self,
  theShape1,
  theShape2,
  theFlag = True 
)

Get angle between the given vectors in degrees.

Parameters
theShape1,theShape2Vectors to find angle between.
theFlagIf True, the normal vector is defined by the two vectors cross, if False, the opposite vector to the normal vector is used.
Returns
Value of the angle between the given vectors in degrees.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ GetAngleRadiansVectors()

def GetAngleRadiansVectors (   self,
  theShape1,
  theShape2,
  theFlag = True 
)

The same as GetAngleVectors, but the result is in radians.

References geomBuilder.GetAngleVectors().

◆ CurveCurvatureByParam()

def CurveCurvatureByParam (   self,
  theCurve,
  theParam 
)

Measure curvature of a curve at a point, set by parameter.

Parameters
theCurvea curve.
theParamparameter.
Returns
radius of curvature of theCurve.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ CurveCurvatureByPoint()

def CurveCurvatureByPoint (   self,
  theCurve,
  thePoint 
)

Measure curvature of a curve at a point.

Parameters
theCurvea curve.
thePointgiven point.
Returns
radius of curvature of theCurve.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ MaxSurfaceCurvatureByParam()

def MaxSurfaceCurvatureByParam (   self,
  theSurf,
  theUParam,
  theVParam 
)

Measure max radius of curvature of surface.

Parameters
theSurfthe given surface.
theUParamValue of U-parameter on the referenced surface.
theVParamValue of V-parameter on the referenced surface.
Returns
max radius of curvature of theSurf.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ MaxSurfaceCurvatureByPoint()

def MaxSurfaceCurvatureByPoint (   self,
  theSurf,
  thePoint 
)

Measure max radius of curvature of surface in the given point.

Parameters
theSurfthe given surface.
thePointgiven point.
Returns
max radius of curvature of theSurf.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ MinSurfaceCurvatureByParam()

def MinSurfaceCurvatureByParam (   self,
  theSurf,
  theUParam,
  theVParam 
)

Measure min radius of curvature of surface.

Parameters
theSurfthe given surface.
theUParamValue of U-parameter on the referenced surface.
theVParamValue of V-parameter on the referenced surface.
Returns
min radius of curvature of theSurf.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ MinSurfaceCurvatureByPoint()

def MinSurfaceCurvatureByPoint (   self,
  theSurf,
  thePoint 
)

Measure min radius of curvature of surface in the given point.

Parameters
theSurfthe given surface.
thePointgiven point.
Returns
min radius of curvature of theSurf.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ CurvatureOnFace()

def CurvatureOnFace (   self,
  theSurf,
  thePoint,
  theDirection,
  theName = None 
)

Measure curvature radius of surface in the given point along the given direction.

Parameters
theSurfthe given face.
thePointgiven point.
theDirectiongiven direction.
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 vector of curvature of theSurf. The returned vector is codirectional with the normal to the face in the given point in case of positive curvature value and opposite to the normal in case of negative curvature. The normal of the returned vector is equal to the absolute value of the curvature radius. Null shape is returned in case of infinite radius (zero curvature), for example, in case of flat face.

Example

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

◆ XYZtoUV()

def XYZtoUV (   self,
  theSurf,
  theXYZlist,
  theIsNormalized = True 
)

Convert X,Y,Z points coordinates to UV parameters on the given surface.

Parameters
theSurfthe given face. It can be also a shell or a compound with one face.
theXYZlistfloat list of size 3*N where N is the number of points for which we want their U,V coordinates. If the user enters a list of size not divisible by 3 an exception will be thrown.
theIsNormalizedif True, the returned parameters will be in range [0, 1].
Returns
list of float of size 2*N.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ UVtoXYZ()

def UVtoXYZ (   self,
  theSurf,
  theUVlist,
  theIsNormalized = True 
)

Convert UV parameters on the given surface to 3D points coordinates.

Parameters
theSurfthe given face. It can be also a shell or a compound with one face.
theUVlistfloat list of size 2*N where N is the number of points for which we want their X,Y,Z coordinates. If the user enters a list of non-even size an exception will be thrown.
theIsNormalizedif True, the input parameters are expected to be in range [0, 1].
Returns
list of float of size 3*N.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ Tolerance()

def Tolerance (   self,
  theShape 
)

Get min and max tolerances of sub-shapes of theShape.

Parameters
theShapeShape, to get tolerances of.
Returns
[FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
FaceMin,FaceMax: Min and max tolerances of the faces.
EdgeMin,EdgeMax: Min and max tolerances of the edges.
VertMin,VertMax: Min and max tolerances of the vertices.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ WhatIs()

def WhatIs (   self,
  theShape 
)

Obtain description of the given shape (number of sub-shapes of each type)

Parameters
theShapeShape to be described.
Returns
Description of the given shape.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ NbShapes()

def NbShapes (   self,
  theShape,
  theType 
)

Obtain quantity of shapes of the given type in theShape.

If theShape is of type theType, it is also counted.

Parameters
theShapeShape to be described.
theTypethe given ShapeType().
Returns
Quantity of shapes of type theType in theShape.

Example

References GEOM_IShapesOperations.SubShapeAllIDs(), and geomBuilder.SubShapeAllIDs().

◆ ShapeInfo()

def ShapeInfo (   self,
  theShape 
)

Obtain quantity of shapes of each type in theShape.

The theShape is also counted.

Parameters
theShapeShape to be described.
Returns
Dictionary of ShapeType() with bound quantities of shapes.

Example

References geomBuilder.ShapeType, GEOM_IShapesOperations.SubShapeAllIDs(), and geomBuilder.SubShapeAllIDs().

◆ GetCreationInformation()

def GetCreationInformation (   self,
  theShape 
)

◆ MakeCDG()

def MakeCDG (   self,
  theShape,
  theName = None 
)

Get a point, situated at the centre of mass of theShape.

Parameters
theShapeShape to define centre of mass 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
New GEOM.GEOM_Object, containing the created point.

Example

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

◆ GetVertexByIndex()

def GetVertexByIndex (   self,
  theShape,
  theIndex,
  theUseOri = True,
  theName = None 
)

Get a vertex sub-shape by index.

Parameters
theShapeShape to find sub-shape.
theIndexIndex to find vertex by this index (starting from zero)
theUseOriTo consider edge/wire orientation or not
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 the created vertex.

Example

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

◆ GetFirstVertex()

def GetFirstVertex (   self,
  theShape,
  theName = None 
)

Get the first vertex of wire/edge depended orientation.

Parameters
theShapeShape to find first vertex.
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 the created vertex.

Example

References GEOM_IMeasureOperations.GetVertexByIndex(), and geomBuilder.GetVertexByIndex().

◆ GetLastVertex()

def GetLastVertex (   self,
  theShape,
  theName = None 
)

Get the last vertex of wire/edge depended orientation.

Parameters
theShapeShape to find last vertex.
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 the created vertex.

Example

References GEOM_IMeasureOperations.GetVertexByIndex(), geomBuilder.GetVertexByIndex(), GEOM_IShapesOperations.NumberOfSubShapes(), geomBuilder.NumberOfSubShapes(), and geomBuilder.ShapeType.

◆ GetNormal()

def GetNormal (   self,
  theFace,
  theOptionalPoint = None,
  theName = None 
)

Get a normale to the given face.

If the point is not given, the normale is calculated at the center of mass.

Parameters
theFaceFace to define normale of.
theOptionalPointPoint to compute the normale at.
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 the created vector.

Example

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

◆ PrintShapeErrors()

def PrintShapeErrors (   self,
  theShape,
  theShapeErrors,
  theReturnStatus = 0 
)

Print shape errors obtained from CheckShape.

Parameters
theShapeShape that was checked.
theShapeErrorsthe shape errors obtained by CheckShape.
theReturnStatusIf 0 the description of problem is printed. If 1 the description of problem is returned.
Returns
If theReturnStatus is equal to 1 the description is returned. Otherwise doesn't return anything.

Example

References geomBuilder.MeasuOp.

◆ CheckShape()

def CheckShape (   self,
  theShape,
  theIsCheckGeom = 0,
  theReturnStatus = 0 
)

Check a topology of the given shape.

Parameters
theShapeShape to check validity of.
theIsCheckGeomIf FALSE, only the shape's topology will be checked,
if TRUE, the shape's geometry will be checked also.
theReturnStatusIf 0 and if theShape is invalid, a description of problem is printed. If 1 isValid flag and the description of problem is returned. If 2 isValid flag and the list of error data is returned.
Returns
TRUE, if the shape "seems to be valid". If theShape is invalid, prints a description of problem. If theReturnStatus is equal to 1 the description is returned along with IsValid flag. If theReturnStatus is equal to 2 the list of error data is returned along with IsValid flag.

Example

References geomBuilder.MeasuOp, geomBuilder.PrintShapeErrors(), and geomBuilder.RaiseIfFailed().

◆ CheckSelfIntersections()

def CheckSelfIntersections (   self,
  theShape,
  theCheckLevel = GEOM.SI_ALL 
)

Detect self-intersections in the given shape.

Parameters
theShapeShape to check.
theCheckLevelis the level of self-intersection check. Possible input values are:
  • GEOM.SI_V_V(0) - only V/V interferences
  • GEOM.SI_V_E(1) - V/V and V/E interferences
  • GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
  • GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
  • GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
  • GEOM.SI_ALL(5) - all interferences.
Returns
TRUE, if the shape contains no self-intersections.

Example

References geomBuilder.EnumToLong(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ CheckSelfIntersectionsFast()

def CheckSelfIntersectionsFast (   self,
  theShape,
  theDeflection = 0.001,
  theTolerance = 0.0 
)

Detect self-intersections of the given shape with algorithm based on mesh intersections.

Parameters
theShapeShape to check.
theDeflectionLinear deflection coefficient that specifies quality of tessellation:
  • if theDeflection <= 0, default deflection 0.001 is used
theToleranceSpecifies a distance between sub-shapes used for detecting gaps:
  • if theTolerance <= 0, algorithm detects intersections (default behavior)
  • if theTolerance > 0, algorithm detects gaps
Returns
TRUE, if the shape contains no self-intersections.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ CheckBOPArguments()

def CheckBOPArguments (   self,
  theShape 
)

Check boolean and partition operations arguments.

Parameters
theShapethe argument of an operation to be checked
Returns
TRUE if the argument is valid for a boolean or partition operation; FALSE otherwise.

References geomBuilder.MeasuOp.

◆ ExtractBOPFailure()

def ExtractBOPFailure (   self,
  theShapes,
  theTimer = False,
  theTopo = False,
  theParallel = False,
  theExact = False,
  theVerbose = False,
  theName = None 
)

Performs general fuse BOP on the given list of shapes and extracts CheckShape information from its invalid result.

Parameters
theShapesList of shapes for the BOP.
theTimerIf True, the execution time of the operation is measured.
theTopoIf True, only the topological entities will be checked.
theParallelIf True, the operation will be executed in parallel.
theExactIf True, an exact check will be performed.
theVerboseIf True, prints execution errors and resulting shape errors.
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
(isValid, shapeResult, listOfErrors), where isValid - a boolean value (whether result shape is valid or not), shapeResult - the result shape itself as GEOM::Object, listOfErrors - the list of GEOM.GEOM_IMeasureOperations.ShapeError.

References geomBuilder._autoPublish(), geomBuilder.MeasuOp, GEOM_IMeasureOperations.PrintShapeErrors(), and geomBuilder.PrintShapeErrors().

◆ FastIntersect()

def FastIntersect (   self,
  theShape1,
  theShape2,
  theTolerance = 0.0,
  theDeflection = 0.001 
)

Detect intersections of the given shapes with algorithm based on mesh intersections.

Parameters
theShape1First source object
theShape2Second source object
theToleranceSpecifies a distance between shapes used for detecting gaps:
  • if theTolerance <= 0, algorithm detects intersections (default behavior)
  • if theTolerance > 0, algorithm detects gaps
theDeflectionLinear deflection coefficient that specifies quality of tessellation:
  • if theDeflection <= 0, default deflection 0.001 is used
Returns
TRUE, if there are intersections (gaps) between source shapes
List of sub-shapes IDs from 1st shape that localize intersection.
List of sub-shapes IDs from 2nd shape that localize intersection.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ GetPosition()

def GetPosition (   self,
  theShape 
)

Get position (LCS) of theShape.

Origin of the LCS is situated at the shape's center of mass. Axes of the LCS are obtained from shape's location or, if the shape is a planar face, from position of its plane.

Parameters
theShapeShape to calculate position of.
Returns
[Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz]. Ox,Oy,Oz: Coordinates of shape's LCS origin. Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction. Xx,Xy,Xz: Coordinates of shape's LCS X direction.

Example

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ KindOfShape()

def KindOfShape (   self,
  theShape 
)

Get kind of theShape.

Parameters
theShapeShape to get a kind of.
Returns
Returns a kind of shape in terms of GEOM.GEOM_IKindOfShape.shape_kind enumeration and a list of parameters, describing the shape.
Note
Concrete meaning of each value, returned via theIntegers or theDoubles list depends on the kind() of the shape.

Example

References geomBuilder.kind, geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ PatchFace()

def PatchFace (   self,
  theShape 
)

The function takes a single face with holes and returns a list of faces, first of them is the original face without holes, and the other faces are placed on the same surface as the original face but bounded by each hole wire.

If the original face has no holes, it will be returned as an output

Parameters
theShapeFace to perform operation on.
Returns
GEOM.ListOfGO, list created faces, where first of them is the original face without holes

References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().

◆ _IsGoodForSolid()

def _IsGoodForSolid (   self,
  theShell 
)
private

Returns the string that describes if the shell is good for solid.

This is a support method for MakeSolid.

Parameters
theShellthe shell to be checked.
Returns
Returns a string that describes the shell validity for solid construction.

References geomBuilder.MeasuOp.

◆ CanonicalRecognition()

def CanonicalRecognition (   self)

Obtain a canonical recognition interface.

Returns
An instance of CanonicalRecognition interface

Example