PD: Fix loft between curved faces
Fixes issue 19183 also reported in the forum: https://forum.freecad.org/viewtopic.php?p=806495 https://forum.freecad.org/viewtopic.php?t=88234 The actual reason for the failure is that the new code uses FaceMakerBullseye method which expects coplanar wires. The code was using FaceMakerCheese previously which changed in LinkStage with their commit 93ce3edfe7ff ("PD: use FaceMakerBullseye for feature Loft") and was imported here with TNP mitigations. As changing it back would cause different regressions, lets try different facemakers until one succeeds. Fixes: 301194a69682 ("Toponaming/Part: Fix all getBaseTopoShape calls...") Co-authored-by: Benjamin Nauck <benjamin@nauck.se> Co-authored-by: Werner Mayer <wmayer@freecad.org>
This commit is contained in:
@@ -213,7 +213,23 @@ App::DocumentObjectExecReturn *Loft::execute()
|
||||
std::vector<TopoShape> backwires;
|
||||
for(auto& sectionWires : wiresections)
|
||||
backwires.push_back(sectionWires.back());
|
||||
back = TopoShape(0).makeElementFace(backwires);
|
||||
const char *faceMaker[] = {
|
||||
"Part::FaceMakerBullseye",
|
||||
"Part::FaceMakerCheese",
|
||||
"Part::FaceMakerSimple",
|
||||
};
|
||||
for (size_t i = 0; i < std::size(faceMaker); i++) {
|
||||
try {
|
||||
back = TopoShape(0).makeElementFace(backwires, nullptr, faceMaker[i]);
|
||||
break;
|
||||
}
|
||||
catch (...) {
|
||||
if (i == std::size(faceMaker) - 1) {
|
||||
throw;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!front.isNull() || !back.isNull()) {
|
||||
|
||||
Reference in New Issue
Block a user