Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-30 Thread Wayne Stambaugh
Seth,

I merged you patch set into the development branch.  Nice work and thank
you for you contribution to KiCad.

Cheers,

Wayne

On 11/29/2017 2:14 PM, Seth Hillbrand wrote:
> Here is the re-based patchset.  No code changes but I repaired the
> coding policy violations.
> 
> Best-
> Seth
> 
> On Wed, Nov 29, 2017 at 7:40 AM, Wayne Stambaugh  > wrote:
> 
> Seth,
> 
> I've done some minimal testing with this patch set and it appears to
> work as expected.  I like the way it handles junctions and it does
> resolve the undo issue I was having with the overlapped wires/buses.  I
> am assuming this is the latest patch set and that there are no other
> patches that need to be applied other than the patches attached to this
> message.  If no one objects, I will merge this.
> 
> Thanks,
> 
> Wayne
> 
> On 11/27/2017 6:03 PM, Seth Hillbrand wrote:
> > Hi Orson-
> >
> > Thanks for the pointer.  I found and corrected the issue and updated the
> > commit messages to remove the NEW/CHANGED tags that didn't reflect
> > user-visible changes.
> >
> > Since we're now in feature freeze, this may be too late for 5.0. 
> > However, this does address a number of bug reports so I'm attaching the
> > minimized patchset in case Wayne would like to merge it.  If Wayne
> > decides that this more feature/less bugfix, I'll hold onto the patchset
> > until we have a 6-dev branch.
> >
> > Best-
> > Seth
> >
> > On Sat, Nov 25, 2017 at 7:37 AM, Maciej Suminski
> > 
> >>
> wrote:
> >
> >     Hi Seth,
> >
> >     I tried this with interf_u demo shipped with the source code. There 
> are
> >     four capacitors in the left bottom corner - try dragging one of the
> >     middle ones out. If you cannot reproduce the problem, I will try to
> >     shoot a video.
> >
> >     Cheers,
> >     Orson
> >
> >     On 11/25/2017 03:58 PM, Seth Hillbrand wrote:
> >     > Hi Orson-
> >     >
> >     > Thanks for the test and the clarification of the documentation.
> >     >
> >     > On the schematic, I can't seem to recreate the issue you document
> >     in the
> >     > image.  Is the example schematic one you can share?
> >     >
> >     > Best-
> >     > Seth
> >     >
> >     > On Fri, Nov 24, 2017 at 6:50 AM, Maciej Sumiński
> >     
> >>
> >     > wrote:
> >     >
> >     >> Hi Seth,
> >     >>
> >     >> I tested the branch and I consider it a significant improvement
> >     to the
> >     >> way junctions are handled. I confirm it fixes the four bugs
> >     mentioned in
> >     >> patch 0011, apart from a single case when a parallel
> component is
> >     >> dragged out. In this case junctions are not still not auto
> >     deleted (see
> >     >> [1], the rightmost picture "Junction is not auto deleted"), but
> >     at least
> >     >> the overlapping wires are merged. It is not a big deal IMHO,
> >     especially
> >     >> the patch set fixes a lot of other issues.
> >     >>
> >     >> It has not been stated explicitly, but I thought we will use
> >     >> NEW/REMOVE/CHANGE tags for listing changes that are
> perceived by the
> >     >> user. Therefore:
> >     >>
> >     >>   CHANGE: DeleteItem removes junctions that are no longer
> needed.
> >     >>
> >     >> informs the user about an improvement, but:
> >     >>
> >     >>   CHANGE: DeleteItemsInList shares the code for DeleteItem.
> >     >>
> >     >> seems to be too detailed and does not need to be reflected
> in the
> >     user
> >     >> documentation.
> >     >>
> >     >> What do you think? I will try to come up with a short paragraph
> >     that can
> >     >> be added to the website to make things clear.
> >     >>
> >     >> Regards,
> >     >> Orson
> >     >>
> >     >> 1.
> >     >> https://launchpadlibrarian.net/213748651/KICAD%20-%20BUG%
> 
> >      >
> >     >> 20REPORT%20-%20EESCHEMA%20-%20SOME%20DRAG%20ISSUES.jpg
> >     >>
> >     >> On 11/22/2017 09:07 PM, Seth Hillbrand wrote:
> >     >>> Updated patchset for this proposal, rebased to master.  I've
> >     also updated
> >     >>> the commit messages to match the CHANGE:/NEW: format and added
> >     one new
> > 

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-29 Thread Seth Hillbrand
Here is the re-based patchset.  No code changes but I repaired the coding
policy violations.

Best-
Seth

On Wed, Nov 29, 2017 at 7:40 AM, Wayne Stambaugh 
wrote:

> Seth,
>
> I've done some minimal testing with this patch set and it appears to
> work as expected.  I like the way it handles junctions and it does
> resolve the undo issue I was having with the overlapped wires/buses.  I
> am assuming this is the latest patch set and that there are no other
> patches that need to be applied other than the patches attached to this
> message.  If no one objects, I will merge this.
>
> Thanks,
>
> Wayne
>
> On 11/27/2017 6:03 PM, Seth Hillbrand wrote:
> > Hi Orson-
> >
> > Thanks for the pointer.  I found and corrected the issue and updated the
> > commit messages to remove the NEW/CHANGED tags that didn't reflect
> > user-visible changes.
> >
> > Since we're now in feature freeze, this may be too late for 5.0.
> > However, this does address a number of bug reports so I'm attaching the
> > minimized patchset in case Wayne would like to merge it.  If Wayne
> > decides that this more feature/less bugfix, I'll hold onto the patchset
> > until we have a 6-dev branch.
> >
> > Best-
> > Seth
> >
> > On Sat, Nov 25, 2017 at 7:37 AM, Maciej Suminski
> > > wrote:
> >
> > Hi Seth,
> >
> > I tried this with interf_u demo shipped with the source code. There
> are
> > four capacitors in the left bottom corner - try dragging one of the
> > middle ones out. If you cannot reproduce the problem, I will try to
> > shoot a video.
> >
> > Cheers,
> > Orson
> >
> > On 11/25/2017 03:58 PM, Seth Hillbrand wrote:
> > > Hi Orson-
> > >
> > > Thanks for the test and the clarification of the documentation.
> > >
> > > On the schematic, I can't seem to recreate the issue you document
> > in the
> > > image.  Is the example schematic one you can share?
> > >
> > > Best-
> > > Seth
> > >
> > > On Fri, Nov 24, 2017 at 6:50 AM, Maciej Sumiński
> > >
> > > wrote:
> > >
> > >> Hi Seth,
> > >>
> > >> I tested the branch and I consider it a significant improvement
> > to the
> > >> way junctions are handled. I confirm it fixes the four bugs
> > mentioned in
> > >> patch 0011, apart from a single case when a parallel component is
> > >> dragged out. In this case junctions are not still not auto
> > deleted (see
> > >> [1], the rightmost picture "Junction is not auto deleted"), but
> > at least
> > >> the overlapping wires are merged. It is not a big deal IMHO,
> > especially
> > >> the patch set fixes a lot of other issues.
> > >>
> > >> It has not been stated explicitly, but I thought we will use
> > >> NEW/REMOVE/CHANGE tags for listing changes that are perceived by
> the
> > >> user. Therefore:
> > >>
> > >>   CHANGE: DeleteItem removes junctions that are no longer needed.
> > >>
> > >> informs the user about an improvement, but:
> > >>
> > >>   CHANGE: DeleteItemsInList shares the code for DeleteItem.
> > >>
> > >> seems to be too detailed and does not need to be reflected in the
> > user
> > >> documentation.
> > >>
> > >> What do you think? I will try to come up with a short paragraph
> > that can
> > >> be added to the website to make things clear.
> > >>
> > >> Regards,
> > >> Orson
> > >>
> > >> 1.
> > >> https://launchpadlibrarian.net/213748651/KICAD%20-%20BUG%
> > 
> > >> 20REPORT%20-%20EESCHEMA%20-%20SOME%20DRAG%20ISSUES.jpg
> > >>
> > >> On 11/22/2017 09:07 PM, Seth Hillbrand wrote:
> > >>> Updated patchset for this proposal, rebased to master.  I've
> > also updated
> > >>> the commit messages to match the CHANGE:/NEW: format and added
> > one new
> > >> bug
> > >>> from launchpad that this addresses.
> > >>>
> > >>> -Seth
> > >>>
> > >>> On Wed, Nov 8, 2017 at 3:59 AM, Nick Østergaard
> > >
> > >> wrote:
> > >>>
> >  For that specific issue with the junction drawing, there is a
> > patch in
> > >> the
> >  thread "[Kicad-developers] [PATCH] Draw junctions last"
> > 
> >  2017-11-03 13:12 GMT+01:00 Jon Evans  > >:
> > 
> > > I looked at fixing this and some other related things, and
> > decided to
> > > just wait for the GAL port. There will need to be huge
> > refactoring of
> > >> the
> > > eeschema draw code as part of that effort, so putting much
> > effort into
> > > making the wxDC drawing better seems not worth it.
> > >
> > 

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-29 Thread Wayne Stambaugh
Seth,

I've done some minimal testing with this patch set and it appears to
work as expected.  I like the way it handles junctions and it does
resolve the undo issue I was having with the overlapped wires/buses.  I
am assuming this is the latest patch set and that there are no other
patches that need to be applied other than the patches attached to this
message.  If no one objects, I will merge this.

Thanks,

Wayne

On 11/27/2017 6:03 PM, Seth Hillbrand wrote:
> Hi Orson-
> 
> Thanks for the pointer.  I found and corrected the issue and updated the
> commit messages to remove the NEW/CHANGED tags that didn't reflect
> user-visible changes.
> 
> Since we're now in feature freeze, this may be too late for 5.0. 
> However, this does address a number of bug reports so I'm attaching the
> minimized patchset in case Wayne would like to merge it.  If Wayne
> decides that this more feature/less bugfix, I'll hold onto the patchset
> until we have a 6-dev branch.
> 
> Best-
> Seth
> 
> On Sat, Nov 25, 2017 at 7:37 AM, Maciej Suminski
> > wrote:
> 
> Hi Seth,
> 
> I tried this with interf_u demo shipped with the source code. There are
> four capacitors in the left bottom corner - try dragging one of the
> middle ones out. If you cannot reproduce the problem, I will try to
> shoot a video.
> 
> Cheers,
> Orson
> 
> On 11/25/2017 03:58 PM, Seth Hillbrand wrote:
> > Hi Orson-
> >
> > Thanks for the test and the clarification of the documentation.
> >
> > On the schematic, I can't seem to recreate the issue you document
> in the
> > image.  Is the example schematic one you can share?
> >
> > Best-
> > Seth
> >
> > On Fri, Nov 24, 2017 at 6:50 AM, Maciej Sumiński
> >
> > wrote:
> >
> >> Hi Seth,
> >>
> >> I tested the branch and I consider it a significant improvement
> to the
> >> way junctions are handled. I confirm it fixes the four bugs
> mentioned in
> >> patch 0011, apart from a single case when a parallel component is
> >> dragged out. In this case junctions are not still not auto
> deleted (see
> >> [1], the rightmost picture "Junction is not auto deleted"), but
> at least
> >> the overlapping wires are merged. It is not a big deal IMHO,
> especially
> >> the patch set fixes a lot of other issues.
> >>
> >> It has not been stated explicitly, but I thought we will use
> >> NEW/REMOVE/CHANGE tags for listing changes that are perceived by the
> >> user. Therefore:
> >>
> >>   CHANGE: DeleteItem removes junctions that are no longer needed.
> >>
> >> informs the user about an improvement, but:
> >>
> >>   CHANGE: DeleteItemsInList shares the code for DeleteItem.
> >>
> >> seems to be too detailed and does not need to be reflected in the
> user
> >> documentation.
> >>
> >> What do you think? I will try to come up with a short paragraph
> that can
> >> be added to the website to make things clear.
> >>
> >> Regards,
> >> Orson
> >>
> >> 1.
> >> https://launchpadlibrarian.net/213748651/KICAD%20-%20BUG%
> 
> >> 20REPORT%20-%20EESCHEMA%20-%20SOME%20DRAG%20ISSUES.jpg
> >>
> >> On 11/22/2017 09:07 PM, Seth Hillbrand wrote:
> >>> Updated patchset for this proposal, rebased to master.  I've
> also updated
> >>> the commit messages to match the CHANGE:/NEW: format and added
> one new
> >> bug
> >>> from launchpad that this addresses.
> >>>
> >>> -Seth
> >>>
> >>> On Wed, Nov 8, 2017 at 3:59 AM, Nick Østergaard
> >
> >> wrote:
> >>>
>  For that specific issue with the junction drawing, there is a
> patch in
> >> the
>  thread "[Kicad-developers] [PATCH] Draw junctions last"
> 
>  2017-11-03 13:12 GMT+01:00 Jon Evans  >:
> 
> > I looked at fixing this and some other related things, and
> decided to
> > just wait for the GAL port. There will need to be huge
> refactoring of
> >> the
> > eeschema draw code as part of that effort, so putting much
> effort into
> > making the wxDC drawing better seems not worth it.
> >
> > -Jon
> >
> > On Nov 3, 2017 00:08, "Kevin Cozens"  > wrote:
> >
> > On 2017-11-02 06:31 PM, Seth Hillbrand wrote:
> >
> >> Please let me know if there are any additional issues or
> suggestions
> >> for
> >> improvement.
> >>
> >
> > How difficult would it be to have junctions draw last on
> 

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-28 Thread Jon Evans
I have been playing with these patches for a bit and I like it, so far I
can't find any bad behavior and it nicely improves the way junctions are
managed.

-Jon

On Tue, Nov 28, 2017 at 2:19 PM, Wayne Stambaugh 
wrote:

> This does not really qualify as a new feature but rather a fix of an
> existing feature.  Given the number of bug fixes linked to the changes,
> I'm OK with merging it assuming it's ready to go.  I only have a few
> comments.  I saw at least one Doxygen comment in a source file instead
> of the header and a few comment lines without a empty line preceding
> them which are coding policy violations.  I'm also not sure how
> necessary it was to move the wire testing code from SCH_SCREEN to
> SCH_MAIN_FRAME but I am OK with the change.  How much testing has anyone
> else done on this?
>
> On 11/27/2017 6:03 PM, Seth Hillbrand wrote:
> > Hi Orson-
> >
> > Thanks for the pointer.  I found and corrected the issue and updated the
> > commit messages to remove the NEW/CHANGED tags that didn't reflect
> > user-visible changes.
> >
> > Since we're now in feature freeze, this may be too late for 5.0.
> > However, this does address a number of bug reports so I'm attaching the
> > minimized patchset in case Wayne would like to merge it.  If Wayne
> > decides that this more feature/less bugfix, I'll hold onto the patchset
> > until we have a 6-dev branch.
> >
> > Best-
> > Seth
> >
> > On Sat, Nov 25, 2017 at 7:37 AM, Maciej Suminski
> > > wrote:
> >
> > Hi Seth,
> >
> > I tried this with interf_u demo shipped with the source code. There
> are
> > four capacitors in the left bottom corner - try dragging one of the
> > middle ones out. If you cannot reproduce the problem, I will try to
> > shoot a video.
> >
> > Cheers,
> > Orson
> >
> > On 11/25/2017 03:58 PM, Seth Hillbrand wrote:
> > > Hi Orson-
> > >
> > > Thanks for the test and the clarification of the documentation.
> > >
> > > On the schematic, I can't seem to recreate the issue you document
> > in the
> > > image.  Is the example schematic one you can share?
> > >
> > > Best-
> > > Seth
> > >
> > > On Fri, Nov 24, 2017 at 6:50 AM, Maciej Sumiński
> > >
> > > wrote:
> > >
> > >> Hi Seth,
> > >>
> > >> I tested the branch and I consider it a significant improvement
> > to the
> > >> way junctions are handled. I confirm it fixes the four bugs
> > mentioned in
> > >> patch 0011, apart from a single case when a parallel component is
> > >> dragged out. In this case junctions are not still not auto
> > deleted (see
> > >> [1], the rightmost picture "Junction is not auto deleted"), but
> > at least
> > >> the overlapping wires are merged. It is not a big deal IMHO,
> > especially
> > >> the patch set fixes a lot of other issues.
> > >>
> > >> It has not been stated explicitly, but I thought we will use
> > >> NEW/REMOVE/CHANGE tags for listing changes that are perceived by
> the
> > >> user. Therefore:
> > >>
> > >>   CHANGE: DeleteItem removes junctions that are no longer needed.
> > >>
> > >> informs the user about an improvement, but:
> > >>
> > >>   CHANGE: DeleteItemsInList shares the code for DeleteItem.
> > >>
> > >> seems to be too detailed and does not need to be reflected in the
> > user
> > >> documentation.
> > >>
> > >> What do you think? I will try to come up with a short paragraph
> > that can
> > >> be added to the website to make things clear.
> > >>
> > >> Regards,
> > >> Orson
> > >>
> > >> 1.
> > >> https://launchpadlibrarian.net/213748651/KICAD%20-%20BUG%
> > 
> > >> 20REPORT%20-%20EESCHEMA%20-%20SOME%20DRAG%20ISSUES.jpg
> > >>
> > >> On 11/22/2017 09:07 PM, Seth Hillbrand wrote:
> > >>> Updated patchset for this proposal, rebased to master.  I've
> > also updated
> > >>> the commit messages to match the CHANGE:/NEW: format and added
> > one new
> > >> bug
> > >>> from launchpad that this addresses.
> > >>>
> > >>> -Seth
> > >>>
> > >>> On Wed, Nov 8, 2017 at 3:59 AM, Nick Østergaard
> > >
> > >> wrote:
> > >>>
> >  For that specific issue with the junction drawing, there is a
> > patch in
> > >> the
> >  thread "[Kicad-developers] [PATCH] Draw junctions last"
> > 
> >  2017-11-03 13:12 GMT+01:00 Jon Evans  > >:
> > 
> > > I looked at fixing this and some other related things, and
> > decided to
> > > just wait for the GAL port. There will need to be huge
> > 

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-28 Thread Wayne Stambaugh
This does not really qualify as a new feature but rather a fix of an
existing feature.  Given the number of bug fixes linked to the changes,
I'm OK with merging it assuming it's ready to go.  I only have a few
comments.  I saw at least one Doxygen comment in a source file instead
of the header and a few comment lines without a empty line preceding
them which are coding policy violations.  I'm also not sure how
necessary it was to move the wire testing code from SCH_SCREEN to
SCH_MAIN_FRAME but I am OK with the change.  How much testing has anyone
else done on this?

On 11/27/2017 6:03 PM, Seth Hillbrand wrote:
> Hi Orson-
> 
> Thanks for the pointer.  I found and corrected the issue and updated the
> commit messages to remove the NEW/CHANGED tags that didn't reflect
> user-visible changes.
> 
> Since we're now in feature freeze, this may be too late for 5.0. 
> However, this does address a number of bug reports so I'm attaching the
> minimized patchset in case Wayne would like to merge it.  If Wayne
> decides that this more feature/less bugfix, I'll hold onto the patchset
> until we have a 6-dev branch.
> 
> Best-
> Seth
> 
> On Sat, Nov 25, 2017 at 7:37 AM, Maciej Suminski
> > wrote:
> 
> Hi Seth,
> 
> I tried this with interf_u demo shipped with the source code. There are
> four capacitors in the left bottom corner - try dragging one of the
> middle ones out. If you cannot reproduce the problem, I will try to
> shoot a video.
> 
> Cheers,
> Orson
> 
> On 11/25/2017 03:58 PM, Seth Hillbrand wrote:
> > Hi Orson-
> >
> > Thanks for the test and the clarification of the documentation.
> >
> > On the schematic, I can't seem to recreate the issue you document
> in the
> > image.  Is the example schematic one you can share?
> >
> > Best-
> > Seth
> >
> > On Fri, Nov 24, 2017 at 6:50 AM, Maciej Sumiński
> >
> > wrote:
> >
> >> Hi Seth,
> >>
> >> I tested the branch and I consider it a significant improvement
> to the
> >> way junctions are handled. I confirm it fixes the four bugs
> mentioned in
> >> patch 0011, apart from a single case when a parallel component is
> >> dragged out. In this case junctions are not still not auto
> deleted (see
> >> [1], the rightmost picture "Junction is not auto deleted"), but
> at least
> >> the overlapping wires are merged. It is not a big deal IMHO,
> especially
> >> the patch set fixes a lot of other issues.
> >>
> >> It has not been stated explicitly, but I thought we will use
> >> NEW/REMOVE/CHANGE tags for listing changes that are perceived by the
> >> user. Therefore:
> >>
> >>   CHANGE: DeleteItem removes junctions that are no longer needed.
> >>
> >> informs the user about an improvement, but:
> >>
> >>   CHANGE: DeleteItemsInList shares the code for DeleteItem.
> >>
> >> seems to be too detailed and does not need to be reflected in the
> user
> >> documentation.
> >>
> >> What do you think? I will try to come up with a short paragraph
> that can
> >> be added to the website to make things clear.
> >>
> >> Regards,
> >> Orson
> >>
> >> 1.
> >> https://launchpadlibrarian.net/213748651/KICAD%20-%20BUG%
> 
> >> 20REPORT%20-%20EESCHEMA%20-%20SOME%20DRAG%20ISSUES.jpg
> >>
> >> On 11/22/2017 09:07 PM, Seth Hillbrand wrote:
> >>> Updated patchset for this proposal, rebased to master.  I've
> also updated
> >>> the commit messages to match the CHANGE:/NEW: format and added
> one new
> >> bug
> >>> from launchpad that this addresses.
> >>>
> >>> -Seth
> >>>
> >>> On Wed, Nov 8, 2017 at 3:59 AM, Nick Østergaard
> >
> >> wrote:
> >>>
>  For that specific issue with the junction drawing, there is a
> patch in
> >> the
>  thread "[Kicad-developers] [PATCH] Draw junctions last"
> 
>  2017-11-03 13:12 GMT+01:00 Jon Evans  >:
> 
> > I looked at fixing this and some other related things, and
> decided to
> > just wait for the GAL port. There will need to be huge
> refactoring of
> >> the
> > eeschema draw code as part of that effort, so putting much
> effort into
> > making the wxDC drawing better seems not worth it.
> >
> > -Jon
> >
> > On Nov 3, 2017 00:08, "Kevin Cozens"  > wrote:
> >
> > On 2017-11-02 06:31 PM, Seth Hillbrand wrote:
> >
> >> Please let me know if there are any additional issues or
> 

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-27 Thread Seth Hillbrand
Hi Orson-

Thanks for the pointer.  I found and corrected the issue and updated the
commit messages to remove the NEW/CHANGED tags that didn't reflect
user-visible changes.

Since we're now in feature freeze, this may be too late for 5.0.  However,
this does address a number of bug reports so I'm attaching the minimized
patchset in case Wayne would like to merge it.  If Wayne decides that this
more feature/less bugfix, I'll hold onto the patchset until we have a 6-dev
branch.

Best-
Seth

On Sat, Nov 25, 2017 at 7:37 AM, Maciej Suminski 
wrote:

> Hi Seth,
>
> I tried this with interf_u demo shipped with the source code. There are
> four capacitors in the left bottom corner - try dragging one of the
> middle ones out. If you cannot reproduce the problem, I will try to
> shoot a video.
>
> Cheers,
> Orson
>
> On 11/25/2017 03:58 PM, Seth Hillbrand wrote:
> > Hi Orson-
> >
> > Thanks for the test and the clarification of the documentation.
> >
> > On the schematic, I can't seem to recreate the issue you document in the
> > image.  Is the example schematic one you can share?
> >
> > Best-
> > Seth
> >
> > On Fri, Nov 24, 2017 at 6:50 AM, Maciej Sumiński <
> maciej.sumin...@cern.ch>
> > wrote:
> >
> >> Hi Seth,
> >>
> >> I tested the branch and I consider it a significant improvement to the
> >> way junctions are handled. I confirm it fixes the four bugs mentioned in
> >> patch 0011, apart from a single case when a parallel component is
> >> dragged out. In this case junctions are not still not auto deleted (see
> >> [1], the rightmost picture "Junction is not auto deleted"), but at least
> >> the overlapping wires are merged. It is not a big deal IMHO, especially
> >> the patch set fixes a lot of other issues.
> >>
> >> It has not been stated explicitly, but I thought we will use
> >> NEW/REMOVE/CHANGE tags for listing changes that are perceived by the
> >> user. Therefore:
> >>
> >>   CHANGE: DeleteItem removes junctions that are no longer needed.
> >>
> >> informs the user about an improvement, but:
> >>
> >>   CHANGE: DeleteItemsInList shares the code for DeleteItem.
> >>
> >> seems to be too detailed and does not need to be reflected in the user
> >> documentation.
> >>
> >> What do you think? I will try to come up with a short paragraph that can
> >> be added to the website to make things clear.
> >>
> >> Regards,
> >> Orson
> >>
> >> 1.
> >> https://launchpadlibrarian.net/213748651/KICAD%20-%20BUG%
> >> 20REPORT%20-%20EESCHEMA%20-%20SOME%20DRAG%20ISSUES.jpg
> >>
> >> On 11/22/2017 09:07 PM, Seth Hillbrand wrote:
> >>> Updated patchset for this proposal, rebased to master.  I've also
> updated
> >>> the commit messages to match the CHANGE:/NEW: format and added one new
> >> bug
> >>> from launchpad that this addresses.
> >>>
> >>> -Seth
> >>>
> >>> On Wed, Nov 8, 2017 at 3:59 AM, Nick Østergaard 
> >> wrote:
> >>>
>  For that specific issue with the junction drawing, there is a patch in
> >> the
>  thread "[Kicad-developers] [PATCH] Draw junctions last"
> 
>  2017-11-03 13:12 GMT+01:00 Jon Evans :
> 
> > I looked at fixing this and some other related things, and decided to
> > just wait for the GAL port. There will need to be huge refactoring of
> >> the
> > eeschema draw code as part of that effort, so putting much effort
> into
> > making the wxDC drawing better seems not worth it.
> >
> > -Jon
> >
> > On Nov 3, 2017 00:08, "Kevin Cozens"  wrote:
> >
> > On 2017-11-02 06:31 PM, Seth Hillbrand wrote:
> >
> >> Please let me know if there are any additional issues or suggestions
> >> for
> >> improvement.
> >>
> >
> > How difficult would it be to have junctions draw last on schematics?
> > There is a minor negative visual effect when you have a component
> with
> >> one
> > end joined to a wire by a junction and you replace the component.
> >
> > When you replace the component the pin of the component is now seen
> > extending through the round disc of the junction to the center of the
> > junction. I prefer to always see just the full round disc of a
> junction
> > mark even if I have replaced a component since placing the junction.
> >
> > --
> > Cheers!
> >
> > Kevin.
> >
> > http://www.ve3syb.ca/   |"Nerds make the shiny things that
> > distract
> > Owner of Elecraft K2 #2172  | the mouth-breathers, and that's why
> > we're
> > | powerful!"
> > #include  | --Chris Hardwick
> >
> >
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> >
> >
> >
> 

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-25 Thread Maciej Suminski
Hi Seth,

I tried this with interf_u demo shipped with the source code. There are
four capacitors in the left bottom corner - try dragging one of the
middle ones out. If you cannot reproduce the problem, I will try to
shoot a video.

Cheers,
Orson

On 11/25/2017 03:58 PM, Seth Hillbrand wrote:
> Hi Orson-
> 
> Thanks for the test and the clarification of the documentation.
> 
> On the schematic, I can't seem to recreate the issue you document in the
> image.  Is the example schematic one you can share?
> 
> Best-
> Seth
> 
> On Fri, Nov 24, 2017 at 6:50 AM, Maciej Sumiński 
> wrote:
> 
>> Hi Seth,
>>
>> I tested the branch and I consider it a significant improvement to the
>> way junctions are handled. I confirm it fixes the four bugs mentioned in
>> patch 0011, apart from a single case when a parallel component is
>> dragged out. In this case junctions are not still not auto deleted (see
>> [1], the rightmost picture "Junction is not auto deleted"), but at least
>> the overlapping wires are merged. It is not a big deal IMHO, especially
>> the patch set fixes a lot of other issues.
>>
>> It has not been stated explicitly, but I thought we will use
>> NEW/REMOVE/CHANGE tags for listing changes that are perceived by the
>> user. Therefore:
>>
>>   CHANGE: DeleteItem removes junctions that are no longer needed.
>>
>> informs the user about an improvement, but:
>>
>>   CHANGE: DeleteItemsInList shares the code for DeleteItem.
>>
>> seems to be too detailed and does not need to be reflected in the user
>> documentation.
>>
>> What do you think? I will try to come up with a short paragraph that can
>> be added to the website to make things clear.
>>
>> Regards,
>> Orson
>>
>> 1.
>> https://launchpadlibrarian.net/213748651/KICAD%20-%20BUG%
>> 20REPORT%20-%20EESCHEMA%20-%20SOME%20DRAG%20ISSUES.jpg
>>
>> On 11/22/2017 09:07 PM, Seth Hillbrand wrote:
>>> Updated patchset for this proposal, rebased to master.  I've also updated
>>> the commit messages to match the CHANGE:/NEW: format and added one new
>> bug
>>> from launchpad that this addresses.
>>>
>>> -Seth
>>>
>>> On Wed, Nov 8, 2017 at 3:59 AM, Nick Østergaard 
>> wrote:
>>>
 For that specific issue with the junction drawing, there is a patch in
>> the
 thread "[Kicad-developers] [PATCH] Draw junctions last"

 2017-11-03 13:12 GMT+01:00 Jon Evans :

> I looked at fixing this and some other related things, and decided to
> just wait for the GAL port. There will need to be huge refactoring of
>> the
> eeschema draw code as part of that effort, so putting much effort into
> making the wxDC drawing better seems not worth it.
>
> -Jon
>
> On Nov 3, 2017 00:08, "Kevin Cozens"  wrote:
>
> On 2017-11-02 06:31 PM, Seth Hillbrand wrote:
>
>> Please let me know if there are any additional issues or suggestions
>> for
>> improvement.
>>
>
> How difficult would it be to have junctions draw last on schematics?
> There is a minor negative visual effect when you have a component with
>> one
> end joined to a wire by a junction and you replace the component.
>
> When you replace the component the pin of the component is now seen
> extending through the round disc of the junction to the center of the
> junction. I prefer to always see just the full round disc of a junction
> mark even if I have replaced a component since placing the junction.
>
> --
> Cheers!
>
> Kevin.
>
> http://www.ve3syb.ca/   |"Nerds make the shiny things that
> distract
> Owner of Elecraft K2 #2172  | the mouth-breathers, and that's why
> we're
> | powerful!"
> #include  | --Chris Hardwick
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>

 ___
 Mailing list: https://launchpad.net/~kicad-developers
 Post to : kicad-developers@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~kicad-developers
 More help   : https://help.launchpad.net/ListHelp


>>>
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : 

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-25 Thread Seth Hillbrand
Hi Orson-

Thanks for the test and the clarification of the documentation.

On the schematic, I can't seem to recreate the issue you document in the
image.  Is the example schematic one you can share?

Best-
Seth

On Fri, Nov 24, 2017 at 6:50 AM, Maciej Sumiński 
wrote:

> Hi Seth,
>
> I tested the branch and I consider it a significant improvement to the
> way junctions are handled. I confirm it fixes the four bugs mentioned in
> patch 0011, apart from a single case when a parallel component is
> dragged out. In this case junctions are not still not auto deleted (see
> [1], the rightmost picture "Junction is not auto deleted"), but at least
> the overlapping wires are merged. It is not a big deal IMHO, especially
> the patch set fixes a lot of other issues.
>
> It has not been stated explicitly, but I thought we will use
> NEW/REMOVE/CHANGE tags for listing changes that are perceived by the
> user. Therefore:
>
>   CHANGE: DeleteItem removes junctions that are no longer needed.
>
> informs the user about an improvement, but:
>
>   CHANGE: DeleteItemsInList shares the code for DeleteItem.
>
> seems to be too detailed and does not need to be reflected in the user
> documentation.
>
> What do you think? I will try to come up with a short paragraph that can
> be added to the website to make things clear.
>
> Regards,
> Orson
>
> 1.
> https://launchpadlibrarian.net/213748651/KICAD%20-%20BUG%
> 20REPORT%20-%20EESCHEMA%20-%20SOME%20DRAG%20ISSUES.jpg
>
> On 11/22/2017 09:07 PM, Seth Hillbrand wrote:
> > Updated patchset for this proposal, rebased to master.  I've also updated
> > the commit messages to match the CHANGE:/NEW: format and added one new
> bug
> > from launchpad that this addresses.
> >
> > -Seth
> >
> > On Wed, Nov 8, 2017 at 3:59 AM, Nick Østergaard 
> wrote:
> >
> >> For that specific issue with the junction drawing, there is a patch in
> the
> >> thread "[Kicad-developers] [PATCH] Draw junctions last"
> >>
> >> 2017-11-03 13:12 GMT+01:00 Jon Evans :
> >>
> >>> I looked at fixing this and some other related things, and decided to
> >>> just wait for the GAL port. There will need to be huge refactoring of
> the
> >>> eeschema draw code as part of that effort, so putting much effort into
> >>> making the wxDC drawing better seems not worth it.
> >>>
> >>> -Jon
> >>>
> >>> On Nov 3, 2017 00:08, "Kevin Cozens"  wrote:
> >>>
> >>> On 2017-11-02 06:31 PM, Seth Hillbrand wrote:
> >>>
>  Please let me know if there are any additional issues or suggestions
> for
>  improvement.
> 
> >>>
> >>> How difficult would it be to have junctions draw last on schematics?
> >>> There is a minor negative visual effect when you have a component with
> one
> >>> end joined to a wire by a junction and you replace the component.
> >>>
> >>> When you replace the component the pin of the component is now seen
> >>> extending through the round disc of the junction to the center of the
> >>> junction. I prefer to always see just the full round disc of a junction
> >>> mark even if I have replaced a component since placing the junction.
> >>>
> >>> --
> >>> Cheers!
> >>>
> >>> Kevin.
> >>>
> >>> http://www.ve3syb.ca/   |"Nerds make the shiny things that
> >>> distract
> >>> Owner of Elecraft K2 #2172  | the mouth-breathers, and that's why
> >>> we're
> >>> | powerful!"
> >>> #include  | --Chris Hardwick
> >>>
> >>>
> >>> ___
> >>> Mailing list: https://launchpad.net/~kicad-developers
> >>> Post to : kicad-developers@lists.launchpad.net
> >>> Unsubscribe : https://launchpad.net/~kicad-developers
> >>> More help   : https://help.launchpad.net/ListHelp
> >>>
> >>>
> >>>
> >>> ___
> >>> Mailing list: https://launchpad.net/~kicad-developers
> >>> Post to : kicad-developers@lists.launchpad.net
> >>> Unsubscribe : https://launchpad.net/~kicad-developers
> >>> More help   : https://help.launchpad.net/ListHelp
> >>>
> >>>
> >>
> >> ___
> >> Mailing list: https://launchpad.net/~kicad-developers
> >> Post to : kicad-developers@lists.launchpad.net
> >> Unsubscribe : https://launchpad.net/~kicad-developers
> >> More help   : https://help.launchpad.net/ListHelp
> >>
> >>
> >
> >
> >
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> >
>
>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-24 Thread Eldar Khayrullin

The related issue
https://bugs.launchpad.net/kicad/+bug/1491052

В Среда, 22 ноя. 2017 в 11:07 П. П., Seth Hillbrand 
 написал:
Updated patchset for this proposal, rebased to master.  I've also 
updated the commit messages to match the CHANGE:/NEW: format and 
added one new bug from launchpad that this addresses.


-Seth

On Wed, Nov 8, 2017 at 3:59 AM, Nick Østergaard  
wrote:
For that specific issue with the junction drawing, there is a patch 
in the thread "[Kicad-developers] [PATCH] Draw junctions last"


2017-11-03 13:12 GMT+01:00 Jon Evans :
I looked at fixing this and some other related things, and decided 
to just wait for the GAL port. There will need to be huge 
refactoring of the eeschema draw code as part of that effort, so 
putting much effort into making the wxDC drawing better seems not 
worth it.


-Jon

On Nov 3, 2017 00:08, "Kevin Cozens"  wrote:

On 2017-11-02 06:31 PM, Seth Hillbrand wrote:
Please let me know if there are any additional issues or 
suggestions for improvement.


How difficult would it be to have junctions draw last on 
schematics? There is a minor negative visual effect when you have 
a component with one end joined to a wire by a junction and you 
replace the component.


When you replace the component the pin of the component is now 
seen extending through the round disc of the junction to the 
center of the junction. I prefer to always see just the full round 
disc of a junction mark even if I have replaced a component since 
placing the junction.


--
Cheers!

Kevin.

http://www.ve3syb.ca/   |"Nerds make the shiny things that 
distract
Owner of Elecraft K2 #2172  | the mouth-breathers, and that's 
why we're

| powerful!"
#include  | --Chris Hardwick


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp




___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-24 Thread Maciej Sumiński
Hi Seth,

I tested the branch and I consider it a significant improvement to the
way junctions are handled. I confirm it fixes the four bugs mentioned in
patch 0011, apart from a single case when a parallel component is
dragged out. In this case junctions are not still not auto deleted (see
[1], the rightmost picture "Junction is not auto deleted"), but at least
the overlapping wires are merged. It is not a big deal IMHO, especially
the patch set fixes a lot of other issues.

It has not been stated explicitly, but I thought we will use
NEW/REMOVE/CHANGE tags for listing changes that are perceived by the
user. Therefore:

  CHANGE: DeleteItem removes junctions that are no longer needed.

informs the user about an improvement, but:

  CHANGE: DeleteItemsInList shares the code for DeleteItem.

seems to be too detailed and does not need to be reflected in the user
documentation.

What do you think? I will try to come up with a short paragraph that can
be added to the website to make things clear.

Regards,
Orson

1.
https://launchpadlibrarian.net/213748651/KICAD%20-%20BUG%20REPORT%20-%20EESCHEMA%20-%20SOME%20DRAG%20ISSUES.jpg

On 11/22/2017 09:07 PM, Seth Hillbrand wrote:
> Updated patchset for this proposal, rebased to master.  I've also updated
> the commit messages to match the CHANGE:/NEW: format and added one new bug
> from launchpad that this addresses.
> 
> -Seth
> 
> On Wed, Nov 8, 2017 at 3:59 AM, Nick Østergaard  wrote:
> 
>> For that specific issue with the junction drawing, there is a patch in the
>> thread "[Kicad-developers] [PATCH] Draw junctions last"
>>
>> 2017-11-03 13:12 GMT+01:00 Jon Evans :
>>
>>> I looked at fixing this and some other related things, and decided to
>>> just wait for the GAL port. There will need to be huge refactoring of the
>>> eeschema draw code as part of that effort, so putting much effort into
>>> making the wxDC drawing better seems not worth it.
>>>
>>> -Jon
>>>
>>> On Nov 3, 2017 00:08, "Kevin Cozens"  wrote:
>>>
>>> On 2017-11-02 06:31 PM, Seth Hillbrand wrote:
>>>
 Please let me know if there are any additional issues or suggestions for
 improvement.

>>>
>>> How difficult would it be to have junctions draw last on schematics?
>>> There is a minor negative visual effect when you have a component with one
>>> end joined to a wire by a junction and you replace the component.
>>>
>>> When you replace the component the pin of the component is now seen
>>> extending through the round disc of the junction to the center of the
>>> junction. I prefer to always see just the full round disc of a junction
>>> mark even if I have replaced a component since placing the junction.
>>>
>>> --
>>> Cheers!
>>>
>>> Kevin.
>>>
>>> http://www.ve3syb.ca/   |"Nerds make the shiny things that
>>> distract
>>> Owner of Elecraft K2 #2172  | the mouth-breathers, and that's why
>>> we're
>>> | powerful!"
>>> #include  | --Chris Hardwick
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 





signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-22 Thread Seth Hillbrand
Updated patchset for this proposal, rebased to master.  I've also updated
the commit messages to match the CHANGE:/NEW: format and added one new bug
from launchpad that this addresses.

-Seth

On Wed, Nov 8, 2017 at 3:59 AM, Nick Østergaard  wrote:

> For that specific issue with the junction drawing, there is a patch in the
> thread "[Kicad-developers] [PATCH] Draw junctions last"
>
> 2017-11-03 13:12 GMT+01:00 Jon Evans :
>
>> I looked at fixing this and some other related things, and decided to
>> just wait for the GAL port. There will need to be huge refactoring of the
>> eeschema draw code as part of that effort, so putting much effort into
>> making the wxDC drawing better seems not worth it.
>>
>> -Jon
>>
>> On Nov 3, 2017 00:08, "Kevin Cozens"  wrote:
>>
>> On 2017-11-02 06:31 PM, Seth Hillbrand wrote:
>>
>>> Please let me know if there are any additional issues or suggestions for
>>> improvement.
>>>
>>
>> How difficult would it be to have junctions draw last on schematics?
>> There is a minor negative visual effect when you have a component with one
>> end joined to a wire by a junction and you replace the component.
>>
>> When you replace the component the pin of the component is now seen
>> extending through the round disc of the junction to the center of the
>> junction. I prefer to always see just the full round disc of a junction
>> mark even if I have replaced a component since placing the junction.
>>
>> --
>> Cheers!
>>
>> Kevin.
>>
>> http://www.ve3syb.ca/   |"Nerds make the shiny things that
>> distract
>> Owner of Elecraft K2 #2172  | the mouth-breathers, and that's why
>> we're
>> | powerful!"
>> #include  | --Chris Hardwick
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
From b70ac1d34998ea04c62f4c74e8f7713fab24f601 Mon Sep 17 00:00:00 2001
From: Seth Hillbrand 
Date: Thu, 12 Oct 2017 14:08:14 -0700
Subject: [PATCH 01/11] Optimize speed of TestSegmentHit

Improves speed of function by exiting on non-hits more quickly for
the majority of tests.  Hits are also calculated slightly faster.
---
 common/trigo.cpp | 172 +--
 1 file changed, 39 insertions(+), 133 deletions(-)

diff --git a/common/trigo.cpp b/common/trigo.cpp
index 96dafa00e..5cf46d121 100644
--- a/common/trigo.cpp
+++ b/common/trigo.cpp
@@ -125,146 +125,52 @@ bool SegmentIntersectsSegment( const wxPoint _p1_l1, const wxPoint _p2_l1,
  * aRefPoint = reference point to test
  * aStart, aEnd are coordinates of end points segment
  * aDist = maximum distance for hit
- * Note: for calculation time reasons, the distance between the ref point
- * and the segment is not always exactly calculated
- * (we only know if the actual dist is < aDist, not exactly know this dist.
- * Because many times we have horizontal or vertical segments,
- * a special calcultaion is made for them
- * Note: sometimes we need to calculate the distande between 2 points
- * A square root should be calculated.
- * However, because we just compare 2 distnaces, to avoid calculating square root,
- * the square of distances are compared.
+ *
 */
-static inline double square( int x )// helper function to calculate x*x
-{
-return (double) x * x;
-}
 bool TestSegmentHit( const wxPoint , wxPoint aStart,
  wxPoint aEnd, int aDist )
 {
-// test for vertical or horizontal segment
-if( aEnd.x == aStart.x )
-{
-// vertical segment
-int ll = abs( aRefPoint.x - aStart.x );
-
-if( ll > aDist )
-return false;
-
-// To have only one case to examine, ensure aEnd.y > aStart.y
-if( aEnd.y < aStart.y )
-std::swap( aStart.y, aEnd.y );
-
-if( aRefPoint.y <= aEnd.y && aRefPoint.y >= aStart.y )
-return true;
-
-// there is a special case: x,y near an end point (distance < dist )
-// the distance should be carefully calculated
-if( (aStart.y - aRefPoint.y) < aDist )
-{
-double dd = square( aRefPoint.x - aStart.x) +
- square( aRefPoint.y - 

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-08 Thread Nick Østergaard
For that specific issue with the junction drawing, there is a patch in the
thread "[Kicad-developers] [PATCH] Draw junctions last"

2017-11-03 13:12 GMT+01:00 Jon Evans :

> I looked at fixing this and some other related things, and decided to just
> wait for the GAL port. There will need to be huge refactoring of the
> eeschema draw code as part of that effort, so putting much effort into
> making the wxDC drawing better seems not worth it.
>
> -Jon
>
> On Nov 3, 2017 00:08, "Kevin Cozens"  wrote:
>
> On 2017-11-02 06:31 PM, Seth Hillbrand wrote:
>
>> Please let me know if there are any additional issues or suggestions for
>> improvement.
>>
>
> How difficult would it be to have junctions draw last on schematics? There
> is a minor negative visual effect when you have a component with one end
> joined to a wire by a junction and you replace the component.
>
> When you replace the component the pin of the component is now seen
> extending through the round disc of the junction to the center of the
> junction. I prefer to always see just the full round disc of a junction
> mark even if I have replaced a component since placing the junction.
>
> --
> Cheers!
>
> Kevin.
>
> http://www.ve3syb.ca/   |"Nerds make the shiny things that
> distract
> Owner of Elecraft K2 #2172  | the mouth-breathers, and that's why we're
> | powerful!"
> #include  | --Chris Hardwick
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-03 Thread Jon Evans
I looked at fixing this and some other related things, and decided to just
wait for the GAL port. There will need to be huge refactoring of the
eeschema draw code as part of that effort, so putting much effort into
making the wxDC drawing better seems not worth it.

-Jon

On Nov 3, 2017 00:08, "Kevin Cozens"  wrote:

On 2017-11-02 06:31 PM, Seth Hillbrand wrote:

> Please let me know if there are any additional issues or suggestions for
> improvement.
>

How difficult would it be to have junctions draw last on schematics? There
is a minor negative visual effect when you have a component with one end
joined to a wire by a junction and you replace the component.

When you replace the component the pin of the component is now seen
extending through the round disc of the junction to the center of the
junction. I prefer to always see just the full round disc of a junction
mark even if I have replaced a component since placing the junction.

-- 
Cheers!

Kevin.

http://www.ve3syb.ca/   |"Nerds make the shiny things that distract
Owner of Elecraft K2 #2172  | the mouth-breathers, and that's why we're
| powerful!"
#include  | --Chris Hardwick


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-02 Thread Kevin Cozens

On 2017-11-02 06:31 PM, Seth Hillbrand wrote:
Please let me know if there are any additional issues or suggestions for 
improvement.


How difficult would it be to have junctions draw last on schematics? There 
is a minor negative visual effect when you have a component with one end 
joined to a wire by a junction and you replace the component.


When you replace the component the pin of the component is now seen 
extending through the round disc of the junction to the center of the 
junction. I prefer to always see just the full round disc of a junction mark 
even if I have replaced a component since placing the junction.


--
Cheers!

Kevin.

http://www.ve3syb.ca/   |"Nerds make the shiny things that distract
Owner of Elecraft K2 #2172  | the mouth-breathers, and that's why we're
| powerful!"
#include  | --Chris Hardwick

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-11-02 Thread Seth Hillbrand
Hi All-

Attached is an updated patchset for this feature, rebased to current master.

This should resolve the issues that Nick and Michael reported as well as
update to handle imported Eagle schematics.

Please let me know if there are any additional issues or suggestions for
improvement.

Thanks-
Seth

On Sat, Oct 28, 2017 at 7:32 PM, Seth Hillbrand 
wrote:

> Hi Nick-
>
> I've tried this action ('g' to drag for me, 'd' is not mapped unless I
> missed a step) on all of schematics in my own library as well as the demos
> but can't get it to crash with the updated patch.
>
> Would you be able to send me a copy of your schematic?
>
> Thanks-
> Seth
>
> On Sat, Oct 28, 2017 at 4:29 PM, Nick Østergaard 
> wrote:
>
>> Thank you. But I still get the same assert.
>>
>> All I do it hit d on my cap and move the pin anchor to the middle of the
>> T junction where the one pin is on the same net.
>>
>> 2017-10-28 21:30 GMT+02:00 Seth Hillbrand :
>>
>>> Thank you Nick for testing!  Looks like a missed a `break` when
>>> re-formatting from the first commit.
>>>
>>> I've corrected the issue in the attached patch set.
>>>
>>> -Seth
>>>
>>> On Sat, Oct 28, 2017 at 5:49 AM, Nick Østergaard 
>>> wrote:
>>>
 Hello Seth

 I am not entirely sure what these patches actually do, but I tired to
 test them.

 But I have major problems with dragging stuff around in kicad. On the
 attached I dragged a capacitor to the T junction on the wire above it.

 If I make the asserts continue I get a blank page eventually.

 Nick



 2017-10-28 <20%2017%2010%2028> 2:09 GMT+02:00 Seth Hillbrand <
 seth.hillbr...@gmail.com>:

> Hi All-
>
> Quick ping on this.  Master has moved on, so I've re-based the patch
> set to the current master, in case anyone is up for looking at it.  I also
> split out the largest patch into a couple of logical blocks, in hopes of
> making it easier to review.
>
> Lastly, I found and fixed a corner case where removing two segments on
> the same junction broke the undo/redo stack.
>
> Thanks!
> Seth
>
> On Mon, Oct 16, 2017 at 5:27 PM, Seth Hillbrand <
> seth.hillbr...@gmail.com> wrote:
>
>> Attached is a proposed patchset for automatically managing
>> junctions​, adding and deleting them as they are needed by the schematic.
>>
>> The patches touch a number of sections, so any reports of issues
>> would be greatly appreciated.  Notably, this introduces an "append" 
>> feature
>> to eeschema's undo save, which allows us to stack changes from different
>> calls into the undo list.  This removes the issue where "Delete 
>> Connection"
>> would break the undo stack.
>>
>> Schematic cleanup is moved from the SCH_SCREEN class into the
>> SCH_EDIT_FRAME class to provide access to the undo stack.
>>
>> Cleanup now checks for overlapping segments as well as duplicate
>> junctions and merge-able lines.
>>
>> Bugs reports addressed by this patchset:
>> https://bugs.launchpad.net/kicad/+bug/1563153
>> https://bugs.launchpad.net/kicad/+bug/593888
>> https://bugs.launchpad.net/kicad/+bug/1482111
>>
>> Any feedback would be greatly appreciated.
>>
>> -S​
>>
>>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>

>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>
From 0359b88f2739f522a2292ecf3403df8008d01eb0 Mon Sep 17 00:00:00 2001
From: Seth Hillbrand 
Date: Thu, 12 Oct 2017 14:08:14 -0700
Subject: [PATCH 01/13] Optimize speed of TestSegmentHit

Improves speed of function by exiting on non-hits more quickly for
the majority of tests.  Hits are also calculated slightly faster.
---
 common/trigo.cpp | 172 +--
 1 file changed, 39 insertions(+), 133 deletions(-)

diff --git a/common/trigo.cpp b/common/trigo.cpp
index 96dafa00e..5cf46d121 100644
--- a/common/trigo.cpp
+++ b/common/trigo.cpp
@@ -125,146 +125,52 @@ bool SegmentIntersectsSegment( const wxPoint _p1_l1, const wxPoint _p2_l1,
  * aRefPoint = reference point to test
  * aStart, aEnd are coordinates of end points segment
  * aDist = maximum distance for hit
- * Note: for calculation time reasons, the distance between the ref point
- * and the segment is not always exactly calculated
- * (we 

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-10-29 Thread Seth Hillbrand
Michael-

Thank you for catching that.  I'll incorporate your suggestion into the
patchset.

Best-
Seth

On Sun, Oct 29, 2017 at 3:06 AM, Michael Geselbracht <
mgeselbrac...@gmail.com> wrote:

> Hi,
>
> just tested your patches. I think it is an improvement over the current
> master.
> But with this patch eeschema crashes on opening some (hierarchical) sheets
> either by double-clicking or using the navigator.
>
> I have changed eeschema/schematic_undo_redo.cpp:182
> from
>
> if( commandToUndo->m_Status == UR_WIRE_IMAGE )
>
> to
>
> if( commandToUndo && commandToUndo->m_Status == UR_WIRE_IMAGE )
>
> and now it seems to work.
>
>  - Michael
>
>
> Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
> 0x7fffe6faf7e4 in SCH_EDIT_FRAME::SaveCopyInUndoList (this=0x1eca430,
> aItemsList=..., aTypeCommand=UR_CHANGED, aAppend=true, aTransformPoint=...)
> at /data/src/kicad-source-mirror/eeschema/schematic_undo_redo.cpp:182
> 182 if( commandToUndo->m_Status == UR_WIRE_IMAGE )
> (gdb) bt
> #0  0x7fffe6faf7e4 in SCH_EDIT_FRAME::SaveCopyInUndoList
> (this=0x1eca430, aItemsList=..., aTypeCommand=UR_CHANGED, aAppend=true,
> aTransformPoint=...)
> at /data/src/kicad-source-mirror/eeschema/schematic_undo_redo.cpp:182
> #1  0x7fffe6d987a2 in SCH_EDIT_FRAME::SchematicCleanUp
> (this=0x1eca430, aAppend=true) at /data/src/kicad-source-mirror/
> eeschema/bus-wire-junction.cpp:536
> #2  0x7fffe6eb0c0e in SCH_EDIT_FRAME::DisplayCurrentSheet
> (this=0x1eca430) at /data/src/kicad-source-mirror/
> eeschema/hierarch.cpp:302
> #3  0x7fffe6f053fc in SCH_EDIT_FRAME::OnLeftDClick (this=0x1eca430,
> aDC=0x7fffcfe0, aPosition=...)
> at /data/src/kicad-source-mirror/eeschema/onleftclick.cpp:410
> #4  0x7fffe70c8e6f in EDA_DRAW_PANEL::OnMouseEvent (this=0x1edf140,
> event=...) at /data/src/kicad-source-mirror/common/draw_panel.cpp:1134
> #5  0x767d11fe in wxAppConsoleBase::CallEventHandler(wxEvtHandler*,
> wxEventFunctor&, wxEvent&) const ()
>from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #6  0x769576e7 in 
> wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase
> const&, wxEvtHandler*, wxEvent&) ()
>from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #7  0x769577db in wxEventHashTable::HandleEvent(wxEvent&,
> wxEvtHandler*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #8  0x76957b8b in wxEvtHandler::TryHereOnly(wxEvent&) () from
> /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #9  0x76957c13 in wxEvtHandler::ProcessEventLocally(wxEvent&) ()
> from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #10 0x76957c75 in wxEvtHandler::ProcessEvent(wxEvent&) () from
> /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #11 0x770ec77b in wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
> () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
> #12 0x769579e7 in wxEvtHandler::SafelyProcessEvent(wxEvent&) ()
> from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #13 0x76e984c6 in ?? () from /usr/lib/x86_64-linux-gnu/
> libwx_gtk2u_core-3.0.so.0
> #14 0x74d1daec in ?? () from /usr/lib/x86_64-linux-gnu/
> libgtk-x11-2.0.so.0
> #15 0x746f2fa5 in g_closure_invoke () from
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
> #16 0x74704fc1 in ?? () from /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0
> #17 0x7470d7f9 in g_signal_emit_valist () from
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
> #18 0x7470e08f in g_signal_emit () from /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0
> #19 0x74e3593c in ?? () from /usr/lib/x86_64-linux-gnu/
> libgtk-x11-2.0.so.0
> #20 0x74d1c284 in gtk_propagate_event () from
> /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
> #21 0x74d1c63b in gtk_main_do_event () from
> /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
> #22 0x74990c8c in ?? () from /usr/lib/x86_64-linux-gnu/
> libgdk-x11-2.0.so.0
> #23 0x73fae197 in g_main_context_dispatch () from
> /lib/x86_64-linux-gnu/libglib-2.0.so.0
> ---Type  to continue, or q  to quit---q
> Quit
> (gdb) p *commandToUndo
> Cannot access memory at address 0x0
>
>
>
> Application: kicad
> Version: (2017-10-28 revision b416c3b4b)-seth, debug build
> Libraries:
> wxWidgets 3.0.2
> libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
> Platform: Linux 4.10.0-37-generic x86_64, 64 bit, Little endian, wxGTK
> Build Info:
> wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
> Boost: 1.58.0
> Curl: 7.47.0
> Compiler: GCC 5.4.0 with C++ ABI 1009
>
> Build settings:
> USE_WX_GRAPHICS_CONTEXT=OFF
> USE_WX_OVERLAY=OFF
> KICAD_SCRIPTING=ON
> KICAD_SCRIPTING_MODULES=ON
> KICAD_SCRIPTING_WXPYTHON=ON
> KICAD_SCRIPTING_ACTION_MENU=OFF
> BUILD_GITHUB_PLUGIN=ON
> KICAD_USE_OCE=ON
> KICAD_SPICE=ON
>
>
>
> On 28.10.2017 02:09, Seth Hillbrand wrote:
>
> Hi All-
>
> Quick 

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-10-29 Thread Michael Geselbracht

Hi,

just tested your patches. I think it is an improvement over the current 
master.
But with this patch eeschema crashes on opening some (hierarchical) 
sheets either by double-clicking or using the navigator.


I have changed eeschema/schematic_undo_redo.cpp:182
from

if( commandToUndo->m_Status == UR_WIRE_IMAGE )

to

if( commandToUndo && commandToUndo->m_Status == UR_WIRE_IMAGE )

and now it seems to work.

 - Michael


Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
0x7fffe6faf7e4 in SCH_EDIT_FRAME::SaveCopyInUndoList 
(this=0x1eca430, aItemsList=..., aTypeCommand=UR_CHANGED, aAppend=true, 
aTransformPoint=...)

    at /data/src/kicad-source-mirror/eeschema/schematic_undo_redo.cpp:182
182 if( commandToUndo->m_Status == UR_WIRE_IMAGE )
(gdb) bt
#0  0x7fffe6faf7e4 in SCH_EDIT_FRAME::SaveCopyInUndoList 
(this=0x1eca430, aItemsList=..., aTypeCommand=UR_CHANGED, aAppend=true, 
aTransformPoint=...)

    at /data/src/kicad-source-mirror/eeschema/schematic_undo_redo.cpp:182
#1  0x7fffe6d987a2 in SCH_EDIT_FRAME::SchematicCleanUp 
(this=0x1eca430, aAppend=true) at 
/data/src/kicad-source-mirror/eeschema/bus-wire-junction.cpp:536
#2  0x7fffe6eb0c0e in SCH_EDIT_FRAME::DisplayCurrentSheet 
(this=0x1eca430) at /data/src/kicad-source-mirror/eeschema/hierarch.cpp:302
#3  0x7fffe6f053fc in SCH_EDIT_FRAME::OnLeftDClick (this=0x1eca430, 
aDC=0x7fffcfe0, aPosition=...)

    at /data/src/kicad-source-mirror/eeschema/onleftclick.cpp:410
#4  0x7fffe70c8e6f in EDA_DRAW_PANEL::OnMouseEvent (this=0x1edf140, 
event=...) at /data/src/kicad-source-mirror/common/draw_panel.cpp:1134
#5  0x767d11fe in 
wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, 
wxEvent&) const ()

   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#6  0x769576e7 in 
wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, 
wxEvtHandler*, wxEvent&) ()

   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#7  0x769577db in wxEventHashTable::HandleEvent(wxEvent&, 
wxEvtHandler*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#8  0x76957b8b in wxEvtHandler::TryHereOnly(wxEvent&) () from 
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#9  0x76957c13 in wxEvtHandler::ProcessEventLocally(wxEvent&) () 
from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#10 0x76957c75 in wxEvtHandler::ProcessEvent(wxEvent&) () from 
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#11 0x770ec77b in 
wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) () from 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#12 0x769579e7 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () 
from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#13 0x76e984c6 in ?? () from 
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#14 0x74d1daec in ?? () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#15 0x746f2fa5 in g_closure_invoke () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x74704fc1 in ?? () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x7470d7f9 in g_signal_emit_valist () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x7470e08f in g_signal_emit () from 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x74e3593c in ?? () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#20 0x74d1c284 in gtk_propagate_event () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#21 0x74d1c63b in gtk_main_do_event () from 
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#22 0x74990c8c in ?? () from 
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#23 0x73fae197 in g_main_context_dispatch () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0

---Type  to continue, or q  to quit---q
Quit
(gdb) p *commandToUndo
Cannot access memory at address 0x0



Application: kicad
Version: (2017-10-28 revision b416c3b4b)-seth, debug build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.10.0-37-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.58.0
    Curl: 7.47.0
    Compiler: GCC 5.4.0 with C++ ABI 1009

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_ACTION_MENU=OFF
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_SPICE=ON



On 28.10.2017 02:09, Seth Hillbrand wrote:

Hi All-

Quick ping on this.  Master has moved on, so I've re-based the patch 
set to the current master, in case anyone is up for looking at it.  I 
also split out the largest patch into a couple of logical blocks, in 
hopes of making it easier to review.


Lastly, I found and fixed a corner case where removing two segments on 
the same junction broke the undo/redo stack.


Thanks!
Seth

On 

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-10-28 Thread Seth Hillbrand
Hi Nick-

I've tried this action ('g' to drag for me, 'd' is not mapped unless I
missed a step) on all of schematics in my own library as well as the demos
but can't get it to crash with the updated patch.

Would you be able to send me a copy of your schematic?

Thanks-
Seth

On Sat, Oct 28, 2017 at 4:29 PM, Nick Østergaard  wrote:

> Thank you. But I still get the same assert.
>
> All I do it hit d on my cap and move the pin anchor to the middle of the T
> junction where the one pin is on the same net.
>
> 2017-10-28 21:30 GMT+02:00 Seth Hillbrand :
>
>> Thank you Nick for testing!  Looks like a missed a `break` when
>> re-formatting from the first commit.
>>
>> I've corrected the issue in the attached patch set.
>>
>> -Seth
>>
>> On Sat, Oct 28, 2017 at 5:49 AM, Nick Østergaard 
>> wrote:
>>
>>> Hello Seth
>>>
>>> I am not entirely sure what these patches actually do, but I tired to
>>> test them.
>>>
>>> But I have major problems with dragging stuff around in kicad. On the
>>> attached I dragged a capacitor to the T junction on the wire above it.
>>>
>>> If I make the asserts continue I get a blank page eventually.
>>>
>>> Nick
>>>
>>>
>>>
>>> 2017-10-28 <20%2017%2010%2028> 2:09 GMT+02:00 Seth Hillbrand <
>>> seth.hillbr...@gmail.com>:
>>>
 Hi All-

 Quick ping on this.  Master has moved on, so I've re-based the patch
 set to the current master, in case anyone is up for looking at it.  I also
 split out the largest patch into a couple of logical blocks, in hopes of
 making it easier to review.

 Lastly, I found and fixed a corner case where removing two segments on
 the same junction broke the undo/redo stack.

 Thanks!
 Seth

 On Mon, Oct 16, 2017 at 5:27 PM, Seth Hillbrand <
 seth.hillbr...@gmail.com> wrote:

> Attached is a proposed patchset for automatically managing junctions​,
> adding and deleting them as they are needed by the schematic.
>
> The patches touch a number of sections, so any reports of issues would
> be greatly appreciated.  Notably, this introduces an "append" feature to
> eeschema's undo save, which allows us to stack changes from different 
> calls
> into the undo list.  This removes the issue where "Delete Connection" 
> would
> break the undo stack.
>
> Schematic cleanup is moved from the SCH_SCREEN class into the
> SCH_EDIT_FRAME class to provide access to the undo stack.
>
> Cleanup now checks for overlapping segments as well as duplicate
> junctions and merge-able lines.
>
> Bugs reports addressed by this patchset:
> https://bugs.launchpad.net/kicad/+bug/1563153
> https://bugs.launchpad.net/kicad/+bug/593888
> https://bugs.launchpad.net/kicad/+bug/1482111
>
> Any feedback would be greatly appreciated.
>
> -S​
>
>

 ___
 Mailing list: https://launchpad.net/~kicad-developers
 Post to : kicad-developers@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~kicad-developers
 More help   : https://help.launchpad.net/ListHelp


>>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-10-28 Thread Nick Østergaard
Thank you. But I still get the same assert.

All I do it hit d on my cap and move the pin anchor to the middle of the T
junction where the one pin is on the same net.

2017-10-28 21:30 GMT+02:00 Seth Hillbrand :

> Thank you Nick for testing!  Looks like a missed a `break` when
> re-formatting from the first commit.
>
> I've corrected the issue in the attached patch set.
>
> -Seth
>
> On Sat, Oct 28, 2017 at 5:49 AM, Nick Østergaard 
> wrote:
>
>> Hello Seth
>>
>> I am not entirely sure what these patches actually do, but I tired to
>> test them.
>>
>> But I have major problems with dragging stuff around in kicad. On the
>> attached I dragged a capacitor to the T junction on the wire above it.
>>
>> If I make the asserts continue I get a blank page eventually.
>>
>> Nick
>>
>>
>>
>> 2017-10-28 <20%2017%2010%2028> 2:09 GMT+02:00 Seth Hillbrand <
>> seth.hillbr...@gmail.com>:
>>
>>> Hi All-
>>>
>>> Quick ping on this.  Master has moved on, so I've re-based the patch set
>>> to the current master, in case anyone is up for looking at it.  I also
>>> split out the largest patch into a couple of logical blocks, in hopes of
>>> making it easier to review.
>>>
>>> Lastly, I found and fixed a corner case where removing two segments on
>>> the same junction broke the undo/redo stack.
>>>
>>> Thanks!
>>> Seth
>>>
>>> On Mon, Oct 16, 2017 at 5:27 PM, Seth Hillbrand <
>>> seth.hillbr...@gmail.com> wrote:
>>>
 Attached is a proposed patchset for automatically managing junctions​,
 adding and deleting them as they are needed by the schematic.

 The patches touch a number of sections, so any reports of issues would
 be greatly appreciated.  Notably, this introduces an "append" feature to
 eeschema's undo save, which allows us to stack changes from different calls
 into the undo list.  This removes the issue where "Delete Connection" would
 break the undo stack.

 Schematic cleanup is moved from the SCH_SCREEN class into the
 SCH_EDIT_FRAME class to provide access to the undo stack.

 Cleanup now checks for overlapping segments as well as duplicate
 junctions and merge-able lines.

 Bugs reports addressed by this patchset:
 https://bugs.launchpad.net/kicad/+bug/1563153
 https://bugs.launchpad.net/kicad/+bug/593888
 https://bugs.launchpad.net/kicad/+bug/1482111

 Any feedback would be greatly appreciated.

 -S​


>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-10-28 Thread Seth Hillbrand
Thank you Nick for testing!  Looks like a missed a `break` when
re-formatting from the first commit.

I've corrected the issue in the attached patch set.

-Seth

On Sat, Oct 28, 2017 at 5:49 AM, Nick Østergaard  wrote:

> Hello Seth
>
> I am not entirely sure what these patches actually do, but I tired to test
> them.
>
> But I have major problems with dragging stuff around in kicad. On the
> attached I dragged a capacitor to the T junction on the wire above it.
>
> If I make the asserts continue I get a blank page eventually.
>
> Nick
>
>
>
> 2017-10-28 2:09 GMT+02:00 Seth Hillbrand :
>
>> Hi All-
>>
>> Quick ping on this.  Master has moved on, so I've re-based the patch set
>> to the current master, in case anyone is up for looking at it.  I also
>> split out the largest patch into a couple of logical blocks, in hopes of
>> making it easier to review.
>>
>> Lastly, I found and fixed a corner case where removing two segments on
>> the same junction broke the undo/redo stack.
>>
>> Thanks!
>> Seth
>>
>> On Mon, Oct 16, 2017 at 5:27 PM, Seth Hillbrand > > wrote:
>>
>>> Attached is a proposed patchset for automatically managing junctions​,
>>> adding and deleting them as they are needed by the schematic.
>>>
>>> The patches touch a number of sections, so any reports of issues would
>>> be greatly appreciated.  Notably, this introduces an "append" feature to
>>> eeschema's undo save, which allows us to stack changes from different calls
>>> into the undo list.  This removes the issue where "Delete Connection" would
>>> break the undo stack.
>>>
>>> Schematic cleanup is moved from the SCH_SCREEN class into the
>>> SCH_EDIT_FRAME class to provide access to the undo stack.
>>>
>>> Cleanup now checks for overlapping segments as well as duplicate
>>> junctions and merge-able lines.
>>>
>>> Bugs reports addressed by this patchset:
>>> https://bugs.launchpad.net/kicad/+bug/1563153
>>> https://bugs.launchpad.net/kicad/+bug/593888
>>> https://bugs.launchpad.net/kicad/+bug/1482111
>>>
>>> Any feedback would be greatly appreciated.
>>>
>>> -S​
>>>
>>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
From 849ac7e93f708018141ed88326f7dada2eb4df40 Mon Sep 17 00:00:00 2001
From: Seth Hillbrand 
Date: Fri, 6 Oct 2017 10:42:55 -0700
Subject: [PATCH 01/13] Eeschema: Improve performance and merge overlapping
 segments

When adding segments, eeschema should check both slope and overlap
instead of only overlapping endpoints.
---
 eeschema/sch_line.cpp | 69 +--
 1 file changed, 39 insertions(+), 30 deletions(-)

diff --git a/eeschema/sch_line.cpp b/eeschema/sch_line.cpp
index 21b6fe8fd..2c1379155 100644
--- a/eeschema/sch_line.cpp
+++ b/eeschema/sch_line.cpp
@@ -273,12 +273,36 @@ void SCH_LINE::Rotate( wxPoint aPosition )
  */
 bool SCH_LINE::MergeOverlap( SCH_LINE* aLine )
 {
+SCH_LINE *leftmost, *rightmost;
 wxCHECK_MSG( aLine != NULL && aLine->Type() == SCH_LINE_T, false,
  wxT( "Cannot test line segment for overlap." ) );
 
 if( this == aLine || GetLayer() != aLine->GetLayer() )
 return false;
 
+auto less = []( const wxPoint& lhs, const wxPoint& rhs ) -> bool
+{
+if( lhs.x == rhs.x )
+return lhs.y < rhs.y;
+return lhs.x < rhs.x;
+};
+
+if( m_start != std::min( { m_start, m_end }, less ) )
+std::swap( m_start, m_end );
+if( aLine->m_start != std::min( { aLine->m_start, aLine->m_end }, less ) )
+std::swap( aLine->m_start, aLine->m_end );
+
+if( less( m_start, aLine->m_start ) )
+{
+leftmost = this;
+rightmost = aLine;
+}
+else
+{
+leftmost = aLine;
+rightmost = this;
+}
+
 // Search for a common end:
 if( m_start == aLine->m_start )
 {
@@ -296,35 +320,30 @@ bool SCH_LINE::MergeOverlap( SCH_LINE* aLine )
 }
 else if( m_end != aLine->m_start )
 {
-// No common end point, segments cannot be merged.
-return false;
+// No common end point, check for maybe overlapping
+if( less ( leftmost->m_end, rightmost->m_start ) )
+return false;
 }
 
 bool colinear = false;
 
 /* Test alignment: */
-if( m_start.y == m_end.y )   // Horizontal segment
+if( ( m_start.y == m_end.y ) && ( aLine->m_start.y == aLine->m_end.y ) )   // Horizontal segment
 {
-if( aLine->m_start.y == aLine->m_end.y )
-{
-colinear = true;
-}
+colinear = ( m_start.y == aLine->m_start.y );
 }
-else if( m_start.x == m_end.x )  // Vertical segment
+else if( ( m_start.x == m_end.x ) && ( 

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-10-28 Thread Nick Østergaard
Hello Seth

I am not entirely sure what these patches actually do, but I tired to test
them.

But I have major problems with dragging stuff around in kicad. On the
attached I dragged a capacitor to the T junction on the wire above it.

If I make the asserts continue I get a blank page eventually.

Nick



2017-10-28 2:09 GMT+02:00 Seth Hillbrand :

> Hi All-
>
> Quick ping on this.  Master has moved on, so I've re-based the patch set
> to the current master, in case anyone is up for looking at it.  I also
> split out the largest patch into a couple of logical blocks, in hopes of
> making it easier to review.
>
> Lastly, I found and fixed a corner case where removing two segments on the
> same junction broke the undo/redo stack.
>
> Thanks!
> Seth
>
> On Mon, Oct 16, 2017 at 5:27 PM, Seth Hillbrand 
> wrote:
>
>> Attached is a proposed patchset for automatically managing junctions​,
>> adding and deleting them as they are needed by the schematic.
>>
>> The patches touch a number of sections, so any reports of issues would be
>> greatly appreciated.  Notably, this introduces an "append" feature to
>> eeschema's undo save, which allows us to stack changes from different calls
>> into the undo list.  This removes the issue where "Delete Connection" would
>> break the undo stack.
>>
>> Schematic cleanup is moved from the SCH_SCREEN class into the
>> SCH_EDIT_FRAME class to provide access to the undo stack.
>>
>> Cleanup now checks for overlapping segments as well as duplicate
>> junctions and merge-able lines.
>>
>> Bugs reports addressed by this patchset:
>> https://bugs.launchpad.net/kicad/+bug/1563153
>> https://bugs.launchpad.net/kicad/+bug/593888
>> https://bugs.launchpad.net/kicad/+bug/1482111
>>
>> Any feedback would be greatly appreciated.
>>
>> -S​
>>
>>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
(gdb) bt
#0  0x7fa81f586c40 in raise () at /usr/lib/libpthread.so.0
#1  0x7fa8229ed636 in wxGUIAppTraits::ShowAssertDialog(wxString const&) () 
at /usr/lib/libwx_gtk2u_core-3.0.so.0
#2  0x7fa8221074f9 in  () at /usr/lib/libwx_baseu-3.0.so.0
#3  0x7fa82210a660 in wxAppConsoleBase::OnAssertFailure(wchar_t const*, 
int, wchar_t const*, wchar_t const*, wchar_t const*) ()
at /usr/lib/libwx_baseu-3.0.so.0
#4  0x7fa8229b8d51 in wxApp::OnAssertFailure(wchar_t const*, int, wchar_t 
const*, wchar_t const*, wchar_t const*) () at /usr/lib/libwx_gtk2u_core-3.0.so.0
#5  0x7fa82210a97c in  () at /usr/lib/libwx_baseu-3.0.so.0
#6  0x7fa822104f44 in wxOnAssert(char const*, int, char const*, char 
const*, char const*) () at /usr/lib/libwx_baseu-3.0.so.0
#7  0x7fa7fb004edd in DHEAD::remove(EDA_ITEM*) (this=0x556e48ef57d0, 
aElement=0x556e4f4f8390) at /home/nickoe/kicad-git/common/dlist.cpp:163
#8  0x7fa7fad55fc9 in DLIST::Remove(SCH_ITEM*) 
(this=0x556e48ef57d0, aElement=0x556e4f4f8390) at 
/home/nickoe/kicad-git/include/dlist.h:213
#9  0x7fa7faf429aa in SCH_SCREEN::Remove(SCH_ITEM*) (this=0x556e48ef5570, 
aItem=0x556e4f4f8390) at /home/nickoe/kicad-git/eeschema/sch_screen.cpp:160
#10 0x7fa7fad53ea2 in SCH_EDIT_FRAME::SchematicCleanUp(bool) 
(this=0x556e4a639cb0, aAppend=true)
at /home/nickoe/kicad-git/eeschema/bus-wire-junction.cpp:512
#11 0x7fa7fad3cbd8 in SCH_EDIT_FRAME::HandleBlockPlace(wxDC*) 
(this=0x556e4a639cb0, DC=0x7fff355f7490) at 
/home/nickoe/kicad-git/eeschema/block.cpp:142
#12 0x7fa7fb0834aa in EDA_DRAW_PANEL::OnMouseEvent(wxMouseEvent&) 
(this=0x556e48c5ce50, event=...) at 
/home/nickoe/kicad-git/common/draw_panel.cpp:1242
#13 0x7fa82228dd7e in 
wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, 
wxEvtHandler*, wxEvent&) () at /usr/lib/libwx_baseu-3.0.so.0
#14 0x7fa82228de84 in wxEventHashTable::HandleEvent(wxEvent&, 
wxEvtHandler*) () at /usr/lib/libwx_baseu-3.0.so.0
#15 0x7fa82228e25d in wxEvtHandler::TryHereOnly(wxEvent&) () at 
/usr/lib/libwx_baseu-3.0.so.0
#16 0x7fa82228e2e4 in wxEvtHandler::ProcessEventLocally(wxEvent&) () at 
/usr/lib/libwx_baseu-3.0.so.0
#17 0x7fa82228e346 in wxEvtHandler::ProcessEvent(wxEvent&) () at 
/usr/lib/libwx_baseu-3.0.so.0
#18 0x7fa822c2090d in wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) () 
at /usr/lib/libwx_gtk2u_core-3.0.so.0
#19 0x7fa82228e097 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () at 
/usr/lib/libwx_baseu-3.0.so.0
#20 0x7fa8229f615f in  () at /usr/lib/libwx_gtk2u_core-3.0.so.0
#21 0x7fa81ecae7ac in  () at /usr/lib/libgtk-x11-2.0.so.0
#22 0x7fa81e68f6f5 in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#23 0x7fa81e6a30b0 in  () at /usr/lib/libgobject-2.0.so.0
#24 0x7fa81e6a6efe in g_signal_emit_valist () at 
/usr/lib/libgobject-2.0.so.0
#25 

Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-10-27 Thread Simon Richter
Hi,

On 28.10.2017 02:09, Seth Hillbrand wrote:

> Quick ping on this.  Master has moved on, so I've re-based the patch set
> to the current master, in case anyone is up for looking at it.  I also
> split out the largest patch into a couple of logical blocks, in hopes of
> making it easier to review.

> Lastly, I found and fixed a corner case where removing two segments on
> the same junction broke the undo/redo stack.

I'm planning to take a look at this tomorrow (because I have another
change on top), but I can only comment, not approve.

   Simon



signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Eeschema automatic manage junctions

2017-10-27 Thread Seth Hillbrand
Hi All-

Quick ping on this.  Master has moved on, so I've re-based the patch set to
the current master, in case anyone is up for looking at it.  I also split
out the largest patch into a couple of logical blocks, in hopes of making
it easier to review.

Lastly, I found and fixed a corner case where removing two segments on the
same junction broke the undo/redo stack.

Thanks!
Seth

On Mon, Oct 16, 2017 at 5:27 PM, Seth Hillbrand 
wrote:

> Attached is a proposed patchset for automatically managing junctions​,
> adding and deleting them as they are needed by the schematic.
>
> The patches touch a number of sections, so any reports of issues would be
> greatly appreciated.  Notably, this introduces an "append" feature to
> eeschema's undo save, which allows us to stack changes from different calls
> into the undo list.  This removes the issue where "Delete Connection" would
> break the undo stack.
>
> Schematic cleanup is moved from the SCH_SCREEN class into the
> SCH_EDIT_FRAME class to provide access to the undo stack.
>
> Cleanup now checks for overlapping segments as well as duplicate junctions
> and merge-able lines.
>
> Bugs reports addressed by this patchset:
> https://bugs.launchpad.net/kicad/+bug/1563153
> https://bugs.launchpad.net/kicad/+bug/593888
> https://bugs.launchpad.net/kicad/+bug/1482111
>
> Any feedback would be greatly appreciated.
>
> -S​
>
>
From 849ac7e93f708018141ed88326f7dada2eb4df40 Mon Sep 17 00:00:00 2001
From: Seth Hillbrand 
Date: Fri, 6 Oct 2017 10:42:55 -0700
Subject: [PATCH 01/13] Eeschema: Improve performance and merge overlapping
 segments

When adding segments, eeschema should check both slope and overlap
instead of only overlapping endpoints.
---
 eeschema/sch_line.cpp | 69 +--
 1 file changed, 39 insertions(+), 30 deletions(-)

diff --git a/eeschema/sch_line.cpp b/eeschema/sch_line.cpp
index 21b6fe8fd..2c1379155 100644
--- a/eeschema/sch_line.cpp
+++ b/eeschema/sch_line.cpp
@@ -273,12 +273,36 @@ void SCH_LINE::Rotate( wxPoint aPosition )
  */
 bool SCH_LINE::MergeOverlap( SCH_LINE* aLine )
 {
+SCH_LINE *leftmost, *rightmost;
 wxCHECK_MSG( aLine != NULL && aLine->Type() == SCH_LINE_T, false,
  wxT( "Cannot test line segment for overlap." ) );
 
 if( this == aLine || GetLayer() != aLine->GetLayer() )
 return false;
 
+auto less = []( const wxPoint& lhs, const wxPoint& rhs ) -> bool
+{
+if( lhs.x == rhs.x )
+return lhs.y < rhs.y;
+return lhs.x < rhs.x;
+};
+
+if( m_start != std::min( { m_start, m_end }, less ) )
+std::swap( m_start, m_end );
+if( aLine->m_start != std::min( { aLine->m_start, aLine->m_end }, less ) )
+std::swap( aLine->m_start, aLine->m_end );
+
+if( less( m_start, aLine->m_start ) )
+{
+leftmost = this;
+rightmost = aLine;
+}
+else
+{
+leftmost = aLine;
+rightmost = this;
+}
+
 // Search for a common end:
 if( m_start == aLine->m_start )
 {
@@ -296,35 +320,30 @@ bool SCH_LINE::MergeOverlap( SCH_LINE* aLine )
 }
 else if( m_end != aLine->m_start )
 {
-// No common end point, segments cannot be merged.
-return false;
+// No common end point, check for maybe overlapping
+if( less ( leftmost->m_end, rightmost->m_start ) )
+return false;
 }
 
 bool colinear = false;
 
 /* Test alignment: */
-if( m_start.y == m_end.y )   // Horizontal segment
+if( ( m_start.y == m_end.y ) && ( aLine->m_start.y == aLine->m_end.y ) )   // Horizontal segment
 {
-if( aLine->m_start.y == aLine->m_end.y )
-{
-colinear = true;
-}
+colinear = ( m_start.y == aLine->m_start.y );
 }
-else if( m_start.x == m_end.x )  // Vertical segment
+else if( ( m_start.x == m_end.x ) && ( aLine->m_start.x == aLine->m_end.x ) )  // Vertical segment
 {
-if( aLine->m_start.x == aLine->m_end.x )
-{
-colinear = true;
-}
+colinear = ( m_start.x == aLine->m_start.x );
 }
 else
 {
-if( atan2( (double) ( m_start.x - m_end.x ), (double) ( m_start.y - m_end.y ) )
-== atan2( (double) ( aLine->m_start.x - aLine->m_end.x ),
-  (double) ( aLine->m_start.y - aLine->m_end.y ) ) )
-{
-colinear = true;
-}
+int dx = leftmost->m_end.x - leftmost->m_start.x;
+int dy = leftmost->m_end.y - leftmost->m_start.y;
+colinear = ( ( ( rightmost->m_start.y - leftmost->m_start.y ) * dx ==
+( rightmost->m_start.x - leftmost->m_start.x ) * dy ) &&
+( ( rightmost->m_end.y - leftmost->m_start.y ) * dx ==
+( rightmost->m_end.x - leftmost->m_start.x ) * dy ) );
 }
 
 // Make a segment which merge the 2 segments
@@ -333,18 +352,8 @@ bool