X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_Placement.cpp;h=4e29cdb305d6df989964137f3b9a8ecbba547c9d;hb=f5c7bb3100ed321392da42f61c2ab505833ec61a;hp=35ea7c186211d35d4fcf1ac43259d087f1d0941a;hpb=c39f725bfe98395871c5853dacb89ab1a6ecc6f2;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Placement.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Placement.cpp index 35ea7c186..4e29cdb30 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Placement.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Placement.cpp @@ -24,7 +24,6 @@ #include #include -#define DEB_PLACEMENT 1 GeomAlgoAPI_Placement::GeomAlgoAPI_Placement( std::shared_ptr theSourceSolid, std::shared_ptr theDestSolid, @@ -195,6 +194,10 @@ void GeomAlgoAPI_Placement::build( TopLoc_Location aDelta(aTrsf); TopoDS_Shape aResult = aSourceShape.Moved(aDelta); myShape->setImpl(new TopoDS_Shape(aResult)); + // store the accumulated information about the result and this delta + //myTrsf = std::shared_ptr(new GeomAPI_Trsf(new gp_Trsf(aTrsf * aSourceShape.Location().Transformation()))); + myTrsf = std::shared_ptr(new GeomAPI_Trsf(new gp_Trsf(aTrsf))); + myDone = true; // it is allways true for simple transformation generation } else { // internal rebuild of the shape // Transform the shape with copying it BRepBuilderAPI_Transform* aBuilder = new BRepBuilderAPI_Transform(aSourceShape, aTrsf, true); @@ -209,12 +212,6 @@ void GeomAlgoAPI_Placement::build( aCurrentShape->setImpl(new TopoDS_Shape(Exp.Current())); myMap.bind(aCurrentShape, aCurrentShape); } - #ifdef DEB_PLACEMENT - int aNum = myMap.size(); - cout << "MAP of Oriented shapes =" << aNum <setImpl(new TopoDS_Shape(aResult)); myMkShape = new GeomAlgoAPI_MakeShape (aBuilder); } @@ -264,6 +261,11 @@ GeomAlgoAPI_MakeShape * GeomAlgoAPI_Placement::makeShape() const return myMkShape; } +std::shared_ptr GeomAlgoAPI_Placement::transformation() const +{ + return myTrsf; +} + //============================================================================ GeomAlgoAPI_Placement::~GeomAlgoAPI_Placement() {