|
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. | |
| def smeshDC.Mesh.AdvancedExtrusion | ( | self, | |
| IDsOfElements, | |||
| StepVector, | |||
| NbOfSteps, | |||
| ExtrFlags, | |||
| SewTolerance, | |||
MakeGroups = False |
|||
| ) | [inherited] |
Generates new elements by extrusion of the elements with given ids.
| IDsOfElements | is ids of elements |
| StepVector | vector, defining the direction and value of extrusion |
| NbOfSteps | the number of steps |
| ExtrFlags | sets flags for extrusion |
| SewTolerance | uses for comparing locations of nodes if flag EXTRUSION_FLAG_SEW is set |
| MakeGroups | forces the generation of new groups from existing ones |
Definition at line 3330 of file smeshDC.py.
03332 : 03333 if ( isinstance( StepVector, geompyDC.GEOM._objref_GEOM_Object)): 03334 StepVector = self.smeshpyD.GetDirStruct(StepVector) 03335 if MakeGroups: 03336 return self.editor.AdvancedExtrusionMakeGroups(IDsOfElements, StepVector, NbOfSteps, 03337 ExtrFlags, SewTolerance) 03338 self.editor.AdvancedExtrusion(IDsOfElements, StepVector, NbOfSteps, 03339 ExtrFlags, SewTolerance) 03340 return []
| def smeshDC.Mesh.ExtrusionAlongPath | ( | self, | |
| IDsOfElements, | |||
| PathMesh, | |||
| PathShape, | |||
| NodeStart, | |||
| HasAngles, | |||
| Angles, | |||
| HasRefPoint, | |||
| RefPoint, | |||
MakeGroups = False, |
|||
LinearVariation = False |
|||
| ) | [inherited] |
Generates new elements by extrusion of the given elements The path of extrusion must be a meshed edge.
| IDsOfElements | ids of elements |
| PathMesh | mesh containing a 1D sub-mesh on the edge, along which proceeds the extrusion |
| PathShape | shape(edge) defines the sub-mesh for the path |
| NodeStart | the first or the last node on the edge. Defines the direction of extrusion |
| HasAngles | allows the shape to be rotated around the path to get the resulting mesh in a helical fashion |
| Angles | list of angles in radians |
| HasRefPoint | allows using the reference point |
| RefPoint | the 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. |
| MakeGroups | forces the generation of new groups from existing ones |
| LinearVariation | forces the computation of rotation angles as linear variation of the given Angles along path steps |
Definition at line 3475 of file smeshDC.py.
03478 : 03479 Angles,AnglesParameters = ParseAngles(Angles) 03480 RefPoint,RefPointParameters = ParsePointStruct(RefPoint) 03481 if IDsOfElements == []: 03482 IDsOfElements = self.GetElementsId() 03483 if ( isinstance( RefPoint, geompyDC.GEOM._objref_GEOM_Object)): 03484 RefPoint = self.smeshpyD.GetPointStruct(RefPoint) 03485 pass 03486 if ( isinstance( PathMesh, Mesh )): 03487 PathMesh = PathMesh.GetMesh() 03488 if HasAngles and Angles and LinearVariation: 03489 Angles = self.editor.LinearAnglesVariation( PathMesh, PathShape, Angles ) 03490 pass 03491 Parameters = AnglesParameters + var_separator + RefPointParameters 03492 self.mesh.SetParameters(Parameters) 03493 if MakeGroups: 03494 return self.editor.ExtrusionAlongPathMakeGroups(IDsOfElements, PathMesh, 03495 PathShape, NodeStart, HasAngles, 03496 Angles, HasRefPoint, RefPoint) 03497 return self.editor.ExtrusionAlongPath(IDsOfElements, PathMesh, PathShape, 03498 NodeStart, HasAngles, Angles, HasRefPoint, RefPoint)
| def smeshDC.Mesh.ExtrusionAlongPathObject | ( | self, | |
| theObject, | |||
| PathMesh, | |||
| PathShape, | |||
| NodeStart, | |||
| HasAngles, | |||
| Angles, | |||
| HasRefPoint, | |||
| RefPoint, | |||
MakeGroups = False, |
|||
LinearVariation = False |
|||
| ) | [inherited] |
Generates new elements by extrusion of the elements which belong to the object The path of extrusion must be a meshed edge.
| theObject | the object which elements should be processed. It can be a mesh, a sub mesh or a group. |
| PathMesh | mesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds |
| PathShape | shape(edge) defines the sub-mesh for the path |
| NodeStart | the first or the last node on the edge. Defines the direction of extrusion |
| HasAngles | allows the shape to be rotated around the path to get the resulting mesh in a helical fashion |
| Angles | list of angles |
| HasRefPoint | allows using the reference point |
| RefPoint | the 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. |
| MakeGroups | forces the generation of new groups from existing ones |
| LinearVariation | forces the computation of rotation angles as linear variation of the given Angles along path steps |
Definition at line 3518 of file smeshDC.py.
03521 : 03522 Angles,AnglesParameters = ParseAngles(Angles) 03523 RefPoint,RefPointParameters = ParsePointStruct(RefPoint) 03524 if ( isinstance( theObject, Mesh )): 03525 theObject = theObject.GetMesh() 03526 if ( isinstance( RefPoint, geompyDC.GEOM._objref_GEOM_Object)): 03527 RefPoint = self.smeshpyD.GetPointStruct(RefPoint) 03528 if ( isinstance( PathMesh, Mesh )): 03529 PathMesh = PathMesh.GetMesh() 03530 if HasAngles and Angles and LinearVariation: 03531 Angles = self.editor.LinearAnglesVariation( PathMesh, PathShape, Angles ) 03532 pass 03533 Parameters = AnglesParameters + var_separator + RefPointParameters 03534 self.mesh.SetParameters(Parameters) 03535 if MakeGroups: 03536 return self.editor.ExtrusionAlongPathObjectMakeGroups(theObject, PathMesh, 03537 PathShape, NodeStart, HasAngles, 03538 Angles, HasRefPoint, RefPoint) 03539 return self.editor.ExtrusionAlongPathObject(theObject, PathMesh, PathShape, 03540 NodeStart, HasAngles, Angles, HasRefPoint, 03541 RefPoint)
| def smeshDC.Mesh.ExtrusionAlongPathObject1D | ( | self, | |
| theObject, | |||
| PathMesh, | |||
| PathShape, | |||
| NodeStart, | |||
| HasAngles, | |||
| Angles, | |||
| HasRefPoint, | |||
| RefPoint, | |||
MakeGroups = False, |
|||
LinearVariation = False |
|||
| ) | [inherited] |
Generates new elements by extrusion of the elements which belong to the object The path of extrusion must be a meshed edge.
| theObject | the object which elements should be processed. It can be a mesh, a sub mesh or a group. |
| PathMesh | mesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds |
| PathShape | shape(edge) defines the sub-mesh for the path |
| NodeStart | the first or the last node on the edge. Defines the direction of extrusion |
| HasAngles | allows the shape to be rotated around the path to get the resulting mesh in a helical fashion |
| Angles | list of angles |
| HasRefPoint | allows using the reference point |
| RefPoint | the 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. |
| MakeGroups | forces the generation of new groups from existing ones |
| LinearVariation | forces the computation of rotation angles as linear variation of the given Angles along path steps |
Definition at line 3561 of file smeshDC.py.
03564 : 03565 Angles,AnglesParameters = ParseAngles(Angles) 03566 RefPoint,RefPointParameters = ParsePointStruct(RefPoint) 03567 if ( isinstance( theObject, Mesh )): 03568 theObject = theObject.GetMesh() 03569 if ( isinstance( RefPoint, geompyDC.GEOM._objref_GEOM_Object)): 03570 RefPoint = self.smeshpyD.GetPointStruct(RefPoint) 03571 if ( isinstance( PathMesh, Mesh )): 03572 PathMesh = PathMesh.GetMesh() 03573 if HasAngles and Angles and LinearVariation: 03574 Angles = self.editor.LinearAnglesVariation( PathMesh, PathShape, Angles ) 03575 pass 03576 Parameters = AnglesParameters + var_separator + RefPointParameters 03577 self.mesh.SetParameters(Parameters) 03578 if MakeGroups: 03579 return self.editor.ExtrusionAlongPathObject1DMakeGroups(theObject, PathMesh, 03580 PathShape, NodeStart, HasAngles, 03581 Angles, HasRefPoint, RefPoint) 03582 return self.editor.ExtrusionAlongPathObject1D(theObject, PathMesh, PathShape, 03583 NodeStart, HasAngles, Angles, HasRefPoint, 03584 RefPoint)
| def smeshDC.Mesh.ExtrusionAlongPathObject2D | ( | self, | |
| theObject, | |||
| PathMesh, | |||
| PathShape, | |||
| NodeStart, | |||
| HasAngles, | |||
| Angles, | |||
| HasRefPoint, | |||
| RefPoint, | |||
MakeGroups = False, |
|||
LinearVariation = False |
|||
| ) | [inherited] |
Generates new elements by extrusion of the elements which belong to the object The path of extrusion must be a meshed edge.
| theObject | the object which elements should be processed. It can be a mesh, a sub mesh or a group. |
| PathMesh | mesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds |
| PathShape | shape(edge) defines the sub-mesh for the path |
| NodeStart | the first or the last node on the edge. Defines the direction of extrusion |
| HasAngles | allows the shape to be rotated around the path to get the resulting mesh in a helical fashion |
| Angles | list of angles |
| HasRefPoint | allows using the reference point |
| RefPoint | the 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. |
| MakeGroups | forces the generation of new groups from existing ones |
| LinearVariation | forces the computation of rotation angles as linear variation of the given Angles along path steps |
Definition at line 3604 of file smeshDC.py.
03607 : 03608 Angles,AnglesParameters = ParseAngles(Angles) 03609 RefPoint,RefPointParameters = ParsePointStruct(RefPoint) 03610 if ( isinstance( theObject, Mesh )): 03611 theObject = theObject.GetMesh() 03612 if ( isinstance( RefPoint, geompyDC.GEOM._objref_GEOM_Object)): 03613 RefPoint = self.smeshpyD.GetPointStruct(RefPoint) 03614 if ( isinstance( PathMesh, Mesh )): 03615 PathMesh = PathMesh.GetMesh() 03616 if HasAngles and Angles and LinearVariation: 03617 Angles = self.editor.LinearAnglesVariation( PathMesh, PathShape, Angles ) 03618 pass 03619 Parameters = AnglesParameters + var_separator + RefPointParameters 03620 self.mesh.SetParameters(Parameters) 03621 if MakeGroups: 03622 return self.editor.ExtrusionAlongPathObject2DMakeGroups(theObject, PathMesh, 03623 PathShape, NodeStart, HasAngles, 03624 Angles, HasRefPoint, RefPoint) 03625 return self.editor.ExtrusionAlongPathObject2D(theObject, PathMesh, PathShape, 03626 NodeStart, HasAngles, Angles, HasRefPoint, 03627 RefPoint)
| def smeshDC.Mesh.ExtrusionAlongPathX | ( | self, | |
| Base, | |||
| Path, | |||
| NodeStart, | |||
| HasAngles, | |||
| Angles, | |||
| LinearVariation, | |||
| HasRefPoint, | |||
| RefPoint, | |||
| MakeGroups, | |||
| ElemType | |||
| ) | [inherited] |
Generates new elements by extrusion of the given elements The path of extrusion must be a meshed edge.
| Base | mesh or group, or submesh, or list of ids of elements for extrusion |
| Path | - 1D mesh or 1D sub-mesh, along which proceeds the extrusion |
| NodeStart | the start node from Path. Defines the direction of extrusion |
| HasAngles | allows the shape to be rotated around the path to get the resulting mesh in a helical fashion |
| Angles | list of angles in radians |
| LinearVariation | forces the computation of rotation angles as linear variation of the given Angles along path steps |
| HasRefPoint | allows using the reference point |
| RefPoint | the 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. |
| MakeGroups | forces the generation of new groups from existing ones |
| ElemType | type of elements for extrusion (if param Base is a mesh) |
Definition at line 3427 of file smeshDC.py.
03430 : 03431 Angles,AnglesParameters = ParseAngles(Angles) 03432 RefPoint,RefPointParameters = ParsePointStruct(RefPoint) 03433 if ( isinstance( RefPoint, geompyDC.GEOM._objref_GEOM_Object)): 03434 RefPoint = self.smeshpyD.GetPointStruct(RefPoint) 03435 pass 03436 Parameters = AnglesParameters + var_separator + RefPointParameters 03437 self.mesh.SetParameters(Parameters) 03438 03439 if (isinstance(Path, Mesh)): Path = Path.GetMesh() 03440 03441 if isinstance(Base, list): 03442 IDsOfElements = [] 03443 if Base == []: IDsOfElements = self.GetElementsId() 03444 else: IDsOfElements = Base 03445 return self.editor.ExtrusionAlongPathX(IDsOfElements, Path, NodeStart, 03446 HasAngles, Angles, LinearVariation, 03447 HasRefPoint, RefPoint, MakeGroups, ElemType) 03448 else: 03449 if isinstance(Base, Mesh): Base = Base.GetMesh() 03450 if isinstance(Base, SMESH._objref_SMESH_Mesh) or isinstance(Base, SMESH._objref_SMESH_Group) or isinstance(Base, SMESH._objref_SMESH_subMesh): 03451 return self.editor.ExtrusionAlongPathObjX(Base, Path, NodeStart, 03452 HasAngles, Angles, LinearVariation, 03453 HasRefPoint, RefPoint, MakeGroups, ElemType) 03454 else: 03455 raise RuntimeError, "Invalid Base for ExtrusionAlongPathX" 03456
| def smeshDC.Mesh.ExtrusionSweep | ( | self, | |
| IDsOfElements, | |||
| StepVector, | |||
| NbOfSteps, | |||
MakeGroups = False |
|||
| ) | [inherited] |
Generates new elements by extrusion of the elements with given ids.
| IDsOfElements | the list of elements ids for extrusion |
| StepVector | vector or DirStruct, defining the direction and value of extrusion for one step (the total extrusion length will be NbOfSteps * ||StepVector||) |
| NbOfSteps | the number of steps |
| MakeGroups | forces the generation of new groups from existing ones |
Definition at line 3306 of file smeshDC.py.
03307 : 03308 if IDsOfElements == []: 03309 IDsOfElements = self.GetElementsId() 03310 if ( isinstance( StepVector, geompyDC.GEOM._objref_GEOM_Object)): 03311 StepVector = self.smeshpyD.GetDirStruct(StepVector) 03312 StepVector,StepVectorParameters = ParseDirStruct(StepVector) 03313 NbOfSteps,Parameters = geompyDC.ParseParameters(NbOfSteps) 03314 Parameters = StepVectorParameters + var_separator + Parameters 03315 self.mesh.SetParameters(Parameters) 03316 if MakeGroups: 03317 return self.editor.ExtrusionSweepMakeGroups(IDsOfElements, StepVector, NbOfSteps) 03318 self.editor.ExtrusionSweep(IDsOfElements, StepVector, NbOfSteps) 03319 return []
| def smeshDC.Mesh.ExtrusionSweepObject | ( | self, | |
| theObject, | |||
| StepVector, | |||
| NbOfSteps, | |||
MakeGroups = False |
|||
| ) | [inherited] |
Generates new elements by extrusion of the elements which belong to the object.
| theObject | the object which elements should be processed. It can be a mesh, a sub mesh or a group. |
| StepVector | vector, defining the direction and value of extrusion for one step (the total extrusion length will be NbOfSteps * ||StepVector||) |
| NbOfSteps | the number of steps |
| MakeGroups | forces the generation of new groups from existing ones |
Definition at line 3349 of file smeshDC.py.
03350 : 03351 if ( isinstance( theObject, Mesh )): 03352 theObject = theObject.GetMesh() 03353 if ( isinstance( StepVector, geompyDC.GEOM._objref_GEOM_Object)): 03354 StepVector = self.smeshpyD.GetDirStruct(StepVector) 03355 StepVector,StepVectorParameters = ParseDirStruct(StepVector) 03356 NbOfSteps,Parameters = geompyDC.ParseParameters(NbOfSteps) 03357 Parameters = StepVectorParameters + var_separator + Parameters 03358 self.mesh.SetParameters(Parameters) 03359 if MakeGroups: 03360 return self.editor.ExtrusionSweepObjectMakeGroups(theObject, StepVector, NbOfSteps) 03361 self.editor.ExtrusionSweepObject(theObject, StepVector, NbOfSteps) 03362 return []
| def smeshDC.Mesh.ExtrusionSweepObject1D | ( | self, | |
| theObject, | |||
| StepVector, | |||
| NbOfSteps, | |||
MakeGroups = False |
|||
| ) | [inherited] |
Generates new elements by extrusion of the elements which belong to the object.
| theObject | object which elements should be processed. It can be a mesh, a sub mesh or a group. |
| StepVector | vector, defining the direction and value of extrusion for one step (the total extrusion length will be NbOfSteps * ||StepVector||) |
| NbOfSteps | the number of steps |
| MakeGroups | to generate new groups from existing ones |
Definition at line 3371 of file smeshDC.py.
03372 : 03373 if ( isinstance( theObject, Mesh )): 03374 theObject = theObject.GetMesh() 03375 if ( isinstance( StepVector, geompyDC.GEOM._objref_GEOM_Object)): 03376 StepVector = self.smeshpyD.GetDirStruct(StepVector) 03377 StepVector,StepVectorParameters = ParseDirStruct(StepVector) 03378 NbOfSteps,Parameters = geompyDC.ParseParameters(NbOfSteps) 03379 Parameters = StepVectorParameters + var_separator + Parameters 03380 self.mesh.SetParameters(Parameters) 03381 if MakeGroups: 03382 return self.editor.ExtrusionSweepObject1DMakeGroups(theObject, StepVector, NbOfSteps) 03383 self.editor.ExtrusionSweepObject1D(theObject, StepVector, NbOfSteps) 03384 return []
| def smeshDC.Mesh.ExtrusionSweepObject2D | ( | self, | |
| theObject, | |||
| StepVector, | |||
| NbOfSteps, | |||
MakeGroups = False |
|||
| ) | [inherited] |
Generates new elements by extrusion of the elements which belong to the object.
| theObject | object which elements should be processed. It can be a mesh, a sub mesh or a group. |
| StepVector | vector, defining the direction and value of extrusion for one step (the total extrusion length will be NbOfSteps * ||StepVector||) |
| NbOfSteps | the number of steps |
| MakeGroups | forces the generation of new groups from existing ones |
Definition at line 3393 of file smeshDC.py.
03394 : 03395 if ( isinstance( theObject, Mesh )): 03396 theObject = theObject.GetMesh() 03397 if ( isinstance( StepVector, geompyDC.GEOM._objref_GEOM_Object)): 03398 StepVector = self.smeshpyD.GetDirStruct(StepVector) 03399 StepVector,StepVectorParameters = ParseDirStruct(StepVector) 03400 NbOfSteps,Parameters = geompyDC.ParseParameters(NbOfSteps) 03401 Parameters = StepVectorParameters + var_separator + Parameters 03402 self.mesh.SetParameters(Parameters) 03403 if MakeGroups: 03404 return self.editor.ExtrusionSweepObject2DMakeGroups(theObject, StepVector, NbOfSteps) 03405 self.editor.ExtrusionSweepObject2D(theObject, StepVector, NbOfSteps) 03406 return [] 03407 03408
| def smeshDC.Mesh.RotationSweep | ( | self, | |
| IDsOfElements, | |||
| Axis, | |||
| AngleInRadians, | |||
| NbOfSteps, | |||
| Tolerance, | |||
MakeGroups = False, |
|||
TotalAngle = False |
|||
| ) | [inherited] |
Generates new elements by rotation of the elements around the axis.
| IDsOfElements | the list of ids of elements to sweep |
| Axis | the axis of rotation, AxisStruct or line(geom object) |
| AngleInRadians | the angle of Rotation (in radians) or a name of variable which defines angle in degrees |
| NbOfSteps | the number of steps |
| Tolerance | tolerance |
| MakeGroups | forces the generation of new groups from existing ones |
| TotalAngle | gives meaning of AngleInRadians: if True then it is an angular size of all steps, else - size of each step |
Definition at line 3167 of file smeshDC.py.
03169 : 03170 flag = False 03171 if isinstance(AngleInRadians,str): 03172 flag = True 03173 AngleInRadians,AngleParameters = geompyDC.ParseParameters(AngleInRadians) 03174 if flag: 03175 AngleInRadians = DegreesToRadians(AngleInRadians) 03176 if IDsOfElements == []: 03177 IDsOfElements = self.GetElementsId() 03178 if ( isinstance( Axis, geompyDC.GEOM._objref_GEOM_Object)): 03179 Axis = self.smeshpyD.GetAxisStruct(Axis) 03180 Axis,AxisParameters = ParseAxisStruct(Axis) 03181 if TotalAngle and NbOfSteps: 03182 AngleInRadians /= NbOfSteps 03183 NbOfSteps,Tolerance,Parameters = geompyDC.ParseParameters(NbOfSteps,Tolerance) 03184 Parameters = AxisParameters + var_separator + AngleParameters + var_separator + Parameters 03185 self.mesh.SetParameters(Parameters) 03186 if MakeGroups: 03187 return self.editor.RotationSweepMakeGroups(IDsOfElements, Axis, 03188 AngleInRadians, NbOfSteps, Tolerance) 03189 self.editor.RotationSweep(IDsOfElements, Axis, AngleInRadians, NbOfSteps, Tolerance) 03190 return []
| def smeshDC.Mesh.RotationSweepObject | ( | self, | |
| theObject, | |||
| Axis, | |||
| AngleInRadians, | |||
| NbOfSteps, | |||
| Tolerance, | |||
MakeGroups = False, |
|||
TotalAngle = False |
|||
| ) | [inherited] |
Generates new elements by rotation of the elements of object around the axis.
| theObject | object which elements should be sweeped. It can be a mesh, a sub mesh or a group. |
| Axis | the axis of rotation, AxisStruct or line(geom object) |
| AngleInRadians | the angle of Rotation |
| NbOfSteps | number of steps |
| Tolerance | tolerance |
| MakeGroups | forces the generation of new groups from existing ones |
| TotalAngle | gives meaning of AngleInRadians: if True then it is an angular size of all steps, else - size of each step |
Definition at line 3203 of file smeshDC.py.
03205 : 03206 flag = False 03207 if isinstance(AngleInRadians,str): 03208 flag = True 03209 AngleInRadians,AngleParameters = geompyDC.ParseParameters(AngleInRadians) 03210 if flag: 03211 AngleInRadians = DegreesToRadians(AngleInRadians) 03212 if ( isinstance( theObject, Mesh )): 03213 theObject = theObject.GetMesh() 03214 if ( isinstance( Axis, geompyDC.GEOM._objref_GEOM_Object)): 03215 Axis = self.smeshpyD.GetAxisStruct(Axis) 03216 Axis,AxisParameters = ParseAxisStruct(Axis) 03217 if TotalAngle and NbOfSteps: 03218 AngleInRadians /= NbOfSteps 03219 NbOfSteps,Tolerance,Parameters = geompyDC.ParseParameters(NbOfSteps,Tolerance) 03220 Parameters = AxisParameters + var_separator + AngleParameters + var_separator + Parameters 03221 self.mesh.SetParameters(Parameters) 03222 if MakeGroups: 03223 return self.editor.RotationSweepObjectMakeGroups(theObject, Axis, AngleInRadians, 03224 NbOfSteps, Tolerance) 03225 self.editor.RotationSweepObject(theObject, Axis, AngleInRadians, NbOfSteps, Tolerance) 03226 return []
| def smeshDC.Mesh.RotationSweepObject1D | ( | self, | |
| theObject, | |||
| Axis, | |||
| AngleInRadians, | |||
| NbOfSteps, | |||
| Tolerance, | |||
MakeGroups = False, |
|||
TotalAngle = False |
|||
| ) | [inherited] |
Generates new elements by rotation of the elements of object around the axis.
| theObject | object which elements should be sweeped. It can be a mesh, a sub mesh or a group. |
| Axis | the axis of rotation, AxisStruct or line(geom object) |
| AngleInRadians | the angle of Rotation |
| NbOfSteps | number of steps |
| Tolerance | tolerance |
| MakeGroups | forces the generation of new groups from existing ones |
| TotalAngle | gives meaning of AngleInRadians: if True then it is an angular size of all steps, else - size of each step |
Definition at line 3239 of file smeshDC.py.
03241 : 03242 flag = False 03243 if isinstance(AngleInRadians,str): 03244 flag = True 03245 AngleInRadians,AngleParameters = geompyDC.ParseParameters(AngleInRadians) 03246 if flag: 03247 AngleInRadians = DegreesToRadians(AngleInRadians) 03248 if ( isinstance( theObject, Mesh )): 03249 theObject = theObject.GetMesh() 03250 if ( isinstance( Axis, geompyDC.GEOM._objref_GEOM_Object)): 03251 Axis = self.smeshpyD.GetAxisStruct(Axis) 03252 Axis,AxisParameters = ParseAxisStruct(Axis) 03253 if TotalAngle and NbOfSteps: 03254 AngleInRadians /= NbOfSteps 03255 NbOfSteps,Tolerance,Parameters = geompyDC.ParseParameters(NbOfSteps,Tolerance) 03256 Parameters = AxisParameters + var_separator + AngleParameters + var_separator + Parameters 03257 self.mesh.SetParameters(Parameters) 03258 if MakeGroups: 03259 return self.editor.RotationSweepObject1DMakeGroups(theObject, Axis, AngleInRadians, 03260 NbOfSteps, Tolerance) 03261 self.editor.RotationSweepObject1D(theObject, Axis, AngleInRadians, NbOfSteps, Tolerance) 03262 return []
| def smeshDC.Mesh.RotationSweepObject2D | ( | self, | |
| theObject, | |||
| Axis, | |||
| AngleInRadians, | |||
| NbOfSteps, | |||
| Tolerance, | |||
MakeGroups = False, |
|||
TotalAngle = False |
|||
| ) | [inherited] |
Generates new elements by rotation of the elements of object around the axis.
| theObject | object which elements should be sweeped. It can be a mesh, a sub mesh or a group. |
| Axis | the axis of rotation, AxisStruct or line(geom object) |
| AngleInRadians | the angle of Rotation |
| NbOfSteps | number of steps |
| Tolerance | tolerance |
| MakeGroups | forces the generation of new groups from existing ones |
| TotalAngle | gives meaning of AngleInRadians: if True then it is an angular size of all steps, else - size of each step |
Definition at line 3275 of file smeshDC.py.
03277 : 03278 flag = False 03279 if isinstance(AngleInRadians,str): 03280 flag = True 03281 AngleInRadians,AngleParameters = geompyDC.ParseParameters(AngleInRadians) 03282 if flag: 03283 AngleInRadians = DegreesToRadians(AngleInRadians) 03284 if ( isinstance( theObject, Mesh )): 03285 theObject = theObject.GetMesh() 03286 if ( isinstance( Axis, geompyDC.GEOM._objref_GEOM_Object)): 03287 Axis = self.smeshpyD.GetAxisStruct(Axis) 03288 Axis,AxisParameters = ParseAxisStruct(Axis) 03289 if TotalAngle and NbOfSteps: 03290 AngleInRadians /= NbOfSteps 03291 NbOfSteps,Tolerance,Parameters = geompyDC.ParseParameters(NbOfSteps,Tolerance) 03292 Parameters = AxisParameters + var_separator + AngleParameters + var_separator + Parameters 03293 self.mesh.SetParameters(Parameters) 03294 if MakeGroups: 03295 return self.editor.RotationSweepObject2DMakeGroups(theObject, Axis, AngleInRadians, 03296 NbOfSteps, Tolerance) 03297 self.editor.RotationSweepObject2D(theObject, Axis, AngleInRadians, NbOfSteps, Tolerance) 03298 return []