← Back to team overview

kicad-developers team mailing list archive

Re: wire connections

 

Arun,

This seems like a plausible solution.  Please don't forget to add
undo/redo capability to your list of steps.  The current method is to
save all of the wires, buses, and junctions on the undo stack.  The
reason for this is there is a clean up algorithm that can change the
line segments so this is the only way to ensure you don't attempt to
undo/redo something that doesn't exist any more.

Cheers,

Wayne

On 8/28/2017 5:17 AM, Arun Kumar wrote:
> Now I realise that it's a bit complex because of the followup steps.
> 
> Make the drawing area as a 2D array grid P[ ] [  ] with walkable points
> representing as 0 and obstacle points as 1. 
> 
> walkable point P[5][6] =0
> obstacle point P[5] [7] = 1
> 
> 1) On each part's drag stop event, make the area (bounding box of the
> part) occupied by the part as obstacle so that wire cannot be drawn over it.
> 
> 2) Make the area from where the part moved as walkable so that other
> wires can pass through that area.
> 
> 3) check if paths already exist with the pins of the part moved. If yes,
> remove that path and make the area of the path walkable. else check next pin
> 
> 4) Draw the new path from the new position and mark he path as obstacle
> so that other wires do not overlap with this.
> 
> 5) Push the new path into an array or object. 
> 
> 6) update the walkable and obstacles in the grid
> 
> 7) iterate the above steps with other pins of the part moved.
> 
> 
> On Tue, Aug 22, 2017 at 7:10 PM, Arun Kumar <arunkumar413@xxxxxxxxx
> <mailto:arunkumar413@xxxxxxxxx>> wrote:
> 
>     Yes, I'm referring to the schematic wires. Through the G hotkey has
>     the functionality, the wires are not  orthogonal bend at 90 
>     degrees) after drag/move.
> 
>     I don't think it would be lot of logic to add. Because we can use
>     any existing routing library such as A* search algorithm.
> 
>     1) Call the routing library immediately after the drag stop event.
>     2) Pass the part dragged to the routing library and the connections
>     associated with it.
>     3) The A* search library re-draws the wires.
> 
> 
> 
> 
>     On Tue, Aug 22, 2017 at 6:41 PM, su_pyrow
>     <su_pyrow@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
>     <mailto:su_pyrow@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>> wrote:
> 
>         Try 'G' to grab rather than 'M' to move
>         is that what you mean?
> 
> 
>         On 08/22/2017 09:04 AM, Arun Kumar wrote:
>         > Hi Team,
>         >
>         > The wire connections doesn't move or sustain when the parts
>         are moved
>         > around. Is there any work going on to address this. Almost in all
>         > commercial softwares the wires connections adjust as per the
>         movement of
>         > the parts.
>         >
>         > Thanks,
>         > Arun
>         >
>         >
>         > _______________________________________________
>         > Mailing list: https://launchpad.net/~kicad-developers
>         <https://launchpad.net/~kicad-developers>
>         > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>         > Unsubscribe : https://launchpad.net/~kicad-developers
>         <https://launchpad.net/~kicad-developers>
>         > More help   : https://help.launchpad.net/ListHelp
>         <https://help.launchpad.net/ListHelp>
>         >
> 
> 
> 
>         _______________________________________________
>         Mailing list: https://launchpad.net/~kicad-developers
>         <https://launchpad.net/~kicad-developers>
>         Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>         Unsubscribe : https://launchpad.net/~kicad-developers
>         <https://launchpad.net/~kicad-developers>
>         More help   : https://help.launchpad.net/ListHelp
>         <https://help.launchpad.net/ListHelp>
> 
> 
> 
> 
> 
> _______________________________________________
> 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
> 


References