PartDesign: decouple refine and other geometric computation (#17008)
This commit is contained in:
committed by
GitHub
parent
32e339447a
commit
115667f73a
@@ -126,6 +126,13 @@ short Helix::mustExecute() const
|
||||
|
||||
App::DocumentObjectExecReturn* Helix::execute()
|
||||
{
|
||||
|
||||
if (onlyHasToRefine()){
|
||||
TopoShape result = refineShapeIfActive(rawShape, RefineErrorPolicy::Warn);
|
||||
Shape.setValue(result);
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
|
||||
// Validate and normalize parameters
|
||||
HelixMode mode = static_cast<HelixMode>(Mode.getValue());
|
||||
if (mode == HelixMode::pitch_height_angle) {
|
||||
@@ -268,6 +275,8 @@ App::DocumentObjectExecReturn* Helix::execute()
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result has multiple solids"));
|
||||
}
|
||||
|
||||
// store shape before refinement
|
||||
this->rawShape = result;
|
||||
Shape.setValue(getSolid(result));
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
@@ -290,6 +299,8 @@ App::DocumentObjectExecReturn* Helix::execute()
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result has multiple solids"));
|
||||
}
|
||||
|
||||
// store shape before refinement
|
||||
this->rawShape = boolOp;
|
||||
boolOp = refineShapeIfActive(boolOp, RefineErrorPolicy::Warn);
|
||||
Shape.setValue(getSolid(boolOp));
|
||||
}
|
||||
@@ -319,6 +330,8 @@ App::DocumentObjectExecReturn* Helix::execute()
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result has multiple solids"));
|
||||
}
|
||||
|
||||
// store shape before refinement
|
||||
this->rawShape = boolOp;
|
||||
boolOp = refineShapeIfActive(boolOp, RefineErrorPolicy::Warn);
|
||||
Shape.setValue(getSolid(boolOp));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user