I’m a mechanical engineer coming from Fusion 360 and I want to learn PCB design. When I discovered placing components requires you to manually define the edge coordinates for the components, I just quit the program. I feel like construction geometry and dimensional constraints are essential for any design workflow involving anything in three dimensions. If this were Fusion and I wanted my USB C port to extend past the board 3mm so that it’s flush to the edge of the pcb’s enclosure, I could just click both edges and dimension them. When I try using dimensions in Kicad, they don’t actually attach to lines and when I try to use lines and dimensioning to line up components and see that it doesn’t work, I get frustrated. I have lots of constraints I can use when I do sketches in Fusion and those would be super useful when placing components on a board. Same for edge cuts and fill zones, I can’t get them anywhere near as clean as I can with Fusion. Traces may benefit from this, but I don’t think they would have the same benefit.
I guess those style of constraints come from Autodesk’s mechanical CAD/CAM heritage - where physical constraint-led design is the norm.
Have you had a look at the PCB docs for other ways to accurately position components?
You can also set up various grid settings to allow you finer control over things such as edge cuts and fill zones.
You are also welcome to file a feature request for physical constraints (if one doesn’t already exist) in gitlab.
Parametric/constraint dimensioning is unfortunately something found in MCAD and not traditionally in any electrical cad.
There is a wishlist item to add it Parametric design / geometric constraints (lp:#1813239) (#2329) · Issues · KiCad / KiCad Source Code / kicad · GitLab
but it’s not a trivial thing to implement
FreeCAD with KiCAD StepUp integration plugin is the solution today.
I can’t really stand FreeCAD though so I get by passing DXF and STEP files back and forth.
I really like parametric drawing in FreeCAD. You start by entering important measurements, and then you add a bunch of less important measurements later, and when you change stuff, the important measurements stay valid, even if they shift relative to other things. This is a quite HUGE thing for mechanical CAD.
But for KiCad, I don’t miss it at all. You write:
so I assume you have not designed a PCB yet. In PCB design, accurate measurements really are not a big deal for the majority of things. It really does not matter whether the spacing between your resistors is 2.5mm or 2.8 mm or whether they line up at all. (Except for the CDO people (which is like OCD but with the letters in the right order)). For they vast majority of measurements on a PCB, going the parametric way would be much more of a bother and annoyance then it’s worth. Imagine drawing a track with a few bends between two pads, and having to define the location, angle, length of the segments. Yuch. Instead, you just draw them on a grid and be done with it. Drag or push them elsewhere if the original location was not so good.
But there are area’s where parametric drawing would be a benefit. Mostly for the PCB outline, connectors, and stuff that (visually) benefits from lining up. KiCad is quite limited in anything mechanical. Partly because of the limited resources available for KiCad development, but also because KiCad focuses on PCB design. Complex PCB outlines are best drawn in a mechanical CAD program, and then imported into KiCad. And overall this is a quite good compromise. I do understand your resistance to the absence of parametric design when you’re coming from a mechanical CAD background. But PCB design really is a whole other world. It would still be nice to have parametric capabilities in some parts of KiCad, but it really is not such a big deal that it’s missing.
I will add a little.
PCB design does have a form of constraints, namely clearances between conductors, components and other elements. However, only a few components need exact physical placement. Usually, placement is more determined by the best routing, and for many applications, this is not always clear and remains something of an art.
In fact, having routing depend on parametrically determined component placement and board dimensions would play havoc with certain types of designs, such as high speed design, high power PCBs, and high sensitivity analog designs. There are many factors to be balanced in addition to physical placement, such as trace impedance, propagation delay, current return paths, and electric and magnetic field coupling between traces.
You can often ignore these for simple designs, but for more complex designs one or more (even all) of these factors can come into play.
John
That kind of positioning is just a tiny bit of what is required to design a functioning PCBA . . . much, much more important is the circuit design, that mostly governs if it’s going to work. Once that is done then you have to connect the components as defined in the schematic . . . then you need to understand the importance of ground planes, track widths, signal cross talk, etc, etc. positioning of components that connect to the outside world is a small bit of the problem you are trying to solve.
I would draw a line on a user layer 3mm past the board edge ( use space bar to reset user coords to aid lining up) and place the connector up against this line. Then lock in place so it cant be moved.
As others have mentioned pcb software tends not to have constrained dimensioning, something I had to get my head round coming from MCAD, but something you soon get used too and develop tricks to get around it.
I don’t understand this sentence. What means manually? Opening a footprint parameter window and manually writing X,Y coordinates? I have never done it.
Then D+ and D- differential pair routed to USB C will be automatically re-routed with preserving all constraints pertaining to differential pair and then if that pair after being re-routed will be colliding with a nearby GND via that via will be shifted, but it then will collide with C5 VCC pad so the C5 have to be shifted and so on.
You have to wait till AI will be designing PCBs.
Imagine you have one USB-C connector and 100 other footprints that there are no rationale rules specifying how they have to be positioned in relation to each other except that no one should collide with any other.
Want you to have to invent constraints for all these 100 footprints or just have a little problem with this one socket?
What is your problem with fill zones? In many cases fill zones are just defined as (intentionally) random shape bigger than PCB itself.
If you think of using KiCad to cell phone PCB design where you really have lot of mechanical constraints than probably KiCad is not yet ready for it.
Constraint dimensioning would help a lot when drawing footprints off datasheet specs.
I agree that this is one of the few areas where parametric drawing would be beneficial, but I’m not convinced it would help “a lot”. Quite a big part of KiCad’s footprints are generated from scripts, and KiCad has the built in footprint wizards. KiCad also has a quite usable method to copy pad properties of one pad to a lot of other pad.
I do not like the dual row header footprints in KiCad much. I find the pads too big and there is not much room left to route tracks in between the pads, and I tend to modify these footprints quite heavily:
- Make the pads oval.
- Make the pads narrower, so there is more room for soldering.
- Move the pads outwards.
- Shift the holes in the pads inward again, so they are back in their place.
These are quite a bit of bulk operations on all the pads, and I find that doing them with the “Copy pad properties to default” and “push default to other pads” works quite well for this. If the design was parametric, only one of the pads would have to be modified, and these modifications would propagate to the rest of the array automatically, and this is a benefit. But it also has down sides.
- How do you keep the parametric parts separated from the rest in an intuitive way?
- How do you handle exceptions, such as pad 1 being square (rounded rectangle)?
- It would complicate the workflow by adding another way of doing things.
- It would suck up a lot of design time from the KiCad developers (They have a backlog for a few years of work, and new feature requests get added all the time).
I usually get lost in details and I find it hard to judge whether the benefits would outweigh the troubles to get there.
One issue that I encounter when placing and orienting footprints on the PCB based on the required mechanical constraints is where the origin is placed on the KiCad footprints. I usually use the center point of the footprint to locate it in the mechanical design for interface components (typically multi-pin and coaxial connectors).
Making or modifying the KiCad footprints to place the origin in the center of the footprint simplifies things greatly for me.
Now give your project placement files to the person who has to program the PnP machine to verify that all parts are placed in their proper locations and orientations. “center of the footprint” does not work for asymmetrical parts, and many connectors are asymmetrical. I’ve never sent out placement data for such machines to a fab, but as far as I know there are no real standards here. It’s a part of the reason such machines need quite a lot of manual intervention for their setup and that makes it expensive, especially for small production runs and prototypes.
To the extent that there is a standard, it’s “center of the footprint”… it’s literally called a centroid file.
For asymmetric footprints, it’s easy enough to calculate a bounding box and its center.