Re: [Kicad-developers] [PATCH] GerbView GAL support

2017-09-26 Thread Jon Evans
Thanks Oliver!  I have to admit, part of why I took on this project was to
learn about the GAL things so that I can be of assistance for the eeschema
port :-)
I definitely plan to help with that, but I have some other things to work
on in the short term (and want to make sure everything is working well for
V5 release).

Cheers
Jon

On Tue, Sep 26, 2017 at 10:56 PM, Oliver Walters <
oliver.henry.walt...@gmail.com> wrote:

> Jon,
>
> The GAL gerber viewer works a treat! It's so fast now!
>
> Can we expect the same treatment to eeschema? ;)
>
> Thanks for your work!
>
>
___
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] GerbView GAL support

2017-09-26 Thread Oliver Walters
Jon,

The GAL gerber viewer works a treat! It's so fast now!

Can we expect the same treatment to eeschema? ;)

Thanks for your work!

On Tue, Sep 26, 2017 at 7:11 AM, Jon Evans  wrote:

> Thanks Orson.  The attached patch changes the d-code LOD threshold to a
> more reasonable value.
>
> -Jon
>
> On Mon, Sep 25, 2017 at 8:31 AM, Maciej Sumiński 
> wrote:
>
>> Jon,
>>
>> Thank you very much for your work on GerbView GAL support. I have just
>> pushed your changes to the master branch, including the most recent
>> patches.
>>
>> The display performance is significantly better when compared to the
>> legacy renderer. Still, if you are interested in further improvements, a
>> cheap upgrade would be to take advantage of VIEW_ITEM::ViewGetLOD()
>> method to hide d-codes depending on the zoom level. It is done the same
>> way e.g. for track net labels.
>>
>> Regards,
>> Orson
>>
>> On 09/25/2017 03:26 AM, Jon Evans wrote:
>> > Hi Orson, Tom,
>> >
>> > Thanks for the tips.  I eventually did figure out what was going on --
>> > mismatch of state between the RTREE and the View in my first attempt at
>> > optimization.
>> >
>> > The attached 3 patches improve performance a ton on larger Gerber files
>> --
>> > on my computer, between 30-40% improvement, and massive improvement in
>> file
>> > load time and responsiveness when you select items.
>> > Please review and if you see no issues, apply on top of the existing
>> branch
>> > before you merge. (yes, there is no 0003- patch)
>> >
>> > (This should also be good for a performance boost in PcbNew when working
>> > with very large boards)
>> >
>> > Thanks,
>> > Jon
>> >
>> > On Sat, Sep 23, 2017 at 3:01 PM, jp charras 
>> wrote:
>> >
>> >> Le 21/09/2017 à 14:04, Wayne Stambaugh a écrit :
>> >>> Orson,
>> >>>
>> >>> I'm leaving this decision up to you and JP since I have not had time
>> to
>> >>> test it.  JP, do you have any other concerns about this?
>> >>
>> >> Sorry for the delay, but I was away last 3 days.
>> >> I do not have concerns about merging Gerbview GAL.
>> >>
>> >> We know there are a few issues, but they can be fixed later. None is
>> >> blocking.
>> >> And the legacy canvas can be used with no issue.
>> >>
>> >> So, Orson, if you can commit this very good enhancement, please do it.
>> >> AFAIK, remember also only the GAL canvas works on wxWidgets + GTK3, so
>> the
>> >> GAL canvas support is
>> >> very important for the future of KiCad.
>> >>
>> >> Thanks to Jon and Orson for all this work.
>> >>
>> >>>
>> >>> Thanks,
>> >>>
>> >>> Wayne
>> >>>
>> >>> On 9/21/2017 6:05 AM, Maciej Sumiński wrote:
>>  Hi Jon,
>> 
>>  Thanks you, this is really cool! Now it is even more tempting to
>> merge
>>  the gerbview_gal branch. I am going to wait one more day for vetos
>> and
>>  tomorrow I will push it to the master branch.
>> 
>>  Regards,
>>  Orson
>> 
>>  On 09/20/2017 09:57 PM, Jon Evans wrote:
>> > Hi Orson,
>> >
>> > Give this a shot in your branch.  It should work in pcbnew also now.
>> >
>> > -Jon
>> >
>> > On Wed, Sep 20, 2017 at 9:28 AM, Jon Evans 
>> wrote:
>> >
>> >> Hi Orson,
>> >>
>> >> Thank you for staging this for merge on your branch.  I checked and
>> >> you do
>> >> have all the patches.
>> >>
>> >> 1) Yes I planned on refactoring the selection tool once things
>> >> stabilized
>> >> with the highlighting etc.
>> >> 2) Do you mean when you are highlighting Gerber X2 attributes, or
>> >> when you
>> >> are deselecting things, or something else?
>> >> 3) That's a good idea on VIEW_GROUP, I will give it a try and send
>> a
>> >> patch.
>> >>
>> >> Thanks,
>> >> Jon
>> >>
>> >> On Wed, Sep 20, 2017 at 5:46 AM, Maciej Sumiński <
>> >> maciej.sumin...@cern.ch>
>> >> wrote:
>> >>
>> >>> Hi Jon,
>> >>>
>> >>> GALifying GerbView is a huge task, so thank you very much for your
>> >> work!
>> >>> I have just tested your changes and in my opinion it is in a state
>> >> that
>> >>> deserves merging and further tests. The new way of item
>> highlighting
>> >> is
>> >>> awesome, we need to port it to pcbnew as well.
>> >>>
>> >>> For now I keep your patches in a separate branch, with some minor
>> >>> modifications on top of it [1]. Please verify it contains all the
>> >> needed
>> >>> patches. If nobody objects, I would like to merge it this week.
>> >>>
>> >>> Just a few minor remarks:
>> >>> - It seems there is some code that could be refactored to share it
>> >> with
>> >>> pcbnew (e.g. selection tool).
>> >>> - 'Clear highlight' operation takes long time to finish (seems
>> more
>> >> than
>> >>> with the legacy canvas), but I cannot really see what is happening
>> >>> there. If it cannot be easily fixed, perhaps it could set the
>> mouse
>> >>> cursor to 

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

2017-09-26 Thread Jon Evans
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


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

2017-09-26 Thread Seth Hillbrand
​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
From 5092561b2d879df2156f1798055bec48fa1e94b6 Mon Sep 17 00:00:00 2001
From: Seth Hillbrand 
Date: Tue, 26 Sep 2017 16:17:14 -0700
Subject: [PATCH 1/1] Eeschema: Automatically remove dangling junctions

---
 eeschema/operations_on_items_lists.cpp | 23 ++-
 eeschema/sch_screen.cpp|  3 ---
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/eeschema/operations_on_items_lists.cpp b/eeschema/operations_on_items_lists.cpp
index 6f0b790c2..5e7502854 100644
--- a/eeschema/operations_on_items_lists.cpp
+++ b/eeschema/operations_on_items_lists.cpp
@@ -175,8 +175,29 @@ void SCH_EDIT_FRAME::DeleteItem( SCH_ITEM* aItem )
 }
 else
 {
+PICKED_ITEMS_LIST delete_list;
+
 screen->Remove( aItem );
-SaveCopyInUndoList( aItem, UR_DELETED );
+delete_list.PushItem(aItem);
+
+if ( aItem->Type() == SCH_LINE_T ) {
+
+SCH_LINE* segment = (SCH_LINE*) aItem;
+SCH_ITEM* item;
+// Clean out junctions that are no longer needed
+if( !screen->IsJunctionNeeded( segment->GetEndPoint() ) &&
+( item = screen->GetItem( segment->GetEndPoint(), 0, SCH_JUNCTION_T ) ) ) {
+delete_list.PushItem( item );
+screen->Remove( item );
+}
+
+if( !screen->IsJunctionNeeded( segment->GetStartPoint() ) &&
+( item = screen->GetItem( segment->GetStartPoint(), 0, SCH_JUNCTION_T ) ) ) {
+delete_list.PushItem( item );
+screen->Remove( item );
+}
+}
+SaveCopyInUndoList( delete_list, UR_DELETED );
 m_canvas->RefreshDrawingRect( aItem->GetBoundingBox() );
 }
 }
diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp
index 02f2030d1..b2d6e6c1d 100644
--- a/eeschema/sch_screen.cpp
+++ b/eeschema/sch_screen.cpp
@@ -336,9 +336,6 @@ void SCH_SCREEN::MarkConnections( SCH_LINE* aSegment )
 
 bool SCH_SCREEN::IsJunctionNeeded( const wxPoint& aPosition )
 {
-if( GetItem( aPosition, 0, SCH_JUNCTION_T ) )
-return false;
-
 if( GetWire( aPosition, 0, EXCLUDE_END_POINTS_T ) )
 {
 if( GetWire( aPosition, 0, END_POINTS_ONLY_T ) )
-- 
2.11.0

___
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] Update PCB from Schematic hotkey in pcbnew and bug in schematic filename

2017-09-26 Thread Dan Green
Ah yes, of course, all that makes sense. Thanks for explaining it.
Alt+F8 is available, so attached is a patch using that as the default (and with 
IS_ACCELERATOR).  
thanks,
Dan
   

On Tuesday, September 26, 2017 at 6:57 AM, Wayne Stambaugh wrote:

> Hey Dan,
>  
> I have a few comments on your patches.
>  
> The "Update PCB from Schematic" patch uses a duplicate hotkey. F8 is
> already assigned to the HK_SWITCH_LAYER_TO_INNER4 command ID. Check the
> pcbnew/hotkeys.cpp file for the list of assigned hotkey. Also, you are
> using F8 as a menu accelerator not a hotkey which requires you to add
> the IS_ACCEL HOTKEY_ACTION_TYPE to the AddHotkeyName() call. You are
> going to have to choose a different hotkey and resubmit your patch.
>  
> Technically the file name fix patch works but you should use the
> wxFileName( path, name, ext) ctor to create the full file name. I've
> been trying to weed out this particular issue in KiCad but I must have
> missed this one. Also, there is no need to wrap "%s.%s" in with the
> internationalization macro _(). There is no text to translate in the
> string. I will fix this one now that I know where the issue exists.
>  
> Thanks,
>  
> Wayne
>  
> On 9/25/2017 7:19 PM, Dan Green wrote:
> > Hi all, here are two patches to address some minor issues with the "Update 
> > PCB from Schematic” tool when called from pcbnew. The first adds the F8 
> > hotkey to match eeschema. The second fixes a bug that happens if the 
> > project name contains a period (e.g.: MyProject_rev1.2). In this case, the 
> > wxFileName command SetExt() would detect an existing extension as “2” and 
> > replace it with “sch”. Thus using the tool from pcbnew would make it look 
> > for (and hopefully not find!) MyProject_rev1.sch. The bug wouldn’t happen 
> > if the schematic window was already open, so it was pretty rare.
> > thanks!
> > Dan
> >  
> >  
> >  
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net 
> > (mailto: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 
> (mailto:kicad-developers@lists.launchpad.net)
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>  




0001-Added-hotkey-in-pcbnew-for-Update-PCB-from-Schematic.patch
Description: Binary data
___
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] Fix some performance issues

2017-09-26 Thread Camille 019
Hi,

Ok, I'll keep the patchset synchronized with the master branch, for future 
inclusion. When will the feature freeze take effect ?

I agree my patchset has no real impact on the performance. I mainly wanted to 
test clang-tidy on a consistent source code base. I also think that keeping 
automated checks empty of warning can help to improve the overall code quality.

Regards,

--
Camille


Le lun. 25 sept. 2017 à 16:21, Wayne Stambaugh  a écrit :
On 9/25/2017 4:07 AM, Maciej Sumiński wrote:
Hi Camille, I think the attached patches are sensible, even though I hope most 
compilers apply optimizations to avoid performance penalties whenever possible.
I agree although I'm not sure about the compiler optimization. A quick look at 
the patches and I'm not sure the performance gains will be that noticeable. 
Most of the changes are in code that is called once on demand in response to a 
user request as opposed to the drawing or drc code where large numbers of calls 
happen frequently. That being said, we really should be doing a better job of 
not passing entire objects on the stack unless there is a good reason to do so.
If the attached patches are autogenerated, then I would kindly ask you to 
generate them when we reach the feature freeze stage. There are a few branches 
that await to be merged and I am not sure whether your patches would not create 
too many conflicts. During the feature freeze we anticipate the code changes 
will not be as disruptive as they are now.
I second this. There are quite a few outstanding patches that will likely have 
enough conflicts so I would rather not pile more on top of that.
Regards, Orson On 09/23/2017 12:17 PM, Camille 019 wrote:
Hi all, I recently play with clang-tidy on the KiCad source code. Here is a set 
of 2 patch which fix the 
unnecessary-copy-initialization
 and 
unnecessary-value-param
 checks. I will run more performance checks in the future. The next two: - 
for-range-copy
 - 
type-promotion-in-math-fn
 Best regards, -- Camille ___ 
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] Multilayer keepout zones

2017-09-26 Thread jp charras
Le 26/09/2017 à 13:47, Wayne Stambaugh a écrit :
> Oliver,
> 
> Thanks for making the changes.
> 
> JP,
> 
> Would you please take a look at this patch set when you get a chance.
> You are more familiar with the board zone code than I am so you may find
> issues that I may have missed.
> 
> Thanks,
> 
> Wayne
> 

I am currently working on it.

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


Re: [Kicad-developers] [PATCH] Footprint viewer: zooming from toolbar and menu doesn't works in GAL mode

2017-09-26 Thread Maciej Sumiński
Hi Konstantin,

Thank you for your patch, I have just pushed it to the master branch.

Regards,
Orson

On 09/26/2017 03:15 PM, Константин Барановский wrote:
> To reproduce:
> 1) launch Pcbnew;
> 2) switch to OpenGL;
> 3) launch Footprint viewer (Library browser);
> 4) select some footprint;
> 5) click zoom in/out/page icon on toolbar;
> 6) nothing happens.
> 
> In legacy mode zooming works fine.
> Attached patch contains fix.
> 
> 
> 
> ___
> 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] Multilayer keepout zones

2017-09-26 Thread Jon Evans
Hi Oliver,

Your recent changes do fix the issue I saw, thanks.

-Jon

On Tue, Sep 26, 2017 at 7:47 AM, Wayne Stambaugh 
wrote:

> Oliver,
>
> Thanks for making the changes.
>
> JP,
>
> Would you please take a look at this patch set when you get a chance.
> You are more familiar with the board zone code than I am so you may find
> issues that I may have missed.
>
> Thanks,
>
> Wayne
>
> On 9/26/2017 7:09 AM, Oliver Walters wrote:
> > I have found and fixed a couple of bugs, and now also improved the layer
> > selector for keepout areas. There is now a checkbox next to each layer
> > to convey that multiple layers can be selected.
> >
> > Updated patch set attached.
> >
> > Jon, I think this should fix the deleted keepout issue you were seeing -
> > the zones not filling to the edge isn't me, I think.
> >
> > Wayne, the load/save issues are now cleaned up too.
> >
> > Please let me know if there is anything else you spot.
> >
> > Oliver
> >
> > On Tue, Sep 26, 2017 at 6:48 AM, Oliver Walters
> > >
> > wrote:
> >
> > Wayne,
> >
> > I was initially thinking that multilayer only made sense for
> > keepouts and that check was simply a guard.
> >
> > Now I think it is a good idea for copper too. I can remove that
> > check in the file parser.
> >
> > Oliver
> >
> >
> > On 26 Sep 2017 05:32, "Wayne Stambaugh"  > > wrote:
> >
> > Oliver,
> >
> > I have a minor issue with your patch set.  What is your
> > rationale for
> > assuming if a zone is on more than one layer that it is a
> > keepout zone?
> > I'm not sure that this would always be valid.  There is already a
> > "keepout" keyword in the list of board file keywords for just
> > such an
> > occasion.  Wouldn't it be better to use the "keepout" keyword
> rather
> > than make assumptions about zones based on what layers they are
> on.
> > This is also not very human readable without some serious
> > knowledge of
> > the pcb file parser.
> >
> > Cheers,
> >
> > Wayne
> >
> > On 9/25/2017 9:09 AM, Oliver Walters wrote:
> > > Attached is a patchset that allows keepout zones to "exist" on
> > multiple
> > > copper layers. This means you can specify a keepout zone for
> > the entire
> > > copper stack (or parts thereof).
> > >
> > >
> > > Features:
> > >
> > > If a keepout zone is specified as multiple layers, the
> > .kicad_mod file
> > > output is adjusted slightly, it will write "(layers F.Cu
> > In1.Cu B.Cu)"
> > > e.g. instead of "(layer F.Cu"). If a single layer is selected,
> > it saves
> > > as it would have previously.
> > >
> > > Rendering is working in legacy and GAL and seems to work as
> > expected for
> > > various combinations of layer visibility.
> > >
> > > Zone cutout (where it intersects the keepout) occurs on for
> > each layer
> > > that the keepout intersects a copper plane.
> > >
> > > DRC violations (pads and tracks inside keepout) work for all
> > layers on
> > > which the keepout exists.
> > >
> > > Screenshot:
> > >
> > > https://i.imgur.com/0JHt3S8.png  png>
> > >
> > > As this patch set touches a lot of files, I'd appreciate some
> > feedback!
> > >
> > > My longer term idea is to integrate keepout zones into module
> > > (footprint) files, with the ability to select from a
> > combination of
> > >
> > > a) F.Cu
> > > b) Inner.Cu (all internal copper)
> > > c) B.Cu
> > >
> > > Let me know if you spot any bugs or glitches!
> > >
> > > 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 : 

Re: [Kicad-developers] [Patch] Update PCB from Schematic hotkey in pcbnew and bug in schematic filename

2017-09-26 Thread Wayne Stambaugh
Hey Dan,

I have a few comments on your patches.

The "Update PCB from Schematic" patch uses a duplicate hotkey.  F8 is
already assigned to the HK_SWITCH_LAYER_TO_INNER4 command ID.  Check the
pcbnew/hotkeys.cpp file for the list of assigned hotkey.  Also, you are
using F8 as a menu accelerator not a hotkey which requires you to add
the IS_ACCEL HOTKEY_ACTION_TYPE to the AddHotkeyName() call.  You are
going to have to choose a different hotkey and resubmit your patch.

Technically the file name fix patch works but you should use the
wxFileName( path, name, ext) ctor to create the full file name.  I've
been trying to weed out this particular issue in KiCad but I must have
missed this one.  Also, there is no need to wrap "%s.%s" in with the
internationalization macro _().  There is no text to translate in the
string.  I will fix this one now that I know where the issue exists.

Thanks,

Wayne

On 9/25/2017 7:19 PM, Dan Green wrote:
> Hi all, here are two patches to address some minor issues with the "Update 
> PCB from Schematic” tool when called from pcbnew. The first adds the F8 
> hotkey to match eeschema. The second fixes a bug that happens if the project 
> name contains a period (e.g.: MyProject_rev1.2). In this case, the wxFileName 
> command SetExt() would detect an existing extension as “2” and replace it 
> with “sch”. Thus using the tool from pcbnew would make it look for (and 
> hopefully not find!) MyProject_rev1.sch. The bug wouldn’t happen if the 
> schematic window was already open, so it was pretty rare.
> thanks!
> Dan
> 
> 
> 
> ___
> 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] Footprint viewer: zooming from toolbar and menu doesn't works in GAL mode

2017-09-26 Thread Константин Барановский
To reproduce:
1) launch Pcbnew;
2) switch to OpenGL;
3) launch Footprint viewer (Library browser);
4) select some footprint;
5) click zoom in/out/page icon on toolbar;
6) nothing happens.

In legacy mode zooming works fine.
Attached patch contains fix.
From 404d01830ac3593d73bec18f81ffca77a40841cb Mon Sep 17 00:00:00 2001
From: Baranovskiy Konstantin 
Date: Tue, 26 Sep 2017 15:35:21 +0300
Subject: [PATCH] Footprint viewer: fix zooming from toolbar or menu in GAL.

---
 pcbnew/tools/pcb_actions.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pcbnew/tools/pcb_actions.cpp b/pcbnew/tools/pcb_actions.cpp
index aba31f22a..ca1e364d6 100644
--- a/pcbnew/tools/pcb_actions.cpp
+++ b/pcbnew/tools/pcb_actions.cpp
@@ -100,12 +100,15 @@ boost::optional PCB_ACTIONS::TranslateLegacyId( int aId )
 return ACTIONS::gridSetOrigin.MakeEvent();
 
 case ID_ZOOM_IN:// toolbar button "Zoom In"
+case ID_VIEWER_ZOOM_IN:
 return ACTIONS::zoomInCenter.MakeEvent();
 
 case ID_ZOOM_OUT:   // toolbar button "Zoom In"
+case ID_VIEWER_ZOOM_OUT:
 return ACTIONS::zoomOutCenter.MakeEvent();
 
 case ID_ZOOM_PAGE:  // toolbar button "Fit on Screen"
+case ID_VIEWER_ZOOM_PAGE:
 return ACTIONS::zoomFitScreen.MakeEvent();
 
 case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH:
-- 
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


Re: [Kicad-developers] [PATCH] Multilayer keepout zones

2017-09-26 Thread Wayne Stambaugh
Oliver,

Thanks for making the changes.

JP,

Would you please take a look at this patch set when you get a chance.
You are more familiar with the board zone code than I am so you may find
issues that I may have missed.

Thanks,

Wayne

On 9/26/2017 7:09 AM, Oliver Walters wrote:
> I have found and fixed a couple of bugs, and now also improved the layer
> selector for keepout areas. There is now a checkbox next to each layer
> to convey that multiple layers can be selected.
> 
> Updated patch set attached.
> 
> Jon, I think this should fix the deleted keepout issue you were seeing -
> the zones not filling to the edge isn't me, I think.
> 
> Wayne, the load/save issues are now cleaned up too.
> 
> Please let me know if there is anything else you spot.
> 
> Oliver
> 
> On Tue, Sep 26, 2017 at 6:48 AM, Oliver Walters
> >
> wrote:
> 
> Wayne,
> 
> I was initially thinking that multilayer only made sense for
> keepouts and that check was simply a guard. 
> 
> Now I think it is a good idea for copper too. I can remove that
> check in the file parser. 
> 
> Oliver
> 
> 
> On 26 Sep 2017 05:32, "Wayne Stambaugh"  > wrote:
> 
> Oliver,
> 
> I have a minor issue with your patch set.  What is your
> rationale for
> assuming if a zone is on more than one layer that it is a
> keepout zone?
> I'm not sure that this would always be valid.  There is already a
> "keepout" keyword in the list of board file keywords for just
> such an
> occasion.  Wouldn't it be better to use the "keepout" keyword rather
> than make assumptions about zones based on what layers they are on.
> This is also not very human readable without some serious
> knowledge of
> the pcb file parser.
> 
> Cheers,
> 
> Wayne
> 
> On 9/25/2017 9:09 AM, Oliver Walters wrote:
> > Attached is a patchset that allows keepout zones to "exist" on
> multiple
> > copper layers. This means you can specify a keepout zone for
> the entire
> > copper stack (or parts thereof).
> >
> >
> > Features:
> >
> > If a keepout zone is specified as multiple layers, the
> .kicad_mod file
> > output is adjusted slightly, it will write "(layers F.Cu
> In1.Cu B.Cu)"
> > e.g. instead of "(layer F.Cu"). If a single layer is selected,
> it saves
> > as it would have previously.
> >
> > Rendering is working in legacy and GAL and seems to work as
> expected for
> > various combinations of layer visibility.
> >
> > Zone cutout (where it intersects the keepout) occurs on for
> each layer
> > that the keepout intersects a copper plane.
> >
> > DRC violations (pads and tracks inside keepout) work for all
> layers on
> > which the keepout exists.
> >
> > Screenshot:
> >
> > https://i.imgur.com/0JHt3S8.png 
> >
> > As this patch set touches a lot of files, I'd appreciate some
> feedback!
> >
> > My longer term idea is to integrate keepout zones into module
> > (footprint) files, with the ability to select from a
> combination of
> >
> > a) F.Cu
> > b) Inner.Cu (all internal copper)
> > c) B.Cu
> >
> > Let me know if you spot any bugs or glitches!
> >
> > 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 : 

Re: [Kicad-developers] latest GerbView doesn't display test file

2017-09-26 Thread jp charras
Le 26/09/2017 à 12:42, Clemens Koller a écrit :
> Hi!
> 
> I just tested the latest (HEAD -2h) GerbView with GAL support to see if it 
> gets usable with big designs, but it seems that
> it has issues to read the file properly. Gerbv just works(TM).
> 
> Attached is a very basic file which is supposed to show milling contours + 
> some markers.
> Is this lack of compatibility a known issue or should I open a new bug report?
> 
> Regards,
> 
> Clemens

The Gerber file is broken:
the line:
%FSDAX33Y33*%

is incorrect: the %FSD format does not exist (It is even flagged invalid : see 
the latest Gerber
file format spec).

only %FSL or %FST exists.

This is a a known issue in some non Gerber compliant EDA tools.

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


Re: [Kicad-developers] [PATCH] Multilayer keepout zones

2017-09-26 Thread Oliver Walters
I have found and fixed a couple of bugs, and now also improved the layer
selector for keepout areas. There is now a checkbox next to each layer to
convey that multiple layers can be selected.

Updated patch set attached.

Jon, I think this should fix the deleted keepout issue you were seeing -
the zones not filling to the edge isn't me, I think.

Wayne, the load/save issues are now cleaned up too.

Please let me know if there is anything else you spot.

Oliver

On Tue, Sep 26, 2017 at 6:48 AM, Oliver Walters <
oliver.henry.walt...@gmail.com> wrote:

> Wayne,
>
> I was initially thinking that multilayer only made sense for keepouts and
> that check was simply a guard.
>
> Now I think it is a good idea for copper too. I can remove that check in
> the file parser.
>
> Oliver
>
>
> On 26 Sep 2017 05:32, "Wayne Stambaugh"  wrote:
>
> Oliver,
>
> I have a minor issue with your patch set.  What is your rationale for
> assuming if a zone is on more than one layer that it is a keepout zone?
> I'm not sure that this would always be valid.  There is already a
> "keepout" keyword in the list of board file keywords for just such an
> occasion.  Wouldn't it be better to use the "keepout" keyword rather
> than make assumptions about zones based on what layers they are on.
> This is also not very human readable without some serious knowledge of
> the pcb file parser.
>
> Cheers,
>
> Wayne
>
> On 9/25/2017 9:09 AM, Oliver Walters wrote:
> > Attached is a patchset that allows keepout zones to "exist" on multiple
> > copper layers. This means you can specify a keepout zone for the entire
> > copper stack (or parts thereof).
> >
> >
> > Features:
> >
> > If a keepout zone is specified as multiple layers, the .kicad_mod file
> > output is adjusted slightly, it will write "(layers F.Cu In1.Cu B.Cu)"
> > e.g. instead of "(layer F.Cu"). If a single layer is selected, it saves
> > as it would have previously.
> >
> > Rendering is working in legacy and GAL and seems to work as expected for
> > various combinations of layer visibility.
> >
> > Zone cutout (where it intersects the keepout) occurs on for each layer
> > that the keepout intersects a copper plane.
> >
> > DRC violations (pads and tracks inside keepout) work for all layers on
> > which the keepout exists.
> >
> > Screenshot:
> >
> > https://i.imgur.com/0JHt3S8.png
> >
> > As this patch set touches a lot of files, I'd appreciate some feedback!
> >
> > My longer term idea is to integrate keepout zones into module
> > (footprint) files, with the ability to select from a combination of
> >
> > a) F.Cu
> > b) Inner.Cu (all internal copper)
> > c) B.Cu
> >
> > Let me know if you spot any bugs or glitches!
> >
> > 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
>
>
>
From 8c2e83f758bf9b00aec292ff6b98279963ad30cf Mon Sep 17 00:00:00 2001
From: Oliver Walters 
Date: Fri, 22 Sep 2017 10:20:20 +1000
Subject: [PATCH 1/8] Enable multi-layer for keepout zones

- Load / save from PCB file correctly
- Doesn't display properly yet
- Keepout only actually applies to one layer (for now)
---
 common/lset.cpp|   1 +
 include/class_board_item.h |   2 +-
 pcbnew/class_zone.cpp  | 158 -
 pcbnew/class_zone.h|  13 ++
 pcbnew/class_zone_settings.cpp |  15 +-
 pcbnew/class_zone_settings.h   |   2 +
 pcbnew/dialogs/dialog_keepout_area_properties.cpp  |  32 -
 .../dialog_keepout_area_properties_base.cpp|   6 +-
 .../dialog_keepout_area_properties_base.fbp|   4 +-
 .../dialogs/dialog_keepout_area_properties_base.h  |   2 +-
 pcbnew/kicad_plugin.cpp|  10 +-
 pcbnew/kicad_plugin.h  |   3 +-
 pcbnew/pcb_parser.cpp  |   8 +-
 13 files changed, 236 insertions(+), 20 deletions(-)

diff --git a/common/lset.cpp b/common/lset.cpp
index d0a58d9..9550198 100644
--- a/common/lset.cpp
+++ b/common/lset.cpp
@@ -563,6 +563,7 @@ LSET FlipLayerMask( LSET aMask, int aCopperLayersCount )
 
 for( int ii = 0; ii < innerLayerCnt; ii++ )
 {
+//TODO there is a problem with this code
 if( internalMask[innerLayerCnt - ii + In1_Cu] )
 newMask.set( ii + In1_Cu );
 else
diff --git 

[Kicad-developers] latest GerbView doesn't display test file

2017-09-26 Thread Clemens Koller
Hi!

I just tested the latest (HEAD -2h) GerbView with GAL support to see if it gets 
usable with big designs, but it seems that
it has issues to read the file properly. Gerbv just works(TM).

Attached is a very basic file which is supposed to show milling contours + some 
markers.
Is this lack of compatibility a known issue or should I open a new bug report?

Regards,

Clemens



*
*
G04 PADS VX.1.2 Build Number: 698008 generated Gerber (RS-274-X) file*
G04 PC Version=2.1*
*
%IN "Test.pcb"*%
*
%MOMM*%
*
%FSDAX33Y33*%
*
*
*
*
G04 PC Standard Apertures*
*
*
G04 Thermal Relief Aperture macro.*
%AMTER*
1,1,$1,0,0*
1,0,$1-$2,0,0*
21,0,$3,$4,0,0,45*
21,0,$3,$4,0,0,135*
%
*
*
G04 Annular Aperture macro.*
%AMANN*
1,1,$1,0,0*
1,0,$2,0,0*
%
*
*
G04 Odd Aperture macro.*
%AMODD*
1,1,$1,0,0*
1,0,$1-0.005,0,0*
%
*
*
G04 PC Custom Aperture Macros*
*
*
*
*
*
*
G04 PC Aperture Table*
*
%ADD010C,0.02*%
%ADD039C,0.1*%
*
*
*
*
G04 PC Circuitry*
G04 Layer Name Test.pcb - circuitry*
%LPD*%
*
*
G04 PC Custom Flashes*
G04 Layer Name Test.pcb - flashes*
%LPD*%
*
*
G04 PC Circuitry*
G04 Layer Name Test.pcb - circuitry*
%LPD*%
*
G54D10*
G54D39*
G01X02Y019500D02*
Y020500D01*
X019500Y02D02*
X020500D01*
X12Y093100D02*
Y094100D01*
X119500Y093600D02*
X120500D01*
X12Y019500D02*
Y020500D01*
X119500Y02D02*
X120500D01*
X02Y019500D02*
Y091800D01*
X023000*
X025000Y093800*
Y094300*
X114000Y019300D02*
Y025800D01*
X116000Y027800*
X12*
Y085800*
X116000*
X114000Y087800*
Y094300*
X019500Y093600D02*
X020500D01*
X02Y093100D02*
Y094100D01*
X00Y00D02*
M02*
___
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] GerbView GAL support

2017-09-26 Thread Maciej Sumiński
Perfect, I have just committed your patch. Thank you!

Regards,
Orson

On 09/25/2017 11:11 PM, Jon Evans wrote:
> Thanks Orson.  The attached patch changes the d-code LOD threshold to a
> more reasonable value.
> 
> -Jon
> 
> On Mon, Sep 25, 2017 at 8:31 AM, Maciej Sumiński 
> wrote:
> 
>> Jon,
>>
>> Thank you very much for your work on GerbView GAL support. I have just
>> pushed your changes to the master branch, including the most recent
>> patches.
>>
>> The display performance is significantly better when compared to the
>> legacy renderer. Still, if you are interested in further improvements, a
>> cheap upgrade would be to take advantage of VIEW_ITEM::ViewGetLOD()
>> method to hide d-codes depending on the zoom level. It is done the same
>> way e.g. for track net labels.
>>
>> Regards,
>> Orson
>>
>> On 09/25/2017 03:26 AM, Jon Evans wrote:
>>> Hi Orson, Tom,
>>>
>>> Thanks for the tips.  I eventually did figure out what was going on --
>>> mismatch of state between the RTREE and the View in my first attempt at
>>> optimization.
>>>
>>> The attached 3 patches improve performance a ton on larger Gerber files
>> --
>>> on my computer, between 30-40% improvement, and massive improvement in
>> file
>>> load time and responsiveness when you select items.
>>> Please review and if you see no issues, apply on top of the existing
>> branch
>>> before you merge. (yes, there is no 0003- patch)
>>>
>>> (This should also be good for a performance boost in PcbNew when working
>>> with very large boards)
>>>
>>> Thanks,
>>> Jon
>>>
>>> On Sat, Sep 23, 2017 at 3:01 PM, jp charras 
>> wrote:
>>>
 Le 21/09/2017 à 14:04, Wayne Stambaugh a écrit :
> Orson,
>
> I'm leaving this decision up to you and JP since I have not had time to
> test it.  JP, do you have any other concerns about this?

 Sorry for the delay, but I was away last 3 days.
 I do not have concerns about merging Gerbview GAL.

 We know there are a few issues, but they can be fixed later. None is
 blocking.
 And the legacy canvas can be used with no issue.

 So, Orson, if you can commit this very good enhancement, please do it.
 AFAIK, remember also only the GAL canvas works on wxWidgets + GTK3, so
>> the
 GAL canvas support is
 very important for the future of KiCad.

 Thanks to Jon and Orson for all this work.

>
> Thanks,
>
> Wayne
>
> On 9/21/2017 6:05 AM, Maciej Sumiński wrote:
>> Hi Jon,
>>
>> Thanks you, this is really cool! Now it is even more tempting to merge
>> the gerbview_gal branch. I am going to wait one more day for vetos and
>> tomorrow I will push it to the master branch.
>>
>> Regards,
>> Orson
>>
>> On 09/20/2017 09:57 PM, Jon Evans wrote:
>>> Hi Orson,
>>>
>>> Give this a shot in your branch.  It should work in pcbnew also now.
>>>
>>> -Jon
>>>
>>> On Wed, Sep 20, 2017 at 9:28 AM, Jon Evans 
>> wrote:
>>>
 Hi Orson,

 Thank you for staging this for merge on your branch.  I checked and
 you do
 have all the patches.

 1) Yes I planned on refactoring the selection tool once things
 stabilized
 with the highlighting etc.
 2) Do you mean when you are highlighting Gerber X2 attributes, or
 when you
 are deselecting things, or something else?
 3) That's a good idea on VIEW_GROUP, I will give it a try and send a
 patch.

 Thanks,
 Jon

 On Wed, Sep 20, 2017 at 5:46 AM, Maciej Sumiński <
 maciej.sumin...@cern.ch>
 wrote:

> Hi Jon,
>
> GALifying GerbView is a huge task, so thank you very much for your
 work!
> I have just tested your changes and in my opinion it is in a state
 that
> deserves merging and further tests. The new way of item
>> highlighting
 is
> awesome, we need to port it to pcbnew as well.
>
> For now I keep your patches in a separate branch, with some minor
> modifications on top of it [1]. Please verify it contains all the
 needed
> patches. If nobody objects, I would like to merge it this week.
>
> Just a few minor remarks:
> - It seems there is some code that could be refactored to share it
 with
> pcbnew (e.g. selection tool).
> - 'Clear highlight' operation takes long time to finish (seems more
 than
> with the legacy canvas), but I cannot really see what is happening
> there. If it cannot be easily fixed, perhaps it could set the mouse
> cursor to busy.
> - For the new highlighting method: perhaps a more universal way is
>> to
> create a temporary VIEW_GROUP object containing the selection
 candidate.
> This way it can be temporarily