[Draft] Issues with snapping

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Roy_043
Veteran
Posts: 8580
Joined: Thu Dec 27, 2018 12:28 pm

Re: [Draft] Issues with snapping

Post by Roy_043 »

@yorik:
Are you asking for more test scenarios?
I have described one scenario with a test file here:
https://forum.freecadweb.org/viewtopic. ... 45#p337866
User avatar
Roy_043
Veteran
Posts: 8580
Joined: Thu Dec 27, 2018 12:28 pm

Re: [Draft] Issues with snapping

Post by Roy_043 »

Maybe this is the cause of the bug?:
wmayer wrote: Sun Oct 13, 2019 10:00 am In the past the method SelectionSingleton::isSelected() only checked for the passed object/object name whether it's selected or not. But now it does some automatic resolving where it considers the object Kanülenlöcher as a sub-element of the Body and because Kanülenlöcher is selected it also considers the Body as selected.
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: [Draft] Issues with snapping

Post by wmayer »

A fix for the mentioned bug is already merged to master. So, if possible you can build the latest version or wait until new packages are available.
User avatar
Roy_043
Veteran
Posts: 8580
Joined: Thu Dec 27, 2018 12:28 pm

Re: [Draft] Issues with snapping

Post by Roy_043 »

OK, great. I'll wait for the packages and then test again. Thanks.
User avatar
Roy_043
Veteran
Posts: 8580
Joined: Thu Dec 27, 2018 12:28 pm

Re: [Draft] Issues with snapping

Post by Roy_043 »

Apparently the bug has a different cause:
https://forum.freecadweb.org/viewtopic.php?f=23&t=40400
User avatar
regis
Posts: 751
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: [Draft] Issues with snapping

Post by regis »

Draft snap issues with snapping to circle edges
This is the error message i get

Code: Select all

<class 'NameError'>
Traceback (most recent call last):
  File "C:\Users\regis\Downloads\FreeCAD_0.19.20943-Win-Conda_vc14.x-x86_64\Mod\Draft\draftguitools\gui_lines.py", line 103, in action
    self.point, ctrlPoint, info = gui_tool_utils.getPoint(self, arg)
  File "C:\Users\regis\Downloads\FreeCAD_0.19.20943-Win-Conda_vc14.x-x86_64\Mod\Draft\draftguitools\gui_tool_utils.py", line 216, in get_point
    point = Gui.Snapper.snap(args["Position"],
  File "C:\Users\regis\Downloads\FreeCAD_0.19.20943-Win-Conda_vc14.x-x86_64\Mod\Draft\draftguitools\gui_snapper.py", line 323, in snap
    return self.snapToObject(lastpoint, active, constrain,
  File "C:\Users\regis\Downloads\FreeCAD_0.19.20943-Win-Conda_vc14.x-x86_64\Mod\Draft\draftguitools\gui_snapper.py", line 421, in snapToObject
    snaps.extend(self.snapToAngles(edge))
  File "C:\Users\regis\Downloads\FreeCAD_0.19.20943-Win-Conda_vc14.x-x86_64\Mod\Draft\draftguitools\gui_snapper.py", line 946, in snapToAngles
    cur = Vector(math.sin(ang) * rad + pos.x,
NameError: name 'Vector' is not defined
Attachments
Snipaste_2020-05-10_10-08-08.png
Snipaste_2020-05-10_10-08-08.png (56.46 KiB) Viewed 824 times
Snipaste_2020-05-10_10-06-49.png
Snipaste_2020-05-10_10-06-49.png (94.32 KiB) Viewed 824 times
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: [Draft] Issues with snapping

Post by carlopav »

regis wrote: Sun May 10, 2020 2:09 pm Draft snap issues with snapping to circle edges
This is the error message i get

Code: Select all

<class 'NameError'>
Traceback (most recent call last):
  File "C:\Users\regis\Downloads\FreeCAD_0.19.20943-Win-Conda_vc14.x-x86_64\Mod\Draft\draftguitools\gui_lines.py", line 103, in action
    self.point, ctrlPoint, info = gui_tool_utils.getPoint(self, arg)
  File "C:\Users\regis\Downloads\FreeCAD_0.19.20943-Win-Conda_vc14.x-x86_64\Mod\Draft\draftguitools\gui_tool_utils.py", line 216, in get_point
    point = Gui.Snapper.snap(args["Position"],
  File "C:\Users\regis\Downloads\FreeCAD_0.19.20943-Win-Conda_vc14.x-x86_64\Mod\Draft\draftguitools\gui_snapper.py", line 323, in snap
    return self.snapToObject(lastpoint, active, constrain,
  File "C:\Users\regis\Downloads\FreeCAD_0.19.20943-Win-Conda_vc14.x-x86_64\Mod\Draft\draftguitools\gui_snapper.py", line 421, in snapToObject
    snaps.extend(self.snapToAngles(edge))
  File "C:\Users\regis\Downloads\FreeCAD_0.19.20943-Win-Conda_vc14.x-x86_64\Mod\Draft\draftguitools\gui_snapper.py", line 946, in snapToAngles
    cur = Vector(math.sin(ang) * rad + pos.x,
NameError: name 'Vector' is not defined
thanks for reporting, fixed here: https://github.com/FreeCAD/FreeCAD/pull/3457
follow my experiments on BIM modelling for architecture design
User avatar
regis
Posts: 751
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: [Draft] Issues with snapping

Post by regis »

carlopav wrote: Sun May 10, 2020 2:50 pm thanks for reporting, fixed here: https://github.com/FreeCAD/FreeCAD/pull/3457
Thanks a bunch, looking forward to the updates, it was already a pain to play with everything.
Post Reply