From 3ec0f6d7525fde8284aa1e0381022b64fa98aea3 Mon Sep 17 00:00:00 2001 From: akl Date: Wed, 17 Apr 2013 11:34:31 +0000 Subject: [PATCH] Correction because of 'geompyDC' refactoring. --- src/SMESH_SWIG/smeshBuilder.py | 12 ++++++------ src/SMESH_SWIG/smesh_algorithm.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index 5c9c581b9..78089201d 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -259,15 +259,15 @@ def AssureGeomPublished(mesh, geom, name=''): return ## Return the first vertex of a geometrical edge by ignoring orientation -def FirstVertexOnCurve(edge): - vv = geomBuilder.SubShapeAll( edge, geomBuilder.geomBuilder.ShapeType["VERTEX"]) +def FirstVertexOnCurve(mesh, edge): + vv = mesh.geompyD.SubShapeAll( edge, geomBuilder.geomBuilder.ShapeType["VERTEX"]) if not vv: raise TypeError, "Given object has no vertices" if len( vv ) == 1: return vv[0] - v0 = geomBuilder.MakeVertexOnCurve(edge,0.) - xyz = geomBuilder.PointCoordinates( v0 ) # coords of the first vertex - xyz1 = geomBuilder.PointCoordinates( vv[0] ) - xyz2 = geomBuilder.PointCoordinates( vv[1] ) + v0 = mesh.geompyD.MakeVertexOnCurve(edge,0.) + xyz = mesh.geompyD.PointCoordinates( v0 ) # coords of the first vertex + xyz1 = mesh.geompyD.PointCoordinates( vv[0] ) + xyz2 = mesh.geompyD.PointCoordinates( vv[1] ) dist1, dist2 = 0,0 for i in range(3): dist1 += abs( xyz[i] - xyz1[i] ) diff --git a/src/SMESH_SWIG/smesh_algorithm.py b/src/SMESH_SWIG/smesh_algorithm.py index e72a81f8e..caad9bb1a 100644 --- a/src/SMESH_SWIG/smesh_algorithm.py +++ b/src/SMESH_SWIG/smesh_algorithm.py @@ -336,7 +336,7 @@ class Mesh_Algorithm: if e.GetShapeType() != geomBuilder.GEOM.EDGE or \ v.GetShapeType() != geomBuilder.GEOM.VERTEX: raise TypeError, "A list item must be a tuple (edge, 1st_vertex_of_edge)" - vFirst = FirstVertexOnCurve( e ) + vFirst = FirstVertexOnCurve( self.mesh, e ) tol = geompy.Tolerance( vFirst )[-1] if geompy.MinDistance( v, vFirst ) > 1.5*tol: resList.append( geompy.GetSubShapeID(self.mesh.geom, e )) -- 2.30.2