Retracting and disappearing grid in Sketcher

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
Frotz
Posts: 105
Joined: Thu Jun 21, 2018 1:52 am

Retracting and disappearing grid in Sketcher

Post by Frotz »

Over the past few weeks I've noticed an ongoing problem with the sketcher grid disappearing as I zoom in. This is another one of those things that took a few weeks to figure out just how to trigger it. Here is how I created the test file attached here and to make the bug show itself.

Go into Part Design and create a Part. Then make a Body within that Part. Make the body active and create a sketch within on the X-Y axis. Draw a square about the origin. Select two diagonally-opposite corners and then the origin. Click "Constrain Symmetrical". Make two adjacent sides equal to each other. Constrain one side to 100mm. The sketch should now be fully-constrained. Pad this to 10mm. Select the left face of the slab created and create a sketch there. Draw a square of 5mm and symmetrically constrain the origin to between two horizontal points. The square should be on the slab, not hanging off the top or bottom. Close the sketch and click Pocket to make a groove through the whole body. Now the stage is set.

Open the sketch again and select it in the combo window. Go down to the Attachment Offset for this sketch and increase the X offset to 10mm. Zoom in. Watch as the grid retracts right. The grid retracts faster the higher the X offset is set. Zoom out so you can see the whole slab. Now set the X offset to a negative value. The grid will retract to the left. The same goes for the Y offset with the grid retracting up if positive and down if negative. I don't see any disappearing gridlines if I alter the Z offset.
grid1.png
grid1.png (159.28 KiB) Viewed 562 times
grid2.png
grid2.png (158.8 KiB) Viewed 562 times
grid3.png
grid3.png (157.19 KiB) Viewed 562 times

Code: Select all

OS: Debian GNU/Linux 12 (bookworm) (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.21.0.32637 (Git)
Build type: Release
Branch: master
Hash: 7fa7cb7f0b222864be7416c683166876eab190bc
Python 3.11.2, Qt 5.15.8, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * Pyramids-and-Polyhedrons
  * sheetmetal 0.2.63
  * freecad.gears 1.0.0
  * Assembly4 0.12.6
  * A2plus 0.4.60k
  * fasteners 0.4.55
  * Manipulator 1.5.0
Attachments
retracting-grid.FCStd
(17.85 KiB) Downloaded 10 times
User avatar
Shalmeneser
Veteran
Posts: 9560
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Retracting and disappearing grid in Sketcher

Post by Shalmeneser »

I never use the grid, but :
* You don't really need a Std_Part here
* You should not sketch upon face : TNP
* You should use Sketcher_CreateRectangle_Center
Attachments
retracting-grid_SHALM.FCStd
(13.93 KiB) Downloaded 5 times
Last edited by Shalmeneser on Thu Mar 30, 2023 11:06 am, edited 1 time in total.
Frotz
Posts: 105
Joined: Thu Jun 21, 2018 1:52 am

Re: Retracting and disappearing grid in Sketcher

Post by Frotz »

I can see not needing a Std_Part. I don't see what using a centered rectangle has to do with this. On sketching upon a face, how is one to model multiple passes of a router on two or more faces of a piece of wood? Are the sketches you do for cutting pockets just floating around out there?

Finally, what's going on with the grid here?
chrisb
Veteran
Posts: 54197
Joined: Tue Mar 17, 2015 9:14 am

Re: Retracting and disappearing grid in Sketcher

Post by chrisb »

No problem here.
1) I have seen issues with the grid and the graphics card or its driver. You may try something different there, or even try Software OpenGL.
2) What Grid spacing do you use? Auto and 10mm work both well here.

Code: Select all

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.21.0.32532 (Git)
Build type: Release
Branch: master
Hash: 20e44eba50e1365b9e7bb9c5c244afe96a627a28
Python 3.10.10, Qt 5.15.8, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: C/Default (C)
Installed mods: 
  * FC_SU
  * DynamicData 2.46.0
  * freecad.gears 1.0.0
  * FeedsAndSpeeds 0.5.0
  * dxf-library
  * fcgear 1.0.0
  * fasteners 0.4.54
  * sheetmetal 0.2.62
  * ExplodedAssembly
  * Curves 0.6.8
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Shalmeneser
Veteran
Posts: 9560
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Retracting and disappearing grid in Sketcher

Post by Shalmeneser »

Frotz wrote: Thu Mar 30, 2023 7:37 am 1) I don't see what using a centered rectangle has to do with this.
2) On sketching upon a face, how is one to model multiple passes of a router on two or more faces of a piece of wood? Are the sketches you do for cutting pockets just floating around out there?
3) Finally, what's going on with the grid here?
3) I never use the grid, so dunno.
1) nothing, but do you know this tool ?
2) Basic_Attachment_Tutorial
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Retracting and disappearing grid in Sketcher

Post by openBrain »

Shalmeneser wrote: Thu Mar 30, 2023 5:25 am I never use the grid, but :
* You don't really need a Std_Part here
* You should not sketch upon face : TNP
* You should use Sketcher_CreateRectangle_Center
Shalmeneser wrote: Thu Mar 30, 2023 10:07 am 3) I never use the grid, so dunno.
1) nothing, but do you know this tool ?
2) Basic_Attachment_Tutorial
Please help keep focus. A problem has been reported and we need to analyze it appropriately. Then you can derail the topic. Thanks. ;)
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Retracting and disappearing grid in Sketcher

Post by openBrain »

Frotz wrote: Thu Mar 30, 2023 7:37 am Finally, what's going on with the grid here?
I couldn't reproduce too so I'll second @chrisb for probably a graphics issue.
Post Reply