kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #13010
Question about track/via type/shape
Still studying the cleanup code and board representation in general...
If nothing changed recently the hierarchy is like this:
BOARD_CONNECTED_ITEM
TRACK
SEGZONE
SEGVIA
However TRACK contains via-only attributes, shape and drill. Why is
that?
I agree that having the VIA IS-A TRACK situation is very useful, even if
it doesn't have distinct begin and end (call it a degenerate track...);
it the typical textbook modeling situation for circles and ellipses (a
circle has only one radius but an ellipse is not a circle), given the
typical processing done on the track list I think it's quite
a reasonable decision.
However I don't see one good reason for having drill and shape in the
track. BTW 'shape' could be better named ViaType since it defines if
it's a THT/Blind/Buried via. Is the VIA_NOT_DEFINED shape for tracks
that actually are not vias?
And of course drill and shape are even less significant for zones...
Do you agree in moving these fields in the SEGVIA class (where they
logically belong) or it's better to keep the fat interface?
Also in which strange circumstance a via could *actually* have different
start and end position? the clean_vias has a fix exactly for this;
I think tripping an assert would be useful in that circumstance (even if
IIRC the current policy is to 'not fix internal errors').
Another thing, the flag in TRACKS_CLEANER::clean_segment is bitmapped
but at the end it's only checked for trueness. Is that an old debug
fixture?
--
Lorenzo Marcantonio
Logos Srl