Salome HOME
updated copyright message
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_STEPImportXCAF.cpp
index 3daecc1b64424fc7bef3e3e8e3edc4aabe42f0e3..6fa5b5b5b106a173f59998e5ba82cf454caef92d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2022  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -166,7 +166,7 @@ std::shared_ptr<GeomAPI_Shape> setGeom(const Handle(XCAFDoc_ShapeTool) &theShape
     aGeomShape->setImpl(new TopoDS_Shape(shape));
     return aGeomShape;
   } else {
-    for (Standard_Integer i=1; i<aFrshapes.Length(); i++) {
+    for (Standard_Integer i=1; i<=aFrshapes.Length(); i++) {
       TopoDS_Shape aS = theShapeTool->GetShape(aFrshapes.Value(i));
       TDF_Label aLabel = theShapeTool->FindShape(aS, Standard_False);
       if ( (!aLabel.IsNull()) && (theShapeTool->IsShape(aLabel)) ) {
@@ -174,7 +174,7 @@ std::shared_ptr<GeomAPI_Shape> setGeom(const Handle(XCAFDoc_ShapeTool) &theShape
           if (aS.IsNull()) {
             continue;
           } else {
-            if (!theShapeTool->IsReference(aLabel) ){
+            if (aS.ShapeType() != TopAbs_SOLID && !theShapeTool->IsReference(aLabel)){
               for(TDF_ChildIterator anIt(aLabel); anIt.More(); anIt.Next()) {
                 aB.Add(aCompound, theShapeTool->GetShape(anIt.Value()) );
               }