Ondsel-Development / FreeCAD

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

[1.0 bughunt] Offsetting partially selected geometry fails #69

Open prokoudine opened 1 month ago

prokoudine commented 1 month ago

Is there an existing issue for this?

Problem description

Reported by user Sariga on Discord:

  1. in sketcher, create two rectangles that are coincident in one point (seems to work with other polygons too, i also tried with hexagons)
  2. select one of the rectangles fully and one partially
  3. try to use the offset tool
18:54:09  Unhandled exception in ViewProvider::eventCallback: makeOffset2D: result of offsetting is null!
(Event type: SoLocation2Event, object type: SketcherGui::ViewProviderSketch)

Demo: https://github.com/Ondsel-Development/FreeCAD/assets/57467/21f521ed-4270-4787-93ff-1f2ca85ff804

This qualifies for a sticker :)

Full version info

OS: Ubuntu 24.04 LTS (ubuntu:GNOME/ubuntu-xorg)
Word size of Ondsel: 64-bit
Version: 2024.2.0dev.37455 (Git) AppImage
Build type: Release
Branch: flavor
Hash: 01e9de13fa3b534aba6588f1a7e6fa9748249899
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)
Installed mods: 
  * fasteners 0.5.21
  * slic3r-tools
  * OpenTheme 2024.4.20
  * Lattice2 1.0.0
  * Curves 0.6.37
  * freecad.gears 1.2.0
  * Ondsel-Lens 2024.5.6.01

Subproject(s) affected?

None

Anything else?

No response

Code of Conduct

PaddleStroke commented 1 month ago

This is a bit tricky. The input selection for the offset has the lines of the second rectangle. Which makes a shape that OCC cannot offset. So we can't help with the failing here.

However we could improve the error message.