操作栅格和参考线

您正在阅读的是 19.0. 版本。关于最新版本,请前往 操作栅格和参考线 阅读 24 版本

The PCB editor is a grid-based design environment - design objects are placed on what is referred to as the placement, or snap grid. Multiple snap grids can be defined, and these can be restricted to a specified area if required. Snap grids are prioritized, with the highest priority grid available at the current location, being applied automatically. Snap grids can also be restricted to Components or Non-Components.

Also, snap guides can be freely placed and provide a handy visual cue for object alignment.

This page describes how to configure snap grids and snap guides in your PCB document.

As well as snap grids and snap guides, the PCB editor includes a number of additional snap features, designed to help you accurately position and align design objects. Together, these features are referred to as the Unified Cursor-Snap System. Refer to the Working with the Cursor-Snap System page to learn more.

Imperial or Metric Grid?

Traditionally, the grid was selected to suit the component pin pitch and the routing technology that you planned to use for the board, i.e. how wide do the tracks need to be, and what clearance is needed between tracks. The basic idea is to have both the tracks and clearances as wide as possible to lower the fabrication costs and improve reliability. Of course, the selection of track/clearance is ultimately driven by what can be achieved on each design, which comes down to how tightly the components and routing must be packed to get the board placed and routed.

Over time, components and their pins have dramatically shrunk in size, as has the spacing of their pins. The component dimensions and the spacing of their pins have moved from being predominantly imperial with thru-hole pins to more-often being metric dimensions with surface mount pins. If you are starting a new board design, unless there is a strong reason, such as designing a replacement board to fit into an existing (imperial) product, you are better off working in metric. Why? Because the older, imperial components have big pins with lots of room between them. On the other hand, the small, surface mount devices are built using metric measurements – they are the ones that need a high level of accuracy to ensure that the fabricated/assembled/functional product works and is reliable. Also, the PCB editor can easily handle routing to off-grid pins, so working with imperial components on a metric board is not onerous.

User-Definable Grids

Any number of user-defined grids can be configured for the design space with all grid management performed from within the Grid Manager region of the Properties panel (accessed when there are no design objects currently selected in the design space). Use the controls available to define custom local grids by which to place design objects - especially components - with greater precision.

The Grid Manager region of the Properties panel is command central for defining and organizing the grids for use with your board.
The Grid Manager region of the Properties panel is command central for defining and organizing the grids for use with your board.

Grid Types

The software supports the creation of two custom grid types: Cartesian (traditional vertical/horizontal grid) and Polar (circular grid).

  • Cartesian Grid - create a new grid of this type using the Add Cartesian Grid command (available from the  button, as described earlier). A new grid entry will appear in the list, initially with the default name New Cartesian Grid. To edit the grid, double-click on its entry or select its entry and click the  button. The Cartesian Grid Editor dialog will open presenting options with which to define the grid.

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

  • Polar Grid - create a new grid of this type using the Add Polar Grid command (available from the  button, as described earlier). A new grid entry will appear in the list, initially with the default name New Polar Grid. To edit the grid, double-click on its entry or select its entry then click the  button. The Polar Grid Editor dialog will open presenting options with which to define the grid.

    Example Polar grid definition using the Polar Grid Editor dialog and resulting appearance in the design space.Example Polar grid definition using the Polar Grid Editor dialog and resulting appearance in the design space.

Quickly access the relevant editor for a defined grid in the design space by hovering the cursor over an area of the board using that grid (do not click in the design space prior to launching the command) and either pressing the Ctrl+G keyboard shortcut or using the keyboard shortcut, then choosing the Grid Properties entry on the subsequent pop-up menu.

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. Note that the default grid always applies to the entire design space even though it is only displayed over the board shape.

Global Board Snap Grid - used in any area of the board where a custom local grid has not been defined.Global Board Snap Grid - used in any area of the board where a custom local grid has not been defined.

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.

Defining the Purpose of a Grid

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

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

Definition of how a grid can be used (its purpose or application) is performed using the Comp and Non Comp options associated with that grid's entry in the Grid Manager region of the Properties panel, in accordance with the following table:

  NON COMP = Cleared NON COMP = Enabled
COMP = Cleared Grid is not visible but still applied in accordance with the current snap behavior settings Grid visible and applied for all non-component object actions
COMP = Enabled Grid is only visible and applied during component actions Grid is visible and applied for actions on all kinds of objects

Use the Comp and Non Comp options to determine local grid application.Use the Comp and Non Comp options to determine local grid application.

  • When specifying a component-only grid (Non Comp option disabled, Comp option enabled), the grid will only display when performing a component-based action, such as moving a component.
  • The visibility of the default snap grid does not determine if it is being applied, that is controlled by the current snap grid behavior settings.

Defining the Grid Display

For any custom grid you define, as well as the Global Board Snap Grid, options are provided to control how the grid is presented visually in the design space. Two levels can be defined:

  • Fine - the fine-level display grid is for when you are more zoomed-in. The grid markers for this level of grid display follow directly the defined step sizes for the grid.
  • Coarse - the optional coarse-level display grid comes into play as you zoom out. The grid markers for this level of grid display are based on a specified multiple of the defined step sizes.

Example Cartesian grid with fine- and coarse-level display grids presented in the design space. Left: Fine-level displayed using dots, coarse-level using Lines. Right: Both fine- and coarse-level grids displayed using Lines.Example Cartesian grid with fine- and coarse-level display grids presented in the design space. Left: Fine-level displayed using dots, coarse-level using Lines. Right: Both fine- and coarse-level grids displayed using Lines.

Individual grid display coloring is defined when editing a grid in the relevant grid editor (Cartesian Grid Editor dialog or Polar Grid Editor dialog). Alternatively, a single nominated color can quickly be assigned for the Fine and Coarse display grids in the Grid Manager region of the Properties panel. To do this, click the color swatch in the grid's associated Color field then choose the required color from the subsequent color palette that appears.
Fine and Coarse display grid colors can be reset to a specified default color by clicking the Reset to Default link in a grid editor. Default coloring is defined in the General Settings region on the View Options tab of the View Configuration panel. Click the color swatch to the right of the Show Grid option then choose the required color from the color palette that appears. Note that this single default color will be used for both Fine and Coarse display grids. Note also, that changing the color here will affect only the default Global Board Snap Grid. Existing custom grids will retain the display colors set for them - only reverting to this new color if the Reset to Default link is used.

Nesting and Grid Priority

The local grids you define in the Grid Manager region of the Properties panel 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 the placement of design objects as you layout your board.

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 you create and define 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 50 - a low enough priority setting to ensure that it has the lowest 'snapping priority' of all defined grids.

In the design space, 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 the 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.An example of three nested Polar grids. The Yellow Polar Grid has the highest priority and appears on top. The Red Polar Grid is the 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.

The priority of the Global Board Snap Grid cannot be changed; it is fixed to always have a priority of 50.

Disabling a Grid

There may be occasions where a grid is not needed while placing or moving a particular design object. Rather than deleting the grid (since it may be needed again later in the same or different area of the board), it can be 'hidden' in the design space. This can be achieved by disabling the grid's associated Comp and Non Comp attributes in the Grid Manager region of the Properties panel.

Disable a local grid to effectively hide it, therefore preventing objects from snapping to it. Using the nested grids example, the Red Polar grid has been disabled. As the grid has not been deleted, you can re-enable and use it again when needed without having to redefine it!Disable a local grid to effectively hide it, therefore preventing objects from snapping to it. Using the nested grids example, the Red Polar grid has been disabled. As the grid has not been deleted, you can re-enable and use it again when needed without having to redefine it!

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 by disabling the Show Grid option in the General Settings region on the View Options tab of the View Configuration panel.

Deleting a Grid

Custom grids can be deleted by selecting their corresponding entry in the Grid Manager region of the Properties panel then clicking the  button. You will be asked to confirm the deletion. Click Yes to do so.

Remember that the default Global Board Snap Grid cannot be deleted.

Snap Guides

Snap Guides are special objects that are manually placed specifically for the purpose of driving the cursor-snap on a certain axis or point - assisting in object/component placement. They can also serve as a visual indicator for general layout or alignment purposes. The following types of snap guides are supported:

  • Linear Guide - a line-style guide that can be horizontal, vertical or +/- 45 Degrees.
  • Point Guide - a point-style guide offering finer control over object placement. It is simply a hotspot that is manually marked within the confines of a defined grid.

Any number of snap guides can be defined for the design space with controls for placement and management available from the Guide Manager region of the Properties panel (accessed when there are no design objects currently selected in the design space). While controls are available for adding new snap guides from within this region (from the  button), it is far easier to visually add them (from the  button) directly in the design space then fine-tune them as required.

Snap Guides can also be placed using commands available from the Place » Work Guides sub-menu.

Snap Guides behave in the same manner as the snap grid. The cursor will snap to a guide as it passes when an object is being moved.

The Guide Manager region of the Properties panel is command central for managing visual placement guides for use in the design space. These are examples of the various Snap Guides available to assist object placement.The Guide Manager region of the Properties panel is command central for managing visual placement guides for use in the design space. These are examples of the various Snap Guides available to assist object placement.

During an interactive process such as placing or moving, the cursor will snap to a placed Linear Guide at the point where that guide intersects a defined grid. Using a Linear Guide, objects can quickly be aligned by dragging them until they 'snap' against the guideline. For a Point Guide, the hotspot for the object being moved will 'snap' to the guide when it passes into close proximity with it.

It can be easier to visually locate a Point Guide when the grid display is set to Dots.

Disabling a Guide

There may be occasions where a snap guide is not needed while placing or moving a particular design object. Rather than deleting the guide (since it may be needed again later in the same or different area of the board), it can be 'hidden' in the design space. This can be achieved by disabling the guide's associated Enabled attribute in the Guide Manager region of the Properties panel.

Disable a snap guide to effectively hide it, therefore preventing objects from snapping to it. In this image, the +45 and -45 guides have been disabled. As the guides have not been deleted, you can re-enable and use them again when needed without having to redefine them!Disable a snap guide to effectively hide it, therefore preventing objects from snapping to it. In this image, the +45 and -45 guides have been disabled. As the guides have not been deleted, you can re-enable and use them again when needed without having to redefine them!

Deleting a Guide

To delete a snap guide, select its entry in the Guide Manager region of the Properties panel then click the  button. You will be asked to confirm the deletion. Click Yes to do so.

If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.

软件的功能取决于您购买的Altium产品级别。您可以比较Altium Designer软件订阅的各个级别中包含的功能,以及通过Altium 365平台提供的应用程序所能实现的功能。

如果您在软件中找不到某个讨论过的功能,请联系Altium销售团队以获取更多信息。

Content