Keep faces colors on boolean operations

This commit is contained in:
wmayer
2012-05-31 15:28:15 +02:00
parent 9e872e4987
commit 20fcef29c7
6 changed files with 79 additions and 41 deletions

View File

@@ -91,8 +91,18 @@ App::DocumentObjectExecReturn *MultiFuse::execute(void)
if (!mkFuse.IsDone())
throw Base::Exception("Fusion failed");
res = mkFuse.Shape();
history.push_back(buildHistory(mkFuse, TopAbs_FACE, res, mkFuse.Shape1()));
history.push_back(buildHistory(mkFuse, TopAbs_FACE, res, mkFuse.Shape2()));
ShapeHistory hist1 = buildHistory(mkFuse, TopAbs_FACE, res, mkFuse.Shape1());
ShapeHistory hist2 = buildHistory(mkFuse, TopAbs_FACE, res, mkFuse.Shape2());
if (history.empty()) {
history.push_back(hist1);
history.push_back(hist2);
}
else {
for (std::vector<ShapeHistory>::iterator jt = history.begin(); jt != history.end(); ++jt)
*jt = joinHistory(*jt, hist1);
history.push_back(hist2);
}
}
if (res.IsNull())
throw Base::Exception("Resulting shape is invalid");