Package geompy


Data Structures

class  info

Functions

def init_geom
def SubShapeName
 Get name for sub-shape aSubObj of shape aMainObj.
def addToStudy
 Publish in study aShape with name aName.
def addToStudyInFather
 Publish in study aShape with name aName as sub-object of previously published aFather.
def MakeVertex
 Create point by three coordinates.
def MakeVertexWithRef
 Create a point, distant from the referenced point on the given distances along the coordinate axes.
def MakeVertexOnCurve
 Create a point, corresponding to the given parameter on the given curve.
def MakeTangentOnCurve
 Create a tangent, corresponding to the given parameter on the given curve.
def MakeVectorDXDYDZ
 Create a vector with the given components.
def MakeVector
 Create a vector between two points.
def MakeLine
 Create a line, passing through the given point and parrallel to the given direction.
def MakeLineTwoPnt
 Create a line, passing through the given points.
def MakePlane
 Create a plane, passing through the given point and normal to the given vector.
def MakePlaneThreePnt
 Create a plane, passing through the three given points.
def MakePlaneFace
 Create a plane, similar to the existing one, but with another size of representing face.
def MakeMarker
 Create a local coordinate system.
def MakeMarkerPntTwoVec
 Create a local coordinate system.
def MakeArc
 Create an arc of circle, passing through three given points.
def MakeArcCenter
 Create an arc of circle from a center and 2 points.
def MakeCircle
 Create a circle with given center, normal vector and radius.
def MakeCircleThreePnt
 Create a circle, passing through three given points.
def MakeEllipse
 Create an ellipse with given center, normal vector and radiuses.
def MakePolyline
 Create a polyline on the set of points.
def MakeBezier
 Create bezier curve on the set of points.
def MakeInterpol
 Create B-Spline curve on the set of points.
def MakeSketcher
 Create a sketcher (wire or face), following the textual description, passed through theCommand argument.
def MakeSketcherOnPlane
 Create a sketcher (wire or face), following the textual description, passed through theCommand argument.
def MakeBox
 Create a box by coordinates of two opposite vertices.
def MakeBoxDXDYDZ
 Create a box with specified dimensions along the coordinate axes and with edges, parallel to the coordinate axes.
def MakeBoxTwoPnt
 Create a box with two specified opposite vertices, and with edges, parallel to the coordinate axes.
def MakeCylinder
 Create a cylinder with given base point, axis, radius and height.
def MakeCylinderRH
 Create a cylinder with given radius and height at the origin of coordinate system.
def MakeSpherePntR
 Create a sphere with given center and radius.
def MakeSphere
 Create a sphere with given center and radius.
def MakeSphereR
 Create a sphere with given radius at the origin of coordinate system.
def MakeCone
 Create a cone with given base point, axis, height and radiuses.
def MakeConeR1R2H
 Create a cone with given height and radiuses at the origin of coordinate system.
def MakeTorus
 Create a torus with given center, normal vector and radiuses.
def MakeTorusRR
 Create a torus with given radiuses at the origin of coordinate system.
def MakePrism
 Create a shape by extrusion of the base shape along a vector, defined by two points.
def MakePrismVecH
 Create a shape by extrusion of the base shape along the vector, i.e.
def MakePipe
 Create a shape by extrusion of the base shape along the path shape.
def MakeRevolution
 Create a shape by revolution of the base shape around the axis on the given angle, i.e.
def MakeThruSections
 Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
def MakePipeWithDifferentSections
 Create a shape by extrusion of the profile shape along the path shape.
def MakePipeWithShellSections
 Create a shape by extrusion of the profile shape along the path shape.
def MakeEdge
 Create a linear edge with specified ends.
def MakeWire
 Create a wire from the set of edges and wires.
def MakeFace
 Create a face on the given wire.
def MakeFaceWires
 Create a face on the given wires set.
def MakeFaces
 Shortcut to MakeFaceWires().
def MakeShell
 Create a shell from the set of faces and shells.
def MakeSolid
 Create a solid, bounded by the given shells.
def MakeCompound
 Create a compound of the given shapes.
def NumberOfFaces
 Gives quantity of faces in the given shape.
def NumberOfEdges
 Gives quantity of edges in the given shape.
def ChangeOrientation
 Reverses an orientation the given shape.
def OrientationChange
 Shortcut to ChangeOrientation().
def GetFreeFacesIDs
 Retrieve all free faces from the given shape.
def GetSharedShapes
 Get all sub-shapes of theShape1 of the given type, shared with theShape2.
def GetShapesOnPlane
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified plane by the certain way, defined through theState parameter.
def GetShapesOnPlaneIDs
 Works like the above method, but returns list of sub-shapes indices.
def GetShapesOnPlaneWithLocation
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified plane by the certain way, defined through theState parameter.
def GetShapesOnPlaneWithLocationIDs
 Works like the above method, but returns list of sub-shapes indices.
def GetShapesOnCylinder
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified cylinder by the certain way, defined through theState parameter.
def GetShapesOnCylinderIDs
 Works like the above method, but returns list of sub-shapes indices.
def GetShapesOnSphere
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified sphere by the certain way, defined through theState parameter.
def GetShapesOnSphereIDs
 Works like the above method, but returns list of sub-shapes indices.
def GetShapesOnQuadrangle
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified quadrangle by the certain way, defined through theState parameter.
def GetShapesOnQuadrangleIDs
 Works like the above method, but returns list of sub-shapes indices.
def GetShapesOnBox
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified theBox by the certain way, defined through theState parameter.
def GetShapesOnBoxIDs
 Works like the above method, but returns list of sub-shapes indices.
def GetInPlace
 Get sub-shape(s) of theShapeWhere, which are coincident with theShapeWhat or could be a part of it.
def GetSame
 Get sub-shape of theShapeWhere, which is equal to theShapeWhat.
def GetSubShape
 Obtain a composite sub-shape of <aShape>, composed from sub-shapes of <aShape>, selected by their unique IDs inside <aShape>.
def GetSubShapeID
 Obtain unique ID of sub-shape <aSubShape> inside <aShape>.
def SubShapeAll
 Explode a shape on subshapes of a given type.
def SubShapeAllIDs
 Explode a shape on subshapes of a given type.
def SubShapeAllSorted
 Explode a shape on subshapes of a given type.
def SubShapeAllSortedIDs
 Explode a shape on subshapes of a given type.
def SubShape
 Obtain a compound of sub-shapes of <aShape>, selected by they indices in list of all sub-shapes of type <aType>.
def SubShapeSorted
 Obtain a compound of sub-shapes of <aShape>, selected by they indices in sorted list of all sub-shapes of type <aType>.
def ProcessShape
 Apply a sequence of Shape Healing operators to the given object.
def SuppressFaces
 Remove faces from the given object (shape).
def MakeSewing
 Sewing of some shapes into single shape.
def Sew
 Sewing of the given object.
def SuppressInternalWires
 Remove internal wires and edges from the given object (face).
def SuppressHoles
 Remove internal closed contours (holes) from the given object.
def CloseContour
 Close an open wire.
def DivideEdge
 Addition of a point to a given edge object.
def ChangeOrientationShell
 Change orientation of the given object.
def ChangeOrientationShellCopy
 Change orientation of the given object.
def GetFreeBoundary
 Get a list of wires (wrapped in GEOM_Object-s), that constitute a free boundary of the given shape.
def MakeCopy
 Create a copy of the given object.
def MakeFilling
 Create a filling from the given compound of contours.
def MakeGlueFaces
 Replace coincident faces in theShape by one face.
def GetGlueFaces
 Find coincident faces in theShape for possible gluing.
def MakeGlueFacesByList
 Replace coincident faces in theShape by one face in compliance with given list of faces.
def MakeBoolean
 Perform one of boolean operations on two given shapes.
def MakeCommon
 Shortcut to MakeBoolean(s1, s2, 1).
def MakeCut
 Shortcut to MakeBoolean(s1, s2, 2).
def MakeFuse
 Shortcut to MakeBoolean(s1, s2, 3).
def MakeSection
 Shortcut to MakeBoolean(s1, s2, 4).
def MakePartition
 Perform partition operation.
def MakePartitionNonSelfIntersectedShape
 Perform partition operation.
def Partition
 Shortcut to MakePartition().
def MakeHalfPartition
 Perform partition of the Shape with the Plane.
def MakeTranslationTwoPoints
 Translate the given object along the vector, specified by its end points, creating its copy before the translation.
def MakeTranslation
 Translate the given object along the vector, specified by its components, creating its copy before the translation.
def MakeTranslationVector
 Translate the given object along the given vector, creating its copy before the translation.
def MakeRotation
 Rotate the given object around the given axis on the given angle, creating its copy before the rotatation.
def MakeRotationThreePoints
 Rotate given object around vector perpendicular to plane containing three points, creating its copy before the rotatation.
def MakeScaleTransform
 Scale the given object by the factor, creating its copy before the scaling.
def MakeMirrorByPlane
 Create an object, symmetrical to the given one relatively the given plane.
def MakeMirrorByAxis
 Create an object, symmetrical to the given one relatively the given axis.
def MakeMirrorByPoint
 Create an object, symmetrical to the given one relatively the given point.
def MakePosition
 Modify the Location of the given object by LCS, creating its copy before the setting.
def MakeOffset
 Create new object as offset of the given one.
def MakeMultiTranslation1D
 Translate the given object along the given vector a given number times.
def MakeMultiTranslation2D
 Conseqently apply two specified translations to theObject specified number of times.
def MultiRotate1D
 Rotate the given object around the given axis a given number times.
def MultiRotate2D
 Rotate the given object around the given axis on the given angle a given number times and multi-translate each rotation result.
def MakeMultiRotation1D
 The same, as MultiRotate1D(), but axis is given by direction and point.
def MakeMultiRotation2D
 The same, as MultiRotate2D(), but axis is given by direction and point.
def MakeFilletAll
 Perform a fillet on all edges of the given shape.
def MakeFillet
 Perform a fillet on the specified edges/faces of the given shape.
def MakeChamferAll
 Perform a symmetric chamfer on all edges of the given shape.
def MakeChamferEdge
 Perform a chamfer on edges, common to the specified faces, with distance D1 on the Face1.
def MakeChamferFaces
 Perform a chamfer on all edges of the specified faces, with distance D1 on the first specified face (if several for one edge).
def MakeChamfer
 Shortcut to MakeChamferEdge() and MakeChamferFaces().
def Archimede
 Perform an Archimde operation on the given shape with given parameters.
def PointCoordinates
 Get point coordinates.
def BasicProperties
 Get summarized length of all wires, area of surface and volume of the given shape.
def BoundingBox
 Get parameters of bounding box of the given shape.
def Inertia
 Get inertia matrix and moments of inertia of theShape.
def MinDistance
 Get minimal distance between the given shapes.
def Tolerance
 Get min and max tolerances of sub-shapes of theShape.
def WhatIs
 Obtain description of the given shape (number of sub-shapes of each type).
def MakeCDG
 Get a point, situated at the centre of mass of theShape.
def CheckShape
 Check a topology of the given shape.
def GetPosition
 Get position (LCS) of theShape.
def KindOfShape
 Get kind of theShape.
def Import
 Import a shape from the BREP or IGES or STEP file (depends on given format) with given name.
def ImportBREP
 Shortcut to Import() for BREP format.
def ImportIGES
 Shortcut to Import() for IGES format.
def ImportSTEP
 Shortcut to Import() for STEP format.
def Export
 Export the given shape into a file with given name.
def ExportBREP
 Shortcut to Export() for BREP format.
def ExportIGES
 Shortcut to Export() for IGES format.
def ExportSTEP
 Shortcut to Export() for STEP format.
def MakeQuad
 Create a quadrangle face from four edges.
def MakeQuad2Edges
 Create a quadrangle face on two edges.
def MakeQuad4Vertices
 Create a quadrangle face with specified corners.
def MakeHexa
 Create a hexahedral solid, bounded by the six given faces.
def MakeHexa2Faces
 Create a hexahedral solid between two given faces.
def GetPoint
 Get a vertex, found in the given shape by its coordinates.
def GetEdge
 Get an edge, found in the given shape by two given vertices.
def GetEdgeNearPoint
 Find an edge of the given shape, which has minimal distance to the given point.
def GetFaceByPoints
 Returns a face, found in the given shape by four given corner vertices.
def GetFaceByEdges
 Get a face of block, found in the given shape by two given edges.
def GetOppositeFace
 Find a face, opposite to the given one in the given block.
def GetFaceNearPoint
 Find a face of the given shape, which has minimal distance to the given point.
def GetFaceByNormale
 Find a face of block, whose outside normale has minimal angle with the given vector.
def CheckCompoundOfBlocks
 Check, if the compound of blocks is given.
def RemoveExtraEdges
 Remove all seam and degenerated edges from theShape.
def CheckAndImprove
 Check, if the given shape is a blocks compound.
def MakeBlockExplode
 Get all the blocks, contained in the given compound.
def GetBlockNearPoint
 Find block, containing the given point inside its volume or on boundary.
def GetBlockByParts
 Find block, containing all the elements, passed as the parts, or maximum quantity of them.
def GetBlocksByParts
 Return all blocks, containing all the elements, passed as the parts.
def MakeMultiTransformation1D
 Multi-transformate block and glue the result.
def MakeMultiTransformation2D
 Multi-transformate block and glue the result.
def Propagate
 Build all possible propagation groups.
def CreateGroup
 Creates a new group which will store sub shapes of theMainShape.
def AddObject
 Adds a sub object with ID theSubShapeId to the group.
def RemoveObject
 Removes a sub object with ID theSubShapeId from the group.
def UnionList
 Adds to the group all the given shapes.
def UnionIDs
 Works like the above method, but argument theSubShapes here is a list of sub-shapes indices.
def DifferenceList
 Removes from the group all the given shapes.
def DifferenceIDs
 Works like the above method, but argument theSubShapes here is a list of sub-shapes indices.
def GetObjectIDs
 Returns a list of sub objects ID stored in the group.
def GetType
 Returns a type of sub objects stored in the group.
def GetMainShape
 Returns a main shape associated with the group.
def GetEdgesByLength
 Create group of edges of theShape, whose length is in range [min_length, max_length].
def SelectEdges
 Create group of edges of selected shape, whose length is in range [min_length, max_length].
def addPath
 Add Path to load python scripts from.

Variables

tuple g = lcc.FindOrLoadComponent("FactoryServer", "GEOM")
tuple geom = g._narrow( GEOM.GEOM_Gen )
 myBuilder = None
int myStudyId = 0
 father = None
 BasicOp = None
 CurvesOp = None
 PrimOp = None
 ShapesOp = None
 HealOp = None
 InsertOp = None
 BoolOp = None
 TrsfOp = None
 LocalOp = None
 MeasuOp = None
 BlocksOp = None
 GroupOp = None
dictionary ShapeType = {"COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
 kind = GEOM.GEOM_IKindOfShape
tuple g = lcc.FindOrLoadComponent("FactoryServer", "GEOM")
tuple geom = g._narrow( GEOM.GEOM_Gen )
 myBuilder = None
int myStudyId = 0
 father = None
 BasicOp = None
 CurvesOp = None
 PrimOp = None
 ShapesOp = None
 HealOp = None
 InsertOp = None
 BoolOp = None
 TrsfOp = None
 LocalOp = None
 MeasuOp = None
 BlocksOp = None
 GroupOp = None
dictionary ShapeType = {"COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
 kind = GEOM.GEOM_IKindOfShape


Function Documentation

def geompy::init_geom   theStudy  ) 
 

def geompy::SubShapeName   aSubObj,
  aMainObj
 

Example: see GEOM_TestAll.py

def geompy::addToStudy   aShape,
  aName
 

Example: see GEOM_TestAll.py

def geompy::addToStudyInFather   aFather,
  aShape,
  aName
 

Example: see GEOM_TestAll.py

def geompy::MakeVertex   theX,
  theY,
  theZ
 

Parameters:
theX The X coordinate of the point.
theY The Y coordinate of the point.
theZ The Z coordinate of the point.
Returns:
New GEOM_Object, containing the created point.
Example: see GEOM_TestAll.py

def geompy::MakeVertexWithRef   theReference,
  theX,
  theY,
  theZ
 

Parameters:
theReference The referenced point.
theX Displacement from the referenced point along OX axis.
theY Displacement from the referenced point along OY axis.
theZ Displacement from the referenced point along OZ axis.
Returns:
New GEOM_Object, containing the created point.
Example: see GEOM_TestAll.py

def geompy::MakeVertexOnCurve   theRefCurve,
  theParameter
 

Parameters:
theRefCurve The referenced curve.
theParameter Value of parameter on the referenced curve.
Returns:
New GEOM_Object, containing the created point.
Example: see GEOM_TestAll.py

def geompy::MakeTangentOnCurve   theRefCurve,
  theParameter
 

Parameters:
theRefCurve The referenced curve.
theParameter Value of parameter on the referenced curve.
Returns:
New GEOM_Object, containing the created tangent.

def geompy::MakeVectorDXDYDZ   theDX,
  theDY,
  theDZ
 

Parameters:
theDX X component of the vector.
theDY Y component of the vector.
theDZ Z component of the vector.
Returns:
New GEOM_Object, containing the created vector.
Example: see GEOM_TestAll.py

def geompy::MakeVector   thePnt1,
  thePnt2
 

Parameters:
thePnt1 Start point for the vector.
thePnt2 End point for the vector.
Returns:
New GEOM_Object, containing the created vector.

def geompy::MakeLine   thePnt,
  theDir
 

Parameters:
thePnt Point. The resulting line will pass through it.
theDir Direction. The resulting line will be parallel to it.
Returns:
New GEOM_Object, containing the created line.
Example: see GEOM_TestAll.py

def geompy::MakeLineTwoPnt   thePnt1,
  thePnt2
 

Parameters:
thePnt1 First of two points, defining the line.
thePnt2 Second of two points, defining the line.
Returns:
New GEOM_Object, containing the created line.
Example: see GEOM_TestAll.py

def geompy::MakePlane   thePnt,
  theVec,
  theTrimSize
 

Parameters:
thePnt Point, the plane has to pass through.
theVec Vector, defining the plane normal direction.
theTrimSize Half size of a side of quadrangle face, representing the plane.
Returns:
New GEOM_Object, containing the created plane.
Example: see GEOM_TestAll.py

def geompy::MakePlaneThreePnt   thePnt1,
  thePnt2,
  thePnt3,
  theTrimSize
 

Parameters:
thePnt1 First of three points, defining the plane.
thePnt2 Second of three points, defining the plane.
thePnt3 Fird of three points, defining the plane.
theTrimSize Half size of a side of quadrangle face, representing the plane.
Returns:
New GEOM_Object, containing the created plane.
Example: see GEOM_TestAll.py

def geompy::MakePlaneFace   theFace,
  theTrimSize
 

Parameters:
theFace Referenced plane or LCS(Marker).
theTrimSize New half size of a side of quadrangle face, representing the plane.
Returns:
New GEOM_Object, containing the created plane.
Example: see GEOM_TestAll.py

def geompy::MakeMarker   OX,
  OY,
  OZ,
  XDX,
  XDY,
  XDZ,
  YDX,
  YDY,
  YDZ
 

Parameters:
OX,OY,OZ Three coordinates of coordinate system origin.
XDX,XDY,XDZ Three components of OX direction
YDX,YDY,YDZ Three components of OY direction
Returns:
New GEOM_Object, containing the created coordinate system.
Example: see GEOM_TestAll.py

def geompy::MakeMarkerPntTwoVec   theOrigin,
  theXVec,
  theYVec
 

Parameters:
theOrigin Point of coordinate system origin.
theXVec Vector of X direction
theYVec Vector of Y direction
Returns:
New GEOM_Object, containing the created coordinate system.

def geompy::MakeArc   thePnt1,
  thePnt2,
  thePnt3
 

Parameters:
thePnt1 Start point of the arc.
thePnt2 Middle point of the arc.
thePnt3 End point of the arc.
Returns:
New GEOM_Object, containing the created arc.
Example: see GEOM_TestAll.py

def geompy::MakeArcCenter   thePnt1,
  thePnt2,
  thePnt3,
  theSense
 

Parameters:
thePnt1 Center of the arc
thePnt2 Start point of the arc. (Gives also the radius of the arc)
thePnt3 End point of the arc (Gives also a direction)
Returns:
New GEOM_Object, containing the created arc.
Example: see GEOM_TestAll.py

def geompy::MakeCircle   thePnt,
  theVec,
  theR
 

Parameters:
thePnt Circle center.
theVec Vector, normal to the plane of the circle.
theR Circle radius.
Returns:
New GEOM_Object, containing the created circle.
Example: see GEOM_TestAll.py

def geompy::MakeCircleThreePnt   thePnt1,
  thePnt2,
  thePnt3
 

Parameters:
thePnt1,thePnt2,thePnt3 Points, defining the circle.
Returns:
New GEOM_Object, containing the created circle.
Example: see GEOM_TestAll.py

def geompy::MakeEllipse   thePnt,
  theVec,
  theRMajor,
  theRMinor
 

Parameters:
thePnt Ellipse center.
theVec Vector, normal to the plane of the ellipse.
theRMajor Major ellipse radius.
theRMinor Minor ellipse radius.
Returns:
New GEOM_Object, containing the created ellipse.
Example: see GEOM_TestAll.py

def geompy::MakePolyline   thePoints  ) 
 

Parameters:
thePoints Sequence of points for the polyline.
Returns:
New GEOM_Object, containing the created polyline.
Example: see GEOM_TestAll.py

def geompy::MakeBezier   thePoints  ) 
 

Parameters: