Toponaming: Bring in Chamfer, Fillet code and add tests (#14035)

* Toponaming: bring in missing code fragments in Sketcher

* Toponaming: Fix infinite recursion, remove debug cruft, rough in fillet test

* Bring in missing code; fix chamfers

* Toponaming: Add code for fillets and test
This commit is contained in:
bgbsww
2024-05-15 19:43:30 -04:00
committed by GitHub
parent 792cee1801
commit b72a8c4222
13 changed files with 523 additions and 283 deletions

View File

@@ -390,6 +390,8 @@ App::DocumentObjectExecReturn *Loft::execute(void)
} catch (const Base::Exception&) {
}
auto hasher = getDocument()->getStringHasher();
try {
//setup the location
this->positionByPrevious();
@@ -413,7 +415,7 @@ App::DocumentObjectExecReturn *Loft::execute(void)
wiresections[i++].push_back(s);
}
TopoShape result(0);
TopoShape result(0,hasher);
std::vector<TopoShape> shapes;
// if (SplitProfile.getValue()) {
@@ -429,14 +431,14 @@ App::DocumentObjectExecReturn *Loft::execute(void)
for (auto &wires : wiresections) {
for(auto& wire : wires)
wire.move(invObjLoc);
shells.push_back(TopoShape(0).makeElementLoft(
shells.push_back(TopoShape(0, hasher).makeElementLoft(
wires, Part::IsSolid::notSolid, Ruled.getValue()? Part::IsRuled::ruled : Part::IsRuled::notRuled, Closed.getValue() ? Part::IsClosed::closed : Part::IsClosed::notClosed));
// }
//build the top and bottom face, sew the shell and build the final solid
TopoShape front;
if (wiresections[0].front().shapeType() != TopAbs_VERTEX) {
front = getVerifiedFace();
front = getTopoShapeVerifiedFace();
if (front.isNull())
return new App::DocumentObjectExecReturn(
QT_TRANSLATE_NOOP("Exception", "Loft: Creating a face from sketch failed"));