Merge branch 'main' of https://github.com/FreeCAD/FreeCAD into bgbsww-toponamingAddFeatureRefine

This commit is contained in:
Chris Hennes
2025-02-11 20:58:58 -06:00
1280 changed files with 19734 additions and 13296 deletions

View File

@@ -108,14 +108,14 @@ App::DocumentObjectExecReturn *Pipe::execute()
auto getSectionShape = [](App::DocumentObject* feature,
const std::vector<std::string>& subs) -> TopoDS_Shape {
if (!feature || !feature->isDerivedFrom(Part::Feature::getClassTypeId()))
if (!feature || !feature->isDerivedFrom<Part::Feature>())
throw Base::TypeError("Pipe: Invalid profile/section");
auto subName = subs.empty() ? "" : subs.front();
// only take the entire shape when we have a sketch selected, but
// not a point of the sketch
if (feature->isDerivedFrom(Part::Part2DObject::getClassTypeId())
if (feature->isDerivedFrom<Part::Part2DObject>()
&& subName.compare(0, 6, "Vertex") != 0)
return static_cast<Part::Part2DObject*>(feature)->Shape.getValue();
else {
@@ -233,7 +233,7 @@ App::DocumentObjectExecReturn *Pipe::execute()
// TODO: we need to order the sections to prevent occ from crashing,
// as makepipeshell connects the sections in the order of adding
for (auto& subSet : multisections) {
if (!subSet.first->isDerivedFrom(Part::Feature::getClassTypeId()))
if (!subSet.first->isDerivedFrom<Part::Feature>())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception",
"Pipe: All sections need to be part features"));