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

Functions

def MakePrism
 Create a shape by extrusion of the base shape along a vector, defined by two points. More...
 
def MakePrism2Ways
 Create a shape by extrusion of the base shape along a vector, defined by two points, in 2 Ways (forward/backward). More...
 
def MakePrismVecH
 Create a shape by extrusion of the base shape along the vector, i.e. More...
 
def MakePrismVecH2Ways
 Create a shape by extrusion of the base shape along the vector, i.e. More...
 
def MakePrismDXDYDZ
 Create a shape by extrusion of the base shape along the dx, dy, dz direction. More...
 
def MakePrismDXDYDZ2Ways
 Create a shape by extrusion of the base shape along the dx, dy, dz direction i.e. More...
 
def MakeRevolution
 Create a shape by revolution of the base shape around the axis on the given angle, i.e. More...
 
def MakeRevolution2Ways
 Create a shape by revolution of the base shape around the axis on the given angle, i.e. More...
 
def MakeFilling
 Create a face from a given set of contours. More...
 
def MakeFillingNew
 Create a face from a given set of contours. More...
 
def MakeThruSections
 Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices. More...
 
def MakePipe
 Create a shape by extrusion of the base shape along the path shape. More...
 
def MakePipeWithDifferentSections
 Create a shape by extrusion of the profile shape along the path shape. More...
 
def MakePipeWithDifferentSectionsBySteps
 Create a shape by extrusion of the profile shape along the path shape. More...
 
def MakePipeWithShellSections
 Create a shape by extrusion of the profile shape along the path shape. More...
 
def MakePipeWithShellSectionsBySteps
 Create a shape by extrusion of the profile shape along the path shape. More...
 
def MakePipeShellsWithoutPath
 Create solids between given sections. More...
 
def MakePipeBiNormalAlongVector
 Create a shape by extrusion of the base shape along the path shape with constant bi-normal direction along the given vector. More...
 
def MakeThickSolid
 Makes a thick solid from a shape. More...
 
def Thicken
 Modifies a shape to make it a thick solid. More...
 
def RestorePath
 Build a middle path of a pipe-like shape. More...
 
def RestorePathEdges
 Build a middle path of a pipe-like shape. More...
 

Detailed Description

Function Documentation

def MakePrism (   self,
  theBase,
  thePoint1,
  thePoint2,
  theScaleFactor = -1.0,
  theName = None 
)

Create a shape by extrusion of the base shape along a vector, defined by two points.

Parameters
theBaseBase shape to be extruded.
thePoint1First end of extrusion vector.
thePoint2Second end of extrusion vector.
theScaleFactorUse it to make prism with scaled second base. Nagative value means not scaled second base.
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 prism.

Example

References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.ParseParameters(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakePrism2Ways (   self,
  theBase,
  thePoint1,
  thePoint2,
  theName = None 
)

Create a shape by extrusion of the base shape along a vector, defined by two points, in 2 Ways (forward/backward).

Parameters
theBaseBase shape to be extruded.
thePoint1First end of extrusion vector.
thePoint2Second end of extrusion vector.
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 prism.

Example

References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakePrismVecH (   self,
  theBase,
  theVec,
  theH,
  theScaleFactor = -1.0,
  theName = None 
)

Create a shape by extrusion of the base shape along the vector, i.e.

all the space, transfixed by the base shape during its translation along the vector on the given distance.

Parameters
theBaseBase shape to be extruded.
theVecDirection of extrusion.
theHPrism dimension along theVec.
theScaleFactorUse it to make prism with scaled second base. Negative value means not scaled second base.
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 prism.

Example

References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.ParseParameters(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakePrismVecH2Ways (   self,
  theBase,
  theVec,
  theH,
  theName = None 
)

Create a shape by extrusion of the base shape along the vector, i.e.

all the space, transfixed by the base shape during its translation along the vector on the given distance in 2 Ways (forward/backward).

Parameters
theBaseBase shape to be extruded.
theVecDirection of extrusion.
theHPrism dimension along theVec in forward 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 the created prism.

Example

References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.ParseParameters(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakePrismDXDYDZ (   self,
  theBase,
  theDX,
  theDY,
  theDZ,
  theScaleFactor = -1.0,
  theName = None 
)

Create a shape by extrusion of the base shape along the dx, dy, dz direction.

Parameters
theBaseBase shape to be extruded.
theDX,theDY,theDZDirections of extrusion.
theScaleFactorUse it to make prism with scaled second base. Nagative value means not scaled second base.
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 prism.

Example

References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.ParseParameters(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakePrismDXDYDZ2Ways (   self,
  theBase,
  theDX,
  theDY,
  theDZ,
  theName = None 
)

Create a shape by extrusion of the base shape along the dx, dy, dz direction i.e.

all the space, transfixed by the base shape during its translation along the vector on the given distance in 2 Ways (forward/backward).

Parameters
theBaseBase shape to be extruded.
theDX,theDY,theDZDirections of extrusion.
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 prism.

Example

References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.ParseParameters(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakeRevolution (   self,
  theBase,
  theAxis,
  theAngle,
  theName = None 
)

Create a shape by revolution of the base shape around the axis on the given angle, i.e.

all the space, transfixed by the base shape during its rotation around the axis on the given angle.

Parameters
theBaseBase shape to be rotated.
theAxisRotation axis.
theAngleRotation angle in radians.
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 revolution.

Example

References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.ParseParameters(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakeRevolution2Ways (   self,
  theBase,
  theAxis,
  theAngle,
  theName = None 
)

Create a shape by revolution of the base shape around the axis on the given angle, i.e.

all the space, transfixed by the base shape during its rotation around the axis on the given angle in both directions (forward/backward)

Parameters
theBaseBase shape to be rotated.
theAxisRotation axis.
theAngleRotation angle in radians.
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 revolution.

Example

References geomBuilder._autoPublish(), geomBuilder.MakeFilling(), geomBuilder.ManageTransactions(), geomBuilder.ParseParameters(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakeFilling (   self,
  theContours,
  theMinDeg = 2,
  theMaxDeg = 5,
  theTol2D = 0.0001,
  theTol3D = 0.0001,
  theNbIter = 0,
  theMethod = GEOM.FOM_Default,
  isApprox = 0,
  theName = None 
)

Create a face from a given set of contours.

Parameters
theContourseither a list or a compound of edges/wires.
theMinDega minimal degree of BSpline surface to create.
theMaxDega maximal degree of BSpline surface to create.
theTol2Da 2d tolerance to be reached.
theTol3Da 3d tolerance to be reached.
theNbItera number of iteration of approximation algorithm.
theMethodKind of method to perform filling operation (see GEOM.filling_oper_method enum).
isApproxif True, BSpline curves are generated in the process of surface construction. By default it is False, that means the surface is created using given curves. The usage of Approximation makes the algorithm work slower, but allows building the surface for rather complex cases.
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 (face), containing the created filling surface.

Example

References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.ParseParameters(), geomBuilder.PrimOp, geomBuilder.RaiseIfFailed(), and geomBuilder.ToList().

def MakeFillingNew (   self,
  theContours,
  theMinDeg = 2,
  theMaxDeg = 5,
  theTol3D = 0.0001,
  theName = None 
)

Create a face from a given set of contours.

This method corresponds to MakeFilling() with isApprox=True.

Parameters
theContourseither a list or a compound of edges/wires.
theMinDega minimal degree of BSpline surface to create.
theMaxDega maximal degree of BSpline surface to create.
theTol3Da 3d tolerance to be reached.
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 (face), containing the created filling surface.

Example

References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.ParseParameters(), geomBuilder.PrimOp, geomBuilder.RaiseIfFailed(), and geomBuilder.ToList().

def MakeThruSections (   self,
  theSeqSections,
  theModeSolid,
  thePreci,
  theRuled,
  theName = None 
)

Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.

Parameters
theSeqSections- set of specified sections.
theModeSolid- mode defining building solid or shell
thePreci- precision 3D used for smoothing
theRuled- mode defining type of the result surfaces (ruled or smoothed).
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 shell or solid.

Example

References geomBuilder._autoPublish(), geomBuilder.MakePipe(), geomBuilder.ManageTransactions(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakePipe (   self,
  theBase,
  thePath,
  IsGenerateGroups = False,
  theName = None 
)

Create a shape by extrusion of the base shape along the path shape.

The path shape can be a wire or an edge. It is possible to generate groups along with the result by means of setting the flag IsGenerateGroups.
If thePath is a closed edge or wire and IsGenerateGroups is set, an error is occured. If thePath is not closed edge/wire, the following groups are returned:

  • If theBase is unclosed edge or wire: "Down", "Up", "Side1", "Side2";
  • If theBase is closed edge or wire, face or shell: "Down", "Up", "Other".

"Down" and "Up" groups contain:

  • Edges if theBase is edge or wire;
  • Faces if theBase is face or shell.

"Side1" and "Side2" groups contain edges generated from the first and last vertices of theBase. The first and last vertices are determined taking into account edge/wire orientation.
"Other" group represents faces generated from the bounding edges of theBase.

Parameters
theBaseBase shape to be extruded.
thePathPath shape to extrude the base shape along it.
IsGenerateGroupsflag that tells if it is necessary to create groups. It is equal to False by default.
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 pipe if IsGenerateGroups is not set. Otherwise it returns a list of GEOM.GEOM_Object. Its first element is the created pipe, the remaining ones are created groups.

Example

References geomBuilder._autoPublish(), geomBuilder.MakePipeWithDifferentSections(), geomBuilder.ManageTransactions(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakePipeWithDifferentSections (   self,
  theSeqBases,
  theLocations,
  thePath,
  theWithContact,
  theWithCorrection,
  IsGenerateGroups = False,
  theName = None 
)

Create a shape by extrusion of the profile shape along the path shape.

The path shape can be a wire or an edge. the several profiles can be specified in the several locations of path. It is possible to generate groups along with the result by means of setting the flag IsGenerateGroups. For detailed information on groups that can be created please see the method MakePipe().

Parameters
theSeqBases- list of Bases shape to be extruded.
theLocations- list of locations on the path corresponding specified list of the Bases shapes. Number of locations should be equal to number of bases or list of locations can be empty.
thePath- Path shape to extrude the base shape along it.
theWithContact- the mode defining that the section is translated to be in contact with the spine.
theWithCorrection- defining that the section is rotated to be orthogonal to the spine tangent in the correspondent point
IsGenerateGroups- flag that tells if it is necessary to create groups. It is equal to False by default.
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 pipe if IsGenerateGroups is not set. Otherwise it returns new GEOM.ListOfGO. Its first element is the created pipe, the remaining ones are created groups.

Example

References geomBuilder._autoPublish(), geomBuilder.MakePipeWithDifferentSectionsBySteps(), geomBuilder.ManageTransactions(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakePipeWithDifferentSectionsBySteps (   self,
  theSeqBases,
  theLocations,
  thePath,
  IsGenerateGroups = False,
  theName = None 
)

Create a shape by extrusion of the profile shape along the path shape.

This function is a version of MakePipeWithDifferentSections() with the same parameters, except eliminated theWithContact and theWithCorrection. So it is possible to find the description of all parameters is in this method. The difference is that this method performs the operation step by step, i.e. it creates pipes between each pair of neighbor sections and fuses them into a single shape.

Example

References geomBuilder._autoPublish(), geomBuilder.MakePipeWithShellSections(), geomBuilder.ManageTransactions(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakePipeWithShellSections (   self,
  theSeqBases,
  theSeqSubBases,
  theLocations,
  thePath,
  theWithContact,
  theWithCorrection,
  IsGenerateGroups = False,
  theName = None 
)

Create a shape by extrusion of the profile shape along the path shape.

The path shape can be a wire or an edge. the several profiles can be specified in the several locations of path. It is possible to generate groups along with the result by means of setting the flag IsGenerateGroups. For detailed information on groups that can be created please see the method MakePipe().

Parameters
theSeqBases- list of Bases shape to be extruded. Base shape must be shell or face. If number of faces in neighbour sections aren't coincided result solid between such sections will be created using external boundaries of this shells.
theSeqSubBases- list of corresponding sub-shapes of section shapes. This list is used for searching correspondences between faces in the sections. Size of this list must be equal to size of list of base shapes.
theLocations- list of locations on the path corresponding specified list of the Bases shapes. Number of locations should be equal to number of bases. First and last locations must be coincided with first and last vertexes of path correspondingly.
thePath- Path shape to extrude the base shape along it.
theWithContact- the mode defining that the section is translated to be in contact with the spine.
theWithCorrection- defining that the section is rotated to be orthogonal to the spine tangent in the correspondent point
IsGenerateGroups- flag that tells if it is necessary to create groups. It is equal to False by default.
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 solids if IsGenerateGroups is not set. Otherwise it returns new GEOM.ListOfGO. Its first element is the created solids, the remaining ones are created groups.

Example

References geomBuilder._autoPublish(), geomBuilder.MakePipeWithShellSectionsBySteps(), geomBuilder.ManageTransactions(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakePipeWithShellSectionsBySteps (   self,
  theSeqBases,
  theSeqSubBases,
  theLocations,
  thePath,
  theWithContact,
  theWithCorrection,
  IsGenerateGroups = False,
  theName = None 
)

Create a shape by extrusion of the profile shape along the path shape.

This function is used only for debug pipe functionality - it is a version of function MakePipeWithShellSections() which give a possibility to recieve information about creating pipe between each pair of sections step by step.

References geomBuilder._autoPublish(), geomBuilder.MakeCompound(), geomBuilder.MakePipeShellsWithoutPath(), geomBuilder.ManageTransactions(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakePipeShellsWithoutPath (   self,
  theSeqBases,
  theLocations,
  IsGenerateGroups = False,
  theName = None 
)

Create solids between given sections.

It is possible to generate groups along with the result by means of setting the flag IsGenerateGroups. For detailed information on groups that can be created please see the method MakePipe().

Parameters
theSeqBases- list of sections (shell or face).
theLocations- list of corresponding vertexes
IsGenerateGroups- flag that tells if it is necessary to create groups. It is equal to False by default.
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 solids if IsGenerateGroups is not set. Otherwise it returns new GEOM.ListOfGO. Its first element is the created solids, the remaining ones are created groups.

Example

References geomBuilder._autoPublish(), geomBuilder.MakePipeBiNormalAlongVector(), geomBuilder.ManageTransactions(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakePipeBiNormalAlongVector (   self,
  theBase,
  thePath,
  theVec,
  IsGenerateGroups = False,
  theName = None 
)

Create a shape by extrusion of the base shape along the path shape with constant bi-normal direction along the given vector.

The path shape can be a wire or an edge. It is possible to generate groups along with the result by means of setting the flag IsGenerateGroups. For detailed information on groups that can be created please see the method MakePipe().

Parameters
theBaseBase shape to be extruded.
thePathPath shape to extrude the base shape along it.
theVecVector defines a constant binormal direction to keep the same angle beetween the direction and the sections along the sweep surface.
IsGenerateGroupsflag that tells if it is necessary to create groups. It is equal to False by default.
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 pipe if IsGenerateGroups is not set. Otherwise it returns new GEOM.ListOfGO. Its first element is the created pipe, the remaining ones are created groups.

Example

References geomBuilder._autoPublish(), geomBuilder.MakeThickSolid(), geomBuilder.ManageTransactions(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def MakeThickSolid (   self,
  theShape,
  theThickness,
  theFacesIDs = [],
  theInside = False,
  theName = None 
)

Makes a thick solid from a shape.

If the input is a surface shape (face or shell) the result is a thick solid. If an input shape is a solid the result is a hollowed solid with removed faces.

Parameters
theShapeFace or Shell to get thick solid or solid to get hollowed solid.
theThicknessThickness of the resulting solid
theFacesIDsthe list of face IDs to be removed from the result. It is ignored if theShape is a face or a shell. It is empty by default.
theInsideIf true the thickness is applied towards inside
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 solid

Example

References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.ParseParameters(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def Thicken (   self,
  theShape,
  theThickness,
  theFacesIDs = [],
  theInside = False 
)

Modifies a shape to make it a thick solid.

If the input is a surface shape (face or shell) the result is a thick solid. If an input shape is a solid the result is a hollowed solid with removed faces.

Parameters
theShapeFace or Shell to get thick solid or solid to get hollowed solid.
theThicknessThickness of the resulting solid
theFacesIDsthe list of face IDs to be removed from the result. It is ignored if theShape is a face or a shell. It is empty by default.
theInsideIf true the thickness is applied towards inside
Returns
The modified shape

Example

References geomBuilder.ManageTransactions(), geomBuilder.ParseParameters(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def RestorePath (   self,
  theShape,
  theBase1,
  theBase2,
  theName = None 
)

Build a middle path of a pipe-like shape.

The path shape can be a wire or an edge.

Parameters
theShapeIt can be closed or unclosed pipe-like shell or a pipe-like solid.
theBase1,theBase2Two bases of the supposed pipe. This should be wires or faces of theShape.
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.
Note
It is not assumed that exact or approximate copy of theShape can be obtained by applying existing Pipe operation on the resulting "Path" wire taking theBase1 as the base - it is not always possible; though in some particular cases it might work it is not guaranteed. Thus, RestorePath function should not be considered as an exact reverse operation of the Pipe.
Returns
New GEOM.GEOM_Object, containing an edge or wire that represent source pipe's "path".

Example

References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().

def RestorePathEdges (   self,
  theShape,
  listEdges1,
  listEdges2,
  theName = None 
)

Build a middle path of a pipe-like shape.

The path shape can be a wire or an edge.

Parameters
theShapeIt can be closed or unclosed pipe-like shell or a pipe-like solid.
listEdges1,listEdges2Two bases of the supposed pipe. This should be lists of edges of theShape.
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.
Note
It is not assumed that exact or approximate copy of theShape can be obtained by applying existing Pipe operation on the resulting "Path" wire taking theBase1 as the base - it is not always possible; though in some particular cases it might work it is not guaranteed. Thus, RestorePath function should not be considered as an exact reverse operation of the Pipe.
Returns
New GEOM.GEOM_Object, containing an edge or wire that represent source pipe's "path".

Example

References geomBuilder._autoPublish(), geomBuilder.ManageTransactions(), geomBuilder.PrimOp, and geomBuilder.RaiseIfFailed().