Only flip extrusion normal when transitioning between union and difference.

After commit a8465cbc8, extrusion normal would be adjusted when
switching between union and assembly groups, if ever implemented.
This commit is contained in:
whitequark 2016-05-07 06:19:47 +00:00
parent a44a4665a8
commit 12c9858d06

View File

@ -195,7 +195,9 @@ void TextWindow::ScreenChangeGroupOption(int link, uint32_t v) {
// When an extrude group is first created, it's positioned for a union
// extrusion. If no constraints were added, flip it when we switch between
// union and difference modes to avoid manual work doing the smae.
if(g->meshCombine != v && g->GetNumConstraints() == 0) {
if(g->meshCombine != v && g->GetNumConstraints() == 0 &&
(v == Group::COMBINE_AS_DIFFERENCE ||
g->meshCombine == Group::COMBINE_AS_DIFFERENCE)) {
g->ExtrusionForceVectorTo(g->ExtrusionGetVector().Negated());
}
g->meshCombine = v;