From: barate Date: Mon, 14 Nov 2011 13:55:44 +0000 (+0000) Subject: Fix bug in structural elements (PAL #2012) X-Git-Tag: RELIQUAT_6x_15112011 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b1226790dea304464c3c9ccb81b5dfe25d87420e;p=modules%2Fgeom.git Fix bug in structural elements (PAL #2012) --- diff --git a/src/GEOM_PY/structelem/parts.py b/src/GEOM_PY/structelem/parts.py index 30420fc7d..a533125fe 100644 --- a/src/GEOM_PY/structelem/parts.py +++ b/src/GEOM_PY/structelem/parts.py @@ -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): """