Use placement only on new objects

This commit is contained in:
bgbsww
2023-11-16 11:59:23 -05:00
committed by Yorik van Havre
parent 156c506f19
commit e10a62ae82
3 changed files with 7 additions and 2 deletions

View File

@@ -55,7 +55,8 @@ Boolean::Boolean()
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/PartDesign");
this->Refine.setValue(hGrp->GetBool("RefineModel", false));
ADD_PROPERTY_TYPE(UsePlacement,(0),"Part Design",(App::PropertyType)(App::Prop_None),"Apply the placement of the second ( tool ) object");
this->UsePlacement.setValue(false);
initExtension(this);
}
@@ -113,7 +114,8 @@ App::DocumentObjectExecReturn *Boolean::execute()
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Cannot do boolean with anything but Part::Feature and its derivatives"));
Part::TopoShape toolShape = static_cast<Part::Feature*>(tool)->Shape.getShape();
toolShape.setPlacement(bodyPlacement * toolShape.getPlacement());
if ( UsePlacement.getValue() )
toolShape.setPlacement(bodyPlacement * toolShape.getPlacement());
TopoDS_Shape shape = toolShape.getShape();
TopoDS_Shape boolOp;