Tutorial - Integrating MCAD Objects and PCB Designs

Old Content - visit altium.com/documentation

Altium Designer offers high levels of interaction with MCAD data. This means you can import, manipulate and check mechanical design elements against your PCB design directly. MCAD data files can be linked to, which maintains the latest file information within Altium Designer.

Integrating mechanical and electronic design components of a project has often proved to be a complex, multi-stage process. Altium Designer has intuitive tools that help integrate these two disciplines to make working in collaboration with mechanical designers faster, easier and more useful.

ECAD - MCAD Interaction Introduction

Once a PCB is designed and laid out with components it would be ideal to check the assembly against its counterpart components, such as enclosures or housings. This has, in the past, been a case of exporting the PCB design in some form of MCAD compatible format which the mechanical designers can utilise within their native applications.

STEP Format Integration

Altium Designer has adopted the STEP format for interchange with mechanical CAD and 3D modelling programs. STEP stands for Standard for Exchange of Product model data and has been widely adopted amongst engineering applications for model data exchange, and means that data from Altium Designer can be readily used in mechanical CAD applications as well as the other way around. The STEP format can be used to accurately model objects of very high complexity, making it ideal to exchange data in for the purposes of pre-production mechanical checking.

The STEP format is also widely used by component manufacturers to offer product users complete, detailed and accurate three-dimensional model representations of components. This makes it easy to import STEP models into component footprints within a PCB library document. Using accurate models in conjunction with component clearance checking based on the actual modelled shape of a component introduces a greater level of accuracy when maintaining clearances than previously possible.

Altium Designer supports both STEP AP203 and STEP AP214 formats. Note that color information is lost with STEP AP203 format.

What Interaction is Possible?

Using the common STEP format for data exchange, it is possible to:

  • import and embed a STEP model file in to a component footprint to provide realistic physical modelling of a component
  • import and embed or link a STEP model file of a mechanical housing or other non-PCB mounted design objects
  • export a STEP model file of a PCB. This can be just the board or a completely assembled PCB
  • use a STEP model file to create a board shape from.

Linked STEP Model Files

File linking is a common concept that provides a "live" connection between an application and a source data file. Altium Designer can link STEP files so that if ever the original source file is changed, Altium Designer immediately recognizes this and can update the linked file. This means that working concurrently with mechanical designers can be managed more effectively and reduce the chance of error as any linked files are always kept up to date.

Altium Designer uses search paths to folders containing STEP files as 'watched' folders. The contents of watched folders are continuously monitored, and any altered files are automatically detected. When you link a file, it must reside in a watched folder or it will not be available. See Setting Up Watched Folders for details on setting up watched folders.

STEP file linking is available only in the PCB Editor. Linking from PCB Library Editor documents is not supported.

The opposite of linked files are embedded files. Embedded file data is copied into the Altium Designer document and remains there - there is no automated monitoring of the original source file.

Note : It is possible to update an embedded file that has been altered as long as the original file path and file still exist.

MCAD Interaction - an Example

The following example describes one use of Altium Designer's MCAD interaction tools. The example will involve linking two STEP model files - one each for the two parts of a housing assembly for our PCB document. After linking, we will accurately position the housings in relation to the PCB and each other, inspect the assembly, set up a Component Clearance design rule and mechanically check clearances between the board, components and the housing itself.

We will also modify the board both mechanically and electrically to provide clearance with protrusions in the housing and also realign the connector with an aperture in the housing cover. We will also provide an example of creating a board shape from an imported STEP model.

In this example, we will use the multivibrator_step.pcbdoc file, located in the Examples/Tutorials/multivibrator_step folder of your Altium Designer (Summer 09 and earlier) installation. Click the link to download these files and extract them to that location for all later versions. Once unzipped, this folder also contains the STEP models we will need. Some aspects of the design may not be entirely real world , however, they were chosen to illustrate the full range of capabilities available in Altium Designer.

Note : The component footprints used in the example already have 3D bodies created for them.

Setting Up Watched Folders

Firstly, we will set up a watched folder from which to link STEP files from. Follow these steps:

  1. Open the PCB Editor - Models page of the Preferences dialog ( DXP » Preferences ). This where we set up 'watched' folders for STEP file linking.
  2. Click the button in the Model Search Path region to open the Browse For Folder dialog. Navigate to the Examples/Tutorials/multivibrator_step folder of your Altium Designer installation. Click OK to close the dialog. Note : Relative search paths (paths that are identified by their proximity to the current project folder and not from the actual drive source) can be added using the .\ (sub-folder) and ..\ (parent folder) prefixes to identify the search folders. Relative paths are searched for based on the current folder for the PCB project and are useful in that absolute path are not required to locate the folder.
  3. Back in the Preferences dialog you should now see the search path. Click the Add button - the path is now added to the Model Search Path list and the folder will now be watched . You can add as many watched folders as you like.
  4. Click OK to close the Preferences dialog.

Placing and Linking STEP Files to the PCB Document

The next step is to place and link the STEP files to the PCB document. The STEP files in this example are the two parts of a mechanical housing for the multivibrator_step PCB. As such, the models are non-PCB mounted - they are free-floating 3D bodies.

Note : It is important to remember that each time the linked design is updated, an updated STEP file needs to be created and placed in the watched folder so that Altium Designer can remain up-to-date.

  1. Open the multivibrator_step.pcbdoc file ( File » Open ), located in the Examples/Tutorials/multivibrator_step folder of your Altium Designer installation.
  2. Select Place » 3D Body . This opens the 3D Body dialog. This dialog provides controls for all aspects of 3D body objects. Select the Generic STEP Model option in the 3D Model Type region then click the Link to STEP Model button. This opens the Choose Model dialog, displaying the contents of the currently watched folders. Note : You can place 3D bodies in either 2D or 3D modes [shortcut: 2 (2D), 3 (3D)].
  3. Select the multivibrator_base.step file and click OK . The model appears attached to the cursor, click in the workspace to place it (place it away from the PCB for this tutorial). The STEP file is now linked to your PCB document. If that file is changed, it will automatically be updated in Altium Designer.
  4. The 3D Body dialog displays again, ready to place another model. We can immediately press the Link to STEP Model button again and select the multivibrator_cover.step file from the Choose Model dialog.
  5. After placing the housing cover, click Cancel in the 3D Body dialog to close it and exit placement mode.

We now have our housing base and cover models placed, however, they are sitting somewhere in relation to the PCB. The next step is to position the housing parts accurately in relation to the PCB.

Note : If you cannot see any 3D bodies when in 3D mode, make sure that both options in the 3D Bodies Display Options region of the PCB panel are enabled.


The PCB and free-floating 3D bodies sharing the workspace.

Orienting and Positioning STEP Models

With the PCB document now sharing the workspace with the free-floating 3D bodies of the housing, now is the time to bring them together to accurately simulate the physical assembly.

Due to imported STEP files coming from different applications, it is important to be able to manipulate and position them with high levels of accuracy. For instance, if the origin used in the STEP model is very different to the origin in the Altium Designer PCB document, you will need to be able to align the STEP model with the PCB, in any direction.

Altium Designer uses vertices or user-defined reference points (known as snap points ) on to the STEP model, which can be used to position and align with specific locations on the board. You also have control to rotate the 3D body in any direction as well as control its height in relation to the PCB.

In the example, we see that the STEP models of the housing base and cover are some distance from our PCB. The housing cover is also rotated in several directions to what we need. There are several methods for positioning STEP models available as follows:

  • Set the vertical position of the STEP model in relation to the board surface
  • Use a single reference point to reposition the entire STEP model
  • Use three reference points to reposition, align and rotate the STEP model
  • Use a face, or surface, of the STEP model to rotate into alignment with the board surface
  • Use the Generic STEP Model controls directly in the 3D Body dialog.
    In this example, we will use each method to orient and position our STEP models of the housing base and cover. You can use any combination of the positioning and orientation techniques to achieve accurate positioning.

Measuring Models and Placing Reference Snap Points

In cases where the model shares the correct orientation as the PCB document (ie. X, Y and Z axes in the STEP model correspond to the same directions in the PCB document), positioning can be accomplished using a single snap point as a reference. In this example, the housing base shares the same orientation as the PCB.

Looking at the housing base and the PCB, you can see there is a boss protruding from the housing base to locate the PCB. There is also no hole in the PCB to accommodate this boss, so we will need to create one. We can measure the position and size of the boss to determine where to place the corresponding board cutout and size it.

First of all, let's measure the board mounting area in the housing base to see if the board will fit. The housing base is designed to support the PCB around its perimeter with a supporting square boss in the centre. We need to ensure that no electrical objects (tracks, pads) pass over these areas.

  1. Enter 3D mode [shortcut: 3 ].
  2. Select Tools » 3D Body Placement » Measure Distances.
  3. Click the housing base to select it, the cursor changes to the 3D positional cursor (blue, six-pointed) that will snap to the nearest vertices found on the model.
  4. Measure the lengths of the sides, by moving the cursor to the corners of the model and clicking. After the second point is selected an information dialog appears showing the length. Measuring side 1, we can see that the length is approximately 52mm. Click OK to close the dialog and return to measuring mode.

Note : Due to Altium Designer's base unit of measurement being imperial, there may be very small rounding errors when working in metric units. In this case, the actual size is 52.00000mm, however, converting from a base imperial measurement to metric produces a rounding error of 0.00001mm.


Measuring the STEP model to compare the PCB size to.

  1. Click the base again and select the vertices representing side 2. The measurement is the same. You could measure the diagonal corners to check for squareness, etc., however, the base in this example is square.

Now let's check the size of the board to see if it will fit (with some clearance) into the base.

  1. Select Reports » Board Information . The PCB Information dialog opens, displaying various information.
  2. Click the General tab and check the sizes in the Board Dimensions region. In this example, the board is 50.8 x 50.8mm. The board will fit into the housing base with a clearance of 0.6mm on each edge.

If you have access to STEP models that represent the PCB shape, it is possible to create the board shape directly from the model. For an example of using this feature, refer to Creating a Board Shape Directly From a STEP Model.
The next step is to place snap points onto the housing base for the central locating and supporting bosses. The locating boss will require a cutout in the board and the supporting boss will require a keepout area.

  1. Select Tools » 3D Body Placement » Add Snap Points from Vertices .
  2. Click the housing base to select it, the cursor changes to the 3D positional cursor (blue, six-pointed) that will snap to the nearest vertices found on the model.
  3. Move the cursor around the model and click to place snap points at each of the four corners of the two bosses. Red arrows in the diagram represent the supporting boss, blue for the locating boss. With the locating boss, place the snap points at the bottom corners where it joins the supporting boss to avoid the chamfer along its top edges. Right-click or press ESC to end snap point placement mode. The image above shows the placed snap points.

Note : The color of the snap points is based on the Selections system color. If you need to see them more clearly, change the color in the System Colors region, Board Layers and Colors page (available under any 2D view configuration) of the View Configurations dialog [shortcut: L ]. Also note that any changes to system colors affect all PCB documents.

  1. We will add one more snap point to represent the center position of the housing base. We are assuming that the bosses are centrally located which, for this example, they are. Re-enter snap placement mode and click the housing base.
  2. Press SPACEBAR to enter mid-point mode, which places the snap point at the mid-point between two selected vertices. Click on two diagonally opposite vertices on one of the bosses to place the snap point, then right-click or ESC to exit.

The next stage is positioning the mounting base in relation to the board. To do this, we will place a pad in the center of the board as a reference and align the central snap point placed in Step 5 of the previous procedure.

  1. Enter 2D mode [shortcut: 2 ] to edit the PCB.

Note : The origin for the board is positioned at the bottom left of the board itself to make finding the center of the board easier. You can edit the origin position using the *Edit » Origin* function.

  1. Select Place » Pad [shortcut: P , P ] to enter pad placement mode.
  2. Select Edit » Jump » New Location [shortcut: *J , L ] to open the Jump to Location dialog. This dialog allows you specify coordinates that the cursor will move to.
  3. Enter 25.4mm for both X-Location and Y-Location fields (the board measures 50.8 x 50.8mm and we need to go halfway). Click OK to close the dialog and position the cursor at the coordinates.
  4. Press ENTER to place the pad. Our reference pad is now positioned on the board.

Positioning Models Using a Single Reference Point

The next step is to position the housing base using the central snap point and the reference pad on the PCB. This technique does not necessarily require snap points placed, any vertex on the STEP model can be used. In this case, there is no available vertex where we need one, so we are using a snap point.

  1. Enter 3D mode.
  2. Select Tools » 3D Body Placement » Position 3D Body

  1. Click the housing base to select it, the cursor changes to the 3D positional cursor (blue, six-pointed) that will snap to vertices and snap points found on the model.
  2. Press TAB to open the Choose Selectable Points dialog and disable the Include Vertices option. Click OK . The 3D positional cursor will now only snap to snap points.

  1. Move the cursor to the center of the model and click when it picks up the central snap point.
  2. Move the cursor to the center of the board and click when it picks up the central reference pad. The housing base is now moved so that it's central snap point is aligned precisely, in the X, Y and Z axes, with the reference pad on the PCB.

Note : The green triangular prism cursor (seen in the image above) appears when it snaps to an electrical object's hotspot (ie. the center of a pad, track, via, etc) if the Electrical Grid option is enabled in the Board Options dialog [shortcut: D , O ]. This mode is useful for determining what object you are snapping to. Furthermore, disabling the Snap On All Layers option in the Board Options dialog reduces the possible number of objects that can be snapped to.

The housing base and board are now aligned as we need them in the X and Y directions, however, vertically, the housing base is not positioned correctly. We need to set the model's height in relation to the board surface.

Setting Model Height

When you place a STEP model, the vertical setting is based on the STEP model's original position in the 3D workspace and the surface of the PCB. You can project the model from either the top or bottom PCB surface. In this example, the PCB is supposed to sit on the mounting lip in the housing base, supported by the boss in the center.

Looking at the housing base and the PCB, you can see that the top board surface is vertically aligned with the surface of the support boss where we placed the central snap point. To rectify this, we will make the housing base project from the bottom surface of the board, seeing as this is the surface that will be touching the PCB. After that, we will set the height of the housing base in relation to the bottom board surface using the support boss in the housing base as the reference surface.

  1. Enter 3D mode [shortcut: 3 ].
  2. Double-click the model of the housing base to open the 3D Body dialog for it.
  3. In the Body Side list, select Bottom Side .
  4. Click OK to close the dialog and apply the changes.

Notice that the housing base is now upside-down. We need to rotate the housing base 180° along the X-axis so that it is facing the right way.

Note : Use the 3D origin marker to help identify which axes you need to rotate in. Enable the Show Origin Marker option in the Physical Materials page of the View Configurations dialog [shortcut: L ] to display it.

  1. Open the 3D Body dialog for the housing base.
  2. In the Generic STEP Model region, enter 180 in the Rotation X° field.
  3. Click OK to close the dialog and apply the changes.

The model of the housing base is now facing the right way. The next step is to align the surface of the support boss in the housing base with the board.

  1. Select Tools » 3D Body Placement » Set Body Height .
  2. Click the housing base to select it, the cursor changes to the 3D positional cursor.
  3. Move the cursor to a corner corresponding to the surface of the support boss and click. The Choose Height dialog opens that allows you to select the board surface or a custom height.
  4. Select the Board Surface option, then click OK to close the dialog.

The surface of the support boss (and mounting lip, which happens to be at the same height) in the housing base is now precisely aligned vertically with the bottom surface of the board. The next step will be to orient and position the housing cover with the housing base/PCB assembly.

It is a good idea to lock the position of the housing base to prevent any accidental changes to its position as you continue working. To lock it, open the 3D Body dialog for it and enable the Locked option for it in the Properties region of the dialog.

Orienting Models

In instances where an imported STEP model is oriented differently to the axes of the PCB document, as can be seen with the housing cover in this example, it is necessary to be able to quickly align and rotate it in relation to the PCB. There are several methods for doing this.

Orienting Models by Aligning a Face with the Board

This method aligns a selected flat face, or surface, of a STEP model with the board surface and is useful for quickly orienting and vertically positioning models in relation to the X-Y plane of the board.
The default vertical positioning of the model, after alignment, is taken from the Body Side value ( 3D Body dialog) for it.
In this example, we will orient the housing cover using the boss in the center as this needs to be at board level and also happens to be in line with surface that butts up against the housing base. To do this:

  1. Select Tools » 3D Body Placement » Align Face with Board.
  2. Click the housing cover to select it.
  3. Click on the face of the boss in the center of the housing cover, to commit the orientation. As you move the cursor around the model, when a surface is found, it is highlighted by the rest of the model being made somewhat transparent.

The housing cover is now rotated so that it is now lies parallel with the surface of the board. The vertical position of the selected face is in alignment with the top of the board, as we require. To correctly position the housing cover in the X-Y axes, we can add a snap point in the centre position of the boss on the inside of the cover and align that with the reference pad on the board, as we did with the housing base. We can do this in this example because the boss protruding from the cover is designed to touch the top board surface, in effect sandwiching the board between the housing base and cover. Refer to Positioning Models Using a Single Reference Point for details on positioning the cover. After you have positioned the housing cover, lock it in position.

Orienting Models Using Three Reference Points

This method requires three points selected on the STEP model and then three corresponding points picked on the board. This technique does not necessarily require snap points placed, any vertex on the STEP model can be used. In this case, we will use vertices. The relationships between the three points are as follows.

First Point - acts as the main anchor – the first reference point you select on the STEP model will be aligned precisely with the first reference point selected on the board.

Second Point - acts as the alignment point – imagine a line drawn from the first point through the second reference point on the STEP model and, likewise between the first and second reference points selected on the board. These lines are aligned.

Third Point - defines any rotation of the STEP model – rotation takes place about the alignment line created when defining the second point. Imagine a plane intersecting the three STEP model reference points and the surface of the board; that is how the model will be placed, even if it passes through the board surface. The following image illustrates this technique – numbers in colored circles represent the STEP model reference points and their order; numbers in white circles represent the main anchor, alignment and rotation points on the board and their order. The resulting positioning and orientation of the STEP model is shown to the right.


STEP model orientation using three reference points.

  1. Select Tools » 3D Body Placement » Orient and Position 3D Body .
  2. Click the housing cover to select it, the cursor changes to the 3D positional cursor that will snap to any vertices.
  3. Click at the vertices in the order 1, 2 and 3. The order you select the reference points in is the order that they will be aligned with the three target points on the board.

We need to select the corresponding points on the board to align and rotate the model to. When selecting the points, the easiest objects to select will be electrical objects with the Electrical Grid enabled.

This is acceptable when the selected objects, vias for instance, are placed parallel with the board edge, however, this may not be the case and you would need to ensure that they were placed in such a way so that the model aligns precisely. A secondary method, which is ideal with straight-edged board shapes, is to use the Electrical Grid in conjunction with the Snap to Board Outline feature. Enable the Electrical Grid and Snap to Board Outline options in the Board Options dialog [shortcut: D , O ] to turn this feature on. Once enabled, you can select the corners of the board as reference points.

  1. Click at the board corners in the order 1, 2 and 3. The order you select the reference points in is the order that they will be aligned with the three reference points on the STEP model.

The housing cover is now aligned parallel with the board edge (and the housing base) and rotated so that it is now lies parallel with the surface of the board. The height and X-Y position of the housing cover still requires final adjustment. To correctly position the housing cover in all axes, we can add a snap point in the centre position of the boss on the inside of the cover and align that with the reference pad on the board, as we did with the housing base. We can do this in this example because the boss protruding from the cover is designed to touch the top board surface, in effect sandwiching the board between the housing base and cover. Refer to Positioning Models Using a Single Reference Point for details on positioning the cover. After you have positioned the housing cover, lock it in position.

Orienting Models Manually Using 3D Body Dialog

This method requires using the various rotation and height controls in the Generic STEP Model region of the 3D Body dialog to position models.

Note : Keyboard shortcuts for moving and rotating 3D bodies are listed in a table at the end of this document.

Manual rotation of STEP models is really only applicable to cases where simple rotations are needed, such as 90° or similar. The rotational axes listed in the dialog pertain to the axes of the PCB document, meaning that rotation of the model will be around the document axes and not around the model's native axes, if they happen to be different.

  1. Double-click the STEP model, or right-click and select Properties from the pop-up menu, to open the 3D Body dialog.
  2. In the Generic STEP Model region of the dialog are four fields to determine rotation of the STEP model in the X, Y and Z-axes as well as the vertical height off the board surface ( Standoff Height ) offset.

Note : The STEP model may not be oriented correctly in relation to the axes of the PCB document due to the origin position used in the originating application.

  1. Enter an angular value in one or more of the Rotation X° / / fields and click OK to apply the rotation.
  2. Observe how the model has been rotated and make further adjustments as required until the desired orientation is achieved.

Once you have achieved the desired rotation of the model it should be aligned parallel with the board's X-Y axes. To correctly position the housing cover in the X-Y axes, we can add a snap point in the centre position of the boss on the inside of the cover and align that with the reference pad on the board, as we did with the housing base. We can do this in this example because the boss protruding from the cover is designed to touch the top board surface, in effect sandwiching the board between the housing base and cover. Refer to Positioning Models Using a Single Reference Point for details on positioning the cover. After you have positioned the housing cover, lock it in position.

Note : After positioning has been completed, it is a good idea to remove any reference pads used for positioning from the PCB document.

Using STEP Models to Modify the Board

The next stage in this project is to modify the PCB so that it can fit into the housing. In this example, a board cutout needs to be defined for the locating boss and a keepout created to avoid placing any electrical objects in the area between the support bosses.

Since we are going to work inside the assembly, it would be a good idea to visibly remove as much of the project that we are not working on from the workspace. The PCB panel is useful for controlling the display of 3D bodies and distinguishes between various types of 3D models. Place the PCB panel in 3D Models mode by selecting this mode from the list at the top of the panel. Select Free Models in the middle list panel to display any free 3D bodies in the lower list panel. In the lower list panel, select the multivibrator_base and click the display icon or use the display control beneath the list and set it to Hide . The housing base is removed from the display.

In the 3D Bodies Display Options region of the panel, disable the Show Simple 3D Bodies option to clear the component 3D bodies from the display, as these are all made from extruded 3D bodies.
To further clear the display, open the View Configurations dialog [shortcut: L ] and disable the options in the Colors and Visibility region.

Using the view Configuration to hide parts of the design.

The result should be something like the image below, looking at the underside of the housing cover.

The following image shows the housing cover and base 'fitted' together. The cover has been set to 50% transparent in the PCB panel to enable looking inside them and the PCB is fully displayed. As you can see, the board now needs to be modified so that components or tracks do not pass across the area of the PCB between the support bosses in the housing assembly and also to allow the locating boss to pass through the board. The connector also requires repositioning to align with the aperture in the cover.

The multivibrator housing is now assembled. Use transparency with free-floating models to look 'inside' the assembly.

Referencing Locations on a Model and Applying them to the PCB

We need to transfer locations on the models on to the board to create the board cutout, keepout area and the position for the connector. Snap points placed on models are particularly suitable for this as they can be snapped to like an electrical object in the 2D workspace.

To make the board cutout, we can use the snap points placed on the housing base. There is one problem with this, and that is the snap points represent the exact locations of the locating boss vertices, therefore we will need to provide some clearance between the edges of our board cutout and the edges of the boss. To overcome this, we will place lines between the snap points, then offset the end points of the lines precisely by our clearance distance, which we will make 0.25mm per side. We will make the offset independent of the grids on the PCB document by using the PCB Inspector panel, maintaining precise control of the repositioning.

  1. Go to 2D mode.

Note : It may be a good idea to use a mechanical layer for this operation as we do not want to compromise any objects placed on signal layers.

  1. Select Place » Line [shortcut: P , L ] to enter line placement mode.
  2. Place lines between the snap points representing the location boss to create a rectangle. Snap points have the equivalent of an electrical hot-spot so that you can snap to their centers. Ensure that the Electrical Grid and Snap On All Layers options are enabled in the Board Options dialog for this feature to work.
  3. Once you have completed the rectangle, open the PCB Inspector panel through the PCB button at the bottom right-hand of the workspace. We will use this panel to offset the ends of each line to give us the desired 0.25mm clearance between the edge of the board cutout and the sides of the locating boss in the housing base.
  4. Select a line by clicking it and look in the PCB Inspector panel. In the Graphical region you will see X1, Y1, X2, Y2 coordinates representing the end points of the line.

  1. Select the X coordinate furthest from the origin - the field becomes editable - and enter !+0.25mm, then press ENTER . The end point of the line moves 0.25mm to the right.

Note : The syntax behind this is: ! denotes the present value of the field (in this case, the coordinate for the end point of the line); + or - denote to add or subtract the following value to/from the present value; the distance and units denotes how much to change the value.

  1. For the same end point, add 0.25mm to the Y coordinate.
  2. For the start point of the same line, subtract 0.25mm from the present X coordinate, then add 0.25mm to the Y coordinate.
  3. Continue to move the end points of each of the four lines until all lines have been offset and lengthened correctly.

The next step is to create a board cutout from these lines.

  1. Select the four lines.
  2. Select Tools » Convert » Create Board Cutout from Selected Primitives .
  3. Delete the lines original lines.

The board cutout is now created. The next step is to create the keepout area around the support boss snap points. For the keepout, we do not require any extra clearance around the snap points.

  1. Select Place » Line to enter line placement mode.
  2. Place lines between the snap points representing the support boss to create a rectangle. Snap points have the equivalent of an electrical hot-spot so that you can snap to their centers. Ensure that the Electrical Grid and Snap On All Layers options are enabled in the Board Options dialog for this feature to work.
  3. Select the four lines.
  4. Select Tools » Convert » Create Region from Selected Primitives . A region object is now created.
  5. Select the region, then right-click it and select Properties from the pop-up menu to open the Region dialog.
  6. Enable the Keepout option and select Multi-Layer from the Layers list, then click OK . The region is converted into a keepout area that applies to all layers.
  7. Delete the original lines.
  8. Re-route NetC2_1 so that it avoids the keepout area.

The board shape now conforms to the available space in the housing, with clearance around the edges as well as to the locating boss. The keepout area between the two support bosses is now defined and any tracks that were crossing this are now moved. The next step in this example is to reposition the connector Y1 so that it is aligned with the corresponding aperture in the housing cover.

Lining Up a Component with a STEP Model

Moving components to snap point references.

In order to line up the connector ( Y1 ) with the aperture in the housing cover, we will place snap points on the cover at each corner of the aperture. Then, in 2D, use these points to show us where to move the connector to.

  1. Select Tools » 3D Body Placement » Add Snap Points from Vertices.
  2. Click the housing cover to select it.
  3. Place four snap points, one at each corner of the aperture in the housing cover. Be careful to avoid snapping to the outer corners of the chamfer on the outer face of the housing cover.
  4. Go to 2D.
  5. Select connector Y1 and move it into the rectangle created by the snap points, so that it centered.

Note : In order to place the connector more precisely, you can readjust the Snap Grid by pressing G , which is a shortcut to the Snap Grid setting, and selecting a smaller Snap Grid value from the list, say, 0.025mm. This new Snap Grid value will remain until you change it again either through the Snap Grid shortcut menu or the Board Options dialog.

  1. Readjust the routing to the connector pads.

The connector should now be aligned with the aperture in the housing cover. This means that in production the socket that connects to connector Y1 will fit. After these modifications, the board should now something like the image below.

Creating a Board Shape Directly From a 3D Body

It is possible to use a surface of a 3D body (STEP model or extruded (simple) 3D body object) to define the board shape from. This means that mechanical designers can produce a model of board shape required, from which you can use to define the exact board from. Not only that, but if a STEP file used for the board shape and is linked (see Placing and Linking STEP Files to the PCB Document), the board shape will update automatically if the associated STEP file is altered.

The kind of model does not necessarily have to be replica of the board, any flat surface on any 3D body can be used. Any circular holes in the surface are created as pads on the generated board shape and are automatically created as a union, meaning that moving one, moves them all and the positional relationship between them is maintained. Non-circular holes are also created as a union, however, are board cutout polygonal regions.
The 3D body used to create the board shape from is also kept as a free-floating 3D body object in the document. The default vertical positioning of it, after the board shape is redefined, is taken from the Body Side value ( 3D Body dialog) for it.

In this example, there is a STEP model of the board shape available in the Examples/Tutorials/multivibrator_step folder of your Altium Designer installation. An existing or new PCB document is required to define a board shape. To define the board shape from a STEP model, do the following:

  1. Select Place » 3D Body . This opens the 3D Body dialog. Select the Generic STEP Model option in the 3D Model Type region.
  2. If you are linking the STEP file, click the Link to STEP Model button, otherwise click the Embed STEP Model button. The Choose Model dialog opens, where you can select the required file from.

Note : You can place 3D bodies in either 2D or 3D modes [shortcut: 2 (2D), 3 (3D)].

  1. Select the board.step file and click OK . The model appears attached to the cursor, click in the workspace to place it. The STEP model is now in your PCB document.

Note : Wherever you place the model will be the position in the workspace adopted by the new board shape.

  1. After placing the board model, click Cancel in the 3D Body dialog to close it and exit placement mode.
  2. If you are not in 3D mode, go to it, then select Design » Board Shape » *Define from 3D Body.
  3. Click the board model to select it.
  4. Click on a flat surface of the board model - this surface will become the new board shape. As you move the cursor around the model, when a surface is found, it is highlighted by the rest of the model being made somewhat transparent.

Note : Only surfaces aligned with the X-Y plane can be used to create the board shape from. If you select a board surface that requires alignment in the X-Y plane, you will be asked, via a Confirmation dialog, to align the surface before you can continue. This dialog also allows you to place the model, using the selected face, in relation to either the top or bottom surface of the board. This means that the vertical position of the model can also be set at the same time. After alignment you will need to select Design » Board Shape » *Define from 3D Body again.

  1. After the board shape has been redefined, you will be given the option to hide the 3D body.

We now have a new board shape exactly to the size of the model, with the model also in the workspace.

Original board shape and the imported STEP model shown on the left, on the right is the Altium Designer board shape created from the model.

Component Clearance Checking Using 3D Bodies

Now that the positional relationships between the board assembly and the housing assembly has been finalized, we can now check the positional relationships of components on the board with the housing parts. Quick visual inspection will show you immediately that some components are contacting the housing cover. Altium Designer offers design rules for component clearance checking against free-floating 3D bodies (the housing) as well as components placed on the board, so you can identify which components are either in interference or do not have enough clearance with one another, or the housing.

Using Design Rules to Check Component Clearances

The rules we need to apply are in the Placement category of the Design Rules. To access the design rules, open the Design Rules and Constraints Editor dialog by selecting Design » Rules [shortcut: D , R ].


PCB design rules for 3D body component clearance checks.

In order to carry out our clearance checks, we need to define which components or objects the rules will apply to. In this example, we will apply rules for the following:

  • A general rule for all board mounted components to specify a minimum gap between them. This rule will also check clearance between components and the housing assembly.
  • A rule specific to the 3D bodies that are the housing cover and housing base to allow them to butt up against one another.
  • A rule specific to the connector so that vertical clearance can be checked between it and the aperture in the housing cover.
  • There are two constraints to component clearance checking - these are in the horizontal and vertical directions. The actual distances checked are based on the exact three-dimensional shape of the 3D body representation of the component. This provides precise clearance checking and can allow overhang of one component over another.

Component clearance checking using the precise shape of the model.

Its is also possible to check clearance infinitely . This is useful where you want to check that a component has nothing at all covering it, regardless of distance. In this example, the connector can use such a clearance check.

 

Setting up a component clearance rule.

Setting Up the Component Clearance Rule

The image above shows us a Component Clearance rule, named ComponentsOnBoard , that will apply to all components on the board. The rule stipulates that a gap of at least 1.5mm is required around every component, including the 3D bodies of the housing. To accomplish this, the full query is isComponent with the horizontal and vertical clearances set to Specified with a value of 1.5mm. Enabling the Show actual violation distances option provides visual clues as to the cause of the violations.

Setting Up the Free-floating 3D Bodies Clearance Rule

Setting up a clearance rule for free-floating 3D bodies.

If we run a Design Rules Check ( Tools » Design Rules Check ) now, there would be violations for all component 3D bodies within 1.5mm of one another. There would also be violations between component 3D bodies and free-floating 3D bodies within 1.5mm, and also between free-floating bodies within 1.5mm of one another. This would not be appropriate for the housing cover and base as we want these parts to physically contact one another, so we need to create a rule that will allow these free-floating 3D bodies to have zero clearance.

To do this, we will create another Component Clearance rule, named FloatingBodies , and use the identifying label ( Identifier field in 3D Body dialog) for the housing cover and base as the query for the rule. To accomplish this, the full query is (id='multivibrator_cover') or (id='multivibrator_base')with the horizontal and vertical clearances set to Specified with a value of 0mm.

Setting Up the 3D Body Infinite Clearance Rule

The final rule to set up will be to ensure that when a socket is placed over connector Y1 that it will be able to pass through the aperture in the housing cover. the following image shows the relationship between the horizontal clearance setting in conjunction with infinite vertical clearance.

Infinite vertical component clearance checking using the shape of the model.

To do this, we will create another Component Clearance rule, named ConnectorY1 , and use the identifying label ( Identifier field in 3D Body dialog) for the housing cover. To accomplish this, the full query is (inComponent ('Y1'), which targets the connector as the first object. We will add a second object to match to because we only want to check the vertical clearance between the connector and the housing cover using id='multivibrator_cover', with the horizontal clearance set to Specified with a value of 0.3mm and vertical set to Infinite.

This rule will, in effect, take the 3D bodies making up the base of the connector, add 0.3mm around their perimeter as clearance and then project that area upwards. If that projection passes through any objects, a violation will occur.

Setting Rule Priorities

Setting up an infinite vertical clearance rule.

Altium Designer supports rule hierarchies, which means that certain rules can be applied before others. In cases where one rule covers the scope of another rule, in this example, the ComponentsOnBoard rule over the ConnectorY1 rule, we need to give the ConnectorY1 rule higher priority. When we do this and run a design rule check, the ConnectorY1 rule is checked before the ComponentsOnBoard rule, with component Y1 not being eligible for subsequent rules.

Click the Priorities button in the PCB Rules and Constraints Editor dialog to define rule priorities via the Edit Rule Priorities dialog.
The next step is to run the Design Rule Check and fix any problems.

Running Design Rule Checks and Solving Violations Between 3D Bodies and Components

Upon running a Design Rule Check (DRC), any defined rules will cause violations whenever they are broken. In this example, we are interested in the relationship between 3D bodies and so will concentrate solely on using the Component Clearance rules that we have defined.

Using the Design Rule Checker dialog we can select which rules to check as well as perform a DRC. Select Tools » Design Rule Check [shortcut: T , D ] to open this dialog.

After running a DRC, Altium Designer can generate a report (in HTML format) listing any violations. Hyperlinks from these reports can jump you to straight to the cause of the violation in the PCB Editor. To turn the report on and also to highlight any violation found in the PCB document, click the Report Options folder in the left pane and enable the Create Report File and Create Violations options.

Enabling the Show actual violation distances option for Component Clearance design rules (as we have done) shows lines between the points of greatest violation, with the distance between the points of violation displayed. This can be useful in identifying the source of the violation and also determining how to resolve the violation. In the case of 3D bodies actually running into one another, the violation will show "Collision".

Click the Placement category in the left pane of the Design Rule Checker dialog and enable the Batch option for the Component Clearance rule. Click the Run Design Rule Check button. The resultant report displays the violations found when applying the rules we have selected. It should look something like the image below.


The Design Rule Verification report, showing any violations found.


Switching back to the document, you can see the highlighted violations. If you zoom inside the assembly and look inside the housing cover material, it is possible to see the colliding parts protruding into it. There are four components colliding with the housing cover, namely Q1 , Q2 , C1 and C2.

Looking at the following image, you can see the clearance violation between the top of resistor R2 and the housing cover; the distance between the two being 1.22674mm - slightly below our minimum specified clearance of 1.5mm.

To solve these violations, we will move the colliding components to the bottom side of the board and move the resistor away from the section of the housing cover that sits too close to its current position.

Viewing 3D body collisions in 3D.

Component Clearance rule violation distances, viewed in 3D.

The next step is to resolve the violations.

Resolving Violations Between 3D Bodies.

To resolve the violations we see between the housing cover and Q1 , Q2 , C1 and C2 , it is evident that flipping them to the underside of the board will help, as the housing base is considerably deeper than the cover. To do this:

  1. Go to 2D mode. It might be useful to remove the violations from the display - select Tools » Reset Error Markers [shortcut: *T , M ].
  2. Select component Q1 , right-click and select Properties from the pop-up menu to open the properties dialog for it.
  3. In the Component Properties region, select Bottom Layer from the Layer list. Click OK to apply the change and close the dialog.
  4. Perform steps 2 and 3 on component C1 . It is worthwhile running a DRC on the document again, to see if moving the components to the bottom of the board resolves the collision violation.

Continue to resolve the violations for components Q2 and C2 and run a DRC again to make sure they are not in any state of rule violation.

Repositioning components to resolve violations with other 3D bodies.

Note : Moving components to the bottom layer in this way is not the same as flipping a component from one side of the board to the other. Component flipping also rotates the component, meaning that the pins will be reversed in relation to the currently placed tracks. This would require further steps to correct.

We can now move R2 until it is non-violating. To make this easier, make the Component Clearance rule checked "online", which means that violations will be highlighted as you edit the document. To do this, open the Design rule Checker dialog and for the Component Clearance rule ( Placement category), enable the Online option, then click Close.

  1. In 2D mode, select component R2 .
  2. Move the cursor over component R2 - it becomes a four-pointed arrow. Click and drag the component to a suitable position that does not cause a violation.

Note : The color of the violation highlight may show as a darker green during the actual moving. After 'dropping' the component, the violation highlight brightens.

  1. Re-route the tracks to R2 's new position.
  2. Run DRC again to verify that there are no Component Clearance violations.

Once violations are clear, you can be confident that the PCB and housing assemblies will fit together in a production situation. If your MCAD designers would prefer to verify design fitment in their native applications, it is possible for you to provide them with compatible files of your PCB. Refer to Exporting PCB MCAD Data from Altium Designer for details.

Exporting PCB MCAD Data from Altium Designer

In order to come full circle with compatibility and data exchange with MCAD applications, Altium Designer can export PCB documents in the popular STEP format as detailed three-dimensional models, and as two-dimensional AutoCAD DWG/DXF files. There are controls available to control what data is exported, allowing you to export an entire PCB assembly, including component 3D bodies, or portions of the assembly.

Note : If your PCB document contains non-PCB mounted, free-floating 3D bodies (such as the housing base and cover used in this tutorial), you may not want to include those objects in the exported file. In these cases it is advisable that you hide those objects and use the exporting of selected objects function. When exported selected object, be sure to make selections in 2D mode as 3D does not fully support the notion of object selection.

Exporting a PCB Document as a STEP File

Using the PCB example we have worked with in this tutorial, export it as a STEP file as follows:

  1. Select File » Save As or File » Save Copy As . The Save As dialog opens.
  2. Navigate to a suitable location for the file, provide a name for it and select Export STEP from the Save as type list.
  3. Click Save. The STEP Export Options dialog opens. This dialog provides controls for determining what to export.

Note : The board itself is always exported.

  1. Use the controls in the STEP Export Options dialog to determine what to include in the exported file.

The Components With 3D Bodies region options will export either all or selected board mounted component 3D bodies as well as any free-floating 3D bodies in the document. Remember, selections need to be made in 2D mode. If you wish to export only the board, do not select anything but select the Export Selected option.

The 3D Bodies Export Options region options gives you the choice of controlling what to export in the case of component 3D bodies that have both STEP models and extruded (simple) 3D bodies assigned to them. Prefer simple ... will export the extruded 3D body version, Prefer STEP ... will export the STEP 3D body version, Export both ... will export extruded and STEP versions. If only extruded 3D bodies are available for components, they will always be exported.

The Pad Holes and Board Cutouts region provides options for exporting all or selected holes in the board, meaning vias and board cutouts.

  1. Click OK to complete the export.

Exporting a PCB Document as a DWG/DXF File

File compatibility between Altium Designer and AutoCAD is limited to two-dimensional (flat) files. These can be opened in several versions of AutoCAD and other MCAD applications and represent the 2D (X-Y plane) information of the PCB assembly. No 3D body information is supplied.

Using the PCB example we have worked with in this tutorial, export it as a DWG or DXF file as follows:

  1. Select File » Save As or File » Save Copy As . The Save As dialog opens.
  2. Navigate to a suitable location for the file, provide a name for it and select Export AutoCAD Files from the Save as type list.
  3. Click Save. The Export to AutoCAD dialog opens. This dialog provides controls for determining what to export.
  4. Use the controls in the Export to AutoCAD dialog to determine what to include and how it is formatted n the exported file.
    • The Options region provides you with selections for AutoCAD version compatibility, file format and base units. You should be aware that not all objects in the PCB document may be understood by older versions of the DWG/DXF file format.
    • The Holes region options gives you the choice of exporting holes for pads and vias and whether or not to create separate drawing layers for each.
    • The Components region controls allow you to export component footprints either individual primitive drawing objects or as blocks, which are basically object unions or groups.
    • The Tracks and Arcs region controls how line ends will be drawn in the exported file.
    • The Primitive to Export With Zero Line Widths region allows you to select objects that will be drawn in the MCAD application with zero line width, basically a construction/geometry line that has no physical representation.
  5. Click OK to complete the export.

That concludes this tutorial. You have now explored some of the design potential when integrating MCAD data and Altium Designer.

3D Body Placement Shortcuts

~ (tilde)

Display list of shortcuts

+ (plus)

Next layer

- (minus)

Previous layer

L

Flip 3D body to paired mechanical layer

TAB

Edit 3D body properties via 3D Body dialog

X

Flip 3D body around X-axis

Y

Flip 3D body around Y-axis

SPACEBAR

Rotate 3D body counter-clockwise

SHIFT
+ SPACEBAR

Rotate 3D body clockwise

2

Rotate 3D body counter-clockwise around it's X-axis

3

Decrease 3D body standoff height (Z-axis) by one Snap Grid increment

4

Rotate 3D body counter-clockwise around it's Y-axis

6

Rotate 3D body clockwise around it's Y-axis

8

Rotate 3D body clockwise around it's X-axis

9

Increase 3D body standoff height (Z-axis) by one Snap Grid increment

¬ (left arrow)

Move 3D body left along X-axis by one Snap Grid increment

SHIFT
+ ¬ (left arrow)

Move 3D body left along X-axis by 10x Snap Grid increment

® (right arrow)

Move 3D body right along X-axis by one Snap Grid increment

SHIFT
+ ® (right arrow)

Move 3D body right along X-axis by 10x Snap Grid increment

­ (up arrow)

Move 3D body backward along Y-axis by one Snap Grid increment

SHIFT
+ ­ (up arrow)

Move 3D body backward along Y-axis by 10x Snap Grid increment

¯ (down arrow)

Move 3D body forward along Y-axis by one Snap Grid increment

SHIFT
+ ¯ (down arrow)

Move 3D body forward along Y-axis by 10x Snap Grid increment

3D body placement shortcut keys.

Note : Rotation is by the Rotation Step setting, PCB Editor - General page of the Preferences dialog. Movement amounts are based on the current Snap Grid setting.

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