PartDesign: decouple refine and other geometric computation (#17008)

This commit is contained in:
Florian Foinant-Willig
2024-12-02 17:57:30 +01:00
committed by GitHub
parent 32e339447a
commit 115667f73a
14 changed files with 141 additions and 5 deletions

View File

@@ -112,6 +112,12 @@ Loft::getSectionShape(const char *name,
App::DocumentObjectExecReturn *Loft::execute()
{
if (onlyHasToRefine()){
TopoShape result = refineShapeIfActive(rawShape);
Shape.setValue(result);
return App::DocumentObject::StdReturn;
}
std::vector<TopoShape> wires;
try {
wires = getSectionShape("Profile", Profile.getValue(), Profile.getSubValues());
@@ -257,6 +263,8 @@ App::DocumentObjectExecReturn *Loft::execute()
if (boolOp.isNull())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid"));
// store shape before refinement
this->rawShape = boolOp;
boolOp = refineShapeIfActive(boolOp);
boolOp = getSolid(boolOp);
if (!isSingleSolidRuleSatisfied(boolOp.getShape())) {