From: eap Date: Tue, 12 Mar 2013 11:28:32 +0000 (+0000) Subject: Fix FirstVertexOnCurve(edge): use MakeVertexOnCurve() instead of X-Git-Tag: pluginMGCleaner~55 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dbd3054f4fa9bfd42cc01542b59efc1ca06b6a95;p=modules%2Fsmesh.git Fix FirstVertexOnCurve(edge): use MakeVertexOnCurve() instead of KindOfShape() to find the EDGE beginning --- diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 046e5e9ab..4f15ee606 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -276,15 +276,15 @@ def AssureGeomPublished(mesh, geom, name=''): ## Return the first vertex of a geomertical edge by ignoring orienation def FirstVertexOnCurve(edge): - from geompy import SubShapeAll, ShapeType, KindOfShape, PointCoordinates + from geompy import SubShapeAll, ShapeType, MakeVertexOnCurve, PointCoordinates vv = SubShapeAll( edge, ShapeType["VERTEX"]) if not vv: raise TypeError, "Given object has no vertices" if len( vv ) == 1: return vv[0] - info = KindOfShape(edge) - xyz = info[1:4] # coords of the first vertex - xyz1 = PointCoordinates( vv[0] ) - xyz2 = PointCoordinates( vv[1] ) + v0 = MakeVertexOnCurve(edge,0.) + xyz = PointCoordinates( v0 ) # coords of the first vertex + xyz1 = PointCoordinates( vv[0] ) + xyz2 = PointCoordinates( vv[1] ) dist1, dist2 = 0,0 for i in range(3): dist1 += abs( xyz[i] - xyz1[i] )