Skip to content

Unfold broken when part contains splines #537

@kotarou3

Description

@kotarou3

Describe your issue

See the below screenshots and error messages.
Note that the examples also show issue #536 and use the same CAD file

CAD file: spline-pocket.zip

FreeCAD version info + SheetMetal WB version

OS: Debian GNU/Linux 13 (trixie) (GNOME-Flashback:GNOME/gnome-flashback-metacity/xcb)
Architecture: x86_64
Version: 1.0.0.
Build type: Release
Python 3.13.5, Qt 5.15.15, Coin 4.0.3, Vtk 9.3.0, OCC 7.8.1
Locale: English/Australia (en_AU)
Stylesheet/Theme/QtStyle: unset/FreeCAD Classic/Qt default
Installed mods: 
  * ExplodedAssembly
  * sheetmetal 0.7.55

Put here any screenshots or videos (optional)

Attempting to unfold using this face results in an "Intersection cannot be computed" error:
Image

15:29:54  pyException: Traceback (most recent call last):
  File "/home/kota/.local/share/FreeCAD/Mod/sheetmetal/./SheetMetalUnfoldCmd.py", line 287, in execute
    shape, sketches = self.newUnfolder(fp, baseObj, baseFace)
  File "/home/kota/.local/share/FreeCAD/Mod/sheetmetal/./SheetMetalUnfoldCmd.py", line 229, in newUnfolder
    sel_face, unfolded_shape, bend_lines, root_normal = SheetMetalNewUnfolder.getUnfold(
  File "/home/kota/.local/share/FreeCAD/Mod/sheetmetal/./SheetMetalNewUnfolder.py", line 1342, in getUnfold
    sketch_wirelist = Edge2DCleanup.clean_and_structure_geometry(sketch_lines)
  File "/home/kota/.local/share/FreeCAD/Mod/sheetmetal/./SheetMetalNewUnfolder.py", line 994, in clean_and_structure_geometry
    intermediate_result1 = Edge2DCleanup.eliminate_bsplines(edges, spline2arc_tol)
  File "/home/kota/.local/share/FreeCAD/Mod/sheetmetal/./SheetMetalNewUnfolder.py", line 844, in eliminate_bsplines
    new_edge, max_err = Edge2DCleanup.bspline_to_arc(edge)
  File "/home/kota/.local/share/FreeCAD/Mod/sheetmetal/./SheetMetalNewUnfolder.py", line 804, in bspline_to_arc
    arc = Part.Arc(point1, point2, point3).toShape().Edges[0]
<class 'Part.OCCError'>: Intersection cannot be computed
15:29:54  Body_Unfold: Intersection cannot be computed

Attempting to unfold using this face results in the spline being "straightened out":
Image
Image

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions