Functions | |
def | NumberOfFaces |
Gives quantity of faces in the given shape. More... | |
def | NumberOfEdges |
Gives quantity of edges in the given shape. More... | |
def | NumberOfSubShapes |
Gives quantity of sub-shapes of type theShapeType in the given shape. More... | |
def | NumberOfSolids |
Gives quantity of solids in the given shape. More... | |
def | PointCoordinates |
Get point coordinates. More... | |
def | VectorCoordinates |
Get vector coordinates. More... | |
def | CrossProduct |
Compute cross product. More... | |
def | DotProduct |
Compute cross product. More... | |
def | BasicProperties |
Get summarized length of all wires, area of surface and volume of the given shape. More... | |
def | BoundingBox |
Get parameters of bounding box of the given shape. More... | |
def | MakeBoundingBox |
Get bounding box of the given shape. More... | |
def | Inertia |
Get inertia matrix and moments of inertia of theShape. More... | |
def | AreCoordsInside |
Get if coords are included in the shape (ST_IN or ST_ON) More... | |
def | MinDistance |
Get minimal distance between the given shapes. More... | |
def | MinDistanceComponents |
Get minimal distance between the given shapes. More... | |
def | ClosestPoints |
Get closest points of the given shapes. More... | |
def | GetAngle |
Get angle between the given shapes in degrees. More... | |
def | GetAngleRadians |
Get angle between the given shapes in radians. More... | |
def | GetAngleVectors |
Get angle between the given vectors in degrees. More... | |
def | GetAngleRadiansVectors |
The same as GetAngleVectors, but the result is in radians. More... | |
def | Tolerance |
Get min and max tolerances of sub-shapes of theShape. More... | |
def | WhatIs |
Obtain description of the given shape (number of sub-shapes of each type) More... | |
def | NbShapes |
Obtain quantity of shapes of the given type in theShape. More... | |
def | ShapeInfo |
Obtain quantity of shapes of each type in theShape. More... | |
def | GetCreationInformation |
def | MakeCDG |
Get a point, situated at the centre of mass of theShape. More... | |
def | GetVertexByIndex |
Get a vertex sub-shape by index depended with orientation. More... | |
def | GetFirstVertex |
Get the first vertex of wire/edge depended orientation. More... | |
def | GetLastVertex |
Get the last vertex of wire/edge depended orientation. More... | |
def | GetNormal |
Get a normale to the given face. More... | |
def | PrintShapeErrors |
Print shape errors obtained from CheckShape. More... | |
def | CheckShape |
Check a topology of the given shape. More... | |
def | CheckSelfIntersections |
Detect self-intersections in the given shape. More... | |
def | CheckSelfIntersectionsFast |
Detect self-intersections of the given shape with algorithm based on mesh intersections. More... | |
def | CheckBOPArguments |
Check boolean and partition operations agruments. More... | |
def | FastIntersect |
Detect intersections of the given shapes with algorithm based on mesh intersections. More... | |
def | GetPosition |
Get position (LCS) of theShape. More... | |
def | KindOfShape |
Get kind of theShape. More... | |
def | _IsGoodForSolid |
Returns the string that describes if the shell is good for solid. More... | |
Curve Curvature Measurement | |
Methods for receiving radius of curvature of curves in the given point | |
def | CurveCurvatureByParam |
Measure curvature of a curve at a point, set by parameter. More... | |
def | CurveCurvatureByPoint |
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 |
Measure max radius of curvature of surface. More... | |
def | MaxSurfaceCurvatureByPoint |
Measure max radius of curvature of surface in the given point. More... | |
def | MinSurfaceCurvatureByParam |
Measure min radius of curvature of surface. More... | |
def | MinSurfaceCurvatureByPoint |
Measure min radius of curvature of surface in the given point. More... | |
def NumberOfFaces | ( | self, | |
theShape | |||
) |
Gives quantity of faces in the given shape.
theShape | Shape to count faces of. |
References geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.
def NumberOfEdges | ( | self, | |
theShape | |||
) |
Gives quantity of edges in the given shape.
theShape | Shape to count edges of. |
References geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.
def NumberOfSubShapes | ( | self, | |
theShape, | |||
theShapeType | |||
) |
Gives quantity of sub-shapes of type theShapeType in the given shape.
theShape | Shape to count sub-shapes of. |
theShapeType | Type of sub-shapes to count (see ShapeType()) |
References geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapesOp.
def NumberOfSolids | ( | self, | |
theShape | |||
) |
Gives quantity of solids in the given shape.
theShape | Shape to count solids in. |
References geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), geomBuilder.ShapesOp, and geomBuilder.ShapeType.
def PointCoordinates | ( | self, | |
Point | |||
) |
Get point coordinates.
References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def VectorCoordinates | ( | self, | |
Vector | |||
) |
Get vector coordinates.
References geomBuilder.GetFirstVertex(), geomBuilder.GetLastVertex(), and geomBuilder.PointCoordinates().
def CrossProduct | ( | self, | |
Vector1, | |||
Vector2 | |||
) |
Compute cross product.
References geomBuilder.MakeVectorDXDYDZ(), and geomBuilder.VectorCoordinates().
def DotProduct | ( | self, | |
Vector1, | |||
Vector2 | |||
) |
Compute cross product.
References geomBuilder.ManageTransactions(), and geomBuilder.VectorCoordinates().
def BasicProperties | ( | self, | |
theShape, | |||
theTolerance = 1.e-6 |
|||
) |
Get summarized length of all wires, area of surface and volume of the given shape.
theShape | Shape to define properties of. |
theTolerance | maximal relative error of area and volume computation. |
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def BoundingBox | ( | self, | |
theShape, | |||
precise = False |
|||
) |
Get parameters of bounding box of the given shape.
theShape | Shape to obtain bounding box of. |
precise | TRUE for precise computation; FALSE for fast one. |
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def MakeBoundingBox | ( | self, | |
theShape, | |||
precise = False , |
|||
theName = None |
|||
) |
Get bounding box of the given shape.
theShape | Shape to obtain bounding box of. |
precise | TRUE for precise computation; FALSE for fast one. |
theName | Object 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. |
References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def Inertia | ( | self, | |
theShape | |||
) |
Get inertia matrix and moments of inertia of theShape.
theShape | Shape to calculate inertia of. |
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def AreCoordsInside | ( | self, | |
theShape, | |||
coords, | |||
tolerance = 1.e-7 |
|||
) |
Get if coords are included in the shape (ST_IN or ST_ON)
theShape | Shape |
coords | list of points coordinates [x1, y1, z1, x2, y2, z2, ...] |
tolerance | to be used (default is 1.0e-7) |
References geomBuilder.ManageTransactions().
def MinDistance | ( | self, | |
theShape1, | |||
theShape2 | |||
) |
Get minimal distance between the given shapes.
theShape1,theShape2 | Shapes to find minimal distance between. |
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def MinDistanceComponents | ( | self, | |
theShape1, | |||
theShape2 | |||
) |
Get minimal distance between the given shapes.
theShape1,theShape2 | Shapes to find minimal distance between. |
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def ClosestPoints | ( | self, | |
theShape1, | |||
theShape2 | |||
) |
Get closest points of the given shapes.
theShape1,theShape2 | Shapes to find closest points of. |
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def GetAngle | ( | self, | |
theShape1, | |||
theShape2 | |||
) |
Get angle between the given shapes in degrees.
theShape1,theShape2 | Lines or linear edges to find angle between. |
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def GetAngleRadians | ( | self, | |
theShape1, | |||
theShape2 | |||
) |
Get angle between the given shapes in radians.
theShape1,theShape2 | Lines or linear edges to find angle between. |
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def GetAngleVectors | ( | self, | |
theShape1, | |||
theShape2, | |||
theFlag = True |
|||
) |
Get angle between the given vectors in degrees.
theShape1,theShape2 | Vectors to find angle between. |
theFlag | If True, the normal vector is defined by the two vectors cross, if False, the opposite vector to the normal vector is used. |
References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def GetAngleRadiansVectors | ( | self, | |
theShape1, | |||
theShape2, | |||
theFlag = True |
|||
) |
The same as GetAngleVectors, but the result is in radians.
References geomBuilder.GetAngleVectors(), and geomBuilder.ManageTransactions().
def CurveCurvatureByParam | ( | self, | |
theCurve, | |||
theParam | |||
) |
Measure curvature of a curve at a point, set by parameter.
theCurve | a curve. |
theParam | parameter. |
Example
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def CurveCurvatureByPoint | ( | self, | |
theCurve, | |||
thePoint | |||
) |
Measure curvature of a curve at a point.
theCurve | a curve. |
thePoint | given point. |
Example
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def MaxSurfaceCurvatureByParam | ( | self, | |
theSurf, | |||
theUParam, | |||
theVParam | |||
) |
Measure max radius of curvature of surface.
theSurf | the given surface. |
theUParam | Value of U-parameter on the referenced surface. |
theVParam | Value of V-parameter on the referenced surface. |
Example
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def MaxSurfaceCurvatureByPoint | ( | self, | |
theSurf, | |||
thePoint | |||
) |
Measure max radius of curvature of surface in the given point.
theSurf | the given surface. |
thePoint | given point. |
Example
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def MinSurfaceCurvatureByParam | ( | self, | |
theSurf, | |||
theUParam, | |||
theVParam | |||
) |
Measure min radius of curvature of surface.
theSurf | the given surface. |
theUParam | Value of U-parameter on the referenced surface. |
theVParam | Value of V-parameter on the referenced surface. |
Example
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def MinSurfaceCurvatureByPoint | ( | self, | |
theSurf, | |||
thePoint | |||
) |
Measure min radius of curvature of surface in the given point.
theSurf | the given surface. |
thePoint | given point. |
Example
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def Tolerance | ( | self, | |
theShape | |||
) |
Get min and max tolerances of sub-shapes of theShape.
theShape | Shape, to get tolerances of. |
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def WhatIs | ( | self, | |
theShape | |||
) |
Obtain description of the given shape (number of sub-shapes of each type)
theShape | Shape to be described. |
References geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
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.
theShape | Shape to be described. |
theType | the given ShapeType(). |
References geomBuilder.SubShapeAllIDs().
def ShapeInfo | ( | self, | |
theShape | |||
) |
Obtain quantity of shapes of each type in theShape.
The theShape is also counted.
theShape | Shape to be described. |
References geomBuilder.ShapeType, and geomBuilder.SubShapeAllIDs().
def GetCreationInformation | ( | self, | |
theShape | |||
) |
References geomBuilder.ManageTransactions().
def MakeCDG | ( | self, | |
theShape, | |||
theName = None |
|||
) |
Get a point, situated at the centre of mass of theShape.
theShape | Shape to define centre of mass of. |
theName | Object 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. |
References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def GetVertexByIndex | ( | self, | |
theShape, | |||
theIndex, | |||
theName = None |
|||
) |
Get a vertex sub-shape by index depended with orientation.
theShape | Shape to find sub-shape. |
theIndex | Index to find vertex by this index (starting from zero) |
theName | Object 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. |
References geomBuilder._autoPublish(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def GetFirstVertex | ( | self, | |
theShape, | |||
theName = None |
|||
) |
Get the first vertex of wire/edge depended orientation.
theShape | Shape to find first vertex. |
theName | Object 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. |
References geomBuilder.GetVertexByIndex().
def GetLastVertex | ( | self, | |
theShape, | |||
theName = None |
|||
) |
Get the last vertex of wire/edge depended orientation.
theShape | Shape to find last vertex. |
theName | Object 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. |
References geomBuilder.GetVertexByIndex(), geomBuilder.ManageTransactions(), geomBuilder.NumberOfSubShapes(), and geomBuilder.ShapeType.
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.
theFace | Face to define normale of. |
theOptionalPoint | Point to compute the normale at. |
theName | Object 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. |
Example
References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def PrintShapeErrors | ( | self, | |
theShape, | |||
theShapeErrors, | |||
theReturnStatus = 0 |
|||
) |
Print shape errors obtained from CheckShape.
theShape | Shape that was checked. |
theShapeErrors | the shape errors obtained by CheckShape. |
theReturnStatus | If 0 the description of problem is printed. If 1 the description of problem is returned. |
References geomBuilder.ManageTransactions().
def CheckShape | ( | self, | |
theShape, | |||
theIsCheckGeom = 0 , |
|||
theReturnStatus = 0 |
|||
) |
Check a topology of the given shape.
theShape | Shape to check validity of. |
theIsCheckGeom | If FALSE, only the shape's topology will be checked, if TRUE, the shape's geometry will be checked also. |
theReturnStatus | If 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. |
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def CheckSelfIntersections | ( | self, | |
theShape, | |||
theCheckLevel = GEOM.SI_ALL |
|||
) |
Detect self-intersections in the given shape.
theShape | Shape to check. |
theCheckLevel | is the level of self-intersection check. Possible input values are:
|
References geomBuilder.EnumToLong(), geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def CheckSelfIntersectionsFast | ( | self, | |
theShape, | |||
theDeflection = 0.001 , |
|||
theTolerance = 0.0 |
|||
) |
Detect self-intersections of the given shape with algorithm based on mesh intersections.
theShape | Shape to check. |
theDeflection | Linear deflection coefficient that specifies quality of tesselation:
|
theTolerance | Specifies a distance between sub-shapes used for detecting gaps:
|
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def CheckBOPArguments | ( | self, | |
theShape | |||
) |
Check boolean and partition operations agruments.
theShape | the agrument of an operation to be checked |
References geomBuilder.ManageTransactions().
def FastIntersect | ( | self, | |
theShape1, | |||
theShape2, | |||
theTolerance = 0.0 , |
|||
theDeflection = 0.001 |
|||
) |
Detect intersections of the given shapes with algorithm based on mesh intersections.
theShape1 | First source object |
theShape2 | Second source object |
theTolerance | Specifies a distance between shapes used for detecting gaps:
|
theDeflection | Linear deflection coefficient that specifies quality of tesselation:
|
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
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.
theShape | Shape to calculate position of. |
Example
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
def KindOfShape | ( | self, | |
theShape | |||
) |
Get kind of theShape.
theShape | Shape to get a kind of. |
Example
References geomBuilder.ManageTransactions(), geomBuilder.MeasuOp, and geomBuilder.RaiseIfFailed().
|
private |
Returns the string that describes if the shell is good for solid.
This is a support method for MakeSolid.
theShell | the shell to be checked. |
References geomBuilder.ManageTransactions().