Problem with Open Profile and linked model

Hello,

its me again :smiley: this path project is driving me crazy.. :confused: Iam slowly find myself thinking about using fusion 360! :blush: :wink:

As you can not see in the picture below, i want to add an open Profile operation on the rounded edge in the red circle. If i want do do so i always get this error message:

Traceback (most recent call last):
  File "C:\Program Files\FreeCAD 0.21\Mod\Path\PathScripts\PathUtils.py", line 70, in new_function
    res = function(*args, **kwargs)
  File "C:\Program Files\FreeCAD 0.21\Mod\Path\Path\Op\Base.py", line 817, in execute
    result = self.opExecute(obj)
  File "C:\Program Files\FreeCAD 0.21\Mod\Path\Path\Op\Area.py", line 366, in opExecute
    for shp in self.areaOpShapes(obj):
  File "C:\Program Files\FreeCAD 0.21\Mod\Path\Path\Op\Profile.py", line 416, in areaOpShapes
    shapes.extend(self._processEdges(obj, remainingObjBaseFeatures))
  File "C:\Program Files\FreeCAD 0.21\Mod\Path\Path\Op\Profile.py", line 621, in _processEdges
    cutWireObjs = self._extractPathWire(
  File "C:\Program Files\FreeCAD 0.21\Mod\Path\Path\Op\Profile.py", line 925, in _extractPathWire
    ofstShp = self._getOffsetArea(obj, cutShp, False)
  File "C:\Program Files\FreeCAD 0.21\Mod\Path\Path\Op\Profile.py", line 1057, in _getOffsetArea
    return PathUtils.getOffsetArea(
  File "C:\Program Files\FreeCAD 0.21\Mod\Path\PathScripts\PathUtils.py", line 326, in getOffsetArea
    area.setPlane(makeWorkplane(plane))
<class 'ValueError'>: {'sclassname': 'class Base::ValueError', 'sErrMsg': 'shape is not planar', 'sfile': '', 'iline': 0, 'sfunction': '', 'swhat': 'shape is not planar', 'btranslatable': False, 'breported': False}

If i import the part via step file and not with a linked body, the operation is working perfectly. What is my fault??

Open_Profile_Error_2.png

OS: Windows 11 build 22631
Word size of FreeCAD: 64-bit
Version: 0.21.0.33668 +7 (Git)
Build type: Release
Branch: (HEAD detached at 0.21)
Hash: 41b058e2087de60dc8fef3d3e68c7d0129e13abf
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * A2plus 0.4.61
  * btl 0.9.9
  * fasteners 0.4.71
  * FeedsAndSpeeds 0.5.0
  * Lithophane
  * Manipulator 1.5.0
  * OpenDark 2023.11.27
  * QuickMeasure 2022.10.28
  * sheetmetal 0.3.12

Got a solution in this particular case. But it seems it is some sort of tolerance problem / error.
I have changed in an act of desperation the angle of the model in the path job from 90Β° to 109Β° and then back to 90Β° after this, the open profile operation is working. :unamused:

Hi, tolerances wΓ€re an issue also in my experience. Sometimes IT helps to lower arc tolerances mit in the setting and Sometimes IT helps Not to Set targeted milling high to 0mm but maybe to 0.1mm.

Hi ModuloFS!
I also think that this is a tolerance issue.

When I change code line

comFC = topComp.common(botComp)

to

comFC = topComp.common(botComp, 1e-4)

in file
Mod/Path/Path/Op/Profile.py
then the operation works. The 1e-4 is a tolerance parameter for the common-shape operation.
This is not a proper fix yet but hopefully this will be good enough to finish your project.

Can you please create an issue on GitHub and also append a FCStd file with the imported step file where there was no problem.

Yes i will create an issue. I do not have to use the step file method, it is enough if i change the rotation of the model in my job object and change it back to original and the operation is working.
So maybe the problem is at the importing of the model body in the path object. Anyway this behavior has to be avoided in any case.

Issue on github created: https://github.com/FreeCAD/FreeCAD/issues/12026