Yes, they are equal. See ViewProviderSketch::setEditViewer.- The focal plane is the same as sketch plane ?
Sketcher grid : fundamental change
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Sketcher grid : fundamental change
Re: Sketcher grid : fundamental change
That's why I had asked about the orientation of the grid. In Sketcher I can imagine to show exactly those parts of the grid which would be shown in "Sketcher ViewSketch" mode. And turning it wouldn't change the size. Well, we could even double it.
I'm not sure though if this approach would also work well in Draft. And I really would like to see the same grid in both WBs.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Sketcher grid : fundamental change
I think the fundamental change should just be to do away with it altogether.
If we must have it, then make it as good as it gets.
Just my 2$.
Thanks for the effort, it's good to see people involved.
If we must have it, then make it as good as it gets.
Just my 2$.
Thanks for the effort, it's good to see people involved.
- pathfinder
- Posts: 315
- Joined: Mon Oct 04, 2021 10:27 am
Re: Sketcher grid : fundamental change
I sound like a broken record, but I think taking a look at how Blender does the adaptive grid may be interesting. If you zoom in or out, lines fade in or out and are replaced by other lines. Blender is mostly used in perspective mode, but it also works in orthographic mode or plane mode.
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Sketcher grid : fundamental change
can you share a video and perhaps better explain how it works? not everyone here uses blenderpathfinder wrote: ↑Mon Nov 14, 2022 7:58 pm I sound like a broken record, but I think taking a look at how Blender does the adaptive grid may be interesting. If you zoom in or out, lines fade in or out and are replaced by other lines. Blender is mostly used in perspective mode, but it also works in orthographic mode or plane mode.
Re: Sketcher grid : fundamental change
If you have Curves WB installed, you can give a try at an old unfinished experiment to mimic Blender grid :adrianinsaval wrote: ↑Mon Nov 14, 2022 8:51 pm can you share a video and perhaps better explain how it works? not everyone here uses blender
Code: Select all
from freecad.Curves import grid
grid.main()
Re: Sketcher grid : fundamental change
I would like to keep an option to set the grid size to a given value, as an alternative to automatic grid resizing. Over a given density, I think it makes sense not to draw this fixed grid size (so, if let's say I have a gridsize of 0.40 mm, and I zoom out a lot, I think it should not be drawn, as it is both useless as a grid, and only contributes to slowing down), but redraw it again if, after zoom in, the grid density goes below a given quantity.
Some thoughts:
- If you strictly tie the grid to the camera, you will need to change the grid on every camera change. This may get slow when zooming in/out with the wheel.
- If you want a sketcher specific grid, then the place to code it is in ViewProviderSketch, or better, in a new coinmanager class that encapsulates all the node changes and additions (so a delegate). You may look at the coinmanager classes that handle all the remaining coin operations for inspiration. This helps keep ViewProviderSketch size under control. If you think your approach is good for other WBs, including Draft WB, then you may generalise the code there.
@openBrain
Would you like to review this PR?
Re: Sketcher grid : fundamental change
I'm keeping the fix size capability and it will act as you describe. Auto resize is an option.
I'm currently putting in ViewProviderSketch which was already pretty tought change to do.
Zooming in/on is not a problem there no slow down. I think the problem is more for paning. Though I have some ideas to mitigate that.
Last edited by paddle on Thu Nov 17, 2022 10:29 am, edited 1 time in total.
Support me on Patreon: https://www.patreon.com/FreeCadDevDiary
FreeCad Dev Diary channel:[/b] https://www.youtube.com/channel/UCGMTmJ ... NiPSSEhBHA
FreeCad Dev Diary channel:[/b] https://www.youtube.com/channel/UCGMTmJ ... NiPSSEhBHA
Re: Sketcher grid : fundamental change
I thing that the grid only need to be around the work area to give a sense of proportions when sketching or make some change and need a reference..