#include <GeomAlgoAPI_Rotation.h>
-#include <GeomAlgoAPI_ShapeProps.h>
+#include <GeomAlgoAPI_ShapeTools.h>
#include <BRepBuilderAPI_Transform.hxx>
#include <BRepCheck_Analyzer.hxx>
std::shared_ptr<GeomAPI_Ax1> theAxis,
double theAngle,
bool theSimpleTransform)
-: myDone(false),
- myShape(new GeomAPI_Shape()),
- myMap(new GeomAPI_DataMapOfShapeShape()),
- myMkShape(new GeomAlgoAPI_MakeShape())
+: myDone(false)
{
build(theSourceShape, theAxis, theAngle, theSimpleTransform);
}
if (theSimpleTransform) {
TopLoc_Location aDelta(aTrsf);
aResult = aSourceShape.Moved(aDelta);
- 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 * aSourceShape.Location().Transformation())));
+ myTrsf = std::shared_ptr<GeomAPI_Trsf>(new GeomAPI_Trsf(new gp_Trsf(aTrsf)));
myDone = true; // is OK for sure
} else {
BRepBuilderAPI_Transform* aBuilder = new BRepBuilderAPI_Transform(aSourceShape, aTrsf, true);
if(!aBuilder) {
return;
}
+ myMkShape.reset(new GeomAlgoAPI_MakeShape(aBuilder));
myDone = aBuilder->IsDone() == Standard_True;
aResult = aBuilder->Shape();
// Fill data map to keep correct orientation of sub-shapes.
+ myMap.reset(new GeomAPI_DataMapOfShapeShape());
for(TopExp_Explorer anExp(aResult, TopAbs_FACE); anExp.More(); anExp.Next()) {
std::shared_ptr<GeomAPI_Shape> aCurrentShape(new GeomAPI_Shape());
aCurrentShape->setImpl(new TopoDS_Shape(anExp.Current()));
myMap->bind(aCurrentShape, aCurrentShape);
}
- myMkShape->setImpl(aBuilder);
}
+ myShape.reset(new GeomAPI_Shape());
myShape->setImpl(new TopoDS_Shape(aResult));
}
const bool GeomAlgoAPI_Rotation::hasVolume() const
{
bool hasVolume(false);
- if(isValid() && (GeomAlgoAPI_ShapeProps::volume(myShape) > Precision::Confusion())) {
+ if(isValid() && (GeomAlgoAPI_ShapeTools::volume(myShape) > Precision::Confusion())) {
hasVolume = true;
}
return hasVolume;