操作挤压体、球和圆柱等3D主体
Parent page: Working with 3D Bodies
While placing generic 3D models is a recommended way of using 3D Body objects as this provides an accurate and detailed component representation on the PCB, a 3D Body object also can be used for placing extruded, spherical, and cylindrical 3D Body shapes. There are three styles of simple 3D Body objects that can be placed:
Extruded | In the X-Y plane (top view), the extruded object is defined interactively, in the same way that other polygonal objects are defined in the PCB editor. The object is then extruded up (or down) in the Z plane, based on the Overall Height and Standoff Height properties defined in the 3D Body mode of the Properties panel, and the Body Projection option. You can also apply a Texture File, such as a logo, to the surface of an Extruded 3D Body object. |
Cylindrical | The properties of this shape are defined in the 3D Body mode of the Properties panel. |
Spherical | The properties of this shape are defined in the 3D Body mode of the Properties panel. |
Extruded, Spherical, or Cylindrical 3D Body Object Placement
Direct placement
Extruded, spherical, and cylindrical 3D Body objects are available for placement in both the PCB and PCB footprint editors by:
- Choosing the Place » Extruded 3D Body command from the main menus.
- Locating and using the Extruded 3D Body command () on the Active Bar.
To place an extruded, spherical, or cylindrical 3D Body object:
- After launching the command, the cursor will change to a crosshair and you will be in the default placement mode, placing an Extruded 3D Body object.
- Press Tab to pause placement and display the Properties panel in 3D Body mode. The pause button overlay ( ) will appear in the design space, indicating that you can access the fields of the Properties panel.
- In the Properties panel, enter a name for the 3D Body in the Identifier field. This is optional; the Identifier can help when there are multiple 3D Bodies being placed and also can be used to target this 3D Body in a design rule if required.
- Select the required Board Side; typically this is set to
Top
. In the PCB library editor, the footprint is built for the top side of the board; it can be flipped to the bottom during the PCB design process if required. - Select the mechanical Layer on which the 3D Body is to be placed. Component-type mechanical layers should be paired with a second mechanical layer so that if the component is flipped from the top side of the board to the bottom side, its mechanical detail, such as the 3D Body, will move to the paired mechanical layer. Mechanical layers are paired in the Layers and Colors tab of the View Configuration panel. Refer to the panel page for more information.
- Select the 3D Model Type from the available shapes: Extruded, Cylinder or Sphere.
- Each shape must have a defined size before it can be placed. If the chosen shape is:
- Extruded – then define the Overall Height.
- Cylinder – define the Height and Radius.
- Sphere – define the Radius.
- In the Display region of the panel, click the Color button to set the color and adjust the Opacity as required.
- Once editing is complete, click the pause button overlay to return to the design space.
- If the shape is a Cylinder or Sphere:
- The cursor will be moving in the design space with a rectangular shape attached; click to place the 3D Body.
- Right-click or press Esc to terminate 3D Body object placement.
- If the shape is Extruded, the cursor will present, ready to define the polygonal base shape of the extruded 3D Body:
- Click to define the first vertex.
- Move the cursor ready to place the second vertex. The default behavior is to place two edges with each click, with a user-defined corner shape between them. Refer to the Extruded 3D Body Placement Modes section below to learn more.
- Continue to move the mouse and click to place further vertices.
- After placing the final vertex, right-click or press Esc to close and complete placement of the 3D Body. There is no need to manually close the 3D Body as the software will automatically complete the shape by connecting the start point to the final point placed.
- If the shape is a Cylinder or Sphere:
Extruded 3D Body Placement Modes
While placing an extruded 3D Body there are five available corner modes, four of which also have corner direction sub-modes. During placement:
- Press Shift+Spacebar to cycle through the five available corner modes.
- Press Spacebar to toggle between the two corner direction sub-modes.
- When in either of the arc corner modes, hold the or keys to shrink or grow the arc. Hold the Shift key as you press to accelerate arc resizing.
- Press the 1 shortcut key to toggle between placing two edges per click, or one edge per click. In the second mode, the dashed edge is referred to as the look-ahead segment.
- Press the Backspace key to remove the last vertex.
Creating from the Footprint
To accelerate the process of building up the component shape out of 3D Bodies, the software can create a series of extruded 3D Body objects based on closed shapes detected in the footprint. This feature can be helpful if the component has an unusual shape, which is already reflected in the shapes defined in the footprint's component overlay. You can also add additional objects into the footprint on mechanical layers, which you can then use to create additional 3D Body objects from, for example, to create the pins.
The images below show a TO-92 transistor footprint. From this, the outline drawn on the Top Overlay layer is used to define the transistor body on the chosen 3D Body layer pair (referred to as the Registration Layer in the dialog). There have also been three small squares created on a mechanical layer (each square made from four lines), which are used to define the component pins on the chosen 3D Body layer pair – the settings are shown in the dialog image below.
To create 3D Body objects from shapes in the footprint run the Tools » Manage 3D Bodies for Current Component command, the Component Body Manager dialog will open. Note that the Body State column shows four shapes are going to be used to create 3D Body objects.
Notes about using this dialog:
- The detection algorithm will offer either: a rectangular shape created from the bounding rectangle, or a polygonal shape that follows the outline of the shape formed by the outline of the primitives (traced along the centerline of tracks/arcs, if their endpoints are coincident).
- To create a 3D Body from an existing object, click the blue text in the Body State column.
- The Overall Height defaults to the Height defined in the PCB Library Footprint dialog.
- For a component pin that passes down through the board, set the Body Projection to Bottom Side.
- The 3D Body objects are created when you click the Close button in the dialog. If the display is already set to 3D mode you might need to: refresh it (End shortcut), switch to 2D then back to 3D, or toggle the Show 3D Bodies option Off and On in the View Options tab of the View Configurations panel to see the new objects.
- To edit 3D Bodies in the PCB editor using this dialog, you can access it by selecting the Tools » Manage 3D Bodies for Components on Board command from the main menus or by right-clicking a component and selecting Component Actions » Manage 3D Bodies from the context menu.
Creating from Selected Primitives
As well as interactively placing a 3D Body, they can also be created from a set of existing track, arc, and solid objects that define a closed shape. To define a 3D Body from an existing closed shape:
- Select all primitives that form the closed shape.
- Click Tools » Convert » Create 3D Body from Selected Primitives.
The 3D Body will be created from the closed boundary formed by the primitives on the Top Layer, regardless of the layer on which the selected tracks are located. Note that the original selected primitives will still exist after the region has been created and will remain selected. The 3D Body's boundary follows the centerline of the bounding track objects and it is not selected.
As the Create 3D Body from Selected Objects algorithm uses the centerline of the selected objects, it requires that the end and start locations of touching objects are exactly co-incident (at the same location). If this is not the case, a Confirm dialog will appear, giving the location where the algorithm failed and also providing the opportunity to instruct the algorithm to attempt to define the 3D Body from the edges of the objects instead. As long as the selected objects overlap slightly, this option should create a 3D Body with the edge of the 3D Body tracing the outer edge of the selected objects.
From the PCB library editor, you can create 3D bodies using the Tools » Convert » Create 3D Body From selected primitives. This command is an excellent choice when the model is simple.
Graphical Editing
The graphical method of editing allows you to select a placed 3D body object directly in the design space and change its size, shape, or location graphically.
For an extruded 3D body, click once on the object to select it, which puts it into edit mode. The outer shape of the 3D body object is defined by a series of edges: where each edge is represented by an end vertex at each end, shown as a solid white square (A in the image below); and a center vertex in the middle, shown as a hollow white square (B in the image below). Each end vertex represents the location where two edges meet.
Standard polygonal shape editing techniques are available for editing the shape.
When editing a polygonal object, there are three editing modes available, Slide/Miter, Incurvate (arc) and Move. The current mode can be changed while dragging a vertex or an edge by pressing Shift+Spacebar to cycle through the 3 modes.
- Slide/Miter – click and hold on an edge or a center vertex to slide that edge; click and hold on an end vertex to miter the corner.
- Incurvate – click and hold on an edge or a center vertex to incurvate that edge; click and hold on an end vertex to incurvate (arc miter) the corner.
- Move – click and hold on an edge or a center vertex to break that edge into two edges; click and hold on an end vertex to freely move that corner.
During editing, you can also:
- Ctrl+click and hold anywhere along an edge away from editing handles to insert a new vertex.
- To remove a vertex, click and hold on the vertex then press the Delete key.
- Click anywhere on the 3D body away from editing handles then drag to reposition it. While dragging, the 3D body can be rotated or mirrored:
- Press the Spacebar to rotate the 3D body counterclockwise or Shift+Spacebar for clockwise rotation. The Rotation Step size is defined on the PCB Editor – General page of the Preferences dialog.
- Press the X or Y keys to mirror the 3D body along the X-axis or Y-axis.
Reference Point of an Extruded, Spherical, or Cylindrical 3D Body object
An extruded, spherical, or cylindrical 3D Body object has a reference point or origin.
- For a cylinder and sphere, the reference is the center point of the object's circular shape on the X-Y plane.
- For an extruded object, the reference is set to the location X-length/2, Y-length/2 when viewed from above.
- It is the position of this reference point in the design space that is shown in the X/Y Location in the Properties panel.
Including a Texture on an Extruded 3D Body
Extruded objects also can include an image overlayed on the uppermost surface. When a Texture File is added, it is automatically stretched to fit to cover the entire upper surface of the 3D body, as shown in the image below. This can be adjusted by altering the Center location, Size and Rotation settings in the 3D Body mode of the Properties panel. Note that the texture file is linked to the Library or Board file.
Supported Texture File formats include: *.bmp
; *.dds
; *.dib
; *.hdr
; *.jpg
; *.pfm
; *.png
; *.ppm
; and *.tga
.