The 3D Advantage in ECAD-MCAD Integration
Parent page: Laying out Your PCB
The 3D Advantage
There's a saying in the design world that the cost of fixing a mistake goes up 10 fold each step of the way. So it costs 10 times as much to fix a mistake during prototyping compared to fixing it during design, then 10 times more again to fix that same mistake during production, and 10 times more again to fix it once the product has been shipped. These are rough approximations, but a cost increase in the order of 1000 times to fix a mistake when the product is in the customer's hand, compared to fixing it during design – that's a strong motivator to get it right during design!
One of the hardest areas to get right is fitting the loaded board into the product enclosure. Today's products are not large, rectangular boxes with lots of empty space – they have unusual shapes, are often compact with tightly packed innards, and might include multiple PCBs that connect together. And the board has to fit precisely into the housing, so that the mounting holes, display and other controls align exactly with their openings and fixing points.
Why is it so hard? – because the board design must move back and forth across the ECAD - MCAD divide.
Traditionally, the ECAD guy designed the board in a 2D design environment, sizing the board and positioning the case-critical elements using dimensions provided by the MCAD designer. On the other side of the fence, the MCAD guy would model the board and place the critical components based on dimensions provided by the ECAD designer – and fingers crossed – they would both get it right and the board would fit!
To help avoid mistakes and that dreaded cost multiplier, a common approach has been to mock-up the loaded board for fit in its enclosure. The board is mocked-up by printing the component overlay and pads, and sticking that printout onto thin cardboard. Then the critical components are glued on, including anything that had to project through or come close to the case, like the connectors and the display. The case is modeled using cardboard or foam, and the board fitted into it. Often this is simply not practical for many product designs, for example, things get hard when the case is an unusual shape.
Like all areas of design, getting a board into its enclosure is about give and take – adjust that mounting hole location, tweak this component position, then modify the display opening when the supplier flags the chosen display as end of life.
The best solution is to knock down that fence and create a connection between the ECAD and MCAD design domains. A connection that allows the loaded board to be easily transferred back and forth between the ECAD and MCAD design spaces.
For this to happen, you need 3-dimensional ECAD and MCAD design environments. You also need the board and its components to have a 3D definition that can be understood in both design domains, supporting those critical changes to the board shape, component locations, and case openings.
To deliver this you need a 3D PCB editor, that can:
- Import standard-format 3D component models and create simple 3D component models
- Import the product case/enclosure
- Perform 3D collision checks within the PCB editor
- Export the loaded board in a standard file format
More than simple visualization, Altium Designer's 3D capabilities allow you to:
- Perform 3D clearance checking - components can be critically aligned with each other and the enclosure, as required.
- Visually locate connectors and other components requiring access for servicing.
- Better define manufacturing processes and the order of assembly, knowing all mechanical constraints have been accounted for.
- Generate more detailed hand assembly instructions, user manuals and instructions using images that are much closer to the reality of what will be seen by a human.
- Experiment with different colored solder masks in order to create a more aesthetically pleasing product that works well with its enclosure and surroundings.
- More easily bring key stakeholders onside by presenting them with a more concrete view of the end product.
The 3D PCB Editor
Sometimes the response when a board designer first sees their board in 3D in the PCB editor is, "hey I don't need that, that's just eye candy!"
Yes, it does look good, but it's definitely not just eye-candy. Sure the board designer is highly skilled at mapping 3-dimensional design tasks into a multi-layered 2D design space, and many of the design tasks, such as routing, are well handled in that 2D space. But the 3D mode of the PCB editor offers the designer much more than a pretty picture.
Being able to display the board in a highly realistic 3D view allows the designer to see the loaded board, ready to be fitted into the enclosure. Now you can immediately see that a designator will be obscured by that component, or that you've forgotten to tent the vias.
Add support for importing component models and now you can bring in those unusually shaped, dimensionally critical components, such as the connectors. Then add support for 3D collision detection, and now you can be confident that that component will fit under the connector, and the loaded board will fit into its enclosure.
Add the last piece in the puzzle, support for exporting the loaded board to MCAD, and the mechanical designer can test it for fit inside the final enclosure, complete with fasteners, stand-offs and the myriad of other mechanical items that go to make up the finished product.
PCB Editor Display Modes
To support the various design tasks, the PCB editor has 3 display modes (View menu):
- Board Planning Mode – use this mode to define the overall board shape, as well as board regions and bending lines on a rigid-flex design. Press the 1 shortcut to switch to this mode.
- 2D Layout Mode – the standard 2D PCB design mode, used for component placement and routing, and general board design tasks. Press L to configure the layers that are currently displayed. Press the 2 shortcut to switch to this mode.
- 3D Layout Mode – a highly realistic 3D representation of the board. Press L to configure the Projection mode, which layers are visible, their colors, and if 3D bodies are to be displayed/hidden. Press the 3 shortcut to switch to this mode.
Controlling the 3D View
In the PCB editor 3D Layout Mode, you can fluidly zoom the view, rotate it and even travel inside the board using the following keyboard and mouse combinations:
Zooming
- Ctrl + Right-drag mouse, or
- Ctrl + Roll mouse-wheel, or
- PgUp / PgDn keys.
Panning
- Right-drag mouse, or
- Windows Roll mouse-wheel (vertical) or Shift+Roll mouse-wheel (horizontal).
- Numeric keypad, in combination with the Ctrl key:
- Ctrl+4 – pan left
- Ctrl+6 – pan right
- Ctrl+8 – pan up
- Ctrl+2 – pan down
Rotation
- Shift + Right-drag mouse. When you hold the Shift key down, a directional sphere appears at the current cursor position (as shown in the animation below). Rotational movement of the model is made about the center of the sphere (position the cursor before pressing Shift to display the sphere), using the following controls. Move the mouse around to highlight and select the required control on the sphere before right-clicking:
- Right-drag sphere when the Center Dot is highlighted – rotate in any direction.
- Right-drag sphere when the Horizontal Arrow is highlighted – rotate the view about the Y-axis.
- Right-drag sphere when the Vertical Arrow is highlighted – rotate the view about the X-axis.
- Right-drag sphere when the Circle Segment is highlighted – rotate the view about the Z-plane.
- Numeric keypad:
- 4 – rotate left
- 6 – rotate right
- 8 – rotate up
- 2 – rotate down
Change the View – Main Keyboard
- 0 (zero) – view board from above
- 9 – view board from above, rotated 90 degrees
- 8 – orthogonal view of the board
Change the View – Numeric Keypad
- 1 – view board from above
- Ctrl+1 – view board from below
- 3 – view board from left
- Ctrl+3 – view board from right
- 7 – view board from front
- Ctrl+7 – view board from back
- 0 – view board from an isometric perspective
- Ctrl+0 – view board from a flipped isometric perspective
- 9 – view board from above, rotated 90 degrees
The video below demonstrates most of these view control techniques.
Controlling the View as you Switch Between 2D and 3D View Modes
When you switch between 2D and 3D view modes, the default behavior is to switch back to the last-used view in that mode. So if you had the entire board shown in 2D mode, then switched to 3D mode and zoomed in, when you switch back to 2D mode the entire board will be shown. Hover the cursor over the image below to show the behavior as the 3 shortcut is pressed.
To switch view modes and retain the current zoom location, hold the Ctrl+Alt shortcuts as you press 2 or 3. Hover the cursor over the image below to show the behavior as the Ctrl+Alt+2 shortcuts are pressed.
The Footprint and the Component
Main page: Creating a PCB Footprint
In the PCB editor, the area that the component occupies on the fabricated board is defined by the component footprint. Component footprints are created and edited in the PCB library editor. Refer to the Creating a PCB Footprint page to learn more.
A typical footprint includes pads and a component overlay, and can also include any other mechanical details required. In the example footprint below, most of the component outline is defined on a mechanical layer (the green lines) rather than the (yellow) overlay, because this component will be mounted so that it hangs over a cutout in the board.
The component that is mounted on that footprint can be modeled using 3D Body objects, which are placed onto the footprint in the PCB library editor. The 3D Body object is used as a container into which a generic MCAD format model can be imported, as shown in the image below.
► Learn more about placing and editing 3D Body objects.
Using a 3D MCAD Component Model
An accurate 3D model is the preferred approach. Not only does it look better, if it is correctly designed it will be dimensionally accurate, giving more accurate 3D collision testing in the PCB editor.
Notes on using a 3D MCAD model sourced from a file:
- When the Place » 3D Body command is selected from the menus the command will default to placing a generic 3D model. The Choose Model dialog will open, locate and select a model file created in one of the supported formats. Components can be imported in the STEP (
*.Step
and*.Stp
), Parasolid (*.x_t
and*.x_b
) and SolidWorks Parts File (*.SldPrt
) formats. - When a model has been selected in the Choose Model dialog and the Open button clicked, the model will appear floating on the cursor in the design space. Click to place the model in the design space.
- The default behavior of the software is to remain in placement mode, press Esc to drop out of model placement mode. The next section discusses how to orient and position the model that you have just placed on the footprint.
- A 3D model is imported into a 3D Body object – if you click to select an MCAD model in the PCB library editor, such as a STEP model, the Properties panel will show the properties of the 3D Body object containing that MCAD model.
Notes on using a 3D MCAD model sourced from a connected Workspace:
- To place an MCAD model from your Workspace, you must select the Place » 3D Extruded Body command from the main menus. This command allows access to the Workspace (via the Properties panel), whereas the Place » 3D Body command only allows an MCAD model to be placed from a file on the hard drive.
- After selecting the command, press the Tab key to display the 3D Body mode of the Properties panel, where the 3D Model Type can be switched from the default Extruded to Generic (generic MCAD model).
- The Source field will appear in the panel, choose Server to access the Workspace, then click the Choose button to open the Choose Item dialog. This dialog shows the content of your Workspace.
- Locate the required MCAD model in your Workspace, select it then click OK.
- You will return to placement mode in the library editor design space. Click the Pause button ( ) to return to editing and place the MCAD model.
- The default behavior of the software is to remain in placement mode. Press Esc to exit model placement mode. The next section discusses how to orient and position the model on the footprint that you have just placed.
- MCAD models can be stored in your Workspace. Refer to the 3D Model page to learn more.
- A 3D model is imported into a 3D Body object in the PCB editor or the PCB library editor. If you click to select an MCAD model in the PCB library editor, such as a STEP model, the Properties panel will show the properties of the 3D Body object containing that MCAD model.
Configuring the Mechanical and Display Layers
3D Body objects are normally placed on a mechanical layer. If the 3D Body object is to represent a component, the 3D Body object should be added to the component footprint in the PCB library editor.
Any mechanical layer can be used to place 3D Body objects. Typically a layer is chosen and named and that layer is used for 3D Body objects only. Because PCB components can be mounted on either surface of the finished PCB, the software supports the pairing of mechanical layers. Working in exactly the same way as the paired top and bottom silkscreen layers, when a component is flipped from the top side to the bottom side, any object on a mechanical layer that is paired is automatically flipped onto the paired mechanical layer.
Layer pairing is not required for the rendering of the model in 3D; the software uses the Board Side property to determine which surface the object is on and in which direction to render the 3D Body. Layer pairs are important if you need to generate side-of-board assembly printouts that include components on one side of the board.
MCAD to ECAD – the Enclosure and Board Shape
Main page: Mechanical Data Import-Export Support - STEP Files Import-Export Support
A common approach is for the mechanical designer to develop an initial concept model, so everyone involved can get a sense of what the product will look like. From there the mechanical designer refines the enclosure design and defines the initial board shape.
That enclosure and board shape can be passed over to the ECAD designer, by saving it out of the MCAD tool in the STEP format and placing it into the PCB editor design space. Altium Designer includes a command that will redefine the ECAD board shape directly from the MCAD board shape.
Exporting the Enclosure from MCAD
STEP is a complex and highly detailed file format. To maximize the success of transferring design data, keep the following in mind:
- The board shape can be exported inside the enclosure, as long as it is a separate sub-assembly. If this has been done, you can redefine the ECAD board shape from the mechanical definition with a few clicks in the PCB editor.
- Use the AP214 format whenever possible.
- Use a surface or solid geometries option, if available.
Importing the Enclosure into the PCB Editor
As well as being able to import a component model into the library editor, you can also import the enclosure into the PCB editor. Doing this allows you to perform accurate 3D collision testing of the loaded board sitting inside its enclosure.
When you are using an MCAD component model, it is imported into the footprint in the PCB library editor. For the enclosure, you import the model into a 3D Body in the main PCB editor using the Place » 3D Body command. In the 3D Body mode of the Properties panel, you must set the source of the model to Server, Embed Model or Link to Model. If you choose the Embed Model option, the MCAD model is stored within the PCB file. For the Server and Link to Model options, the model is linked to the PCB file.
The process of importing an MCAD enclosure into the PCB editor is demonstrated in the video below.
Controlling the Display of the Enclosure
Main page: PCB – 3D Models
A big advantage of defining the PCB editor board shape from the board shape in the STEP model is that your board is then perfectly sized and positioned within the enclosure. To redefine the board shape you need to be able to see the board inside the STEP model, which you can do by hiding part or all of the enclosure (demonstrated in the next video).
The visibility of all 3D models is controlled in the 3D Models mode of the PCB panel.
To hide a sub-part in a model:
- Select
Free Models
in the Components section of the panel. - Select the enclosure in the Model section of the panel. If it contains sub-parts, you will be able to expand it as shown in the image above.
- Click on the required sub-part model name to select it. This enables the drop-down below that section of the panel, where you can control the opacity or hide that part of the model. There is also a checkbox that can be used to disable DRC checking of any STEP model.
Defining the Board Shape from the MCAD Model
If the imported enclosure includes the board shape, and that shape has been included as a separate sub-assembly, the ECAD board shape can easily be redefined directly from the MCAD board shape, as shown below.
To define the PCB editor board shape from a shape within the imported STEP model:
- If necessary, you can hide part of the enclosure to give access to the board shape (as shown in the video above).
- Run the Design » Board Shape » Define from 3D Body command with the display in 3D Layout Mode.
- This is a 2-stage command, first you select the model,
- then you select the face that the board shape will be defined from.
- The Board Outline Creation Successful dialog will appear, here you choose which face of the board will be aligned with the model face that you just clicked on. The term top PCB board surface refers to the upper surface of the Top Layer copper. This is the zero reference for the PCB editor's Z plane, so a good approach is to click on the upper surface of the board shape in the STEP model, and align it with the top PCB board surface.
- You also get the option to hide the MCAD board object from the DRC process. It is a good idea to enable this option, since the board shape is now accurately defined and will now be used for component placement and DRC testing.
Perform 3D Collision Checks within the PCB Editor
Main page: Defining, Scoping & Managing PCB Design Rules
Perhaps the greatest strength of the 3D PCB editor is the ability to perform 3D collision testing. As well as catching general component-to-component collisions, you can also confidently position one component under another, or test if the loaded board fits correctly into the enclosure.
Collision testing relies on the Component Clearance design rule. Add Component Clearance design rules to check for collisions between components that include 3D body objects in the X, Y and Z planes. This allows you to check the clearance of one component over another component. Multiple rules can be defined to handle different clearance requirements. Note that the Design Rule Check does not test if a 3D body object is passing through the board.
This is a binary rule, meaning it tests between this object(s) and that object(s).
The default behavior is to display the objects in violation, and the distance between those two objects. To see the exact location of the minimum separation between the objects, enable the Show actual violation distances option in the Component Clearance design rule.
Referencing a 3D Model in a Design Rule
Main page: Defining, Scoping & Managing PCB Design Rules
To get the most out of the design rules system, it is important to understand how to best scope the design rule. The rule scope defines the set of objects targeted by that rule, for example, a rule scoped with the InPolygon
keyword will apply to all of the primitives within all of the polygons on the board. To target the objects within a specific polygon, you would use the InNamedPolygon('PolygonNameHere')
keyword.
If you are creating a rule to target a specific component, you can use the query keyword InComponent('ComponentDesignatorHere')
. That rule scope will target all objects within the component C1, including the pads, overlay tracks, 3D model, and so on.
If you only want the rule to target the 3D model in a component, you can use the id
keyword in the design rule. For example, in the video above, the LCD is a separate sub-assembly, with a designator of LCD1. The 3D model used in that component has an id value of LCD_2x16
, as shown in the first image below. To use this id, the rule could have been configured as shown in the second image below.
Performing Measurements in 3D
As well as checking for collisions, another task the designer often needs to do is to measure the distance between two 3D objects. What is the clearance between the connector and the case? How much room is there between that IC and the connector that is above it?
The Measure 3D Objects command (Reports menu) gives detailed measurement distances for the X, Y and Z planes, as well as the shortest distance between the chosen objects.
The command has two modes for selecting the target object:
- Hover the cursor over the required object (it will highlight in green), or
- Hold Ctrl as you hover the cursor to highlight only the specific face on the target 3D object.
In the image below a surface on the blue connector has been chosen, and the closest surface on the white product case. The 3D Distance dialog has been overlaid on the image.
ECAD to MCAD – Export the Loaded Board
Main page: Mechanical Data Import-Export Support - STEP Files Import-Export Support
So you're ready to export the loaded board to your MCAD designer, you do this using the File » Export » STEP 3D. Once you've entered a name for the file, the Export Options dialog will open.
Notes about using this dialog:
- If you only want to export select components, it is generally easier to select them in 2D display mode.
- Free 3D Bodies are additional 3D models placed in the PCB editor, such as the enclosure.
- The board is always exported. To exclude all components (only export the board), enable the Export Selected option, with no components selected.
- The 3D Bodies Export Options apply to 3D bodies/models added to the component footprints in the PCB library editor. The term simple bodies refers to extruded, cylindrical or spherical 3D Body objects.
- In the STEP file, each component is identified by its designator. If the MCAD designer needs to import multiple boards into a single MCAD file there is likely to be designator clashes, to avoid this include a Component Suffix.
- Use the Export As Single Part option to export the board as a part rather than as an assembly.
- The Export Folded Board option only functions if there bending lines defined in the design. To export the board partially folded, before running the Export command, configure the fold amount using the Fold State slider in the Layer Stack Region mode of the PCB panel. The value defined will automatically be applied in the Export Options dialog.
Generating Outputs
There are a variety of 3D-type outputs that can be generated. The table below summarizes the available outputs and how each is configured and generated.
Output Type | From The | Notes |
---|---|---|
Screen capture | PCB editor | When the editor is in 3D Layout Mode, press Ctrl+C to take a screenshot of the current view. The 3D Snapshot Resolution dialog will appear, select the required Render Resolution and click OK to copy the image onto the Windows clipboard. From there, paste it into your preferred bitmap editor. |
Export as an image | PCB editor | Select the File » Export » PCB 3D Print command. After selecting the location to save the image file, the PCB 3D Print Settings dialog will open, where you can set the Render Resolution, how you would like the board to be viewed, and the image format. |
PCB 3D Print | OutputJob |
Configured in the PCB 3D Print Settings dialog. In the OutputJob, map the output a New PDF container or directly to a printer. Position the board as required before generating output, then click the Take Current Camera Position and Take Current View Configuration buttons to generate a printout of what you can see on the screen. You can also create an image file, by mapping the Output Job to a Folder Structure Output Container. |
PCB 3D Video | OutputJob |
Configured in the PCB 3D Video dialog. In the OutputJob, map the output to a New Video container. Output can be in a variety of video formats. To generate this output you need to first define a PCB 3D movie in the PCB 3D Movie Editor panel. Refer to the 3D PCB Video page to learn more. |
PDF 3D | OutputJob / PCB editor | Configured in the PDF3D dialog. In the OutputJob, map the output to a New Folder Structure. Requires Adobe Acrobat v9 or newer to support the 3D motion. Output can also include key frames from a PCB 3D Movie, if one has been defined. Refer to the PDF3D Exporter page to learn more. |
Including Mechanical Layers in the 3D View Mode
Mechanical layers can 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 (hover the cursor over the image to display the View Options settings).
Printing from the PCB editor
The PCB editor is able to generate printouts from both the 2D and 3D layout modes. It is also possible to define multiple 2D printouts, with different layers and objects enabled – for example, final artwork prints, composite prints, power plane prints, and so on.
Since there are multiple PCB printouts available, the printout that is generated when you select File » Print from the PCB editor menus is determined by the currently selected Default Print, which is configured via the File » Default Prints command.
Printing from an OutputJob
Main page: Streamlining Generation of Manufacturing Data with Output Jobs
Because there is a range of PCB printouts available, most designers prefer to use an OutputJob, where each specific output type can easily be added and configured, and output generated from it.
The 3D type printouts are added in the Documentation Outputs section of the OutputJob file. Click [Add New Documentation Output] to display the menu and select the required output type, as shown in the image below.
► Learn more about Streamlining Generation of Manufacturing Data with Output Jobs
► Learn more about releasing output data with the Project Releaser