From: jfa Date: Thu, 6 Dec 2007 08:12:02 +0000 (+0000) Subject: Fix bug 17537: pb. with GEOM_Spanner.MakeSpanner(). X-Git-Tag: V3_2_9~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=446fdd4222ae2fc0076ac53641c6f0c11d752466;p=modules%2Fgeom.git Fix bug 17537: pb. with GEOM_Spanner.MakeSpanner(). --- diff --git a/src/GEOM_SWIG/GEOM_Spanner.py b/src/GEOM_SWIG/GEOM_Spanner.py index 053619d35..2e410ca9c 100644 --- a/src/GEOM_SWIG/GEOM_Spanner.py +++ b/src/GEOM_SWIG/GEOM_Spanner.py @@ -324,8 +324,13 @@ def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None): Face_5_horiz = geompy.GetFaceByNormale(aBlock, vz) f_5_horiz_ind = geompy.LocalOp.GetSubShapeIndex(aBlock, Face_5_horiz) - MRot = geompy.MakeMultiTransformation2D(aBlock, f42_sp_ind, 0, 3, f_5_horiz_ind, 0, 5) - if MRot is not None: + MRot = None + is2Dok = True + try: + MRot = geompy.MakeMultiTransformation2D(aBlock, f42_sp_ind, 0, 3, f_5_horiz_ind, 0, 5) + except: + is2Dok = False + if is2Dok and MRot is not None: isMRot2D = 1 p_z100 = geompy.MakeVertex(0., 0., 100.) MRot_tr = geompy.MakeTranslationTwoPoints(MRot, p0, p_z100)