← Back to team overview

kicad-developers team mailing list archive

Re: layer based constraints

 

Very cool idea!

Concerning the potential mess in the pcb file, I absolutely agree.
Concerning the potential mess I partly agree. Of course, this check-box would be in the layer stack dialog, not in the constraint dialog.

I really like your idea of an arbitrary list of constraints of any "sort". And I like the thought that complex constraint sets could be scripted. But I still think that for the "normal user" it has to be kept simple. I could imagine a gui based helper for the simpler constraints.

add constraint --> dialog with - how are they called? "folder indexes" on top of the dialog for: Layer constaint, net constraint, area constraint,...

and for more complex constraints: Just script them. :-) Or load them from a normal text file produced for a similar project.

Hmmm... Is it realistic? I really kinda like this idea! I also like mine ;-) but this would be even better!




-----Ursprüngliche Nachricht----- From: Tomasz Wlostowski
Sent: Friday, April 26, 2013 4:43 PM
To: Simon Huwyler
Cc: Dick Hollenbeck ; kicad-developers@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Kicad-developers] layer based constraints

On 04/26/2013 04:08 PM, Simon Huwyler wrote:
One more thing: I agree that the additional numbers may confuse a bit.
So, why not just insert a check box named: "Use layer based constraints"?

Hi Simon,

I agree that such constraints are very useful, I use them frequently in
Altium, but this is only a small piece of the whole DRC machinery that
needs to be rewritten. A makeshift patch to the current DRC code will
only make it more difficult to fix properly in the future, for instance
by keeping these extra rules hardcoded in PCB files (that any newer
release will have to parse to keep compatibility).

For example, what about area-bound clearance/width constraints (i.e.
different clearance values for different parts of the PCB?). Why not
just insert another checkbox named "Use area based constraints" next to
yours and store a few more parameters in the .kicad_pcb file? Then
someone else comes up with yet another specialized constraint, and we'll
end up with bloated GUI and mess in code.

What about simply letting users specify a set of boolean expressions
that return the clearance for a pair of objects to be checked. For example:

1. both.GetLayer() in ['Top', 'Bottom']: 10 mil
2. not both.GetLayer() in ['Top', 'Bottom']: 14 mil
3. first.InArea ('My area'): 20 mil else: 10 mil
4. any.InComponent ('Some BGA that needs smaller clearance'): 5 mil
5. default: 10 mil

.... and so on, and so forth, for any DRC check.

These can be python expressions, evaluated through the scripting engine
for each item before starting the DRC.

The advantages are:
- no need to change DRC's C++ code and/or GUI whenever somebody requests
a fancy constraint configuration
- rule expressions can be stored in .kicad_pcb files without risk of
being deprecated (unless somebody changes the API of the scripting engine).
- P&S must follow design rules as well. I would prefer get the clearance
value for any pair of objects directly via scripting engine  instead of
parsing and analyzing all specialized constraints again in P&S code.
- automatic trace impedance calculation via python expressions:

both.IsDiffPair() && both.GetLayer() == 'Top'  :
DifferentialMicrostrip(first, second).Gap

Regards,
Tom











References