|
Functions | |
| def | smeshDC::Mesh.Mirror |
| Creates a symmetrical copy of mesh elements. | |
| def | smeshDC::Mesh.MirrorMakeMesh |
| Creates a new mesh by a symmetrical copy of mesh elements. | |
| def | smeshDC::Mesh.MirrorObject |
| Creates a symmetrical copy of the object. | |
| def | smeshDC::Mesh.MirrorObjectMakeMesh |
| Creates a new mesh by a symmetrical copy of the object. | |
| def | smeshDC::Mesh.Translate |
| Translates the elements. | |
| def | smeshDC::Mesh.TranslateMakeMesh |
| Creates a new mesh of translated elements. | |
| def | smeshDC::Mesh.TranslateObject |
| Translates the object. | |
| def | smeshDC::Mesh.TranslateObjectMakeMesh |
| Creates a new mesh from the translated object. | |
| def | smeshDC::Mesh.Rotate |
| Rotates the elements. | |
| def | smeshDC::Mesh.RotateMakeMesh |
| Creates a new mesh of rotated elements. | |
| def | smeshDC::Mesh.RotateObject |
| Rotates the object. | |
| def | smeshDC::Mesh.RotateObjectMakeMesh |
| Creates a new mesh from the rotated object. | |
| def | smeshDC::Mesh.FindCoincidentNodes |
| Finds groups of ajacent nodes within Tolerance. | |
| def | smeshDC::Mesh.FindCoincidentNodesOnPart |
| Finds groups of ajacent nodes within Tolerance. | |
| def | smeshDC::Mesh.MergeNodes |
| Merges nodes. | |
| def | smeshDC::Mesh.FindEqualElements |
| Finds the elements built on the same nodes. | |
| def | smeshDC::Mesh.MergeElements |
| Merges elements in each given group. | |
| def | smeshDC::Mesh.MergeEqualElements |
| Leaves one element and removes all other elements built on the same nodes. | |
| def | smeshDC::Mesh.SewFreeBorders |
| Sews free borders. | |
| def | smeshDC::Mesh.SewConformFreeBorders |
| Sews conform free borders. | |
| def | smeshDC::Mesh.SewBorderToSide |
| Sews border to side. | |
| def | smeshDC::Mesh.SewSideElements |
| Sews two sides of a mesh. | |
| def smeshDC.Mesh.FindCoincidentNodes | ( | self, | |
| Tolerance | |||
| ) | [inherited] |
Finds groups of ajacent nodes within Tolerance.
| Tolerance | the value of tolerance |
Definition at line 3937 of file smeshDC.py.
| def smeshDC.Mesh.FindCoincidentNodesOnPart | ( | self, | |
| SubMeshOrGroup, | |||
| Tolerance, | |||
exceptNodes = [] |
|||
| ) | [inherited] |
Finds groups of ajacent nodes within Tolerance.
| Tolerance | the value of tolerance |
| SubMeshOrGroup | SubMesh or Group |
| exceptNodes | list of either SubMeshes, Groups or node IDs to exclude from search |
Definition at line 3946 of file smeshDC.py.
03947 : 03948 if (isinstance( SubMeshOrGroup, Mesh )): 03949 SubMeshOrGroup = SubMeshOrGroup.GetMesh() 03950 if not isinstance( exceptNodes, list): 03951 exceptNodes = [ exceptNodes ] 03952 if exceptNodes and isinstance( exceptNodes[0], int): 03953 exceptNodes = [ self.GetIDSource( exceptNodes, SMESH.NODE)] 03954 return self.editor.FindCoincidentNodesOnPartBut(SubMeshOrGroup, Tolerance,exceptNodes)
| def smeshDC.Mesh.FindEqualElements | ( | self, | |
| MeshOrSubMeshOrGroup | |||
| ) | [inherited] |
Finds the elements built on the same nodes.
| MeshOrSubMeshOrGroup | Mesh or SubMesh, or Group of elements for searching |
Definition at line 3965 of file smeshDC.py.
| def smeshDC.Mesh.MergeElements | ( | self, | |
| GroupsOfElementsID | |||
| ) | [inherited] |
Merges elements in each given group.
| GroupsOfElementsID | groups of elements for merging |
Definition at line 3973 of file smeshDC.py.
| def smeshDC.Mesh.MergeEqualElements | ( | self | ) | [inherited] |
Leaves one element and removes all other elements built on the same nodes.
Definition at line 3978 of file smeshDC.py.
| def smeshDC.Mesh.MergeNodes | ( | self, | |
| GroupsOfNodes | |||
| ) | [inherited] |
Merges nodes.
| GroupsOfNodes | the list of groups of nodes |
Definition at line 3958 of file smeshDC.py.
| def smeshDC.Mesh.Mirror | ( | self, | |
| IDsOfElements, | |||
| Mirror, | |||
| theMirrorType, | |||
Copy = 0, |
|||
MakeGroups = False |
|||
| ) | [inherited] |
Creates a symmetrical copy of mesh elements.
| IDsOfElements | list of elements ids |
| Mirror | is AxisStruct or geom object(point, line, plane) |
| theMirrorType | is POINT, AXIS or PLANE If the Mirror is a geom object this parameter is unnecessary |
| Copy | allows to copy element (Copy is 1) or to replace with its mirroring (Copy is 0) |
| MakeGroups | forces the generation of new groups from existing ones (if Copy) |
Definition at line 3637 of file smeshDC.py.
03638 : 03639 if IDsOfElements == []: 03640 IDsOfElements = self.GetElementsId() 03641 if ( isinstance( Mirror, geompyDC.GEOM._objref_GEOM_Object)): 03642 Mirror = self.smeshpyD.GetAxisStruct(Mirror) 03643 Mirror,Parameters = ParseAxisStruct(Mirror) 03644 self.mesh.SetParameters(Parameters) 03645 if Copy and MakeGroups: 03646 return self.editor.MirrorMakeGroups(IDsOfElements, Mirror, theMirrorType) 03647 self.editor.Mirror(IDsOfElements, Mirror, theMirrorType, Copy) 03648 return []
| def smeshDC.Mesh.MirrorMakeMesh | ( | self, | |
| IDsOfElements, | |||
| Mirror, | |||
| theMirrorType, | |||
MakeGroups = 0, |
|||
NewMeshName = "" |
|||
| ) | [inherited] |
Creates a new mesh by a symmetrical copy of mesh elements.
| IDsOfElements | the list of elements ids |
| Mirror | is AxisStruct or geom object (point, line, plane) |
| theMirrorType | is POINT, AXIS or PLANE If the Mirror is a geom object this parameter is unnecessary |
| MakeGroups | to generate new groups from existing ones |
| NewMeshName | a name of the new mesh to create |
Definition at line 3658 of file smeshDC.py.
03659 : 03660 if IDsOfElements == []: 03661 IDsOfElements = self.GetElementsId() 03662 if ( isinstance( Mirror, geompyDC.GEOM._objref_GEOM_Object)): 03663 Mirror = self.smeshpyD.GetAxisStruct(Mirror) 03664 Mirror,Parameters = ParseAxisStruct(Mirror) 03665 mesh = self.editor.MirrorMakeMesh(IDsOfElements, Mirror, theMirrorType, 03666 MakeGroups, NewMeshName) 03667 mesh.SetParameters(Parameters) 03668 return Mesh(self.smeshpyD,self.geompyD,mesh)
| def smeshDC.Mesh.MirrorObject | ( | self, | |
| theObject, | |||
| Mirror, | |||
| theMirrorType, | |||
Copy = 0, |
|||
MakeGroups = False |
|||
| ) | [inherited] |
Creates a symmetrical copy of the object.
| theObject | mesh, submesh or group |
| Mirror | AxisStruct or geom object (point, line, plane) |
| theMirrorType | is POINT, AXIS or PLANE If the Mirror is a geom object this parameter is unnecessary |
| Copy | allows copying the element (Copy is 1) or replacing it with its mirror (Copy is 0) |
| MakeGroups | forces the generation of new groups from existing ones (if Copy) |
Definition at line 3678 of file smeshDC.py.
03679 : 03680 if ( isinstance( theObject, Mesh )): 03681 theObject = theObject.GetMesh() 03682 if ( isinstance( Mirror, geompyDC.GEOM._objref_GEOM_Object)): 03683 Mirror = self.smeshpyD.GetAxisStruct(Mirror) 03684 Mirror,Parameters = ParseAxisStruct(Mirror) 03685 self.mesh.SetParameters(Parameters) 03686 if Copy and MakeGroups: 03687 return self.editor.MirrorObjectMakeGroups(theObject, Mirror, theMirrorType) 03688 self.editor.MirrorObject(theObject, Mirror, theMirrorType, Copy) 03689 return []
| def smeshDC.Mesh.MirrorObjectMakeMesh | ( | self, | |
| theObject, | |||
| Mirror, | |||
| theMirrorType, | |||
MakeGroups = 0, |
|||
NewMeshName = "" |
|||
| ) | [inherited] |
Creates a new mesh by a symmetrical copy of the object.
| theObject | mesh, submesh or group |
| Mirror | AxisStruct or geom object (point, line, plane) |
| theMirrorType | POINT, AXIS or PLANE If the Mirror is a geom object this parameter is unnecessary |
| MakeGroups | forces the generation of new groups from existing ones |
| NewMeshName | the name of the new mesh to create |
Definition at line 3699 of file smeshDC.py.
03700 : 03701 if ( isinstance( theObject, Mesh )): 03702 theObject = theObject.GetMesh() 03703 if (isinstance(Mirror, geompyDC.GEOM._objref_GEOM_Object)): 03704 Mirror = self.smeshpyD.GetAxisStruct(Mirror) 03705 Mirror,Parameters = ParseAxisStruct(Mirror) 03706 mesh = self.editor.MirrorObjectMakeMesh(theObject, Mirror, theMirrorType, 03707 MakeGroups, NewMeshName) 03708 mesh.SetParameters(Parameters) 03709 return Mesh( self.smeshpyD,self.geompyD,mesh )
| def smeshDC.Mesh.Rotate | ( | self, | |
| IDsOfElements, | |||
| Axis, | |||
| AngleInRadians, | |||
| Copy, | |||
MakeGroups = False |
|||
| ) | [inherited] |
Rotates the elements.
| IDsOfElements | list of elements ids |
| Axis | the axis of rotation (AxisStruct or geom line) |
| AngleInRadians | the angle of rotation (in radians) or a name of variable which defines angle in degrees |
| Copy | allows copying the rotated elements |
| MakeGroups | forces the generation of new groups from existing ones (if Copy) |
Definition at line 3835 of file smeshDC.py.
03836 : 03837 flag = False 03838 if isinstance(AngleInRadians,str): 03839 flag = True 03840 AngleInRadians,Parameters = geompyDC.ParseParameters(AngleInRadians) 03841 if flag: 03842 AngleInRadians = DegreesToRadians(AngleInRadians) 03843 if IDsOfElements == []: 03844 IDsOfElements = self.GetElementsId() 03845 if ( isinstance( Axis, geompyDC.GEOM._objref_GEOM_Object)): 03846 Axis = self.smeshpyD.GetAxisStruct(Axis) 03847 Axis,AxisParameters = ParseAxisStruct(Axis) 03848 Parameters = AxisParameters + var_separator + Parameters 03849 self.mesh.SetParameters(Parameters) 03850 if Copy and MakeGroups: 03851 return self.editor.RotateMakeGroups(IDsOfElements, Axis, AngleInRadians) 03852 self.editor.Rotate(IDsOfElements, Axis, AngleInRadians, Copy) 03853 return []
| def smeshDC.Mesh.RotateMakeMesh | ( | self, | |
| IDsOfElements, | |||
| Axis, | |||
| AngleInRadians, | |||
MakeGroups = 0, |
|||
NewMeshName = "" |
|||
| ) | [inherited] |
Creates a new mesh of rotated elements.
| IDsOfElements | list of element ids |
| Axis | the axis of rotation (AxisStruct or geom line) |
| AngleInRadians | the angle of rotation (in radians) or a name of variable which defines angle in degrees |
| MakeGroups | forces the generation of new groups from existing ones |
| NewMeshName | the name of the newly created mesh |
Definition at line 3862 of file smeshDC.py.
03863 : 03864 flag = False 03865 if isinstance(AngleInRadians,str): 03866 flag = True 03867 AngleInRadians,Parameters = geompyDC.ParseParameters(AngleInRadians) 03868 if flag: 03869 AngleInRadians = DegreesToRadians(AngleInRadians) 03870 if IDsOfElements == []: 03871 IDsOfElements = self.GetElementsId() 03872 if ( isinstance( Axis, geompyDC.GEOM._objref_GEOM_Object)): 03873 Axis = self.smeshpyD.GetAxisStruct(Axis) 03874 Axis,AxisParameters = ParseAxisStruct(Axis) 03875 Parameters = AxisParameters + var_separator + Parameters 03876 mesh = self.editor.RotateMakeMesh(IDsOfElements, Axis, AngleInRadians, 03877 MakeGroups, NewMeshName) 03878 mesh.SetParameters(Parameters) 03879 return Mesh( self.smeshpyD, self.geompyD, mesh )
| def smeshDC.Mesh.RotateObject | ( | self, | |
| theObject, | |||
| Axis, | |||
| AngleInRadians, | |||
| Copy, | |||
MakeGroups = False |
|||
| ) | [inherited] |
Rotates the object.
| theObject | the object to rotate( mesh, submesh, or group) |
| Axis | the axis of rotation (AxisStruct or geom line) |
| AngleInRadians | the angle of rotation (in radians) or a name of variable which defines angle in degrees |
| Copy | allows copying the rotated elements |
| MakeGroups | forces the generation of new groups from existing ones (if Copy) |
Definition at line 3888 of file smeshDC.py.
03889 : 03890 flag = False 03891 if isinstance(AngleInRadians,str): 03892 flag = True 03893 AngleInRadians,Parameters = geompyDC.ParseParameters(AngleInRadians) 03894 if flag: 03895 AngleInRadians = DegreesToRadians(AngleInRadians) 03896 if (isinstance(theObject, Mesh)): 03897 theObject = theObject.GetMesh() 03898 if (isinstance(Axis, geompyDC.GEOM._objref_GEOM_Object)): 03899 Axis = self.smeshpyD.GetAxisStruct(Axis) 03900 Axis,AxisParameters = ParseAxisStruct(Axis) 03901 Parameters = AxisParameters + ":" + Parameters 03902 self.mesh.SetParameters(Parameters) 03903 if Copy and MakeGroups: 03904 return self.editor.RotateObjectMakeGroups(theObject, Axis, AngleInRadians) 03905 self.editor.RotateObject(theObject, Axis, AngleInRadians, Copy) 03906 return []
| def smeshDC.Mesh.RotateObjectMakeMesh | ( | self, | |
| theObject, | |||
| Axis, | |||
| AngleInRadians, | |||
MakeGroups = 0, |
|||
NewMeshName = "" |
|||
| ) | [inherited] |
Creates a new mesh from the rotated object.
| theObject | the object to rotate (mesh, submesh, or group) |
| Axis | the axis of rotation (AxisStruct or geom line) |
| AngleInRadians | the angle of rotation (in radians) or a name of variable which defines angle in degrees |
| MakeGroups | forces the generation of new groups from existing ones |
| NewMeshName | the name of the newly created mesh |
Definition at line 3915 of file smeshDC.py.
03916 : 03917 flag = False 03918 if isinstance(AngleInRadians,str): 03919 flag = True 03920 AngleInRadians,Parameters = geompyDC.ParseParameters(AngleInRadians) 03921 if flag: 03922 AngleInRadians = DegreesToRadians(AngleInRadians) 03923 if (isinstance( theObject, Mesh )): 03924 theObject = theObject.GetMesh() 03925 if (isinstance(Axis, geompyDC.GEOM._objref_GEOM_Object)): 03926 Axis = self.smeshpyD.GetAxisStruct(Axis) 03927 Axis,AxisParameters = ParseAxisStruct(Axis) 03928 Parameters = AxisParameters + ":" + Parameters 03929 mesh = self.editor.RotateObjectMakeMesh(theObject, Axis, AngleInRadians, 03930 MakeGroups, NewMeshName) 03931 mesh.SetParameters(Parameters) 03932 return Mesh( self.smeshpyD, self.geompyD, mesh )
| def smeshDC.Mesh.SewBorderToSide | ( | self, | |
| FirstNodeIDOnFreeBorder, | |||
| SecondNodeIDOnFreeBorder, | |||
| LastNodeIDOnFreeBorder, | |||
| FirstNodeIDOnSide, | |||
| LastNodeIDOnSide, | |||
| CreatePolygons, | |||
| CreatePolyedrs | |||
| ) | [inherited] |
| def smeshDC.Mesh.SewConformFreeBorders | ( | self, | |
| FirstNodeID1, | |||
| SecondNodeID1, | |||
| LastNodeID1, | |||
| FirstNodeID2, | |||
| SecondNodeID2 | |||
| ) | [inherited] |
| def smeshDC.Mesh.SewFreeBorders | ( | self, | |
| FirstNodeID1, | |||
| SecondNodeID1, | |||
| LastNodeID1, | |||
| FirstNodeID2, | |||
| SecondNodeID2, | |||
| LastNodeID2, | |||
| CreatePolygons, | |||
| CreatePolyedrs | |||
| ) | [inherited] |
| def smeshDC.Mesh.SewSideElements | ( | self, | |
| IDsOfSide1Elements, | |||
| IDsOfSide2Elements, | |||
| NodeID1OfSide1ToMerge, | |||
| NodeID1OfSide2ToMerge, | |||
| NodeID2OfSide1ToMerge, | |||
| NodeID2OfSide2ToMerge | |||
| ) | [inherited] |
Sews two sides of a mesh.
The nodes belonging to Side1 are merged with the nodes of elements of Side2. The number of elements in theSide1 and in theSide2 must be equal and they should have similar nodal connectivity. The nodes to merge should belong to side borders and the first node should be linked to the second.
Definition at line 4015 of file smeshDC.py.
| def smeshDC.Mesh.Translate | ( | self, | |
| IDsOfElements, | |||
| Vector, | |||
| Copy, | |||
MakeGroups = False |
|||
| ) | [inherited] |
Translates the elements.
| IDsOfElements | list of elements ids |
| Vector | the direction of translation (DirStruct or vector) |
| Copy | allows copying the translated elements |
| MakeGroups | forces the generation of new groups from existing ones (if Copy) |
Definition at line 3717 of file smeshDC.py.
03718 : 03719 if IDsOfElements == []: 03720 IDsOfElements = self.GetElementsId() 03721 if ( isinstance( Vector, geompyDC.GEOM._objref_GEOM_Object)): 03722 Vector = self.smeshpyD.GetDirStruct(Vector) 03723 Vector,Parameters = ParseDirStruct(Vector) 03724 self.mesh.SetParameters(Parameters) 03725 if Copy and MakeGroups: 03726 return self.editor.TranslateMakeGroups(IDsOfElements, Vector) 03727 self.editor.Translate(IDsOfElements, Vector, Copy) 03728 return []
| def smeshDC.Mesh.TranslateMakeMesh | ( | self, | |
| IDsOfElements, | |||
| Vector, | |||
MakeGroups = False, |
|||
NewMeshName = "" |
|||
| ) | [inherited] |
Creates a new mesh of translated elements.
| IDsOfElements | list of elements ids |
| Vector | the direction of translation (DirStruct or vector) |
| MakeGroups | forces the generation of new groups from existing ones |
| NewMeshName | the name of the newly created mesh |
Definition at line 3736 of file smeshDC.py.
03737 : 03738 if IDsOfElements == []: 03739 IDsOfElements = self.GetElementsId() 03740 if ( isinstance( Vector, geompyDC.GEOM._objref_GEOM_Object)): 03741 Vector = self.smeshpyD.GetDirStruct(Vector) 03742 Vector,Parameters = ParseDirStruct(Vector) 03743 mesh = self.editor.TranslateMakeMesh(IDsOfElements, Vector, MakeGroups, NewMeshName) 03744 mesh.SetParameters(Parameters) 03745 return Mesh ( self.smeshpyD, self.geompyD, mesh )
| def smeshDC.Mesh.TranslateObject | ( | self, | |
| theObject, | |||
| Vector, | |||
| Copy, | |||
MakeGroups = False |
|||
| ) | [inherited] |
Translates the object.
| theObject | the object to translate (mesh, submesh, or group) |
| Vector | direction of translation (DirStruct or geom vector) |
| Copy | allows copying the translated elements |
| MakeGroups | forces the generation of new groups from existing ones (if Copy) |
Definition at line 3753 of file smeshDC.py.
03754 : 03755 if ( isinstance( theObject, Mesh )): 03756 theObject = theObject.GetMesh() 03757 if ( isinstance( Vector, geompyDC.GEOM._objref_GEOM_Object)): 03758 Vector = self.smeshpyD.GetDirStruct(Vector) 03759 Vector,Parameters = ParseDirStruct(Vector) 03760 self.mesh.SetParameters(Parameters) 03761 if Copy and MakeGroups: 03762 return self.editor.TranslateObjectMakeGroups(theObject, Vector) 03763 self.editor.TranslateObject(theObject, Vector, Copy) 03764 return []
| def smeshDC.Mesh.TranslateObjectMakeMesh | ( | self, | |
| theObject, | |||
| Vector, | |||
MakeGroups = False, |
|||
NewMeshName = "" |
|||
| ) | [inherited] |
Creates a new mesh from the translated object.
| theObject | the object to translate (mesh, submesh, or group) |
| Vector | the direction of translation (DirStruct or geom vector) |
| MakeGroups | forces the generation of new groups from existing ones |
| NewMeshName | the name of the newly created mesh |
Definition at line 3772 of file smeshDC.py.
03773 : 03774 if (isinstance(theObject, Mesh)): 03775 theObject = theObject.GetMesh() 03776 if (isinstance(Vector, geompyDC.GEOM._objref_GEOM_Object)): 03777 Vector = self.smeshpyD.GetDirStruct(Vector) 03778 Vector,Parameters = ParseDirStruct(Vector) 03779 mesh = self.editor.TranslateObjectMakeMesh(theObject, Vector, MakeGroups, NewMeshName) 03780 mesh.SetParameters(Parameters) 03781 return Mesh( self.smeshpyD, self.geompyD, mesh ) 03782 03783