Keep faces colors on boolean operations

This commit is contained in:
wmayer
2012-05-31 15:28:15 +02:00
parent 09e7c897d0
commit 5875c1bd1c
6 changed files with 79 additions and 41 deletions

View File

@@ -83,23 +83,12 @@ void applyColor(const Part::ShapeHistory& hist,
{
std::map<int, std::vector<int> >::const_iterator jt;
// apply color from modified faces
for (jt = hist.modified.begin(); jt != hist.modified.end(); ++jt) {
for (jt = hist.shapeMap.begin(); jt != hist.shapeMap.end(); ++jt) {
std::vector<int>::const_iterator kt;
for (kt = jt->second.begin(); kt != jt->second.end(); ++kt) {
colBool[*kt] = colBase[jt->first];
}
}
// apply color from generated faces
for (jt = hist.generated.begin(); jt != hist.generated.end(); ++jt) {
std::vector<int>::const_iterator kt;
for (kt = jt->second.begin(); kt != jt->second.end(); ++kt) {
colBool[*kt] = colBase[jt->first];
}
}
// apply data from accepted faces
for (std::map<int, int>::const_iterator kt = hist.accepted.begin(); kt != hist.accepted.end(); ++kt) {
colBool[kt->second] = colBase[kt->first];
}
}
void ViewProviderBoolean::updateData(const App::Property* prop)