From: jfa Date: Wed, 27 Apr 2011 14:17:08 +0000 (+0000) Subject: Mantis issue 0020442 remark 0010776: compound in compound. X-Git-Tag: V6_3_0b1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ac23e51c261475a0bb4e09bdd5288130a10aa6d2;p=modules%2Fgeom.git Mantis issue 0020442 remark 0010776: compound in compound. --- diff --git a/src/STEPImport/STEPImport.cxx b/src/STEPImport/STEPImport.cxx index 055039805..d8142d23b 100644 --- a/src/STEPImport/STEPImport.cxx +++ b/src/STEPImport/STEPImport.cxx @@ -131,6 +131,21 @@ extern "C" /* For a single entity */ else if (nbr == 1 && nbs == 1) { aResShape = aReader.Shape(1); + // ATTENTION: this is a workaround for mantis issue 0020442 remark 0010776 + // It should be removed after patching OCCT for bug OCC22436 + // (fix for OCCT is expected in service pack next to OCCT6.3sp12) + if (aResShape.ShapeType() == TopAbs_COMPOUND) { + int nbSub1 = 0; + TopoDS_Shape currShape; + TopoDS_Iterator It (aResShape, Standard_True, Standard_True); + for (; It.More(); It.Next()) { + nbSub1++; + currShape = It.Value(); + } + if (nbSub1 == 1) + aResShape = currShape; + } + // END workaround break; }