FreeCAD / FreeCAD

This is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler.
https://www.freecad.org
Other
19.85k stars 4.06k forks source link

Surface: "Fill boundary curves" gives error "Curves are disjoint" (RC2 + 1.1.0dev39100) #17735

Open Xargas opened 1 week ago

Xargas commented 1 week ago

Is there an existing issue for this?

Problem description

Checks: 1) Latest development version used -> yes 2) Is Bug -> yes 3) FreeCAD forum -> check 4) Reproducible -> yes 5) Version info -> see below 6) Include all error messages -> Text, Screenshot 7) Terminal, FreeCAD Log -> Screenshot, no info there 8) Cool and patient -> 🫡

The bug occured while redo-ing the solution from the forum: https://forum.freecad.org/viewtopic.php?p=790611#p790787

Problem: 1) Open FreeCAD 1.0.0RC2 or 1.1.0dev37100 2) Create a new file 3) Create a new Sketch on XY plane using Sketcher containing: -- two lines and one circle -- the two lines form a 90° edge joint -- the circle is concave towards the 90° edge -- all three form a face form a compact manifold 4) Switch to the Surface workbench and create a "Fill boundary curves" object. -- Add the three edges in order: arc, line, line -- The other two possible orders seem to work. As this is a triangle it should not be an issue regarding the order, like in other cases. 5) Try to finish surface creation, get the error message "Curves are disjoint"

Screenshot

Full version info

Buggy version dev:

OS: Windows 11 build 22631
Architecture: x86_64
Version: 1.1.0dev.39100 (Git)
Build type: Release
Branch: main
Hash: 8865450a3e14220925e0e449c0f1f79056b4fb89
Python 3.11.10, Qt 5.15.15, Coin 4.0.3, Vtk 9.3.0, OCC 7.8.1
Locale: English/Austria (en_AT)
Stylesheet/Theme/QtStyle: FreeCAD Dark.qss/FreeCAD Dark/Fusion
Installed mods: 
  * CurvedShapes 1.0.12
  * Curves 0.6.47
  * fasteners 0.5.29
  * freecad.gears 1.3.0
  * ThreadProfile 1.92.0

Subproject(s) affected?

Other (specify in description)

Anything else?

Context: https://forum.freecad.org/viewtopic.php?p=790611

Code of Conduct

luzpaz commented 1 week ago

Thanks for this report. We need more improvement to Surface WB for sure.

wwmayer commented 1 week ago

I don't think it's a regression but I guess it has never worked because in v0.21 it fails, too. However, instead of three edges you can select two edge to create the surface.

I assume the problem is in GeomFillSurface::createBSplineSurface where the line segments and arc of circle are converted into B-Splines in order to be able to use OCC's GeomFill_BSplineCurves. If the B-Spline from the arc of circle is not a real NURBS curve then there is a loss of accuracy and this could mean that there is a tiny gap between the three B-Spline curves.

Edit: It seems the order of selection makes the difference. If the two lines are first selected and then the arc it works.

VinceBa commented 19 hours ago

I can't reproduce this error. Both Filling or Fill Boundary Curve features work here ( Version: 1.1.0dev.39176 ear 0.3.38) Could you send a file?