kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #30226
Re: Wiring logic/algorithm
On 8/3/2017 3:54 AM, Simon Richter wrote:
> Hi,
>
> On 03.08.2017 07:09, Arun Kumar wrote:
>
>> Could you please let me know the wiring logic used in kicad. Like how
>> the wire is drawn uisng mouse movement and clicks.
>
> The first click starts a wire, which already has two segments, one
> horizontal, one vertical, with the first segment being the longer one
> initially.
>
> Moving the mouse then adjusts the length of both at once. If the first
> segment disappears, they switch places (so if you start horizontal and
> pass through the point over the beginning, the vertical segment becomes
> first).
>
> Clicking fixes the point between the two segments currently being
> edited, and adds another segment at the end, which then has to be at a
> 90 degree angle.
>
> Clicking on a connection point (end of another wire or end of a
> component pin) ends the wire. If you want to end the current wire
> without connecting anywhere, double-click.
>
>> Also the wiring is rerouted when the components are move around. Could
>> you please explain the under lying logic and algorithm. If possible
>> please guide me to the relevant code of kicad.
The wire drawing code is in eeschema/bus-wire-junction.cpp and the
move/drag code is in eeschema/block.cpp.
>
> When you move a component ('m' key), nothing else moves. When you grab a
> component ('g' key), all wires that are already connected remain
> connected, and the last segment that connects to the component is adjusted.
>
> Simon
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References