From b1226790dea304464c3c9ccb81b5dfe25d87420e Mon Sep 17 00:00:00 2001 From: barate Date: Mon, 14 Nov 2011 13:55:44 +0000 Subject: [PATCH] Fix bug in structural elements (PAL #2012) --- src/GEOM_PY/structelem/parts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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): """ -- 2.39.2