操作机械层
Even the simplest board needs design detail beyond the tracks and pads that implement the circuit. It might be the board dimensions or the fabrication detail, it might be the component courtyards, or it might be the 3D component models. In Altium Designer, this type of additional information is detailed on Mechanical Layers.
There are two ways mechanical layers can be used, either as:
- An individual mechanical layer, being used for a task that does not apply to a specific side of the board, such as the board outline, or
- As a pair of layers, for detail such as the component courtyard, that applies to a specific side of the board. Since pairs are used for component-related detail, they are called Component Layer Pairs.
These individual/layer pairs can be included in printouts or in fabrication outputs, as required.
Adding Mechanical Layers to the Design
Mechanical layers are added, edited and removed in the View Configuration panel. Their display state is also configured in the panel. Use the button at the bottom-right of the design space then select View Configuration or press the L shortcut key to display the panel.
Right-click anywhere in the Layers region of the panel to display the context menu, providing commands to Add Component Layer Pair (a pairing of two mechanical layers) and Add Mechanical Layer.
Configuration of the component layer pair or mechanical layer is performed using the Edit Layers Pair / Edit Layer dialog. Use the dialog to enter the Layer Pair Name / Layer Name, define Layer Number(s) and assign a Layer Type.
-
When a component layer pair or mechanical layer is added, if the Layer Pair Name / Layer Name is not edited then the software will automatically define the name based on the selected Layer Type, if one is assigned.
-
If the Layer Pair Name / Layer Name is renamed, the Layer Type will appear within parentheses next to the user-defined naming (on the View Configuration panel).
-
When specifying the Layer Number(s), if the desired layer number is already in use, a warning icon will appear next to the chosen layer number (e.g. ) and another layer number will need to be assigned to continue.
To edit an existing component layer pair or mechanical layer, double-click directly on its entry on the View Configuration panel (or right-click on the desired entry and choose Edit Layer from the context menu). Make any changes in the Edit Layers Pair / Edit Layer dialog as needed.
To delete a layer, you can right-click on the desired layer and select Delete Layer. Depending on how the layer is being utilized, you will come across three options:
-
If the layer can not be deleted because it contains component primitives that cannot be removed, an error pop-up will appear to alert you that the action cannot be completed.
-
If the layer is associated with primitives that can be removed, a pop-up will appear to ask for confirmation of the deletion.
- If the layer is not associated with primitives, it will be deleted immediately upon clicking Delete Layer without confirmation.
Layer Types
There are two sets of layer types; one set for component layer pairs, the other for individual mechanical layers. The layer type is configured in the Edit Layer dialog using the Layer Type drop-down. Available layer types are defined below.
Component Layer Pairs
-
Assembly – used to draw/detail assembly data for the component. This layer can be included in a Draftsman Board Assembly View, and can then be selected as the Geometry Source for the components in the Draftsman Component Display Properties dialog. Learn more about Draftsman.
-
Coating – used to define component areas that require a protective coating.
-
Component Center – used to indicate the centroid of the component, providing a visual reference of the location used by the component placement machine, in the assembly documentation.
-
Component Outline – used to define the outline of the component body, representing the area the component occupies on the board.
-
Courtyard – used to define the placement space required for a component. Typically the Courtyard will outline the component and pads, with a suitable clearance buffer ( show image – the green outline is the Courtyard). Learn more about Custom Footprint Creation. The shape defined on the Courtyard layer is also used for component selection, to define the component area, and for collision detection when there is no 3D Body included in the component.
-
Designator – use this layer to place the
.Designator
special string. This layer pair can then be included in assembly drawings that require the component designator to be displayed. Learn more about special strings. -
Dimensions – used to define the dimensional detail required for components.
-
Glue Points – used to define component glue dots.
-
Gold Plating – used to define component selective gold plating requirements.
-
Value – use this layer to place the
.Comment
special string. This layer pair can then be included in assembly drawings that require the component value to be displayed. Learn more about special strings. -
3D Body – use this layer for the 3D model of the component.
-
Die – use this layer for die pads and die 3D bodies when creating a Chip-on-Board component. Refer to the Wire Bonding page to learn more.
-
Wire Bonding – use this layer for bond wires when creating a Chip-on-Board component or directly in a PCB document. Refer to the Wire Bonding page to learn more.
Mechanical Layers
- Assembly Notes – used to detail the component load order and/or important assembly instructions.
- Board – use this layer for board-related instructions or details.
-
Board Shape – use this layer for the overall board outline (board shape).
- Dimensions – used to define the dimensional detail required for the board.
- Fab Notes – used to detail important fabrication notes.
- Route Tool Path – used to indicate the layer that contains the mechanical routing information. Note that a user-defined name is not permitted when using this layer type (show image).
- Sheet – use this layer to define the outer document drawing template border. See details in the Sheet Representation and Settings section below.
- V Cut – used to define V cut details. V cuts are used to split circuit boards by cutting a "v" groove on the top and bottom of a circuit board while leaving a minimum amount of material in place to hold the panel of boards together.
Displaying Mechanical Layers
- Click the visibility icon () next to the layer's name to toggle the display of that mechanical layer on or off, or select the layer name and press the Spacebar (this toggles the display of both layers in a Component Layer Pair).
-
Mechanical layers have an additional display feature; they can be set to remain visible when the display is in Single Layer Mode. Hold Ctrl as you click on the visibility icon of a mechanical layer to enable the Display in Single Layer Mode feature. The visibility icon changes to indicate that this layer has this feature enabled (), Ctrl+Click a second time to disable this mode.
-
Mechanical layers can also be included in the 3D display, when the 3D Settings are using Colors - By Layer. The mechanical layers that are currently configured to be visible, will be displayed, as shown in the image below. The second image of the slideshow below shows the View Options settings.
Exporting and Importing Mechanical Layers
The structure of mechanical layers and component layer pairs added to a PCB can be duplicated to another PCB by exporting that set into a file from the source PCB document and then importing the file to the target PCB document.
-
In the source PCB document where the required structure of mechanical layers and component layer pairs is added, use the Tools » Export Mechanical Layers command from the main menus. Use the Export Mechanical Layers dialog that opens to define the name and the directory for the
*.stackup
file that will contain data about the mechanical layer structure. -
In the target PCB document, use the Tools » Import Mechanical Layers command from the main menus and use the Import Mechanical Layers dialog that opens to select the saved
*.stackup
file. The added structure of mechanical layers and component layer pairs can be seen in the View Configuration panel.
Mechanical Layers and Component Layer Pairs
In some situations, the extra detail included on a mechanical layer is only needed once, for example, assembly notes that detail the component load order and important assembly instructions. In this situation, a standard mechanical layer is added, named, and where possible, has its Layer Type assigned (more on this below).
If the extra detail is required for a component, for example, component courtyard outlines, there needs to be two mechanical layers assigned: one layer holding the courtyard detail when the component is placed on the top side of the board; the other mechanical layer holding that same courtyard detail if the component is flipped to the bottom side of the board.
In this situation, a pair of mechanical layers are added as a Component Layer Pair. When mechanical layers are added as a Component Layer Pair, they are displayed in the Component Layer Pairs section of the View Configuration panel, as shown below.
- Any number of Component Layer Pairs can be defined.
- Layer Pairs can also have a Layer Type assigned.
- In the design space, the two layers in the pair are displayed on separate layer tabs using the naming Top <LayerPairName> and Bottom <LayerPairName> (show image).
- In the PCB library editor, additional design objects required in a component footprint are placed on the top pair layer. When the component is flipped to the bottom side of the board (L shortcut as a component is being moved), the contents of the top layer in the pair are automatically mirrored onto the bottom layer in the pair.
- If a Component Layer Pair defined in the PCB library has the Layer Type assigned, that Layer Pair is automatically created on the PCB when a component using those layers is placed. If the PCB already has a Component Layer Pair of that Layer Type, the contents of those layers are mapped accordingly.
- For Component Layer Pairs defined in the PCB library that do not have a Layer Type assigned in the library, individual mechanical layers are created on the PCB. In this situation, pre-define the Component Layer Pair in the PCB using the same layer numbers before placing the component, as the software will fall back to matching by Layer Number if it is unable to match by Layer Type.
The Advantage of Assigning a Layer Type
A common approach to managing mechanical layer usage is to assign a dedicated layer number for each required mechanical layer function. This approach requires all designers to adhere to the same layer assignment and numbering scheme. It can also create difficulties when components are obtained from other sources that do not follow the same assignment and numbering scheme. If a different scheme has been used, the design objects must be moved from their current mechanical layer to the mechanical layer assigned for that function.
This issue is resolved with the introduction of the Layer Type property. When a component is placed from a library into the PCB editor, or copied from one library to another, or created by the IPC Footprint Wizard, existing Layer Type assignments are automatically matched, regardless of the mechanical layer number(s) assigned to those Layer Types. The objects are relocated on the correct layer(s) according to their Layer Type. If the software is unable to match by Layer Type, it will fall back to matching by Layer Number.
For both individual mechanical layers and Component Layer Pairs, you can select a Layer Type from a pre-defined list of types. The images below show the list of available Layer Types. You can access the dialogs shown below by right-clicking on an individual layer, then selecting the Edit Layer or Add Component Layer command from the menu.
Naming Layers with a Layer Type Assigned
When a Layer Type is assigned, the layer automatically has its Layer Name property changed to be the same as the Layer Type. This can be overridden, if needed, by typing in a user-defined name. When a layer has a user-defined name and a Layer Type assigned, both are displayed with the Layer Type shown in brackets, as shown below for the Layer Pair GP (Gold Plating)
.
The Route Tool Path Layer Type
There is one exception to the naming behavior just described when a Layer Type is assigned – a user-defined name is not permitted when the Layer Type is set to Route Tool Path
. The reason for this is that older versions of the software use the name of the Route Tool Path layer to identify the layer that contains the route information (also referred to as rout information). Fixing the naming of this layer ensures that the design will continue to function correctly in an older version.
The Route Tool Path layer type is used to indicate the layer that contains the mechanical routing information. A typical approach to using this layer is to place tracks and arcs around the outer edge of the board shape to define the machining path and width. Solid sections are left to hold the board within the panel, then a series of small holes are placed across each solid section to create perforations (often referred to as mouse-bites), allowing the board to be snapped out of the panel once the assembly process is complete.
When the board is displayed in 3D mode, objects detected on the Route Tool Path layer are displayed as a routed slot in the board, as shown below.
Use the Line/Arc Primitives from Board Shape dialog to trace the outside of the board shape with tracks and arcs. Enable the Route Tool Outline option in the dialog to have the objects placed outside the board shape rather than centered along its edge. Some designers prefer to add the fabrication information when they use the Embedded Board Array feature to create an assembly panel, rather than including this detail in the actual board file.
► Learn more about Board Panelization and defining the Route Tool Path
Transitioning from Numbered Mechanical Layers to Layer Types
Where possible, it is recommended to edit the source library and assign Layer Types. When a component footprint is placed (or copied) from a library, mechanical layers and Component Layer Pairs of those Layer Types are automatically created in the target board (or library) if they do not exist. If those Layer Types already exist in the target board (or library), the layer contents are automatically mapped to the correct layer.
User layers with a Layer Type assigned are automatically created or mapped when the component is placed onto a board. The component on the board. |
Sheet Presentation and Settings
Add a mechanical layer of the Sheet
type to define the outer document drawing template border.
Sheet Settings can be customized in the Properties panel in its Board mode with regards to the X/Y values of the sheet's bottom-left corner, Width, and Height. If the Get Size From Sheet Layer option is enabled, the sheet background is automatically calculated from the bounding rectangle of the set of objects placed on the Sheet
mechanical layer.
The color and visibility of the sheet background are configured in the System Colors section of the View Configuration panel. Click the color button to change the color of the Sheet Line and Area Color. Toggle to / show/hide the sheet.
Including Mechanical Layers in Output
Mechanical layers are used for a broad variety of tasks, detailing information used during board design, fabrication, assembly, and product documentation. To support all of these requirements, mechanical layers can be excluded or included in all forms of layer-based output generation, including printing and output file generation.
Printed Output
Any of the layers that are present in the design can be included in the specification of a PCB Printout, including mechanical layers. Printouts are configured by adding the required layers and setting their order in the Print dialog.
► Learn more about Preparing 2D Print-based PCB Output
Generated Outputs
All fabrication-type outputs, such as Gerber and ODB++, allow mechanical layers to be included as an output Layer to Plot or to be added as detail to every layer being plotted. The output is generated when the configured output generator is run by using an ODB output generator in an OutputJob Configuration file (*.OutJob
).
► Learn more about Preparing Your Design for Manufacture