#include <BRepGProp.hxx>
#include <Precision.hxx>
-#define DEB_PLACEMENT 1
GeomAlgoAPI_Placement::GeomAlgoAPI_Placement(
std::shared_ptr<GeomAPI_Shape> theSourceSolid,
std::shared_ptr<GeomAPI_Shape> theDestSolid,
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<GeomAPI_Trsf>(new GeomAPI_Trsf(new gp_Trsf(aTrsf * aSourceShape.Location().Transformation())));
+ myTrsf = std::shared_ptr<GeomAPI_Trsf>(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);
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);
}
return myMkShape;
}
+std::shared_ptr<GeomAPI_Trsf> GeomAlgoAPI_Placement::transformation() const
+{
+ return myTrsf;
+}
+
//============================================================================
GeomAlgoAPI_Placement::~GeomAlgoAPI_Placement()
{