mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-02 02:40:34 +05:00
Fix bug 18122: 'Name Error' from some functions of smeshDC.Mesh class.
This commit is contained in:
parent
bee39a08f4
commit
4d2bf97770
@ -15,7 +15,7 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
#
|
#
|
||||||
# File : smesh.py
|
# File : smesh.py
|
||||||
# Author : Francis KLOSS, OCC
|
# Author : Francis KLOSS, OCC
|
||||||
@ -172,7 +172,7 @@ class smeshDC(SMESH._objref_SMESH_Gen):
|
|||||||
## Make DirStruct from a triplet
|
## Make DirStruct from a triplet
|
||||||
# @param x,y,z are vector components
|
# @param x,y,z are vector components
|
||||||
# @return SMESH.DirStruct
|
# @return SMESH.DirStruct
|
||||||
def MakeDirStruct(x,y,z):
|
def MakeDirStruct(self,x,y,z):
|
||||||
pnt = PointStruct(x,y,z)
|
pnt = PointStruct(x,y,z)
|
||||||
return DirStruct(pnt)
|
return DirStruct(pnt)
|
||||||
|
|
||||||
@ -2149,7 +2149,7 @@ class Mesh:
|
|||||||
# @param Shape is geom object(subshape) IOR
|
# @param Shape is geom object(subshape) IOR
|
||||||
# Shape must be subshape of a ShapeToMesh()
|
# Shape must be subshape of a ShapeToMesh()
|
||||||
def GetSubMeshElementsId(self, Shape):
|
def GetSubMeshElementsId(self, Shape):
|
||||||
if ( isinstance( Shape, geompy.GEOM._objref_GEOM_Object)):
|
if ( isinstance( Shape, geompyDC.GEOM._objref_GEOM_Object)):
|
||||||
ShapeID = Shape.GetSubShapeIndices()[0]
|
ShapeID = Shape.GetSubShapeIndices()[0]
|
||||||
else:
|
else:
|
||||||
ShapeID = Shape
|
ShapeID = Shape
|
||||||
@ -2159,7 +2159,7 @@ class Mesh:
|
|||||||
# @param Shape is geom object(subshape) IOR
|
# @param Shape is geom object(subshape) IOR
|
||||||
# Shape must be subshape of a ShapeToMesh()
|
# Shape must be subshape of a ShapeToMesh()
|
||||||
def GetSubMeshNodesId(self, Shape, all):
|
def GetSubMeshNodesId(self, Shape, all):
|
||||||
if ( isinstance( Shape, geompy.GEOM._objref_GEOM_Object)):
|
if ( isinstance( Shape, geompyDC.GEOM._objref_GEOM_Object)):
|
||||||
ShapeID = Shape.GetSubShapeIndices()[0]
|
ShapeID = Shape.GetSubShapeIndices()[0]
|
||||||
else:
|
else:
|
||||||
ShapeID = Shape
|
ShapeID = Shape
|
||||||
@ -2169,7 +2169,7 @@ class Mesh:
|
|||||||
# @param Shape is geom object(subshape) IOR
|
# @param Shape is geom object(subshape) IOR
|
||||||
# Shape must be subshape of a ShapeToMesh()
|
# Shape must be subshape of a ShapeToMesh()
|
||||||
def GetSubMeshElementType(self, Shape):
|
def GetSubMeshElementType(self, Shape):
|
||||||
if ( isinstance( Shape, geompy.GEOM._objref_GEOM_Object)):
|
if ( isinstance( Shape, geompyDC.GEOM._objref_GEOM_Object)):
|
||||||
ShapeID = Shape.GetSubShapeIndices()[0]
|
ShapeID = Shape.GetSubShapeIndices()[0]
|
||||||
else:
|
else:
|
||||||
ShapeID = Shape
|
ShapeID = Shape
|
||||||
@ -2327,7 +2327,7 @@ class Mesh:
|
|||||||
# @param Vertex - vertex or vertex ID
|
# @param Vertex - vertex or vertex ID
|
||||||
# @return True if succeed else raise an exception
|
# @return True if succeed else raise an exception
|
||||||
def SetNodeOnVertex(self, NodeID, Vertex):
|
def SetNodeOnVertex(self, NodeID, Vertex):
|
||||||
if ( isinstance( Vertex, geompy.GEOM._objref_GEOM_Object)):
|
if ( isinstance( Vertex, geompyDC.GEOM._objref_GEOM_Object)):
|
||||||
VertexID = Vertex.GetSubShapeIndices()[0]
|
VertexID = Vertex.GetSubShapeIndices()[0]
|
||||||
else:
|
else:
|
||||||
VertexID = Vertex
|
VertexID = Vertex
|
||||||
@ -2344,7 +2344,7 @@ class Mesh:
|
|||||||
# @param paramOnEdge - parameter on edge where the node is located
|
# @param paramOnEdge - parameter on edge where the node is located
|
||||||
# @return True if succeed else raise an exception
|
# @return True if succeed else raise an exception
|
||||||
def SetNodeOnEdge(self, NodeID, Edge, paramOnEdge):
|
def SetNodeOnEdge(self, NodeID, Edge, paramOnEdge):
|
||||||
if ( isinstance( Edge, geompy.GEOM._objref_GEOM_Object)):
|
if ( isinstance( Edge, geompyDC.GEOM._objref_GEOM_Object)):
|
||||||
EdgeID = Edge.GetSubShapeIndices()[0]
|
EdgeID = Edge.GetSubShapeIndices()[0]
|
||||||
else:
|
else:
|
||||||
EdgeID = Edge
|
EdgeID = Edge
|
||||||
@ -2361,7 +2361,7 @@ class Mesh:
|
|||||||
# @param v - V parameter on face where the node is located
|
# @param v - V parameter on face where the node is located
|
||||||
# @return True if succeed else raise an exception
|
# @return True if succeed else raise an exception
|
||||||
def SetNodeOnFace(self, NodeID, Face, u, v):
|
def SetNodeOnFace(self, NodeID, Face, u, v):
|
||||||
if ( isinstance( Face, geompy.GEOM._objref_GEOM_Object)):
|
if ( isinstance( Face, geompyDC.GEOM._objref_GEOM_Object)):
|
||||||
FaceID = Face.GetSubShapeIndices()[0]
|
FaceID = Face.GetSubShapeIndices()[0]
|
||||||
else:
|
else:
|
||||||
FaceID = Face
|
FaceID = Face
|
||||||
@ -2376,7 +2376,7 @@ class Mesh:
|
|||||||
# @param Solid - solid or solid ID
|
# @param Solid - solid or solid ID
|
||||||
# @return True if succeed else raise an exception
|
# @return True if succeed else raise an exception
|
||||||
def SetNodeInVolume(self, NodeID, Solid):
|
def SetNodeInVolume(self, NodeID, Solid):
|
||||||
if ( isinstance( Solid, geompy.GEOM._objref_GEOM_Object)):
|
if ( isinstance( Solid, geompyDC.GEOM._objref_GEOM_Object)):
|
||||||
SolidID = Solid.GetSubShapeIndices()[0]
|
SolidID = Solid.GetSubShapeIndices()[0]
|
||||||
else:
|
else:
|
||||||
SolidID = Solid
|
SolidID = Solid
|
||||||
@ -2391,7 +2391,7 @@ class Mesh:
|
|||||||
# @param Shape - shape or shape ID
|
# @param Shape - shape or shape ID
|
||||||
# @return True if succeed else raise an exception
|
# @return True if succeed else raise an exception
|
||||||
def SetMeshElementOnShape(self, ElementID, Shape):
|
def SetMeshElementOnShape(self, ElementID, Shape):
|
||||||
if ( isinstance( Shape, geompy.GEOM._objref_GEOM_Object)):
|
if ( isinstance( Shape, geompyDC.GEOM._objref_GEOM_Object)):
|
||||||
ShapeID = Shape.GetSubShapeIndices()[0]
|
ShapeID = Shape.GetSubShapeIndices()[0]
|
||||||
else:
|
else:
|
||||||
ShapeID = Shape
|
ShapeID = Shape
|
||||||
|
Loading…
Reference in New Issue
Block a user