Fix bug 18122: 'Name Error' from some functions of smeshDC.Mesh class.

This commit is contained in:
jfa 2007-12-07 13:48:11 +00:00
parent bee39a08f4
commit 4d2bf97770

View File

@ -172,7 +172,7 @@ class smeshDC(SMESH._objref_SMESH_Gen):
## Make DirStruct from a triplet
# @param x,y,z are vector components
# @return SMESH.DirStruct
def MakeDirStruct(x,y,z):
def MakeDirStruct(self,x,y,z):
pnt = PointStruct(x,y,z)
return DirStruct(pnt)
@ -2149,7 +2149,7 @@ class Mesh:
# @param Shape is geom object(subshape) IOR
# Shape must be subshape of a ShapeToMesh()
def GetSubMeshElementsId(self, Shape):
if ( isinstance( Shape, geompy.GEOM._objref_GEOM_Object)):
if ( isinstance( Shape, geompyDC.GEOM._objref_GEOM_Object)):
ShapeID = Shape.GetSubShapeIndices()[0]
else:
ShapeID = Shape
@ -2159,7 +2159,7 @@ class Mesh:
# @param Shape is geom object(subshape) IOR
# Shape must be subshape of a ShapeToMesh()
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]
else:
ShapeID = Shape
@ -2169,7 +2169,7 @@ class Mesh:
# @param Shape is geom object(subshape) IOR
# Shape must be subshape of a ShapeToMesh()
def GetSubMeshElementType(self, Shape):
if ( isinstance( Shape, geompy.GEOM._objref_GEOM_Object)):
if ( isinstance( Shape, geompyDC.GEOM._objref_GEOM_Object)):
ShapeID = Shape.GetSubShapeIndices()[0]
else:
ShapeID = Shape
@ -2327,7 +2327,7 @@ class Mesh:
# @param Vertex - vertex or vertex ID
# @return True if succeed else raise an exception
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]
else:
VertexID = Vertex
@ -2344,7 +2344,7 @@ class Mesh:
# @param paramOnEdge - parameter on edge where the node is located
# @return True if succeed else raise an exception
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]
else:
EdgeID = Edge
@ -2361,7 +2361,7 @@ class Mesh:
# @param v - V parameter on face where the node is located
# @return True if succeed else raise an exception
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]
else:
FaceID = Face
@ -2376,7 +2376,7 @@ class Mesh:
# @param Solid - solid or solid ID
# @return True if succeed else raise an exception
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]
else:
SolidID = Solid
@ -2391,7 +2391,7 @@ class Mesh:
# @param Shape - shape or shape ID
# @return True if succeed else raise an exception
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]
else:
ShapeID = Shape