Salome HOME
Issue #273: Add copyright string
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Placement.cpp
index 6a378adde2ce10d71514694ad793a12805661566..3cc4f85aedc6bea31cedcd8ecf2e713996ef2a54 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:        GeomAlgoAPI_Placement.cpp
 // Created:     2 Dec 2014
 // Author:      Artem ZHIDKOV
@@ -15,8 +17,7 @@
 #include <GProp_GProps.hxx>
 #include <BRepGProp.hxx>
 #include <Precision.hxx>
-
-
+#define DEB_PLACEMENT 1
 GeomAlgoAPI_Placement::GeomAlgoAPI_Placement(
     std::shared_ptr<GeomAPI_Shape> theAttractiveFace,
     std::shared_ptr<GeomAPI_Pln> theSourcePlane,
@@ -57,17 +58,19 @@ void GeomAlgoAPI_Placement::build(
     setImpl(aBuilder);
     myDone = aBuilder->IsDone() == Standard_True;
     if (myDone) {
-      TopoDS_Shape aResult;
-      if(aBuilder->Shape().ShapeType() == TopAbs_COMPOUND) 
-        aResult = GeomAlgoAPI_DFLoader::refineResult(aBuilder->Shape());
-      else
-        aResult = aBuilder->Shape();
+      TopoDS_Shape aResult = aBuilder->Shape();
       // fill data map to keep correct orientation of sub-shapes 
       for (TopExp_Explorer Exp(aResult,TopAbs_FACE); Exp.More(); Exp.Next()) {
         std::shared_ptr<GeomAPI_Shape> aCurrentShape(new GeomAPI_Shape());
         aCurrentShape->setImpl(new TopoDS_Shape(Exp.Current()));
         myMap.bind(aCurrentShape, aCurrentShape);
-      }   
+      }
+#ifdef DEB_PLACEMENT
+         int aNum = myMap.size();
+         cout << "MAP of Oriented shapes =" << aNum <<endl;
+
+#endif
+
       myShape->setImpl(new TopoDS_Shape(aResult));
       myMkShape = new GeomAlgoAPI_MakeShape (aBuilder);
     }