FreeCAD: master 74d5c0a8

Author Committer Branch Timestamp Parent
Roy-043 GitHub master 2021-01-25 14:33:36 master 8113794e
Changeset [Draft] Fix snap to center of faces of solids

The code would only find a center snap on the face with index=0 of solids.

In V0.19 Part.getShape was introduced (line 399). But not all consequences were not fully implemented.

In the '# we are snapping to an edge' section (line 411) the code could be cleaned up. There is no need to check if the index of the edge is correct for the parent object since we are no longer dealing with a parent object. That portion was effectively dead code.

The '# we are snapping to a face' section (line 429 in the revised code) has been modified accordingly, which fixes the bug.

Forum discussion:
https://forum.freecadweb.org/viewtopic.php?f=23&t=54747
mod - src/Mod/Draft/draftguitools/gui_snapper.py Diff File