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.
As you’ve noticed most PCB designers work in a more “analog” world, where clearances and path routing are the defining design elements.
You will also note a component “location” is defined by its origin when the footprint is created. Not all footprints follow the same approach. Some use Pin 1 and some use the center of the body etc.
In your example you should know where the “location” is relative to the front edge of the body. Simply move that to the edge of the board then move it again to have the overhang you want. Then you can lock the location of that component.
You will also notice most component have loose tolerances with the major requirement the pins fall on the pads.
I will agree creating more complex (than a circle or rectangle) shapes KiCad is not the most friendly, however you can import a dxf file using your favorite program to create a shape and mounting locations.
All this is compilated even more with the addition of those “components” you cannot see. Namely pickup from other traces and or creation of unwanted noise sent out of your design via RF (and some below RF) electrical noise. Hence the “magic” some folks have mentioned.
Welcome to the world of drawing. Be careful what you learn you may not be able to learn another substantial CAD paradigm in your life, unless you can work over this psychological issue. There is essentially 5 ways to draw accurately (in order of how generic they are):
-
Grids.
-
Numeric input. Supported but hidden very effectively by the GUI,
-
Construction geometry and intersection finding. Can do mostly everything and is finally supported in kicad so you can now in fact do everything a constraint solver does.
This is how most drawing works. And it might be useful to get familiar with this as it allows for much more geometry than geometry solvers do. But it is also useful for working with real world stuff as this is how you must do things because there’s no inherent solver in the real world. Technology from 300 BC.
-
Geometric constraints. Which is essentially 2 and 3 generalized into a form that mimics how mechanical drawings are specified. More on this later
-
By writing the solver yourself (in other words programming). Possibly the next paradigm since LLM’s might help us get here without much problems and this has less limitations as current solver based systems.
This is what all those node based building systems are. But it has all the downsides of programming in general.
Even though constraint based software have become standard in mechanical CAD applications mostly because of efforts to get away from Autodesk (not invented by Autodesk) in mid 1980’s. Other industries have not heard about this until very recently (5-10 years even though the paradigm has existed 50 years)
Now the problem is that geometric constraint based systems are very hard to retrofit, especially if the software does not already have a robust scene graph. The problem is 2 fold
-
A constraint solver is generally a slow O(n^2) complexity* . For this reason most CAD software employing this paradigm have many small sketches that then get rolled into a whole.
You can get a away with this in 3d as you can hide behind the 3d operations. But in 2d you have no natural way of grouping things in 2d. So you would need to introduce a bit of things that is unnatural to the directly manipulating crowd. You can probably get away with this if you have a solver graph like say Blender or Graphite (which is a vector drawing software with a node graph).
So simply it does not currently scale in complexity very well. Which is why you don’t see people working with layout using constraints all that much. So Architects, interior architects, graphic designers, electrical engineers, electronics designers, landscapers, factory floor planners etc don’t see it as a a direct benefit. Even if they see it as a useful feature in certain sub aspects of their work.
-
It isn’t actually a faster way to work. The direct manipulation is faster, provided that you do not need to do any significant changes later. So its not necceserily a feature that makes everybody happier. It needs training to do well, as does the construction geometry method. And there is a substantial overhead from moving form one system to the next. It’s fairly typical that students who have learned one or other reject the other method as even a possibility.
From development point this means you’d have to climb a mountain to get to a new local minima. Probably hire all new programmers and convince you clients it will be better at some unspecified future date.
So you would probably benefit from this a lot in certain cases. To throw an example that hasn’t been said: You could use something like this to make parametric components in the library, instead of having 3*40 pin headers you could probably with a graph and constraints to explain the intent only have 1 parametric item in your library.
But then you can export stuff form your 3d CAD. Since it is most likely the one running the user interface design show anyway. So might be sane to design the user interface items in CAD and then just snap your items to the imported guide.
* Or actually the pre compute phase where you arrange the computation into a form that you can then solve. It has been claimed to be O(n log(n)). But i haven’t used any software that is.
Looks like the OP is no longer interested . . .
I suggest this thread (which is going well off topic) is closed soon.
Was last seen 1 min. ago, so is still reading comments. Better leave this open for a while longer.