Version: 8.3.0
Home
 All Data Structures Namespaces Files Functions Variables Groups
Extrusion and Revolution

Functions

def RotationSweepObjects
 Generate new elements by rotation of the given elements and nodes around the axis. More...
 
def RotationSweep
 Generate new elements by rotation of the elements around the axis. More...
 
def RotationSweepObject
 Generate new elements by rotation of the elements of object around the axis. More...
 
def RotationSweepObject1D
 Generate new elements by rotation of the elements of object around the axis. More...
 
def RotationSweepObject2D
 Generate new elements by rotation of the elements of object around the axis. More...
 
def ExtrusionSweepObjects
 Generate new elements by extrusion of the given elements and nodes. More...
 
def ExtrusionSweep
 Generate new elements by extrusion of the elements with given ids. More...
 
def ExtrusionByNormal
 Generate new elements by extrusion along the normal to a discretized surface or wire. More...
 
def ExtrusionSweepObject
 Generate new elements by extrusion of the elements or nodes which belong to the object. More...
 
def ExtrusionSweepObject1D
 Generate new elements by extrusion of edges which belong to the object. More...
 
def ExtrusionSweepObject2D
 Generate new elements by extrusion of faces which belong to the object. More...
 
def AdvancedExtrusion
 Generate new elements by extrusion of the elements with given ids. More...
 
def ExtrusionAlongPathObjects
 Generate new elements by extrusion of the given elements and nodes along the path. More...
 
def ExtrusionAlongPathX
 Generate new elements by extrusion of the given elements The path of extrusion must be a meshed edge. More...
 
def ExtrusionAlongPath
 Generate new elements by extrusion of the given elements The path of extrusion must be a meshed edge. More...
 
def ExtrusionAlongPathObject
 Generate new elements by extrusion of the elements which belong to the object The path of extrusion must be a meshed edge. More...
 
def ExtrusionAlongPathObject1D
 Generate new elements by extrusion of mesh segments which belong to the object The path of extrusion must be a meshed edge. More...
 
def ExtrusionAlongPathObject2D
 Generate new elements by extrusion of faces which belong to the object The path of extrusion must be a meshed edge. More...
 

Detailed Description

Function Documentation

def RotationSweepObjects (   self,
  nodes,
  edges,
  faces,
  Axis,
  AngleInRadians,
  NbOfSteps,
  Tolerance,
  MakeGroups = False,
  TotalAngle = False 
)

Generate new elements by rotation of the given elements and nodes around the axis.

Parameters
nodes- nodes to revolve: a list including ids, groups, sub-meshes or a mesh
edges- edges to revolve: a list including ids, groups, sub-meshes or a mesh
faces- faces to revolve: a list including ids, groups, sub-meshes or a mesh
Axisthe axis of rotation: AxisStruct, line (geom object) or [x,y,z,dx,dy,dz]
AngleInRadiansthe angle of Rotation (in radians) or a name of variable which defines angle in degrees
NbOfStepsthe number of steps
Tolerancetolerance
MakeGroupsforces the generation of new groups from existing ones
TotalAnglegives meaning of AngleInRadians: if True then it is an angular size of all steps, else - size of each step
Returns
the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh._getIdSourceList(), smeshBuilder.ParseAngles(), smeshBuilder.ParseParameters(), and Mesh.RotationSweep().

def RotationSweep (   self,
  IDsOfElements,
  Axis,
  AngleInRadians,
  NbOfSteps,
  Tolerance,
  MakeGroups = False,
  TotalAngle = False 
)

Generate new elements by rotation of the elements around the axis.

Parameters
IDsOfElementsthe list of ids of elements to sweep
Axisthe axis of rotation, AxisStruct or line(geom object)
AngleInRadiansthe angle of Rotation (in radians) or a name of variable which defines angle in degrees
NbOfStepsthe number of steps
Tolerancetolerance
MakeGroupsforces the generation of new groups from existing ones
TotalAnglegives meaning of AngleInRadians: if True then it is an angular size of all steps, else - size of each step
Returns
the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh.RotationSweepObject(), and Mesh.RotationSweepObjects().

def RotationSweepObject (   self,
  theObject,
  Axis,
  AngleInRadians,
  NbOfSteps,
  Tolerance,
  MakeGroups = False,
  TotalAngle = False 
)

Generate new elements by rotation of the elements of object around the axis.

Parameters
theObjectobject which elements should be sweeped. It can be a mesh, a sub mesh or a group.
Axisthe axis of rotation, AxisStruct or line(geom object)
AngleInRadiansthe angle of Rotation
NbOfStepsnumber of steps
Tolerancetolerance
MakeGroupsforces the generation of new groups from existing ones
TotalAnglegives meaning of AngleInRadians: if True then it is an angular size of all steps, else - size of each step
Returns
the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh.RotationSweepObject1D(), and Mesh.RotationSweepObjects().

def RotationSweepObject1D (   self,
  theObject,
  Axis,
  AngleInRadians,
  NbOfSteps,
  Tolerance,
  MakeGroups = False,
  TotalAngle = False 
)

Generate new elements by rotation of the elements of object around the axis.

Parameters
theObjectobject which elements should be sweeped. It can be a mesh, a sub mesh or a group.
Axisthe axis of rotation, AxisStruct or line(geom object)
AngleInRadiansthe angle of Rotation
NbOfStepsnumber of steps
Tolerancetolerance
MakeGroupsforces the generation of new groups from existing ones
TotalAnglegives meaning of AngleInRadians: if True then it is an angular size of all steps, else - size of each step
Returns
the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh.RotationSweepObject2D(), and Mesh.RotationSweepObjects().

def RotationSweepObject2D (   self,
  theObject,
  Axis,
  AngleInRadians,
  NbOfSteps,
  Tolerance,
  MakeGroups = False,
  TotalAngle = False 
)

Generate new elements by rotation of the elements of object around the axis.

Parameters
theObjectobject which elements should be sweeped. It can be a mesh, a sub mesh or a group.
Axisthe axis of rotation, AxisStruct or line(geom object)
AngleInRadiansthe angle of Rotation
NbOfStepsnumber of steps
Tolerancetolerance
MakeGroupsforces the generation of new groups from existing ones
TotalAnglegives meaning of AngleInRadians: if True then it is an angular size of all steps, else - size of each step
Returns
the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh.ExtrusionSweepObjects(), and Mesh.RotationSweepObjects().

def ExtrusionSweepObjects (   self,
  nodes,
  edges,
  faces,
  StepVector,
  NbOfSteps,
  MakeGroups = False,
  scaleFactors = [],
  linearVariation = False,
  basePoint = [] 
)

Generate new elements by extrusion of the given elements and nodes.

Parameters
nodesnodes to extrude: a list including ids, groups, sub-meshes or a mesh
edgesedges to extrude: a list including ids, groups, sub-meshes or a mesh
facesfaces to extrude: a list including ids, groups, sub-meshes or a mesh
StepVectorvector or DirStruct or 3 vector components, defining the direction and value of extrusion for one step (the total extrusion length will be NbOfSteps * ||StepVector||)
NbOfStepsthe number of steps
MakeGroupsforces the generation of new groups from existing ones
scaleFactorsoptional scale factors to apply during extrusion
linearVariationif True, scaleFactors are spread over all scaleFactors, else scaleFactors[i] is applied to nodes at the i-th extrusion step
basePointoptional scaling center; if not provided, a gravity center of nodes and elements being extruded is used as the scaling center. It can be either
  • a list of tree components of the point or
  • a node ID or
  • a GEOM point
Returns
the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh._getIdSourceList(), Mesh.GetNodeXYZ(), and smeshBuilder.ParseParameters().

def ExtrusionSweep (   self,
  IDsOfElements,
  StepVector,
  NbOfSteps,
  MakeGroups = False,
  IsNodes = False 
)

Generate new elements by extrusion of the elements with given ids.

Parameters
IDsOfElementsthe list of ids of elements or nodes for extrusion
StepVectorvector or DirStruct or 3 vector components, defining the direction and value of extrusion for one step (the total extrusion length will be NbOfSteps * ||StepVector||)
NbOfStepsthe number of steps
MakeGroupsforces the generation of new groups from existing ones
IsNodesis True if elements with given ids are nodes
Returns
the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh.ExtrusionByNormal(), and Mesh.ExtrusionSweepObjects().

def ExtrusionByNormal (   self,
  Elements,
  StepSize,
  NbOfSteps,
  ByAverageNormal = False,
  UseInputElemsOnly = True,
  MakeGroups = False,
  Dim = 2 
)

Generate new elements by extrusion along the normal to a discretized surface or wire.

Parameters
Elementselements to extrude - a list including ids, groups, sub-meshes or a mesh. Only faces can be extruded so far. A sub-mesh should be a sub-mesh on geom faces.
StepSizelength of one extrusion step (the total extrusion length will be NbOfSteps * StepSize ).
NbOfStepsnumber of extrusion steps.
ByAverageNormalif True each node is translated by StepSize along the average of the normal vectors to the faces sharing the node; else each node is translated along the same average normal till intersection with the plane got by translation of the face sharing the node along its own normal by StepSize.
UseInputElemsOnlyto use only Elements when computing extrusion direction for every node of Elements.
MakeGroupsforces generation of new groups from existing ones.
Dimdimension of elements to extrude: 2 - faces or 1 - edges. Extrusion of edges is not yet implemented. This parameter is used if Elements contains both faces and edges, i.e. Elements is a Mesh.
Returns
the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise.

References Mesh.GetIDSource(), and smeshBuilder.ParseParameters().

def ExtrusionSweepObject (   self,
  theObject,
  StepVector,
  NbOfSteps,
  MakeGroups = False,
  IsNodes = False 
)

Generate new elements by extrusion of the elements or nodes which belong to the object.

Parameters
theObjectthe object whose elements or nodes should be processed. It can be a mesh, a sub-mesh or a group.
StepVectorvector or DirStruct or 3 vector components, defining the direction and value of extrusion for one step (the total extrusion length will be NbOfSteps * ||StepVector||)
NbOfStepsthe number of steps
MakeGroupsforces the generation of new groups from existing ones
IsNodesis True if elements to extrude are nodes
Returns
list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh.ExtrusionSweepObjects().

def ExtrusionSweepObject1D (   self,
  theObject,
  StepVector,
  NbOfSteps,
  MakeGroups = False 
)

Generate new elements by extrusion of edges which belong to the object.

Parameters
theObjectobject whose 1D elements should be processed. It can be a mesh, a sub-mesh or a group.
StepVectorvector or DirStruct or 3 vector components, defining the direction and value of extrusion for one step (the total extrusion length will be NbOfSteps * ||StepVector||)
NbOfStepsthe number of steps
MakeGroupsto generate new groups from existing ones
Returns
list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh.ExtrusionSweepObjects().

def ExtrusionSweepObject2D (   self,
  theObject,
  StepVector,
  NbOfSteps,
  MakeGroups = False 
)

Generate new elements by extrusion of faces which belong to the object.

Parameters
theObjectobject whose 2D elements should be processed. It can be a mesh, a sub-mesh or a group.
StepVectorvector or DirStruct or 3 vector components, defining the direction and value of extrusion for one step (the total extrusion length will be NbOfSteps * ||StepVector||)
NbOfStepsthe number of steps
MakeGroupsforces the generation of new groups from existing ones
Returns
list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh.AdvancedExtrusion(), and Mesh.ExtrusionSweepObjects().

def AdvancedExtrusion (   self,
  IDsOfElements,
  StepVector,
  NbOfSteps,
  ExtrFlags,
  SewTolerance,
  MakeGroups = False 
)

Generate new elements by extrusion of the elements with given ids.

Parameters
IDsOfElementsis ids of elements
StepVectorvector or DirStruct or 3 vector components, defining the direction and value of extrusion for one step (the total extrusion length will be NbOfSteps * ||StepVector||)
NbOfStepsthe number of steps
ExtrFlagssets flags for extrusion
SewToleranceuses for comparing locations of nodes if flag EXTRUSION_FLAG_SEW is set
MakeGroupsforces the generation of new groups from existing ones
Returns
list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh.ExtrusionAlongPathObjects().

def ExtrusionAlongPathObjects (   self,
  Nodes,
  Edges,
  Faces,
  PathMesh,
  PathShape = None,
  NodeStart = 1,
  HasAngles = False,
  Angles = [],
  LinearVariation = False,
  HasRefPoint = False,
  RefPoint = [0,
  MakeGroups = False 
)

Generate new elements by extrusion of the given elements and nodes along the path.

The path of extrusion must be a meshed edge.

Parameters
Nodesnodes to extrude: a list including ids, groups, sub-meshes or a mesh
Edgesedges to extrude: a list including ids, groups, sub-meshes or a mesh
Facesfaces to extrude: a list including ids, groups, sub-meshes or a mesh
PathMesh1D mesh or 1D sub-mesh, along which proceeds the extrusion
PathShapeshape (edge) defines the sub-mesh of PathMesh if PathMesh contains not only path segments, else it can be None
NodeStartthe first or the last node on the path. Defines the direction of extrusion
HasAnglesallows the shape to be rotated around the path to get the resulting mesh in a helical fashion
Angleslist of angles
LinearVariationforces the computation of rotation angles as linear variation of the given Angles along path steps
HasRefPointallows using the reference point
RefPointthe point around which the shape is rotated (the mass center of the shape by default). The User can specify any point as the Reference Point.
MakeGroupsforces the generation of new groups from existing ones
Returns
list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error

References Mesh._getIdSourceList(), Mesh.ExtrusionAlongPathX(), and smeshBuilder.ParseAngles().

def ExtrusionAlongPathX (   self,
  Base,
  Path,
  NodeStart,
  HasAngles = False,
  Angles = [],
  LinearVariation = False,
  HasRefPoint = False,
  RefPoint = [0,
  MakeGroups = False,
  ElemType = SMESH.FACE 
)

Generate new elements by extrusion of the given elements The path of extrusion must be a meshed edge.

Parameters
Basemesh or group, or sub-mesh, or list of ids of elements for extrusion
Path- 1D mesh or 1D sub-mesh, along which proceeds the extrusion
NodeStartthe start node from Path. Defines the direction of extrusion
HasAnglesallows the shape to be rotated around the path to get the resulting mesh in a helical fashion
Angleslist of angles in radians
LinearVariationforces the computation of rotation angles as linear variation of the given Angles along path steps
HasRefPointallows using the reference point
RefPointthe point around which the elements are rotated (the mass center of the elements by default). The User can specify any point as the Reference Point. RefPoint can be either GEOM Vertex, [x,y,z] or SMESH.PointStruct
MakeGroupsforces the generation of new groups from existing ones
ElemTypetype of elements for extrusion (if param Base is a mesh)
Returns
list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, only SMESH::Extrusion_Error otherwise

References Mesh.ExtrusionAlongPath(), and Mesh.ExtrusionAlongPathObjects().

def ExtrusionAlongPath (   self,
  IDsOfElements,
  PathMesh,
  PathShape,
  NodeStart,
  HasAngles = False,
  Angles = [],
  HasRefPoint = False,
  RefPoint = [],
  MakeGroups = False,
  LinearVariation = False 
)

Generate new elements by extrusion of the given elements The path of extrusion must be a meshed edge.

Parameters
IDsOfElementsids of elements
PathMeshmesh containing a 1D sub-mesh on the edge, along which proceeds the extrusion
PathShapeshape(edge) defines the sub-mesh for the path
NodeStartthe first or the last node on the edge. Defines the direction of extrusion
HasAnglesallows the shape to be rotated around the path to get the resulting mesh in a helical fashion
Angleslist of angles in radians
HasRefPointallows using the reference point
RefPointthe point around which the shape is rotated (the mass center of the shape by default). The User can specify any point as the Reference Point.
MakeGroupsforces the generation of new groups from existing ones
LinearVariationforces the computation of rotation angles as linear variation of the given Angles along path steps
Returns
list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, only SMESH::Extrusion_Error otherwise

References Mesh.ExtrusionAlongPathObject(), and Mesh.ExtrusionAlongPathObjects().

def ExtrusionAlongPathObject (   self,
  theObject,
  PathMesh,
  PathShape,
  NodeStart,
  HasAngles = False,
  Angles = [],
  HasRefPoint = False,
  RefPoint = [],
  MakeGroups = False,
  LinearVariation = False 
)

Generate new elements by extrusion of the elements which belong to the object The path of extrusion must be a meshed edge.

Parameters
theObjectthe object whose elements should be processed. It can be a mesh, a sub-mesh or a group.
PathMeshmesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds
PathShapeshape(edge) defines the sub-mesh for the path
NodeStartthe first or the last node on the edge. Defines the direction of extrusion
HasAnglesallows the shape to be rotated around the path to get the resulting mesh in a helical fashion
Angleslist of angles
HasRefPointallows using the reference point
RefPointthe point around which the shape is rotated (the mass center of the shape by default). The User can specify any point as the Reference Point.
MakeGroupsforces the generation of new groups from existing ones
LinearVariationforces the computation of rotation angles as linear variation of the given Angles along path steps
Returns
list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, only SMESH::Extrusion_Error otherwise

References Mesh.ExtrusionAlongPathObject1D(), and Mesh.ExtrusionAlongPathObjects().

def ExtrusionAlongPathObject1D (   self,
  theObject,
  PathMesh,
  PathShape,
  NodeStart,
  HasAngles = False,
  Angles = [],
  HasRefPoint = False,
  RefPoint = [],
  MakeGroups = False,
  LinearVariation = False 
)

Generate new elements by extrusion of mesh segments which belong to the object The path of extrusion must be a meshed edge.

Parameters
theObjectthe object whose 1D elements should be processed. It can be a mesh, a sub-mesh or a group.
PathMeshmesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds
PathShapeshape(edge) defines the sub-mesh for the path
NodeStartthe first or the last node on the edge. Defines the direction of extrusion
HasAnglesallows the shape to be rotated around the path to get the resulting mesh in a helical fashion
Angleslist of angles
HasRefPointallows using the reference point
RefPointthe point around which the shape is rotated (the mass center of the shape by default). The User can specify any point as the Reference Point.
MakeGroupsforces the generation of new groups from existing ones
LinearVariationforces the computation of rotation angles as linear variation of the given Angles along path steps
Returns
list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, only SMESH::Extrusion_Error otherwise

References Mesh.ExtrusionAlongPathObject2D(), and Mesh.ExtrusionAlongPathObjects().

def ExtrusionAlongPathObject2D (   self,
  theObject,
  PathMesh,
  PathShape,
  NodeStart,
  HasAngles = False,
  Angles = [],
  HasRefPoint = False,
  RefPoint = [],
  MakeGroups = False,
  LinearVariation = False 
)

Generate new elements by extrusion of faces which belong to the object The path of extrusion must be a meshed edge.

Parameters
theObjectthe object whose 2D elements should be processed. It can be a mesh, a sub-mesh or a group.
PathMeshmesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds
PathShapeshape(edge) defines the sub-mesh for the path
NodeStartthe first or the last node on the edge. Defines the direction of extrusion
HasAnglesallows the shape to be rotated around the path to get the resulting mesh in a helical fashion
Angleslist of angles
HasRefPointallows using the reference point
RefPointthe point around which the shape is rotated (the mass center of the shape by default). The User can specify any point as the Reference Point.
MakeGroupsforces the generation of new groups from existing ones
LinearVariationforces the computation of rotation angles as linear variation of the given Angles along path steps
Returns
list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, only SMESH::Extrusion_Error otherwise

References Mesh.ExtrusionAlongPathObjects().