i can imagine that the master version will be something like the linux kernel and other surfaces, macro collections, specializations such as mechanical engineering, architecture, commercial support, etc. appear as distributions.ragohix769 wrote: ↑Sat Sep 18, 2021 10:15 am ....
There are a lot of Linux taste and distributions and that's good IMHO, but GNU-Linux it's a kernel (monolitic) and it's just one, and one only. ...
[Bug Solved] Why using generated dot grid instead of grid plane? [for Thomas]
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- thomas-neemann
- Veteran
- Posts: 11958
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
Re: Why using generated dot grid instead of grid plane? [for Thomas]
Re: Why using generated dot grid instead of grid plane? [for Thomas]
I see So there is a serie of issues then, 1st is Snap to Grid fails at some cases, and it is not 3D, etc. etc.ragohix769 wrote: ↑Sat Sep 18, 2021 9:34 am Nope, the problem is that snap to grid just for now it's not working (in DraftWB) if you have an object or a face in front o you. See here:
There are developers working on Draft. Maybe other users can do is to suggest best practice, submit Feature Request, debugging etc. Unfortunately, these features in Draft is too advanced for me
Can you search if there is similar report / request / do some feature request in the Mantis Bugtracker ?
Hope the community would help the development of the Draft, Arch & BIM workbench.
Re: Why using generated dot grid instead of grid plane? [for Thomas]
In my opinion it is a bug and it's caused here:
https://github.com/FreeCAD/FreeCAD/blob ... er.py#L485
self.spoint is the cursor position in the space.
But that's not correct: snapToObject should return None, and then the upper method snap() should handle the case, checking for extension and grid snaps before assuming the snapped point is self.spoint.
I'm attaching the modified version of Snapper.py to be substituted in \Mod\Draft\draftguitools
I would higly appreciate some extensive test before going for a PR (https://github.com/FreeCAD/FreeCAD/comp ... d?expand=1).
https://github.com/FreeCAD/FreeCAD/blob ... er.py#L485
Code: Select all
def snapToObject(self, lastpoint, active, constrain,
eline, point, oldActive):
[...]
if not snaps:
self.spoint = self.cstr(lastpoint, constrain, point)
self.running = False
if self.trackLine and lastpoint:
self.trackLine.p2(self.spoint)
self.trackLine.color.rgb = Gui.draftToolBar.getDefaultColor("line")
self.trackLine.on()
return self.spoint
But that's not correct: snapToObject should return None, and then the upper method snap() should handle the case, checking for extension and grid snaps before assuming the snapped point is self.spoint.
I'm attaching the modified version of Snapper.py to be substituted in \Mod\Draft\draftguitools
I would higly appreciate some extensive test before going for a PR (https://github.com/FreeCAD/FreeCAD/comp ... d?expand=1).
- Attachments
-
- gui_snapper.py
- (73.13 KiB) Downloaded 44 times
follow my experiments on BIM modelling for architecture design
- thomas-neemann
- Veteran
- Posts: 11958
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
Re: Why using generated dot grid instead of grid plane? [for Thomas]
thank you for the effort.
if i paste it into the python window or create a macro from it, i can't see any effect. I guess I'm doing it wrong. I would like to test it, but need a little guide
Re: Why using generated dot grid instead of grid plane? [for Thomas]
Yes, you arethomas-neemann wrote: ↑Sun Sep 19, 2021 1:15 pm if i paste it into the python window or create a macro from it, i can't see any effect. I guess I'm doing it wrong.
To test it you should download the gui_snapper.py file that you find attached to the previous post and substitute to the one into your FreeCAD folder.
Mine is in C:\Users\myname\Documents\FreeCAD-Source\FreeCAD_compiled\Mod\Draft\draftguitools.
follow my experiments on BIM modelling for architecture design
- thomas-neemann
- Veteran
- Posts: 11958
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
Re: Why using generated dot grid instead of grid plane? [for Thomas]
thanks for the info, i can test it with my windows version, wonderful.
- ragohix769
- Posts: 568
- Joined: Sat Jul 18, 2020 7:04 am
- Location: Rome - Italy
Re: Why using generated dot grid instead of grid plane? [for Thomas]
I'm speachless: IT WORKS!!!!carlopav wrote: ↑Sun Sep 19, 2021 12:05 pm In my opinion it is a bug and it's caused here:
https://github.com/FreeCAD/FreeCAD/blob ... er.py#L485
self.spoint is the cursor position in the space.Code: Select all
def snapToObject(self, lastpoint, active, constrain, eline, point, oldActive): [...] if not snaps: self.spoint = self.cstr(lastpoint, constrain, point) self.running = False if self.trackLine and lastpoint: self.trackLine.p2(self.spoint) self.trackLine.color.rgb = Gui.draftToolBar.getDefaultColor("line") self.trackLine.on() return self.spoint
But that's not correct: snapToObject should return None, and then the upper method snap() should handle the case, checking for extension and grid snaps before assuming the snapped point is self.spoint.
I'm attaching the modified version of Snapper.py to be substituted in \Mod\Draft\draftguitools
I would higly appreciate some extensive test before going for a PR (https://github.com/FreeCAD/FreeCAD/comp ... d?expand=1).
(it appear to be working, at least, I'm with KDE on Linux)
I've tested too with an image imported to retrace lines over... It's working!
It was a bug so simple to solve, it's incredbile that till now noboby solved it. Really really BIG thank you!
GRAZIE, sei un grande!
[the only problem, if we can name it this way, it's that if you pass mouse over an object now he auto select it even without clicking changing his color, that's can be a problem with some color contrast so you cannot see sometimes snapping points]
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
- thomas-neemann
- Veteran
- Posts: 11958
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
- ragohix769
- Posts: 568
- Joined: Sat Jul 18, 2020 7:04 am
- Location: Rome - Italy
Re: Why using generated dot grid instead of grid plane? [for Thomas]
No more artificial generated dot grid to have the right snapping
I'm very happy, thanks another time Carlo. And go on for PR
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
Re: [Bug Solved] Why using generated dot grid instead of grid plane? [for Thomas]
Great! thanks a lot for testing.
Here the PR
Here the PR
follow my experiments on BIM modelling for architecture design