Custom Local Grid

Old Content - visit altium.com/documentation

Parent page: Objects


Cartesian and Polar-based local grids.

Summary

User-defined Cartesian and/or Polar-based local grids can be used to place design objects – especially components – with greater precision. Each grid-type is fully customizable using a dedicated editing dialog. Define where in the workspace the grid is to be located, the step size of the grid, the extent of the grid and two levels of visual display for the grid. In addition, a grid can be made available for use with  component and/or non-component objects.

Availability&Placement

The user-defined grids can only be defined and managed from within the Grid Manager dialog.

The cursor will only snap to a defined grid provided the option Snap To Grids is enabled, in the Snap Options region of the Board Options dialog.

Non-Graphical Editing

The following methods of non-graphical editing are available:

...via an Associated Properties Dialog

This method of editing uses the following dialog to modify the properties of a Grid object.

The Grid Manager dialog can be accessed in following ways:

Using the Grids command on the menu associated to the Snap button, at the bottom-right of the main design window.

  • Using the G,M shortcuts.
  • Using the Tools » Grid Manager command.
  • Clicking the Grids button in the Board Options dialog.
  • Using the View » Grids » Grid Manager command.
  • Right-clicking in the workspace and using the Snap Grid » Grid Manager command.

Creating and Defining a Cartesian Grid

To create a new Cartesian-type grid use the Add Cartesian Grid command – available from the dialog's main menu or right-click menu – or press the R key. A new grid entry will appear in the list, initially with the default name New Cartesian Grid.


Example addition of a new Cartesian grid.

A Cartesian grid is distinguished in the list of existing grids by the letter C, to the left of the grid name field.

To edit the grid, simply double-click on its entry, or select its entry and use the Properties command accessible through the dialog's menus. The Cartesian Grid Editor dialog will appear presenting options with which to define the grid.


Example Cartesian grid definition, using the Cartesian Grid Editor dialog, and resulting appearance in the workspace.

Creating and Defining a Polar Grid

To create a new Polar-type grid use the Add Polar Grid command – available from the Grid Manager dialog's main menu or right-click menu – or press the P key. A new grid entry will appear in the list, initially with the default name New Polar Grid.


Example addition of a new Polar grid.

A Polar grid is distinguished in the list of existing grids by the letter P, to the left of the grid name field.

To edit the grid, simply double-click on its entry, or select its entry and use the Properties command accessible through the dialog's menus. The Polar Grid Editor dialog will appear presenting options with which to define the grid.


Example Polar grid definition, using the Polar Grid Editor dialog, and resulting appearance in the workspace.

Default Snap Grid

A default snap grid is defined for the board, named Global Board Snap Grid. This is the grid that is used for object placement and movement in any area of the board not covered by a dedicated local grid.


Global Board Snap Grid – used by default wherever no customized local grid is present.

The default grid is a Cartesian-type grid. The step size and/or display for the grid can be modified, but the grid cannot be renamed, disabled, or deleted.

Quickly shift focus to the default snap grid, within the list of defined grids, using the 0 (zero) key.

Duplicating a Grid

To aid the designer in quickly building a set of local grids, the Grid Manager dialog supports the ability to duplicate grids. Simply select one or more custom grids in the existing list of grids and use the Duplicate Selected Grids command from the dialog's menus. Exact copies of those grids are created and added to the list, distinguished by the suffix (Copied) in their name.

The default snap grid (Global Board Snap Grid) cannot be used as a source of duplication.

Defining Grid Purpose

A defined local grid can be used in a variety of situations:

  • In the placement of non-component objects only.
  • In the placement of components only.
  • In the placement of both non-component objects and components.

Definition of how a grid can be used – its purpose or application – is performed using the Non Comp and Comp checkboxes, associated with that grid's entry in the Grid Manager dialog. Use these checkboxes to determine how a custom local grid is to be used, for non-components and/or components, as required.

The default snap grid is always enabled for use with components and non-components (both checkboxes checked).
When specifying a component-only grid (Non Comp unchecked, Comp checked), the grid will only display when performing a component-based action, such as moving a component for example.

Defining Grid Display

For any custom grid defined, as well as the Global Board Snap Grid, options are provided to control how the grid is presented visually in the workspace. Two levels can be defined – Fine and Coarse. The fine-level display grid is used when zoomed-in. The grid markers for this level of grid display follow directly the defined step sizes for the grid. The optional coarse-level display grid comes into play when zooming out. The grid markers for this level of grid display are based on a specified multiple of the defined step sizes.

When choosing a color for this level of grid, a completely different color to that used for the fine-level display grid can be used. Alternatively, quickly employ a lighter or darker shade of the color currently used for the fine-level display grid, using the available Lighter or Darker links respectively. 

Grid colors can be reset back to their defaults using the Reset to Default link. To effectively disable display of a grid, simply choose the option Do Not Draw.

Although individual grid display coloring is defined when editing a grid in the specific grid editor, a single nominated color can quickly be assigned for the fine- or coarse-level display grids – on a global level to all defined grids, including the default grid – from within the Grid Manager dialog. To do this, simply use the Set Fine Color for All or Set Coarse Color for All commands from the dialog's menus, then choose the required color from the subsequent Choose Color dialog.

The default display colors – assigned to Fine and Coarse display grids when the Reset to Default link is clicked in a grid editor, or the Reset All To System Grid Colors command is issued from the Grid Manager dialog – are defined in the System Colors region, on the Board Layers And Colors tab of the View Configurations dialog. Specifically, the default fine-level display grid color is specified using the Default Grid Color - Small option, and the default coarse-level display grid color is specified using the Default Grid Color - Large option.

Nesting and Grid Priority

Grids defined in the Grid Manager dialog can be freely stacked within the board area. By specifying origin coordinates accordingly grids can be overlapped, creating a nested hierarchy of grids, with which to fine tune placement of design objects during board layout.

Grid contention – which grid in an overlapping stackup of grids should a design object snap to – is resolved using a priority system. Each local placement grid created and defined is given a numbered priority. By default, each new grid is given the highest priority of 1, with all existing grids moved down in priority accordingly.

The Global Board Snap Grid is an exception. As it is the default grid that is used in all areas of the board that are not 'covered' by defined custom grids, it is given the priority setting of Default. It has the lowest 'snapping priority' of all defined grids.

In the workspace, priority is distinguished by drawing order. The highest priority grid (priority 1) will be drawn in front of all other grids, then the grid with priority level 2, and so on, down to the default Global Board Snap Grid, which is drawn behind all other custom grids.


An example of three nested Polar grids. The Yellow Polar Grid has the highest priority and appears on top. The Red Polar Grid is next priority, appearing behind the yellow grid, but in front of the aqua grid. The default grid appears behind all of these grids, as all custom grids take precedence over it in the priority stakes.

Change the priority for a grid by selecting it in the list and using the Increment Priority and Decrement Priority commands (available from the dialog's menus) as required. A number of keyboard shortcuts are also available for setting the priority:

  • U or Ctrl+Up Arrow – increase the priority of the focused grid.
  • D or Ctrl+Down Arrow – decrease the priority of the focused grid.
  • H or B – make the currently focused grid the highest priority (i.e. 1).

The priority of the Global Board Snap Grid cannot be changed – it is fixed to always have the lowest priority.

The number keys 1-9 can be used to quickly focus the grid with the corresponding numeric priority.

Disabling a Grid

There may be occasion where a grid isn't needed while placing or moving a particular design object. Rather than deleting the grid – it may be needed again later, in the same or different area of the board – it can simply be 'hidden' from the workspace. This can be achieved by un-checking the grid's associated Non Comp and Comp attributes in the Grid Manager dialog.

The default Global Board Snap Grid is permanently enabled, as this is the default grid that is used when no local grid has been defined for an area of the board. However it, and all defined grids, can be hidden from within the View Configurations dialog, by disabling the Show option for the Default Grid Color - Small and Default Grid Color - Large options.

The Non Comp attribute can be quickly toggled for the focused grid using the Spacebar. In addition, commands available from the dialog's menus allow the designer to quickly Enable All Custom Grids or Disable All Custom Grids respectively.

The Enable All Custom Grids and Disable All Custom Grids commands act on the Non Comp attribute only. If a grid is set for use as a component grid also (Comp attribute checked), this setting will remain unchanged by use of these commands. Manually uncheck this attribute to fully disable ('hide') a grid.

Exporting and Importing Grids

The Grid Manager dialog provides controls for exporting and importing defined grids, so that preferred grids can always be accessed and used across different designs. Grid information is stored in a PCB Grid file (*.PCBGrid).

To export specific grids, select the grids and use the Export Selected command from the dialog's menus. To export all grids, use the Export All command. Use the subsequent Save PCBGrid dialog to determine where, and under what name, the file is to be saved.


Example PCB Grid file, containing definitions for exported grids.

The default grid (Global Board Snap Grid) can be exported and imported, just like any other defined custom grid.

To import grids, simply use the Import Grids command from the Grid Manager dialog's menus. Use the Load Custom Grid dialog to browse to, and open, the required PCB Grid file. The grids will be added to the list of existing grids.

Importing grids with the same name as any existing grids will not overwrite those existing grids. The imported grids will simply be added to the list. The exception is the Default grid. The existing Default grid will be overwritten with the definition for it in an imported PCB Grid file.

The ability to export and import grid definitions plays a valuable role in the PCB Library Editor domain, since grids defined in the Editor only apply to the current component. Simply define grids once, for a single component, then export them and import them to all other components as required.

Deleting a Grid

Custom grids can be deleted simply by selecting their corresponding entry in the Grid Manager dialog and using the Delete command from the dialog's menus. Remember that the default Global Board Snap Grid cannot be deleted.

You are reporting an issue with the following selected text and/or image within the active document: