Re: [Kicad-developers] [PATCH] Remove dangling ends when switching sheets

2017-12-10 Thread Seth Hillbrand
Find
​can
 warp you to a new sheet
​ if the string matches a component that isn't on the current sheet​
. If that sheet hasn't
​yet ​
been shown
​ during the session
, the dangling ends
​have
 not
​ been​
calculated
​, so we force it here.​
​
​Best-
Seth​


On Dec 10, 2017 5:44 PM, "Wayne Stambaugh"  wrote:

Seth,

Why is it necessary to test for dangling end on a find?  Find only
searches for string matches so I'm having a hard time understanding why
the dangling ends need to be cleaned up.

Cheers,

Wayne

On 12/09/2017 11:45 PM, Seth Hillbrand wrote:
> ​This patch fixes https://bugs.launchpad.net/kicad/+bug/1672381
> 
>
> When warping to a new sheet from either a "Find" command or receiving a
> cross-probe request, Eeschema needs to check for dangling ends on the
sheet.
>
> -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] Remove dangling ends when switching sheets

2017-12-10 Thread Wayne Stambaugh
Seth,

Why is it necessary to test for dangling end on a find?  Find only
searches for string matches so I'm having a hard time understanding why
the dangling ends need to be cleaned up.

Cheers,

Wayne

On 12/09/2017 11:45 PM, Seth Hillbrand wrote:
> ​This patch fixes https://bugs.launchpad.net/kicad/+bug/1672381
> 
> 
> When warping to a new sheet from either a "Find" command or receiving a
> cross-probe request, Eeschema needs to check for dangling ends on the sheet.
> 
> -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


Re: [Kicad-developers] [PATCH] Clean up unused junctions

2017-12-10 Thread Seth Hillbrand
Hi Wayne-

Nope.  It was part of the larger junction management patch set that was
already merged.

Best-
Seth

On Dec 10, 2017 3:33 PM, "Wayne Stambaugh"  wrote:

> Seth,
>
> Does this patch still needs to be applied?  I'm getting buried with the
> patch submissions.
>
> Thanks,
>
> Wayne
>
> On 09/27/2017 07:57 PM, Seth Hillbrand wrote:
> > Hi Jon-
> >
> > Thanks for catching that.  The delete node/delete connection follow a
> > different path to deletion, so I missed them initially.  As I was doing
> > this, I noticed a couple of corner cases where junctions were not
> > properly added/deleted, so this fixes that issue as well.
> >
> > There is one remaining issue, which is that junctions along the wire are
> > not deleted if they are no longer required.  But I'm holding off on
> > adding this because I don't think that we want to keep the wire crossing
> > multiple junctions and I'll try to lay out that proposal at a later date.
> >
> > Best-
> > Seth
> >
> > On Tue, Sep 26, 2017 at 5:58 PM, Jon Evans  > > wrote:
> >
> > Hi Seth,
> >
> > Neat feature!  I just checked this out and it does seem to work in
> > most cases.
> > There seem to be some situations where it doesn't remove junctions
> > in my existing schematics -- when I use "delete connection" it
> > works, but when I use "delete wire" it only works some of the time.
> > I haven't looked closely at the code to see why this might be
> happening.
> >
> > -Jon
> >
> > On Tue, Sep 26, 2017 at 7:39 PM, Seth Hillbrand
> > > wrote:
> >
> > ​Hi All-
> >
> > Currently, when laying wire in eeschema, junctions are
> > automatically added​ where needed.  This patch provides the
> > reverse.  When deleting segments in eeschema, it automatically
> > removes the junction if it is no longer needed.
> >
> > This should save extra clicks when re-wiring and hopefully help
> > new Kicad users keep their schematics cleaner.
> >
> > Best-
> > Seth
> >
> > ___
> > 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] Clean up unused junctions

2017-12-10 Thread Wayne Stambaugh
Seth,

Does this patch still needs to be applied?  I'm getting buried with the
patch submissions.

Thanks,

Wayne

On 09/27/2017 07:57 PM, Seth Hillbrand wrote:
> Hi Jon-
> 
> Thanks for catching that.  The delete node/delete connection follow a
> different path to deletion, so I missed them initially.  As I was doing
> this, I noticed a couple of corner cases where junctions were not
> properly added/deleted, so this fixes that issue as well.
> 
> There is one remaining issue, which is that junctions along the wire are
> not deleted if they are no longer required.  But I'm holding off on
> adding this because I don't think that we want to keep the wire crossing
> multiple junctions and I'll try to lay out that proposal at a later date.
> 
> Best-
> Seth
> 
> On Tue, Sep 26, 2017 at 5:58 PM, Jon Evans  > wrote:
> 
> Hi Seth,
> 
> Neat feature!  I just checked this out and it does seem to work in
> most cases.
> There seem to be some situations where it doesn't remove junctions
> in my existing schematics -- when I use "delete connection" it
> works, but when I use "delete wire" it only works some of the time. 
> I haven't looked closely at the code to see why this might be happening.
> 
> -Jon
> 
> On Tue, Sep 26, 2017 at 7:39 PM, Seth Hillbrand
> > wrote:
> 
> ​Hi All-
> 
> Currently, when laying wire in eeschema, junctions are
> automatically added​ where needed.  This patch provides the
> reverse.  When deleting segments in eeschema, it automatically
> removes the junction if it is no longer needed.
> 
> This should save extra clicks when re-wiring and hopefully help
> new Kicad users keep their schematics cleaner.
> 
> Best-
> Seth
> 
> ___
> 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] Remove LAYER_WORKSHEET from forced visibility since it now has a control

2017-12-10 Thread Wayne Stambaugh
Jon,

I merged your patch into the master branch.

Thanks,

Wayne

On 12/09/2017 01:08 PM, Jon Evans wrote:
> Fixes: https://bugs.launchpad.net/kicad/+bug/1737315
> 
> -Jon
> 
> 
> ___
> 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


[Kicad-developers] [PATCH] Bugfix: EDA_RECT to BOX2I generated wrong boxes

2017-12-10 Thread Andreas Buhr
Dear Kicad developers,

The "operator BOX2I() const" of EDA_RECT produced wrong boxes, usually
much to big. It passed its end-position as second argument to the
constructor of BOX2I. However, BOX2I expects its size as second
argument.

This caused a dramatic performance penalty in some
cases. Took me about a day to figure this out.

Cheers,
Andreas
>From 90f991e9938e0841908e58d665103e0f41fdbb43 Mon Sep 17 00:00:00 2001
From: Andreas Buhr 
Date: Sun, 10 Dec 2017 23:04:23 +0100
Subject: [PATCH] Bugfix: EDA_RECT to BOX2I generated wrong boxes

The "operator BOX2I() const" of EDA_RECT produced
wrong boxes, usually much to big. It passed its
end-position as second argument to the constructor
of BOX2I. However, BOX2I expects its size as second
argument.

This caused a dramatic performance penalty in some
cases.
---
 include/class_eda_rect.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/class_eda_rect.h b/include/class_eda_rect.h
index 3062d0a..c6b0acf 100644
--- a/include/class_eda_rect.h
+++ b/include/class_eda_rect.h
@@ -227,7 +227,7 @@ public:
 {
 EDA_RECT rect( m_Pos, m_Size );
 rect.Normalize();
-return BOX2I( rect.GetOrigin(), rect.GetEnd() );
+return BOX2I( rect.GetOrigin(), rect.GetSize() );
 }
 
 /**
-- 
2.7.4

___
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


[Kicad-developers] [PATCH] bugfix: OPENGL_GAL::DrawPolygon did not close closed polygons

2017-12-10 Thread Andreas Buhr
Dear Kicad developers,

The polygon drawing routing in the OpenGL-GAL did
not plot polygons which are "closed", i.e. have a segment
from their last point to their first point, correctly.
That segment was omitted.

The patch attached fixes this bug.

Cheers,
Andreas
>From 837eecbdae9b778525b12fdde19731456b7ffe26 Mon Sep 17 00:00:00 2001
From: Andreas Buhr 
Date: Sun, 10 Dec 2017 22:56:06 +0100
Subject: [PATCH] bugfix: OPENGL_GAL::DrawPolygon did not close closed polygons

The polygon drawing routing in the OpenGL-GAL did
not plot polygons which are "closed", i.e. have a segment
from their last point to their first point, correctly.
That segment was omitted.
This commit fixes this bug.
---
 common/gal/opengl/opengl_gal.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp
index 63f08ee..2d50c3d 100644
--- a/common/gal/opengl/opengl_gal.cpp
+++ b/common/gal/opengl/opengl_gal.cpp
@@ -826,11 +826,11 @@ void OPENGL_GAL::DrawPolygon( const SHAPE_POLY_SET& aPolySet )
 for( int j = 0; j < aPolySet.OutlineCount(); ++j )
 {
 const SHAPE_LINE_CHAIN& outline = aPolySet.COutline( j );
-const int pointCount = outline.PointCount();
+const int pointCount = outline.SegmentCount() + 1;
 std::unique_ptr points( new GLdouble[3 * pointCount] );
 GLdouble* ptr = points.get();
 
-for( int i = 0; i < outline.PointCount(); ++i )
+for( int i = 0; i < pointCount; ++i )
 {
 const VECTOR2I& p = outline.CPoint( i );
 *ptr++ = p.x;
-- 
2.7.4

___
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] Joining buses with junctions behavior

2017-12-10 Thread Seth Hillbrand
Jon-

Thanks for catching this discrepancy.  I had written the logic such that
busses connect to other busses by a bus-to-bus entry.  But clearly, that is
historically not accurate and there needs to be a junction.

-S

On Sun, Dec 10, 2017 at 8:09 AM, Jon Evans  wrote:

> Hi all,
>
> As I am working on bus features I have dived into all the ways you can use
> buses (that I haven't always known about myself).
>
> One thing I noticed was an example given on the docs:
> http://docs.kicad-pcb.org/stable/en/eeschema.html#wires-
> buses-labels-power-ports
>
> Under "Global connections between buses", you have three different named
> bus segments joined together with a junction, and a description of how
> their nets will be connected during netlisting.
>
> a) This behavior seems to be kind of broken at present -- when I try to
> replicate it, the junction is sometimes automatically removed, and the
> netlist does not join all of the nets as described in the manual (maybe
> related to Seth's recent changes?)
>
> b) Those of you who use this feature: how do you use it?  Do you care that
> the final netlist arbitrarily picks one of the possible net names?
>
> Thanks,
>
> -Jon
>
> ___
> 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] Remove outdated check on endAngle to fix GerbView arc draw direction

2017-12-10 Thread Chris Pavlina
Just pushed this patch - thank you!

On Sun, Dec 10, 2017 at 06:35:44PM +, Jon Evans wrote:
> Hi all,
> 
> Quick fix for an arc drawing path that still had some wrong logic in it.
> 
> -Jon


___
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


[Kicad-developers] [PATCH] Remove outdated check on endAngle to fix GerbView arc draw direction

2017-12-10 Thread Jon Evans
Hi all,

Quick fix for an arc drawing path that still had some wrong logic in it.

-Jon
From 318991f7202e42af73367be7f3ba4bf872efd4ce Mon Sep 17 00:00:00 2001
From: Jon Evans 
Date: Sun, 10 Dec 2017 13:35:00 -0500
Subject: [PATCH] Remove outdated check on endAngle to fix arc draw direction

Fixes: lp:1737420
* https://bugs.launchpad.net/kicad/+bug/1737420
---
 gerbview/gerbview_painter.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gerbview/gerbview_painter.cpp b/gerbview/gerbview_painter.cpp
index 72a7559ce..7ac870ff5 100644
--- a/gerbview/gerbview_painter.cpp
+++ b/gerbview/gerbview_painter.cpp
@@ -300,7 +300,7 @@ void GERBVIEW_PAINTER::draw( /*const*/ GERBER_DRAW_ITEM* aItem, int aLayer )
 // GAL fills in direction of increasing angle, so we have to convert
 // the angle from the -PI to PI domain of atan2() to ensure that
 // the arc goes in the right direction
-if( ( startAngle > endAngle ) && ( endAngle < 0 ) )
+if( startAngle > endAngle )
 endAngle += (2 * M_PI);
 
 // 360-degree arcs are stored in the file with start equal to end
-- 
2.14.1

___
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


[Kicad-developers] Joining buses with junctions behavior

2017-12-10 Thread Jon Evans
Hi all,

As I am working on bus features I have dived into all the ways you can use
buses (that I haven't always known about myself).

One thing I noticed was an example given on the docs:
http://docs.kicad-pcb.org/stable/en/eeschema.html#wires-buses-labels-power-ports

Under "Global connections between buses", you have three different named
bus segments joined together with a junction, and a description of how
their nets will be connected during netlisting.

a) This behavior seems to be kind of broken at present -- when I try to
replicate it, the junction is sometimes automatically removed, and the
netlist does not join all of the nets as described in the manual (maybe
related to Seth's recent changes?)

b) Those of you who use this feature: how do you use it?  Do you care that
the final netlist arbitrarily picks one of the possible net names?

Thanks,

-Jon
___
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