Maybe...

Or we can just roll our own implementation, like my macro.

BTW, OCC BOPs offer a method to extract section edges, so the implementation can be even simpler than mine.

OCC docs shows a code snipplet, howto obtain a bspline (up to max 8th degree)

source: https://www.opencascade.com/doc/occt-6. ... ction.html

while FreeCAD is doing only:

"...\src\Mod\Part\App\FeaturePartSection.cpp"
Better should be tested before tickling their tracker

Code: Select all

```
Example : giving two shapes S1,S2 accessing faces, let compute the section edges R on S1,S2, performing approximation on new curves, performing PCurve on part 1 but not on part 2 :
Standard_Boolean PerformNow = Standard_False;
BRepBoolAPI_Section S(S1,S2,PerformNow);
S.ComputePCurveOn1(Standard_True);
S.Approximation(Standard_True);
S.Build();
TopoDS_Shape R = S.Shape();
```

while FreeCAD is doing only:

"...\src\Mod\Part\App\FeaturePartSection.cpp"

Code: Select all

```
BRepAlgoAPI_BooleanOperation* Section::makeOperation(const TopoDS_Shape& base, const TopoDS_Shape& tool) const
{
// Let's call algorithm computing a section operation:
return new BRepAlgoAPI_Section(base, tool);
}
```

Good catch !

From OCC BRepAlgo_Section the intersection shape is:

So the OCC algo is not faulty. It works how it is supposed to.analytic where possible ... or a succession of points grouped together in a BSpline curve of degree 1

But adding the Approximation option to Part.Section would indeed be pretty useful.

PR 1507 adds the Approximation option to Part.Section.

I hope my PR is good, because C++ is not easy for me. ... fingers crossed.

Here is the result of the sweep of the original post, with Approximation enabled on the section curve :

I hope my PR is good, because C++ is not easy for me. ... fingers crossed.

Here is the result of the sweep of the original post, with Approximation enabled on the section curve :