return false; // something is wrong
}
+gp_Trsf Model_ResultPart::sumTrsf() {
+ gp_Trsf aResult;
+ if (myTrsf) {
+ aResult = *myTrsf;
+ aResult = aResult * baseRef()->sumTrsf();
+ }
+ return aResult;
+}
+
std::shared_ptr<GeomAPI_Shape> Model_ResultPart::shapeInPart(
const std::string& theName, const std::string& theType, int& theIndex)
{
aSelAttr->append(theName, theType);
theIndex = aSelAttr->size();
aResult = aSelAttr->value(theIndex - 1)->value();
+ if (myTrsf.get() && aResult.get() && !aResult->isNull()) {
+ gp_Trsf aSumTrsf = sumTrsf();
+ TopoDS_Shape anOrigMoved = aResult->impl<TopoDS_Shape>().Moved(aSumTrsf);
+ aResult->setImpl(new TopoDS_Shape(anOrigMoved));
+ }
return aResult;
}
AttributeSelectionListPtr aSelAttr = aDoc->selectionInPartFeature();
aResult = aSelAttr->value(theIndex - 1)->value();
+ if (myTrsf.get() && aResult.get() && !aResult->isNull()) {
+ gp_Trsf aSumTrsf = sumTrsf();
+ TopoDS_Shape anOrigMoved = aResult->impl<TopoDS_Shape>().Moved(aSumTrsf);
+ aResult->setImpl(new TopoDS_Shape(anOrigMoved));
+ }
return aResult;
}
/// makes a result on a temporary feature (an action)
Model_ResultPart();
+ /// returns sum of transformations of the whole sequence of transformation-parts
+ gp_Trsf sumTrsf();
+
/// Returns true if document is activated (loaded into the memory)
virtual bool isActivated();