← Back to team overview

kicad-developers team mailing list archive

Re: pin 'connection bubble'

 

Vesa Solonen a écrit :

Could it be a good behavior to remove 'connection bubble' from a pin when
it gets connected? That would allow easy checking for unconnected, verify
a connect and also simplify detail on screen. Can you Jean-Pierre give any
advice where to look for that code as I'd like to get that done here
locally. If the feature is seen as benefit for others and it's
implementation fits your schedule that would be even better.

-Vesa


The main difficulty is schematic components do not handle the shapes (graphics items and pins ) to draw. They handle only the body position, orientation and part in multiples parts per package components.
Shapes are in libraries item descriptions.
To draw a component in schematic, the shared shape in lib must be find first (by the Chip Name) .

This draw function knows anything about other schematic items, and draw info is shared by all components having the same chip name.
It is not specific to a given component in schematic.

I do not know the best way to handle connection bubble to draw, but because it is specific to each component in schematic the draw function must have a knowledge of location to draw (or not) bubbles for each component in schematic.
A possible way is:
In schematic, for each sheet, creates the list of coordinates that have 2 (or more) connected items (pin pos, wire ends ..) (something a std::vector < wxPoint> m_ConnectedNodes, that could be a member of a SCH_SCREEN) (It is recreated only after changing and item (wire, component .. ), so this is not time consuming, and easy to calculate: this is the list of pin locations, wire ends coordinates, junctions..., sorted, and each unique coordinate removed) Send this list to the Chip Draw Functions, that do not draw connection bubble if an end pin coordinate is found in this list If the list is sorted(by X and Y value) and a fast search algo is used in draw function, this could be not time consuming

And the changes in current code could be very limited and easy to activate/inhibit (could be an a display option )

--
Jean-Pierre CHARRAS
Maître de conférences
Directeur d'études 2ieme année.
Génie Electrique et Informatique Industrielle 2
Institut Universitaire de Technologie 1 de Grenoble
BP 67, 38402 St Martin d'Heres Cedex

Recherche :
Grenoble Image Parole Signal Automatique (GIPSA - INPG)
Grenoble France






References