mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-27 13:10:34 +05:00
Correction because of 'geompyDC' refactoring.
This commit is contained in:
parent
6524427cb2
commit
3ec0f6d752
@ -259,15 +259,15 @@ def AssureGeomPublished(mesh, geom, name=''):
|
|||||||
return
|
return
|
||||||
|
|
||||||
## Return the first vertex of a geometrical edge by ignoring orientation
|
## Return the first vertex of a geometrical edge by ignoring orientation
|
||||||
def FirstVertexOnCurve(edge):
|
def FirstVertexOnCurve(mesh, edge):
|
||||||
vv = geomBuilder.SubShapeAll( edge, geomBuilder.geomBuilder.ShapeType["VERTEX"])
|
vv = mesh.geompyD.SubShapeAll( edge, geomBuilder.geomBuilder.ShapeType["VERTEX"])
|
||||||
if not vv:
|
if not vv:
|
||||||
raise TypeError, "Given object has no vertices"
|
raise TypeError, "Given object has no vertices"
|
||||||
if len( vv ) == 1: return vv[0]
|
if len( vv ) == 1: return vv[0]
|
||||||
v0 = geomBuilder.MakeVertexOnCurve(edge,0.)
|
v0 = mesh.geompyD.MakeVertexOnCurve(edge,0.)
|
||||||
xyz = geomBuilder.PointCoordinates( v0 ) # coords of the first vertex
|
xyz = mesh.geompyD.PointCoordinates( v0 ) # coords of the first vertex
|
||||||
xyz1 = geomBuilder.PointCoordinates( vv[0] )
|
xyz1 = mesh.geompyD.PointCoordinates( vv[0] )
|
||||||
xyz2 = geomBuilder.PointCoordinates( vv[1] )
|
xyz2 = mesh.geompyD.PointCoordinates( vv[1] )
|
||||||
dist1, dist2 = 0,0
|
dist1, dist2 = 0,0
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
dist1 += abs( xyz[i] - xyz1[i] )
|
dist1 += abs( xyz[i] - xyz1[i] )
|
||||||
|
@ -336,7 +336,7 @@ class Mesh_Algorithm:
|
|||||||
if e.GetShapeType() != geomBuilder.GEOM.EDGE or \
|
if e.GetShapeType() != geomBuilder.GEOM.EDGE or \
|
||||||
v.GetShapeType() != geomBuilder.GEOM.VERTEX:
|
v.GetShapeType() != geomBuilder.GEOM.VERTEX:
|
||||||
raise TypeError, "A list item must be a tuple (edge, 1st_vertex_of_edge)"
|
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]
|
tol = geompy.Tolerance( vFirst )[-1]
|
||||||
if geompy.MinDistance( v, vFirst ) > 1.5*tol:
|
if geompy.MinDistance( v, vFirst ) > 1.5*tol:
|
||||||
resList.append( geompy.GetSubShapeID(self.mesh.geom, e ))
|
resList.append( geompy.GetSubShapeID(self.mesh.geom, e ))
|
||||||
|
Loading…
Reference in New Issue
Block a user