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

2017-10-16 Thread Seth Hillbrand
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 b52d51ea78fc30ccd4d89ca1002174d4468d5701 Mon Sep 17 00:00:00 2001
From: Seth Hillbrand 
Date: Fri, 6 Oct 2017 10:42:55 -0700
Subject: [PATCH 1/8] 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 48c3cb397..fe13eb957 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 SCH_LINE::MergeOverlap( SCH_LINE* aLine )
 // for horizontal segments the uppermost and the lowest point
 if( colinear )
 {
-auto less = []( const wxPoint& lhs, const wxPoint& rhs ) -> bool
-{
-if( lhs.x == rhs.x )
-return lhs.y < rhs.y;
-return lhs.x < rhs.x;
-};
-
-wxPoint top_left = std::min( { m_start, m_end, aLine->m_start, aLine->m_end }, less );
-wxPoint bottom_right = std::max( { m_start, m_end, aLine->m_start, 

Re: [Kicad-developers] [PATCH] Unit naming in eeschema spice model config

2017-10-16 Thread jp charras

Le 16/10/2017 à 19:55, Ingo Kletti a écrit :

Hello,

while working on the translation I stumbled over a wrong unit in
eeschema/dialogs/dialog_spice_model_base.fbp (which then also ends up in the
dialog_spice_model_base.cpp file): 'fempto' should be 'femto'

Since git format-patch doesn't produce any output (PEBKAC), here's the diff.

Hooray for my very first code contribution to Kicad ;-)

Ingo


I committed your patch.

Thanks, Ingo.


--
Jean-Pierre CHARRAS

___
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] Unit naming in eeschema spice model config

2017-10-16 Thread Ingo Kletti

Hello,

while working on the translation I stumbled over a wrong unit in 
eeschema/dialogs/dialog_spice_model_base.fbp (which then also ends up in 
the dialog_spice_model_base.cpp file): 'fempto' should be 'femto'


Since git format-patch doesn't produce any output (PEBKAC), here's the diff.

Hooray for my very first code contribution to Kicad ;-)

Ingo



diff --git a/eeschema/dialogs/dialog_spice_model_base.fbp 
b/eeschema/dialogs/dialog_spice_model_base.fbp

index ea9cdf146..a3a08036a 100644
--- a/eeschema/dialogs/dialog_spice_model_base.fbp
+++ b/eeschema/dialogs/dialog_spice_model_base.fbp
@@ -1177,7 +1177,7 @@
 name="gripper">0
 name="hidden">0
 name="id">wxID_ANY
-name="label">fempto
+name="label">femto
 name="max_size">
 name="maximize_button">0
 name="maximum_size">


___
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] Datasheet confusion

2017-10-16 Thread Fabrizio Tappero
Hi Kristoffer,
I am a big supporter of this option. I am often in need of showing a
datasheet with a right click on component. It would be great to be able to
do it in the completed schematic as well as in the completed pcb layout.

cheers
Fabrizio



On Fri, Oct 13, 2017 at 2:18 PM, Kristoffer Ödmark <
kristofferodmar...@gmail.com> wrote:

> There is a "show documentation" context field, but it only uses the
> documentation string, so if i put a value into the datasheet field. The
> menu doesnt show, I do not think that adding a "Show documentation" and a
> "Show Datasheet" is a good solution.
>
> I will create a patch, probably this weekend and submit, I think it will
> highlight the problem better. I believe its a trivial fix.
>
> - Kristoffer
>
>
> On 10/13/2017 01:54 PM, Wayne Stambaugh wrote:
>
>> On 10/13/2017 6:19 AM, Kristoffer Ödmark wrote:
>>
>>> Thanks you very much for that clarification, I for one would really
>>> enjoy a clarification of the documentation and Datasheet string. KiCad
>>> has been around for quite a while now, interesting how technology has
>>> changed during that time.
>>>
>>> For another question, would It be okay to redirect the context menu in
>>> eeschema, so that the "Show documentation" context menu would use the
>>> Field "Datasheet"? And use the "documentation" string to fill the
>>> "Datasheet" field when adding the symbol to the schematic?
>>>
>>
>> I'm OK with adding both a "Show Documentation" (should be visible only
>> when the field is not empty) to the symbol context menu and an "Edit
>> Datasheet Field" entry to the "Properties" sub-menu.
>>
>>
>>> I guess this would be considered a temporary fix if okay?
>>>
>>> On 10/13/2017 08:51 AM, jp charras wrote:
>>>
>>> FYI, in fact this confusion comes from a bug introduced a long time ago:

 Initially, the field name was "Sheet" not "Datasheet".
 It should be "SchematicSheet"

 The purpose was to be able to create a component acting as a
 hierarchical sheet:
 The component in a root sheet, and its internal sheet
 ("SchematicSheet") similar to a sub sheet.

 But unfortunately, it was never done, and one day the word "Sheet"
 became "Datasheet", thus creating
 a serious confusion.

 Perhaps the "DATASHEET" field (attached to the symbol) and the
 "documentation" string (attached to a
 alias) should be clearly redefined for the V5.

 By the way, do you know why the .dcm file exists?
 It is similar to the .idx index file of old spice libs.

 In the early time of eeschema, Kicad was stored on a server and was
 used in classrooms and on PCs
 connected by a "slow" network link: network cards were ISA cards and
 the link speed was roughly 2400
 bps.

 So loading all needed schematic libraries to choose a symbol was a too
 time costly process, making
 Eeschema barely usable.
 Using small .dcm files to display a list of symbols and some info
 fixed this issue.

 Nowadays, link speed, PC speed and memory sizes have 3 order of
 magnitude, and .dcm files (a relic
 of this time) is more an annoying feature.


>>>
>>>
>>
>> ___
>> 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
>>
>>
> --
>  -Kristoffer
>
>
> ___
> 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] [FEATURE] Add keepout areas in footprints

2017-10-16 Thread Oliver Walters
By 'segfault' I obviously meant assertion error. The Type() calls are
returning:

a) PCB_MODULE_T
b) PCB_ZONE_AREA_T

Oliver

On Tue, Oct 17, 2017 at 12:06 AM, Oliver Walters <
oliver.henry.walt...@gmail.com> wrote:

> JP,
>
> Thanks for pointing out those errors. I have fixed the zone rotation bug
> (patch attached to this email).
>
> The undo/redo behaviour is odd, I have now noticed something related
> within the module editor window.
>
> If I make a change to a zone (add / remove / rotate / move / flip) then I
> get a segfault.
>
> /pcbnew/undo_redo.cpp(581): assert "Type() == aImage->Type()" failed in
>> SwapData().
>
>
> Orson has previously given me some (very much appreciated) pointers to get
> me started on this feature. Perhaps either you or he have some further
> insights?
>
> Thanks,
>
> Oliver
>
> On Mon, Oct 16, 2017 at 7:16 PM, jp charras  wrote:
>
>> Le 14/10/2017 à 23:20, Oliver Walters a écrit :
>> > Friendly bump - has anyone had a chance to look at this? :)
>> >
>> > Oliver
>> >
>> > On 12 Oct 2017 00:30, "Oliver Walters" > > > wrote:
>> >
>> > Attached is a patch set that allows addition of keepout zones to
>> footprints (modules).
>> >
>> > When embedded inside a module, a keepout can be specified on a
>> combination of:
>> >
>> > a) F.Cu
>> > b) All internal copper layers
>> > c) B.Cu
>> >
>> > The patch set is working pretty well, save / load is working and
>> you can add / edit / delete
>> > keepout areas within the module editor.
>> >
>> > I have also added a new layer shortcut string *.In.Cu to specify
>> all internal layers within a
>> > saved file.
>> >
>> > There are a few issues that I need some help sorting out.
>> >
>> > 1. Displaying zones only on internal layers.
>> >
>> > If you create a keepout zone but edit the layers such that is only
>> on the internal copper
>> > layers, then it will disappear in the module editor. This is
>> because only F.Cu and B.Cu layers
>> > are available in the module editor. I'm not sure how to display the
>> zone in this case, and allow
>> > the user to edit it once it has disappeared.
>> >
>> > 2. Editing zone in pcbnew
>> >
>> > Once a module is loaded into pcbnew, I want to be able to modify
>> the zone properties. e.g.
>> > disable for a certain internal layer, or adjust the outline of the
>> zone. In the same way that
>> > you can individually edit a pad once a module is added to a PCB.
>> >
>> > Strangely I had this working at one point but I can't work out what
>> I changed to break it...
>> >
>> >
>> > As far as I can tell, the DRC and zone cutouts are working well for
>> keepout areas that are added
>> > to a board via a footprint.
>> >
>> > Let me know if you see any crashes or mistakes, and if you can
>> provide pointers for the two
>> > outstanding items above.
>> >
>> > Thanks,
>> >
>> > Oliver
>>
>> Hi Oliver,
>>
>> I tested your patch, but I have found a few serious issues when editing a
>> footprint with keepout
>> zone on a board:
>>
>> - the rotation does not work (incorrect position of the keepout after
>> rotation)
>> - Undoing/redoing a move, rotation... is fully broken and creates
>> multiple copies of the keepout,
>> and I had a crash after playing with undo/redo.
>>
>> Thanks.
>>
>> --
>> Jean-Pierre CHARRAS
>>
>> ___
>> 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] [FEATURE] Add keepout areas in footprints

2017-10-16 Thread Oliver Walters
JP,

Thanks for pointing out those errors. I have fixed the zone rotation bug
(patch attached to this email).

The undo/redo behaviour is odd, I have now noticed something related within
the module editor window.

If I make a change to a zone (add / remove / rotate / move / flip) then I
get a segfault.

/pcbnew/undo_redo.cpp(581): assert "Type() == aImage->Type()" failed in
> SwapData().


Orson has previously given me some (very much appreciated) pointers to get
me started on this feature. Perhaps either you or he have some further
insights?

Thanks,

Oliver

On Mon, Oct 16, 2017 at 7:16 PM, jp charras  wrote:

> Le 14/10/2017 à 23:20, Oliver Walters a écrit :
> > Friendly bump - has anyone had a chance to look at this? :)
> >
> > Oliver
> >
> > On 12 Oct 2017 00:30, "Oliver Walters"  > > wrote:
> >
> > Attached is a patch set that allows addition of keepout zones to
> footprints (modules).
> >
> > When embedded inside a module, a keepout can be specified on a
> combination of:
> >
> > a) F.Cu
> > b) All internal copper layers
> > c) B.Cu
> >
> > The patch set is working pretty well, save / load is working and you
> can add / edit / delete
> > keepout areas within the module editor.
> >
> > I have also added a new layer shortcut string *.In.Cu to specify all
> internal layers within a
> > saved file.
> >
> > There are a few issues that I need some help sorting out.
> >
> > 1. Displaying zones only on internal layers.
> >
> > If you create a keepout zone but edit the layers such that is only
> on the internal copper
> > layers, then it will disappear in the module editor. This is because
> only F.Cu and B.Cu layers
> > are available in the module editor. I'm not sure how to display the
> zone in this case, and allow
> > the user to edit it once it has disappeared.
> >
> > 2. Editing zone in pcbnew
> >
> > Once a module is loaded into pcbnew, I want to be able to modify the
> zone properties. e.g.
> > disable for a certain internal layer, or adjust the outline of the
> zone. In the same way that
> > you can individually edit a pad once a module is added to a PCB.
> >
> > Strangely I had this working at one point but I can't work out what
> I changed to break it...
> >
> >
> > As far as I can tell, the DRC and zone cutouts are working well for
> keepout areas that are added
> > to a board via a footprint.
> >
> > Let me know if you see any crashes or mistakes, and if you can
> provide pointers for the two
> > outstanding items above.
> >
> > Thanks,
> >
> > Oliver
>
> Hi Oliver,
>
> I tested your patch, but I have found a few serious issues when editing a
> footprint with keepout
> zone on a board:
>
> - the rotation does not work (incorrect position of the keepout after
> rotation)
> - Undoing/redoing a move, rotation... is fully broken and creates multiple
> copies of the keepout,
> and I had a crash after playing with undo/redo.
>
> Thanks.
>
> --
> Jean-Pierre CHARRAS
>
> ___
> 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 ae3a05df0224166c105ac197f1fbee9753c0d7c1 Mon Sep 17 00:00:00 2001
From: Oliver Walters 
Date: Mon, 16 Oct 2017 23:01:18 +1100
Subject: [PATCH 8/8] Fixed zone rotation bug

- Zone with MODULE as parent was rotating around its own center, rather than module center
---
 pcbnew/class_module.cpp | 7 ---
 pcbnew/class_module.h   | 4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp
index 684cc51..b5349dc 100644
--- a/pcbnew/class_module.cpp
+++ b/pcbnew/class_module.cpp
@@ -2,6 +2,7 @@
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
  * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 2017 Oliver Walters, oliver.henry.walters at gmail.com
  * Copyright (C) 2015 SoftPLC Corporation, Dick Hollenbeck 
  * Copyright (C) 2015 Wayne Stambaugh 
  * Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
@@ -247,7 +248,7 @@ void MODULE::ClearAllNets()
 }
 
 
-void MODULE::DrawAncre( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset,
+void MODULE::DrawAnchor( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset,
 int dim_ancre, GR_DRAWMODE draw_mode )
 {
 auto frame = (PCB_EDIT_FRAME*) panel->GetParent();
@@ -434,7 +435,7 @@ void MODULE::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode,
 BOARD* brd = GetBoard();
 
 // Draws footprint anchor
-DrawAncre( aPanel, aDC, aOffset, DIM_ANCRE_MODULE, 

Re: [Kicad-developers] wxAUI woes

2017-10-16 Thread hauptmech
Looks like I missed modview_frame at the time so you'll want to 
reference one of the other frames and update it. I converted a lot of 
erroneous Row() calls to Layer() and standardized the initialization. On 
the git repo it's commit bd19d31082...


Remembering more about this now. From back when tearing off the AUI 
panels and moving them to a second monitor gave me a crucial few more cm 
of room to view my design. These days with a 4K display it doesn't seem 
so critical.




-Hauptmech

On 16/10/17 15:00, Oliver Walters wrote:

The image is 1920x1020, there should be no issue reading the text...

Anyway, the issue is that I have tried to add a new panel to the 
module selector window, by copying the code used to add the panels 
that are currently there. Compiles ok but when I run KiCad and open 
the selector, the new panel is not visible anywhere. I realize this 
isn't much of a problem description, but I was wondering if there was 
some trick that is undocumented (or documented somewhere that I 
haven't found it) that I need to know to display wxAUI panels.




On Mon, Oct 16, 2017 at 12:29 PM, Greg Smith > wrote:


I can't read the text, there's not enough resolution. What is the
issue?

I've had windows that seem to be tucked under the horizontal toolbar.

Greg S.

On Oct 15, 2017, at 7:46 PM, Oliver Walters
> wrote:


I'm trying to add a new panel to the module viewer window.
"screenshot" below.

However I can't get wxAUI to play along at all. I cannot even get
a new panel to be displayed in this window. Are there any
particular tricks that may be non-obvious?

https://i.imgur.com/dXj51u1.png 

Cheers,

Oliver
___
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] wxAUI woes

2017-10-16 Thread hauptmech
It looks like I left some notes in wxstruct.h/class EDA_PANEINFO way 
back when I set up moveable toolbars for my branch... Not sure if they 
are relevant as this has long faded from my memory.


On 16/10/17 15:00, Oliver Walters wrote:

The image is 1920x1020, there should be no issue reading the text...

Anyway, the issue is that I have tried to add a new panel to the 
module selector window, by copying the code used to add the panels 
that are currently there. Compiles ok but when I run KiCad and open 
the selector, the new panel is not visible anywhere. I realize this 
isn't much of a problem description, but I was wondering if there was 
some trick that is undocumented (or documented somewhere that I 
haven't found it) that I need to know to display wxAUI panels.




On Mon, Oct 16, 2017 at 12:29 PM, Greg Smith > wrote:


I can't read the text, there's not enough resolution. What is the
issue?

I've had windows that seem to be tucked under the horizontal toolbar.

Greg S.

On Oct 15, 2017, at 7:46 PM, Oliver Walters
> wrote:


I'm trying to add a new panel to the module viewer window.
"screenshot" below.

However I can't get wxAUI to play along at all. I cannot even get
a new panel to be displayed in this window. Are there any
particular tricks that may be non-obvious?

https://i.imgur.com/dXj51u1.png 

Cheers,

Oliver
___
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] [FEATURE] Add keepout areas in footprints

2017-10-16 Thread jp charras
Le 14/10/2017 à 23:20, Oliver Walters a écrit :
> Friendly bump - has anyone had a chance to look at this? :)
> 
> Oliver
> 
> On 12 Oct 2017 00:30, "Oliver Walters"  > wrote:
> 
> Attached is a patch set that allows addition of keepout zones to 
> footprints (modules).
> 
> When embedded inside a module, a keepout can be specified on a 
> combination of:
> 
> a) F.Cu
> b) All internal copper layers
> c) B.Cu
> 
> The patch set is working pretty well, save / load is working and you can 
> add / edit / delete
> keepout areas within the module editor.
> 
> I have also added a new layer shortcut string *.In.Cu to specify all 
> internal layers within a
> saved file.
> 
> There are a few issues that I need some help sorting out.
> 
> 1. Displaying zones only on internal layers.
> 
> If you create a keepout zone but edit the layers such that is only on the 
> internal copper
> layers, then it will disappear in the module editor. This is because only 
> F.Cu and B.Cu layers
> are available in the module editor. I'm not sure how to display the zone 
> in this case, and allow
> the user to edit it once it has disappeared.
> 
> 2. Editing zone in pcbnew
> 
> Once a module is loaded into pcbnew, I want to be able to modify the zone 
> properties. e.g.
> disable for a certain internal layer, or adjust the outline of the zone. 
> In the same way that
> you can individually edit a pad once a module is added to a PCB.
> 
> Strangely I had this working at one point but I can't work out what I 
> changed to break it...
> 
> 
> As far as I can tell, the DRC and zone cutouts are working well for 
> keepout areas that are added
> to a board via a footprint.
> 
> Let me know if you see any crashes or mistakes, and if you can provide 
> pointers for the two
> outstanding items above.
> 
> Thanks,
> 
> Oliver

Hi Oliver,

I tested your patch, but I have found a few serious issues when editing a 
footprint with keepout
zone on a board:

- the rotation does not work (incorrect position of the keepout after rotation)
- Undoing/redoing a move, rotation... is fully broken and creates multiple 
copies of the keepout,
and I had a crash after playing with undo/redo.

Thanks.

-- 
Jean-Pierre CHARRAS

___
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