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... | |
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.
theBase | Base shape to be extruded. |
thePoint1 | First end of extrusion vector. |
thePoint2 | Second end of extrusion vector. |
theScaleFactor | Use it to make prism with scaled second base. Nagative value means not scaled second base. |
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.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).
theBase | Base shape to be extruded. |
thePoint1 | First end of extrusion vector. |
thePoint2 | Second end of extrusion vector. |
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.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.
theBase | Base shape to be extruded. |
theVec | Direction of extrusion. |
theH | Prism dimension along theVec. |
theScaleFactor | Use it to make prism with scaled second base. Negative value means not scaled second base. |
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.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).
theBase | Base shape to be extruded. |
theVec | Direction of extrusion. |
theH | Prism dimension along theVec in forward direction. |
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.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.
theBase | Base shape to be extruded. |
theDX,theDY,theDZ | Directions of extrusion. |
theScaleFactor | Use it to make prism with scaled second base. Nagative value means not scaled second base. |
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.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).
theBase | Base shape to be extruded. |
theDX,theDY,theDZ | Directions of extrusion. |
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.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.
theBase | Base shape to be rotated. |
theAxis | Rotation axis. |
theAngle | Rotation angle in radians. |
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.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)
theBase | Base shape to be rotated. |
theAxis | Rotation axis. |
theAngle | Rotation angle in radians. |
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.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.
theContours | either a list or a compound of edges/wires. |
theMinDeg | a minimal degree of BSpline surface to create. |
theMaxDeg | a maximal degree of BSpline surface to create. |
theTol2D | a 2d tolerance to be reached. |
theTol3D | a 3d tolerance to be reached. |
theNbIter | a number of iteration of approximation algorithm. |
theMethod | Kind of method to perform filling operation (see GEOM.filling_oper_method enum). |
isApprox | if 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. |
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.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.
theContours | either a list or a compound of edges/wires. |
theMinDeg | a minimal degree of BSpline surface to create. |
theMaxDeg | a maximal degree of BSpline surface to create. |
theTol3D | a 3d tolerance to be reached. |
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.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.
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). |
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.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:
"Down" and "Up" groups contain:
"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.
theBase | Base shape to be extruded. |
thePath | Path shape to extrude the base shape along it. |
IsGenerateGroups | flag that tells if it is necessary to create groups. It is equal to False by default. |
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.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().
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. |
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.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.
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().
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. |
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.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().
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. |
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.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().
theBase | Base shape to be extruded. |
thePath | Path shape to extrude the base shape along it. |
theVec | Vector defines a constant binormal direction to keep the same angle beetween the direction and the sections along the sweep surface. |
IsGenerateGroups | flag that tells if it is necessary to create groups. It is equal to False by default. |
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.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.
theShape | Face or Shell to get thick solid or solid to get hollowed solid. |
theThickness | Thickness of the resulting solid |
theFacesIDs | the 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. |
theInside | If true the thickness is applied towards inside |
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.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.
theShape | Face or Shell to get thick solid or solid to get hollowed solid. |
theThickness | Thickness of the resulting solid |
theFacesIDs | the 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. |
theInside | If true the thickness is applied towards inside |
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.
theShape | It can be closed or unclosed pipe-like shell or a pipe-like solid. |
theBase1,theBase2 | Two bases of the supposed pipe. This should be wires or faces of theShape. |
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.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.
theShape | It can be closed or unclosed pipe-like shell or a pipe-like solid. |
listEdges1,listEdges2 | Two bases of the supposed pipe. This should be lists of edges of theShape. |
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.PrimOp, and geomBuilder.RaiseIfFailed().