From 5a51c1c3555249185d96a96ab04e377e85e14d11 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 7 Mar 2007 07:31:47 +0000 Subject: [PATCH] PAL15148(0D Algorithm "Segments around vertex" works wrong) --- src/SMESH_SWIG/smesh.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/SMESH_SWIG/smesh.py b/src/SMESH_SWIG/smesh.py index db7ac29f6..1f84436fb 100644 --- a/src/SMESH_SWIG/smesh.py +++ b/src/SMESH_SWIG/smesh.py @@ -541,13 +541,16 @@ class Mesh_Segment(Mesh_Algorithm): ## Define "SegmentLengthAroundVertex" hypothesis # @param length for the segment length # @param vertex for the length localization: vertex index [0,1] | verext object - def LengthNearVertex(self, length, vertex): + def LengthNearVertex(self, length, vertex=0): import types - if type(vertex) is types.IntType: - vertex = geompy.SubShapeAllSorted(self.geom,geompy.ShapeType["VERTEX"])[vertex] - pass store_geom = self.geom - self.geom = vertex + if vertex: + if type(vertex) is types.IntType: + vertex = geompy.SubShapeAllSorted(self.geom,geompy.ShapeType["VERTEX"])[vertex] + pass + self.geom = vertex + pass + hyp = self.Hypothesis("SegmentAroundVertex_0D") hyp = self.Hypothesis("SegmentLengthAroundVertex") self.geom = store_geom hyp.SetLength( length ) -- 2.39.2