Grid extents bug

Sunday morning, and I found a bug!

  1. Open 6 SR16 / Windows 10 Pro.

  2. Create a new document: Small Objects - Millimeters

  3. Select the Top view and zoom out to see the entire grid.

  4. Run _Grid, then:

    1. Change minor line spacing: m, 2

      The grid now is displayed at twice the extents. This is the bug.

    2. Reset extents: e, 100

      The grid goes back to the correct extents. Note that there was no change in grid properties. The extents were already 100.

Well, there is an inconsistency here somewhere - just not sure it’s where you think it is - and it is not an exclusively Rhino 6 bug, I get the same thing happening in V5.

If I open my mm/small template, I have a default grid “extents” of 100. However, that is 100 in either direction from 0, to the total number of gridlines (minor lines) is actually 200. IIRC, that is how Rhino has always been (same in V5 in any case - although at some point in the past I seem to remember the grid line count was 70 by default). Note also that in Doc Properties>Grid, there is no mention of the property “extents” - only “grid line count”. so there is some confusion as to what each term means and how they are related (are they the same?). The Help is not helpful on this point either @KelvinC.

However, it is normal when you increase the minor line spacing, that the overall grid size increases - as the line count remains the same. The grid size has always been determined by # of minor lines * minor line spacing.

What is not normal is that “extents” setting is listed as 100 before you change the grid spacing, and 200 after you change the grid spacing, when in fact the number of grid lines has not changed. And, when you set the “extents” back to 100 afterward, then, the number of grid lines changes, it is half the number as before, i.e. 50 on either side of 0. Which is inconsistent. Note also that if you change the grid line spacing via the options page and not the command line, the “grid line count” does not change.

What needs to be fixed? First, the definition of “grid line count” needs to be clarified - does it apply to the total grid or just the positive quadrant. Then the relation between the terms “grid line count” and “extents” also needs to be made clear - especially as “extents” only exists as a command line option. Lastly the command line options need to be adjusted to work consistently - my feeling is that the “Extents” option is the one that is not correctly hooked up.

Sorry, if what I wrote was not clear: “Note that there was no change in grid properties. The extents were already 100.”

By that I mean that the numeric value shown is always 100. The grid extents on the viewport change however, and they change back when I overwrite the numeric value with the same unchanged value. If this isn’t a bug, I don’t know what is.

Try it, step by step.

Yest, the number is not changed while you remain in the command (which is correct)

Grid command line before changing grid size:

Grid command after changing grid size but before exiting the command


(the grid overall size has already changed in the viewport)

Exit the the Grid command, then run it again immediately after


Here is where Extents goes wrong.

Edit:
Note that if Extents is defined as quadrant extents (from the plane origin) it is correct initially and wrong after the grid cell size is adjusted. However if it is defined as overall extents (from max negative to max positive) then it is wrong initially and only correct after the grid cell size has been modified. Depends on how “extents” is to be interpreted, which is still an unresolved question.

@feklee @Helvetosaur

http://docs.mcneel.com/rhino/6/help/en-us/index.htm#documentproperties/grid.htm
I updated the topic as…

image

And added two youtrack issues for reducing confusion.

RH-54358 Grid: Extends does not update in real-time
RH-54359 Grid command and Document Properties > Grid have different options

1 Like

RH-54358 is fixed in the latest WIP

1 Like