I'm attempting to align some components, such as an OLED display and a push-button, to the pcb board's centerline. The board was imported as STEP from Solidworks and has a non-uniform format (not a rectangle). The issue is that I've already completed the layout and origins from CAD to Altium have been forgotten, making it nearly impossible to insert a board shape from Soldiworks with origin marks that matches exactly to the existing board shape. Another issue I'm having is that because the board has a strange shape, it's difficult to manually set the origin because even when I click over a line, it's not right on top of it when I zoom in (has always a offset). The same principle applies when I try to mark the PCB's boundaries with simple pads or taking measures, which is the CADish way I explored to center an object between the board's lateral edges (horizontal boundaries), for example. Is there a different way to find the board's center and/or a way to place components on centerlines, midpoints or in the center of an component? When designing footprints (pcb library view) there is an option to center the origin between the existing pads but not on the layout. To get a more precise placement, I manually check the coordinates between the keep-out lines on the board edges and then make calculations, but this is not practical or error-proof.
-
1\$\begingroup\$ You could find the coordinate of the centerline, create a new mechanical layer, and then draw a centerline as a track or something on that mechanical layer. You can then set your snap rules to snap to track centers and then you will be able to drag components onto your centerline. Alternatively, you could use the "Move Board" command to move the entire board so the centerline is in a more convenient place. \$\endgroup\$– mooshoomattCommented Apr 13, 2022 at 1:07
-
1\$\begingroup\$ Are the mounting holes defined in Solidworks? If so, calculate the offsets from one of the mounting holes for your various components and set the x-y coordinates manually for the part. You can set the origin of the board to the reference mounting hole. Alternatively, you can create a user definable grid where the origin references your reference mounting hole. \$\endgroup\$– qrkCommented Apr 13, 2022 at 2:42
2 Answers
You can select the top outline, the bottom outline and the component (one at a time). Then choose align -> space equally distributed.
You define the origin of the part when you create the footprint. Often that's on pin 1, but for some parts like tact switches it makes a lot more sense to put it in the centre of the part under the button. Similarly with LEDs. Sometimes I put silk screen marks where the edge of the board should be, for example, or where a shaft extends to. Or where an LED should be under a light pipe. You can always edit unwanted silk screen marks off the instantiation of the part, or ignore them if they're on a mechanical layer.
As far as the board goes, I think I'd calculate the center of the board (however you define that on an irregular board like that) and move the origin there, at least temporarily, but there are other ways to do it such as adding lines on a mechanical layer. To be honest, on a board like that, center between mounting holes (very easy to calculate) looks more useful than center of the extents.
-
\$\begingroup\$ Unfortunately, the mounting holes were placed without reference, they will only be used to add height to the board using spacers. \$\endgroup\$ Commented Apr 13, 2022 at 1:25