]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix bug in structural elements (PAL #2012) RELIQUAT_6x_15112011
authorbarate <barate>
Mon, 14 Nov 2011 13:55:44 +0000 (13:55 +0000)
committerbarate <barate>
Mon, 14 Nov 2011 13:55:44 +0000 (13:55 +0000)
src/GEOM_PY/structelem/parts.py

index 30420fc7d0ef12844d538b6b11ecc6d5469b6370..a533125fea52783fbcb6751ea62b0cd9d9741c89 100644 (file)
@@ -254,10 +254,11 @@ class Beam(StructuralElementPart):
         orientation is different than the orientation of the underlying OCC
         object.
         """
+        length = self.geom.BasicProperties(path)[0]
         p1 = self.geom.MakeVertexOnCurve(path, 0.0)
         p2 = self.geom.GetFirstVertex(path)
         dist = self.geom.MinDistance(p1, p2)
-        return dist != 0.0
+        return dist > length / 2
 
     def _getVertexAndTangentOnOrientedWire(self, path, param):
         """