Back to index

salome-smesh  6.5.0
Functions
Extrusion and Revolution
Modifying meshes
Collaboration diagram for Extrusion and Revolution:

Functions

def smeshDC.Mesh.RotationSweep
 Generates new elements by rotation of the elements around the axis.
def smeshDC.Mesh.RotationSweepObject
 Generates new elements by rotation of the elements of object around the axis.
def smeshDC.Mesh.RotationSweepObject1D
 Generates new elements by rotation of the elements of object around the axis.
def smeshDC.Mesh.RotationSweepObject2D
 Generates new elements by rotation of the elements of object around the axis.
def smeshDC.Mesh.ExtrusionSweep
 Generates new elements by extrusion of the elements with given ids.
def smeshDC.Mesh.AdvancedExtrusion
 Generates new elements by extrusion of the elements with given ids.
def smeshDC.Mesh.ExtrusionSweepObject
 Generates new elements by extrusion of the elements which belong to the object.
def smeshDC.Mesh.ExtrusionSweepObject1D
 Generates new elements by extrusion of the elements which belong to the object.
def smeshDC.Mesh.ExtrusionSweepObject2D
 Generates new elements by extrusion of the elements which belong to the object.
def smeshDC.Mesh.ExtrusionAlongPathX
 Generates new elements by extrusion of the given elements The path of extrusion must be a meshed edge.
def smeshDC.Mesh.ExtrusionAlongPath
 Generates new elements by extrusion of the given elements The path of extrusion must be a meshed edge.
def smeshDC.Mesh.ExtrusionAlongPathObject
 Generates new elements by extrusion of the elements which belong to the object The path of extrusion must be a meshed edge.
def smeshDC.Mesh.ExtrusionAlongPathObject1D
 Generates new elements by extrusion of the elements which belong to the object The path of extrusion must be a meshed edge.
def smeshDC.Mesh.ExtrusionAlongPathObject2D
 Generates new elements by extrusion of the elements which belong to the object The path of extrusion must be a meshed edge.

Function Documentation

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

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

Parameters:
IDsOfElementsis ids of elements
StepVectorvector, defining the direction and value of extrusion
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

Definition at line 3103 of file smeshDC.py.

03103 
03104                           ExtrFlags, SewTolerance, MakeGroups=False):
03105         if ( isinstance( StepVector, geompyDC.GEOM._objref_GEOM_Object)):
03106             StepVector = self.smeshpyD.GetDirStruct(StepVector)
03107         if MakeGroups:
03108             return self.editor.AdvancedExtrusionMakeGroups(IDsOfElements, StepVector, NbOfSteps,
03109                                                            ExtrFlags, SewTolerance)
03110         self.editor.AdvancedExtrusion(IDsOfElements, StepVector, NbOfSteps,
03111                                       ExtrFlags, SewTolerance)
03112         return []

Here is the caller graph for this function:

def smeshDC.Mesh.ExtrusionAlongPath (   self,
  IDsOfElements,
  PathMesh,
  PathShape,
  NodeStart,
  HasAngles,
  Angles,
  HasRefPoint,
  RefPoint,
  MakeGroups = False,
  LinearVariation = False 
)

Generates 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

Definition at line 3252 of file smeshDC.py.

03252 
03253                            MakeGroups=False, LinearVariation=False):
03254         if IDsOfElements == []:
03255             IDsOfElements = self.GetElementsId()
03256         if ( isinstance( RefPoint, geompyDC.GEOM._objref_GEOM_Object)):
03257             RefPoint = self.smeshpyD.GetPointStruct(RefPoint)
03258             pass
03259         if ( isinstance( PathMesh, Mesh )):
03260             PathMesh = PathMesh.GetMesh()
03261         Angles,AnglesParameters,hasVars = ParseAngles(Angles)
03262         Parameters = AnglesParameters + var_separator + RefPoint.parameters
03263         self.mesh.SetParameters(Parameters)
03264         if HasAngles and Angles and LinearVariation:
03265             Angles = self.editor.LinearAnglesVariation( PathMesh, PathShape, Angles )
03266             pass
03267         if MakeGroups:
03268             return self.editor.ExtrusionAlongPathMakeGroups(IDsOfElements, PathMesh,
03269                                                             PathShape, NodeStart, HasAngles,
03270                                                             Angles, HasRefPoint, RefPoint)
03271         return self.editor.ExtrusionAlongPath(IDsOfElements, PathMesh, PathShape,
03272                                               NodeStart, HasAngles, Angles, HasRefPoint, RefPoint)

Here is the call graph for this function:

Here is the caller graph for this function:

def smeshDC.Mesh.ExtrusionAlongPathObject (   self,
  theObject,
  PathMesh,
  PathShape,
  NodeStart,
  HasAngles,
  Angles,
  HasRefPoint,
  RefPoint,
  MakeGroups = False,
  LinearVariation = False 
)

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

Parameters:
theObjectthe object which 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

Definition at line 3294 of file smeshDC.py.

03294 
03295                                  MakeGroups=False, LinearVariation=False):
03296         if ( isinstance( theObject, Mesh )):
03297             theObject = theObject.GetMesh()
03298         if ( isinstance( RefPoint, geompyDC.GEOM._objref_GEOM_Object)):
03299             RefPoint = self.smeshpyD.GetPointStruct(RefPoint)
03300         if ( isinstance( PathMesh, Mesh )):
03301             PathMesh = PathMesh.GetMesh()
03302         Angles,AnglesParameters,hasVars = ParseAngles(Angles)
03303         Parameters = AnglesParameters + var_separator + RefPoint.parameters
03304         self.mesh.SetParameters(Parameters)
03305         if HasAngles and Angles and LinearVariation:
03306             Angles = self.editor.LinearAnglesVariation( PathMesh, PathShape, Angles )
03307             pass
03308         if MakeGroups:
03309             return self.editor.ExtrusionAlongPathObjectMakeGroups(theObject, PathMesh,
03310                                                                   PathShape, NodeStart, HasAngles,
03311                                                                   Angles, HasRefPoint, RefPoint)
03312         return self.editor.ExtrusionAlongPathObject(theObject, PathMesh, PathShape,
03313                                                     NodeStart, HasAngles, Angles, HasRefPoint,
03314                                                     RefPoint)

Here is the call graph for this function:

Here is the caller graph for this function:

def smeshDC.Mesh.ExtrusionAlongPathObject1D (   self,
  theObject,
  PathMesh,
  PathShape,
  NodeStart,
  HasAngles,
  Angles,
  HasRefPoint,
  RefPoint,
  MakeGroups = False,
  LinearVariation = False 
)

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

Parameters:
theObjectthe object which 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

Definition at line 3336 of file smeshDC.py.

03336 
03337                                    MakeGroups=False, LinearVariation=False):
03338         if ( isinstance( theObject, Mesh )):
03339             theObject = theObject.GetMesh()
03340         if ( isinstance( RefPoint, geompyDC.GEOM._objref_GEOM_Object)):
03341             RefPoint = self.smeshpyD.GetPointStruct(RefPoint)
03342         if ( isinstance( PathMesh, Mesh )):
03343             PathMesh = PathMesh.GetMesh()
03344         Angles,AnglesParameters,hasVars = ParseAngles(Angles)
03345         Parameters = AnglesParameters + var_separator + RefPoint.parameters
03346         self.mesh.SetParameters(Parameters)
03347         if HasAngles and Angles and LinearVariation:
03348             Angles = self.editor.LinearAnglesVariation( PathMesh, PathShape, Angles )
03349             pass
03350         if MakeGroups:
03351             return self.editor.ExtrusionAlongPathObject1DMakeGroups(theObject, PathMesh,
03352                                                                     PathShape, NodeStart, HasAngles,
03353                                                                     Angles, HasRefPoint, RefPoint)
03354         return self.editor.ExtrusionAlongPathObject1D(theObject, PathMesh, PathShape,
03355                                                       NodeStart, HasAngles, Angles, HasRefPoint,
03356                                                       RefPoint)

Here is the call graph for this function:

Here is the caller graph for this function:

def smeshDC.Mesh.ExtrusionAlongPathObject2D (   self,
  theObject,
  PathMesh,
  PathShape,
  NodeStart,
  HasAngles,
  Angles,
  HasRefPoint,
  RefPoint,
  MakeGroups = False,
  LinearVariation = False 
)

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

Parameters:
theObjectthe object which 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

Definition at line 3378 of file smeshDC.py.

03378 
03379                                    MakeGroups=False, LinearVariation=False):
03380         if ( isinstance( theObject, Mesh )):
03381             theObject = theObject.GetMesh()
03382         if ( isinstance( RefPoint, geompyDC.GEOM._objref_GEOM_Object)):
03383             RefPoint = self.smeshpyD.GetPointStruct(RefPoint)
03384         if ( isinstance( PathMesh, Mesh )):
03385             PathMesh = PathMesh.GetMesh()
03386         Angles,AnglesParameters,hasVars = ParseAngles(Angles)
03387         Parameters = AnglesParameters + var_separator + RefPoint.parameters
03388         self.mesh.SetParameters(Parameters)
03389         if HasAngles and Angles and LinearVariation:
03390             Angles = self.editor.LinearAnglesVariation( PathMesh, PathShape, Angles )
03391             pass
03392         if MakeGroups:
03393             return self.editor.ExtrusionAlongPathObject2DMakeGroups(theObject, PathMesh,
03394                                                                     PathShape, NodeStart, HasAngles,
03395                                                                     Angles, HasRefPoint, RefPoint)
03396         return self.editor.ExtrusionAlongPathObject2D(theObject, PathMesh, PathShape,
03397                                                       NodeStart, HasAngles, Angles, HasRefPoint,
03398                                                       RefPoint)

Here is the call graph for this function:

Here is the caller graph for this function:

def smeshDC.Mesh.ExtrusionAlongPathX (   self,
  Base,
  Path,
  NodeStart,
  HasAngles,
  Angles,
  LinearVariation,
  HasRefPoint,
  RefPoint,
  MakeGroups,
  ElemType 
)

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

Parameters:
Basemesh or group, or submesh, 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 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
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

Definition at line 3205 of file smeshDC.py.

03205 
03206                             HasRefPoint, RefPoint, MakeGroups, ElemType):
03207         if ( isinstance( RefPoint, geompyDC.GEOM._objref_GEOM_Object)):
03208             RefPoint = self.smeshpyD.GetPointStruct(RefPoint)
03209             pass
03210         Angles,AnglesParameters,hasVars = ParseAngles(Angles)
03211         Parameters = AnglesParameters + var_separator + RefPoint.parameters
03212         self.mesh.SetParameters(Parameters)
03213 
03214         if (isinstance(Path, Mesh)): Path = Path.GetMesh()
03215 
03216         if isinstance(Base, list):
03217             IDsOfElements = []
03218             if Base == []: IDsOfElements = self.GetElementsId()
03219             else: IDsOfElements = Base
03220             return self.editor.ExtrusionAlongPathX(IDsOfElements, Path, NodeStart,
03221                                                    HasAngles, Angles, LinearVariation,
03222                                                    HasRefPoint, RefPoint, MakeGroups, ElemType)
03223         else:
03224             if isinstance(Base, Mesh): Base = Base.GetMesh()
03225             if isinstance(Base, SMESH._objref_SMESH_Mesh) or isinstance(Base, SMESH._objref_SMESH_Group) or isinstance(Base, SMESH._objref_SMESH_subMesh):
03226                 return self.editor.ExtrusionAlongPathObjX(Base, Path, NodeStart,
03227                                                           HasAngles, Angles, LinearVariation,
03228                                                           HasRefPoint, RefPoint, MakeGroups, ElemType)
03229             else:
03230                 raise RuntimeError, "Invalid Base for ExtrusionAlongPathX"
03231 

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Parameters:
IDsOfElementsthe list of elements ids for extrusion
StepVectorvector or DirStruct, 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

Definition at line 3073 of file smeshDC.py.

03073 
03074     def ExtrusionSweep(self, IDsOfElements, StepVector, NbOfSteps, MakeGroups=False, IsNodes = False):
03075         if IDsOfElements == []:
03076             IDsOfElements = self.GetElementsId()
03077         if ( isinstance( StepVector, geompyDC.GEOM._objref_GEOM_Object)):
03078             StepVector = self.smeshpyD.GetDirStruct(StepVector)
03079         NbOfSteps,Parameters,hasVars = ParseParameters(NbOfSteps)
03080         Parameters = StepVector.PS.parameters + var_separator + Parameters
03081         self.mesh.SetParameters(Parameters)
03082         if MakeGroups:
03083             if(IsNodes):
03084                 return self.editor.ExtrusionSweepMakeGroups0D(IDsOfElements, StepVector, NbOfSteps)
03085             else:
03086                 return self.editor.ExtrusionSweepMakeGroups(IDsOfElements, StepVector, NbOfSteps)
03087         if(IsNodes):
03088             self.editor.ExtrusionSweep0D(IDsOfElements, StepVector, NbOfSteps)
03089         else:
03090             self.editor.ExtrusionSweep(IDsOfElements, StepVector, NbOfSteps)
03091         return []

Here is the call graph for this function:

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

Generates new elements by extrusion of the elements which belong to the object.

Parameters:
theObjectthe object which elements should be processed. It can be a mesh, a sub mesh or a group.
StepVectorvector, 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 which belong to the object are nodes
Returns:
list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

Definition at line 3122 of file smeshDC.py.

03122 
03123     def ExtrusionSweepObject(self, theObject, StepVector, NbOfSteps, MakeGroups=False, IsNodes=False):
03124         if ( isinstance( theObject, Mesh )):
03125             theObject = theObject.GetMesh()
03126         if ( isinstance( StepVector, geompyDC.GEOM._objref_GEOM_Object)):
03127             StepVector = self.smeshpyD.GetDirStruct(StepVector)
03128         NbOfSteps,Parameters,hasVars = ParseParameters(NbOfSteps)
03129         Parameters = StepVector.PS.parameters + var_separator + Parameters
03130         self.mesh.SetParameters(Parameters)
03131         if MakeGroups:
03132             if(IsNodes):
03133                 return self.editor.ExtrusionSweepObject0DMakeGroups(theObject, StepVector, NbOfSteps)
03134             else:
03135                 return self.editor.ExtrusionSweepObjectMakeGroups(theObject, StepVector, NbOfSteps)
03136         if(IsNodes):
03137             self.editor.ExtrusionSweepObject0D(theObject, StepVector, NbOfSteps)
03138         else:
03139             self.editor.ExtrusionSweepObject(theObject, StepVector, NbOfSteps)
03140         return []

Here is the call graph for this function:

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

Generates new elements by extrusion of the elements which belong to the object.

Parameters:
theObjectobject which elements should be processed. It can be a mesh, a sub mesh or a group.
StepVectorvector, 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

Definition at line 3149 of file smeshDC.py.

03149 
03150     def ExtrusionSweepObject1D(self, theObject, StepVector, NbOfSteps, MakeGroups=False):
03151         if ( isinstance( theObject, Mesh )):
03152             theObject = theObject.GetMesh()
03153         if ( isinstance( StepVector, geompyDC.GEOM._objref_GEOM_Object)):
03154             StepVector = self.smeshpyD.GetDirStruct(StepVector)
03155         NbOfSteps,Parameters,hasVars = ParseParameters(NbOfSteps)
03156         Parameters = StepVector.PS.parameters + var_separator + Parameters
03157         self.mesh.SetParameters(Parameters)
03158         if MakeGroups:
03159             return self.editor.ExtrusionSweepObject1DMakeGroups(theObject, StepVector, NbOfSteps)
03160         self.editor.ExtrusionSweepObject1D(theObject, StepVector, NbOfSteps)
03161         return []

Here is the call graph for this function:

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

Generates new elements by extrusion of the elements which belong to the object.

Parameters:
theObjectobject which elements should be processed. It can be a mesh, a sub mesh or a group.
StepVectorvector, 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

Definition at line 3170 of file smeshDC.py.

03170 
03171     def ExtrusionSweepObject2D(self, theObject, StepVector, NbOfSteps, MakeGroups=False):
03172         if ( isinstance( theObject, Mesh )):
03173             theObject = theObject.GetMesh()
03174         if ( isinstance( StepVector, geompyDC.GEOM._objref_GEOM_Object)):
03175             StepVector = self.smeshpyD.GetDirStruct(StepVector)
03176         NbOfSteps,Parameters,hasVars = ParseParameters(NbOfSteps)
03177         Parameters = StepVector.PS.parameters + var_separator + Parameters
03178         self.mesh.SetParameters(Parameters)
03179         if MakeGroups:
03180             return self.editor.ExtrusionSweepObject2DMakeGroups(theObject, StepVector, NbOfSteps)
03181         self.editor.ExtrusionSweepObject2D(theObject, StepVector, NbOfSteps)
03182         return []
03183 
03184 

Here is the call graph for this function:

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

Generates 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

Definition at line 2958 of file smeshDC.py.

02958 
02959                       MakeGroups=False, TotalAngle=False):
02960         if IDsOfElements == []:
02961             IDsOfElements = self.GetElementsId()
02962         if ( isinstance( Axis, geompyDC.GEOM._objref_GEOM_Object)):
02963             Axis = self.smeshpyD.GetAxisStruct(Axis)
02964         AngleInRadians,AngleParameters,hasVars = ParseAngles(AngleInRadians)
02965         NbOfSteps,Tolerance,Parameters,hasVars = ParseParameters(NbOfSteps,Tolerance)
02966         Parameters = Axis.parameters + var_separator + AngleParameters + var_separator + Parameters
02967         self.mesh.SetParameters(Parameters)
02968         if TotalAngle and NbOfSteps:
02969             AngleInRadians /= NbOfSteps
02970         if MakeGroups:
02971             return self.editor.RotationSweepMakeGroups(IDsOfElements, Axis,
02972                                                        AngleInRadians, NbOfSteps, Tolerance)
02973         self.editor.RotationSweep(IDsOfElements, Axis, AngleInRadians, NbOfSteps, Tolerance)
02974         return []

Here is the call graph for this function:

Here is the caller graph for this function:

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

Generates 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

Definition at line 2988 of file smeshDC.py.

02988 
02989                             MakeGroups=False, TotalAngle=False):
02990         if ( isinstance( theObject, Mesh )):
02991             theObject = theObject.GetMesh()
02992         if ( isinstance( Axis, geompyDC.GEOM._objref_GEOM_Object)):
02993             Axis = self.smeshpyD.GetAxisStruct(Axis)
02994         AngleInRadians,AngleParameters,hasVars = ParseAngles(AngleInRadians)
02995         NbOfSteps,Tolerance,Parameters,hasVars = ParseParameters(NbOfSteps,Tolerance)
02996         Parameters = Axis.parameters + var_separator + AngleParameters + var_separator + Parameters
02997         self.mesh.SetParameters(Parameters)
02998         if TotalAngle and NbOfSteps:
02999             AngleInRadians /= NbOfSteps
03000         if MakeGroups:
03001             return self.editor.RotationSweepObjectMakeGroups(theObject, Axis, AngleInRadians,
03002                                                              NbOfSteps, Tolerance)
03003         self.editor.RotationSweepObject(theObject, Axis, AngleInRadians, NbOfSteps, Tolerance)
03004         return []

Here is the call graph for this function:

Here is the caller graph for this function:

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

Generates 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

Definition at line 3018 of file smeshDC.py.

03018 
03019                               MakeGroups=False, TotalAngle=False):
03020         if ( isinstance( theObject, Mesh )):
03021             theObject = theObject.GetMesh()
03022         if ( isinstance( Axis, geompyDC.GEOM._objref_GEOM_Object)):
03023             Axis = self.smeshpyD.GetAxisStruct(Axis)
03024         AngleInRadians,AngleParameters,hasVars = ParseAngles(AngleInRadians)
03025         NbOfSteps,Tolerance,Parameters,hasVars = ParseParameters(NbOfSteps,Tolerance)
03026         Parameters = Axis.parameters + var_separator + AngleParameters + var_separator + Parameters
03027         self.mesh.SetParameters(Parameters)
03028         if TotalAngle and NbOfSteps:
03029             AngleInRadians /= NbOfSteps
03030         if MakeGroups:
03031             return self.editor.RotationSweepObject1DMakeGroups(theObject, Axis, AngleInRadians,
03032                                                                NbOfSteps, Tolerance)
03033         self.editor.RotationSweepObject1D(theObject, Axis, AngleInRadians, NbOfSteps, Tolerance)
03034         return []

Here is the call graph for this function:

Here is the caller graph for this function:

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

Generates 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

Definition at line 3048 of file smeshDC.py.

03048 
03049                               MakeGroups=False, TotalAngle=False):
03050         if ( isinstance( theObject, Mesh )):
03051             theObject = theObject.GetMesh()
03052         if ( isinstance( Axis, geompyDC.GEOM._objref_GEOM_Object)):
03053             Axis = self.smeshpyD.GetAxisStruct(Axis)
03054         AngleInRadians,AngleParameters,hasVars = ParseAngles(AngleInRadians)
03055         NbOfSteps,Tolerance,Parameters,hasVars = ParseParameters(NbOfSteps,Tolerance)
03056         Parameters = Axis.parameters + var_separator + AngleParameters + var_separator + Parameters
03057         self.mesh.SetParameters(Parameters)
03058         if TotalAngle and NbOfSteps:
03059             AngleInRadians /= NbOfSteps
03060         if MakeGroups:
03061             return self.editor.RotationSweepObject2DMakeGroups(theObject, Axis, AngleInRadians,
03062                                                              NbOfSteps, Tolerance)
03063         self.editor.RotationSweepObject2D(theObject, Axis, AngleInRadians, NbOfSteps, Tolerance)
03064         return []

Here is the call graph for this function:

Here is the caller graph for this function: