Sketcher grid : fundamental change

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Sketcher grid : fundamental change

Post by GeneFC »

I never use the grid, so I do not care what happens here.

However, I wonder about the utility of a "grid" that constantly self-adjusts. How does that remain a "grid"?

Yes, there are a bunch of lines, but what do they mean? How can someone select the correct grid location or move a specific distance?

Gene
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Sketcher grid : fundamental change

Post by adrianinsaval »

The idea is that it'll be a sensible size (1, 10, 100, etc. personally I would love to see intermediate 2, 20, etc. steps too) for the current zoom level, it might be worth adding some indication of what is the current grid size is.
drmacro
Veteran
Posts: 8869
Joined: Sun Mar 02, 2014 4:35 pm

Re: Sketcher grid : fundamental change

Post by drmacro »

I'm with @GeneFC I don't use the grid in Sketcher.

It seems to go against the constraint based concept of the sketcher. And, it gives new users a false idea that two vertexes on the same grid intersection are coincident, adding to the frustration of "shape not closed" when they attempt to Pad/Pocket/etc.

But, there are definitely folks who find it an indispensable tool. I think the expansion/contraction to the bounds of the existing geometry is actually a great feature (assuming it still works that way, as noted I have it turned off). The Blender way introduces the clipping window into the equation, which is a source of frustration in Blender (at least for me...).

As long as it can still be turned off and off by default, again, I'm with GeneFC...I'll have it turned off. :mrgreen:

Now the Draft grid is a different discussion. 8-)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Sketcher grid : fundamental change

Post by openBrain »

abdullah wrote: Tue Nov 15, 2022 12:38 pm @openBrain
Would you like to review this PR?
Will probably do (depending on spare time :P).
User avatar
pathfinder
Posts: 315
Joined: Mon Oct 04, 2021 10:27 am

Re: Sketcher grid : fundamental change

Post by pathfinder »

GeneFC wrote: Tue Nov 15, 2022 3:47 pm I never use the grid, so I do not care what happens here.

However, I wonder about the utility of a "grid" that constantly self-adjusts. How does that remain a "grid"?

Yes, there are a bunch of lines, but what do they mean? How can someone select the correct grid location or move a specific distance?

Gene
It self adjusts in the sense that it changes units depending on zoom factor. Zoom out: millimeters will be replaced by centimeters, then decimeters and so on and vice versa. So if grid snap is active, you can change the sensitivity of it by zooming in or out.

I think the idea is that the current grid size is apparent through context. If you drew an object with a known size, it should be easy to see whether something is centimeters or millimeters. Worst case, you have a "Grid spacing: mm" line in the corner somewhere.

I personally don't use the grid in FC, but that may be because current solutions are bad and obtrusive. I agree with @drmacro that grid snap goes somewhat against a constraints based system and that it may lead to overlooked open sketches if not handled properly, but I think that the grid does have utility as a visual aid. Especially in more complex sketches, the solver sometimes can't handle objects being too far from their desired size and/or position when applying constraints and a grid (with or without snap) may help to draw objects closer to their end state before applying constraints.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Sketcher grid : fundamental change

Post by GeneFC »

I don't use the grid, but I am not saying it is evil.

Just trying to understand how someone would select a specific grid location when it automatically changes at will. Seems like it would require a new concept of "grid".

Gene
User avatar
paddle
Veteran
Posts: 1392
Joined: Mon Feb 03, 2020 4:47 pm

Re: Sketcher grid : fundamental change

Post by paddle »

The grid doesn't change from the user perspective. It's not moving weirdly or anything.

It is just drawn differently. ie it is drawn only where the camera views so that it always fills the viewer and don't draw thousands of useless lines in some cases.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Sketcher grid : fundamental change

Post by GeneFC »

paddle wrote: Wed Nov 16, 2022 4:31 pm The grid doesn't change from the user perspective. It's not moving weirdly or anything.
That is fine.

However, several folks here have mentioned adjusting the grid to show different distances between grid lines. Seems difficult to use.

If your proposal is only for a proper fill of the window that is great.

Gene
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Sketcher grid : fundamental change

Post by adrianinsaval »

GeneFC wrote: Wed Nov 16, 2022 4:25 pm Just trying to understand how someone would select a specific grid location when it automatically changes at will. Seems like it would require a new concept of "grid".
are you specifically referring to the auto resizing functionality or did you understood the proposal here as if the grid would be static while you move/zoom on the 3d view?
Here's a demo comparing master (left) to the PR (right), with auto resize:
grid-auto.webm
(638.12 KiB) Downloaded 22 times
the grid resizes but in a very intuitive way (powers of the number of subdivisions), one has to be mindful of the current zoom scale if using the grid as guidance though, it may be a good idea to show the grid size in the status bar. It is important to note that this behavior is completely optional.
with fixed size:
gird-fixed.webm
(993.73 KiB) Downloaded 12 times
very similar to master branch but much better by having major and minor lines and always covering the viewport instead of being always at the origin and bound to the existing geometry size.
and here a demo when the view is tilted in case you are interested:
grid-tilt.webm
(661.86 KiB) Downloaded 12 times
maybe not perfect but still a big improvement over master IMO, sketching is mostly done from a perpendicular view anyways.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Sketcher grid : fundamental change

Post by GeneFC »

adrianinsaval wrote: Wed Nov 16, 2022 7:20 pm one has to be mindful of the current zoom scale if using the grid as guidance though,
That is exactly my point. It would be very easy to try to move, say, two grid spaces and not notice that now it should really be four.

To use the popular explanation for everything around here, "That would be unfriendly for newbies".

Gene
Post Reply