Re: [Kicad-developers] New version of net selector up

2018-09-25 Thread Andrzej Wolski

It is better now, but I still have some artifacts (Win 10), see here:
https://www.dropbox.com/s/l671nfmdtikbmlq/kicad%202018-09-25%2023-05-52.mov?dl=0

Andrzej

W dniu 2018-09-25 o 18:57, Jeff Young pisze:

Thanks, JP.  I’ve pushed another “fix”.  It works on OSX, but then so did the 
first one, so who knows.

Let me know how it works on Linux & MSW.

Cheers,
Jeff.




On 25 Sep 2018, at 16:38, jp charras  wrote:

Le 25/09/2018 à 16:09, Jeff Young a écrit :

OK, so it looks correct, it’s just closing itself immediately.

@JP or @Wayne,

Could one of you put a breakpoint in NET_SELECTOR_POPUP::DoPopup() (in
net_selector.cpp somewhere around line 134) and see why it’s exiting?

Thanks,
Jeff.


the loop:
while( eventLoop.Pending() )
is made only once, due to the fact eventLoop.Pending() is true only once.

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




___
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] New version of net selector up

2018-09-25 Thread Andrzej Wolski

This is how it looks:
https://www.dropbox.com/s/fplbtsct41ycwoj/kicad%202018-09-25%2014-53-52.mov?dl=0
Moving mouse does not change anything.

Andrzej


W dniu 2018-09-25 o 14:15, Jeff Young pisze:

Hi Andrzej,

A couple of more questions.  Does it look right when it shows up briefly, or is 
it very short?

Do you move the mouse inside it before it closes back up, or does it do that 
even if you don’t move the mouse at all?

If the former, can you move the mouse into it very quickly after clicking?  
Does that change the behaviour any?

Cheers,
Jeff.



On 25 Sep 2018, at 11:46, Andrzej Wolski  wrote:

Another observation: when I click on net selector and try to enter character there, the character 
goes into "start point x" or "position x" field.

Andrzej

W dniu 2018-09-25 o 12:29, Jeff Young pisze:

Hi Andrzej,

How recent is your code?  Seth made some recent fixes to the Net Selector on 
GTK, so let’s make sure you’ve got that code first.

Neither Seth nor I have MSW, so all bets are off there….

Cheers,
Jeff.



On 25 Sep 2018, at 11:09, Andrzej Wolski  wrote:

Hi Jeff,

net selector seems to no longer work on Windows and Linux.
When I try to drop it down it just flickers and folds back up.

Andrzej

W dniu 2018-09-21 o 21:43, Jeff Young pisze:

I just pushed a new version of the net selector combobox.  It’s a complete 
re-write using less wxStuff, and so hopefully won’t run into the same bugs.

It’s used in the Track Properties, Pad Properties and Global Edit Tracks and 
Vias dialogs; if you get a chance to try it out I’d love to hear what works and 
what doesn’t.

Cheers,
Jeff.


___
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] New version of net selector up

2018-09-25 Thread Andrzej Wolski
Another observation: when I click on net selector and try to enter 
character there, the character goes into "start point x" or "position x" 
field.


Andrzej

W dniu 2018-09-25 o 12:29, Jeff Young pisze:

Hi Andrzej,

How recent is your code?  Seth made some recent fixes to the Net Selector on 
GTK, so let’s make sure you’ve got that code first.

Neither Seth nor I have MSW, so all bets are off there….

Cheers,
Jeff.



On 25 Sep 2018, at 11:09, Andrzej Wolski  wrote:

Hi Jeff,

net selector seems to no longer work on Windows and Linux.
When I try to drop it down it just flickers and folds back up.

Andrzej

W dniu 2018-09-21 o 21:43, Jeff Young pisze:

I just pushed a new version of the net selector combobox.  It’s a complete 
re-write using less wxStuff, and so hopefully won’t run into the same bugs.

It’s used in the Track Properties, Pad Properties and Global Edit Tracks and 
Vias dialogs; if you get a chance to try it out I’d love to hear what works and 
what doesn’t.

Cheers,
Jeff.


___
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] New version of net selector up

2018-09-25 Thread Andrzej Wolski

I'm on current master (ee465fb23).

Andrzej


W dniu 2018-09-25 o 12:29, Jeff Young pisze:

Hi Andrzej,

How recent is your code?  Seth made some recent fixes to the Net Selector on 
GTK, so let’s make sure you’ve got that code first.

Neither Seth nor I have MSW, so all bets are off there….

Cheers,
Jeff.



On 25 Sep 2018, at 11:09, Andrzej Wolski  wrote:

Hi Jeff,

net selector seems to no longer work on Windows and Linux.
When I try to drop it down it just flickers and folds back up.

Andrzej

W dniu 2018-09-21 o 21:43, Jeff Young pisze:

I just pushed a new version of the net selector combobox.  It’s a complete 
re-write using less wxStuff, and so hopefully won’t run into the same bugs.

It’s used in the Track Properties, Pad Properties and Global Edit Tracks and 
Vias dialogs; if you get a chance to try it out I’d love to hear what works and 
what doesn’t.

Cheers,
Jeff.


___
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] New version of net selector up

2018-09-25 Thread Andrzej Wolski

Hi Jeff,

net selector seems to no longer work on Windows and Linux.
When I try to drop it down it just flickers and folds back up.

Andrzej

W dniu 2018-09-21 o 21:43, Jeff Young pisze:

I just pushed a new version of the net selector combobox.  It’s a complete 
re-write using less wxStuff, and so hopefully won’t run into the same bugs.

It’s used in the Track Properties, Pad Properties and Global Edit Tracks and 
Vias dialogs; if you get a chance to try it out I’d love to hear what works and 
what doesn’t.

Cheers,
Jeff.


___
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] GAL: Draw hole even if pad has no layer

2018-06-25 Thread Andrzej Wolski

Hi,

if by submitter you mean me, then this is a board I found on Github, I 
don't know if it was manually edited.


But I have done a little investigation, and I think I've found the 
source of this problem.
The problematic footprint is identical to the one that can be downloaded 
from SnapEDA:

https://www.snapeda.com/parts/67910-5700/Molex/view-part/
The footprint is in legacy format and has NPTH holes defined with zero 
layer mask:


$PAD
Sh "Hole" C 1.1 1.1 0 0 0
Dr 1.1 0 0
At HOLE N 0
Po 14.3 0
$EndPAD

So it looks like SnapEDA has a bug in their export-to-kicad script.

Maybe someone could inform them about this (I don't know how layer mask 
should look in legacy format).


Andrzej


W dniu 2018-06-25 o 20:25, Wayne Stambaugh pisze:

Hey Seth,

I would agree with you if this was our error.  If I'm reading JP's
analysis correctly, he could not create this board error using KiCad so
I'm working on the assumption that this was not our board file output
formatter causing the problem.  Using defensive measures such as
assertions and test cases to ensure our board file output formatter is
correct makes sense.  Adding code to our parser to fix board files that
are broken due to manual editing or broken scripts is a slippery slope.
Where do we draw the line?  This isn't the first time this has happened.
  In the past, we have chosen not to allow this so I am leaning in that
direction.  It would be nice if the submitter of the broken board would
confirm if the board was manually edited with a text editor or
manipulated with a script.  I'm not completely dismissing the patch but
it would be easier to make an informed decision if I knew how the broken
board was created.

Cheers,

Wayne

On 6/25/2018 10:25 AM, Seth Hillbrand wrote:

​Hi Wayne-

I would view this patch more as defensive coding than trying to fix
others' errors.  The alternatives are to refuse to parse the file or (as
we currently do) parse as written and encounter errors in display and
routing.  JP's approach provides a clear and predictable response to a
modified file.

-Seth​


Am Mo., 25. Juni 2018 um 06:16 Uhr schrieb Wayne Stambaugh
mailto:stambau...@gmail.com>>:

 On 6/25/2018 8:12 AM, jp charras wrote:
 > Le 24/06/2018 à 21:52, Wayne Stambaugh a écrit :
 >> Are we planning on fixing this for rc3?  If so, what is
 required.  I'm fine with waiting a day or
 >> two to tag rc3.
 >>
 >
 > Attached a possible fix.
 >
 > The board test file shows really broken layer set in a few pads:
 > - no layers for some pads (the layers section is empty).
 > This make no sense for me.
 >
 > After tests, It is not possible to create this empty layer set
 from Pcbnew (even with old 2013
 > stable version).
 >
 > My opinion is the board (or the footprints) was modified by hand
 (or by a script).

 If this is the case, then I'm not thrilled about applying this patch
 even if it does solve the problem.  We should not be modifying KiCad to
 fix other people's coding errors.

 >
 > This patch is short and fixes silently this kind of issues.
 > (I am not sure it is worth to try a better fix, because this issue
 cannot happens when editing a
 > board from pcbnew)
 >
 >
 >
 > ___
 > 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] GAL: Draw hole even if pad has no layer

2018-06-23 Thread Andrzej Wolski
When you generate gerbers from a valid NPTH pad with hole size = pad 
size, there will be no shape plotted on copper layers, so in my opinion, 
this pad does not exist on copper layers. But this is more philosophical 
discussion :)


Regarding clearance for router, you could just take the merged shape of 
both pad and hole. This would solve problems you mentioned, and perhaps 
some other edge cases.


This is just my opinion, I'm not proposing to change anything in kicad 
(at least not in the near future).


So if you agree to GAL fix, can this patch be merged?

Cheers,
Andrzej


W dniu 2018-06-23 o 08:54, jp charras pisze:

Le 22/06/2018 à 21:54, Andrzej Wolski a écrit :

No, this IS an error in the board :)
If you open pad properties and click OK, it won't let you save it as is, you 
will have to enable
copper layers.
NPTH pads also HAVE TO exists on copper layers (I don't understand why, but 
they do).

Just because they *are* on these copper layers, regardless the hole has removed 
the visible copper area.

A pad is not only a copper area. It also define a clearance area, that is not 
necessary the hole area.
If you say: this pad is not on this copper layer, it means you have no obstacle 
to draw a track.
This is obviously false: the hole in on this layer.

If a NPTH is removed from copper layers (malformed pad), the PnS router will 
happily route a track
crossing the hole, because it is the mathematical result of "this pad is not 
here".
You can think: there is a bug in PnS router.
But the Truth is the pad is broken and has incorrect layer setting, therefore 
incorrect routing
constraints (and incorrect fill zone param).

Therefore regardless the GAL fix, the malformed pad (like any malformed item) 
need a fix when
reading the file, because it this king of issue can create problems, even 
crashes.

Of course, the GAL draw issue needs also to be fixed: it must show the hole, 
even for malformed pads.


Also, as I already mentioned, current GAL behavior is different from 4.0 GAL 
and legacy, so this is
a regression.

Andrzej

W dniu 2018-06-22 o 21:44, Seth Hillbrand pisze:

Ah.  This is not an error in the board.  This is just an NPTH.  If you click on 
it in GAL, you
will see it.

I think the correct patch to this should check the pad type instead of drawing 
one with no layers.

-S

Am Fr., 22. Juni 2018 um 12:33 Uhr schrieb Andrzej Wolski 
mailto:awolski.ki...@gmail.com>>:

 IIRC you have to leave (layers) to reproduce this.

 This is a board where I found the issue:
 
https://github.com/mntmn/reform/blob/master/electronics/reform-motherboard.kicad_pcb
 There are two mPCIE connectors in the center, they have NPTH alignment 
holes, you can see them
 in legacy mode.

 Andrzej

 W dniu 2018-06-22 o 20:06, Seth Hillbrand pisze:

 Andrzej-

 I just tested this, editing a file to remove the layers from a pad and 
KiCad automatically
 adds the pad back to all copper layers.  I see the pad in pcbnew and can 
edit it.

 Can you provide a board that demonstrates the issue?  Maybe it was only 
the test board I used?

 -S

 Am Fr., 22. Juni 2018 um 10:51 Uhr schrieb Andrzej Wolski 
mailto:awolski.ki...@gmail.com>>:

 Hi Seth,

 current behavior is that malformed pad holes are always hidden, so you 
can't see on the
 screen something that exists on your PCB and will be plotted in drill 
files. This patch
 makes those holes visible.

 Andrzej

 W dniu 2018-06-22 o 17:46, Seth Hillbrand pisze:

 ​Andrzej-

 Can you explain the issue that this patch addresses?  I read the 
commit message but it
 looks like malformed pads (GetLayerSet().any() == 0) are no longer 
hidden.  This seems
 counter-intuitive but maybe I'm just not seeing the problem.

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


Re: [Kicad-developers] [PATCH] Fix overbar drawing for non-italic text

2018-06-23 Thread Andrzej Wolski

Wayne,

this is after patch:
https://imgur.com/a/54ESCMD

Andrzej

W dniu 2018-06-23 o 16:54, Wayne Stambaugh pisze:

Andrzej,

Do you have an image of the same characters after you patch?  The other
question I have is what happens when consecutive characters have and
overbar?  AFAIK, the overbar should be continuous (no breaks between
characters).  Did you test this as well.  If this needs fixed, I would
like to get it merged for rc3.  Anyone else have any thoughts on this.

Cheers,

Wayne

On 06/22/2018 10:35 AM, Andrzej Wolski wrote:

No, the patch didn't go the wrong way.
If you try to shorten the right side of the bar, for some characters it
will look really bad, and in case of "I" it will turn into dot.
This is before patch:
https://imgur.com/a/TjibR0Q

Andrzej


W dniu 2018-06-22 o 15:40, Kevin Cozens pisze:

On 2018-06-22 07:01 AM, Andrzej Wolski wrote:

This is an illustration of what this patch do:
https://imgur.com/a/GxIeLkA

Hm... did the patch go the wrong way with the change to the position
and length of the bar over non-italicized text? Before the bar started
at the left side of the letter and extends past the right side of the
letter. After it starts before the letter and extends past the right
side. Contrast that to italicized text where the bar starts and ends
based on the left-most and right-most part of the drawn letter.

I think a patch should shorten the right-hand extent of the bar over
non-italicized text so it is only over the letter.



___
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] GAL: Draw hole even if pad has no layer

2018-06-22 Thread Andrzej Wolski

No, this IS an error in the board :)
If you open pad properties and click OK, it won't let you save it as is, 
you will have to enable copper layers.
NPTH pads also HAVE TO exists on copper layers (I don't understand why, 
but they do).


Also, as I already mentioned, current GAL behavior is different from 4.0 
GAL and legacy, so this is a regression.


Andrzej

W dniu 2018-06-22 o 21:44, Seth Hillbrand pisze:
Ah.  This is not an error in the board.  This is just an NPTH.  If you 
click on it in GAL, you will see it.


I think the correct patch to this should check the pad type instead of 
drawing one with no layers.


-S

Am Fr., 22. Juni 2018 um 12:33 Uhr schrieb Andrzej Wolski 
mailto:awolski.ki...@gmail.com>>:


IIRC you have to leave (layers) to reproduce this.

This is a board where I found the issue:

https://github.com/mntmn/reform/blob/master/electronics/reform-motherboard.kicad_pcb
There are two mPCIE connectors in the center, they have NPTH
alignment holes, you can see them in legacy mode.

Andrzej

W dniu 2018-06-22 o 20:06, Seth Hillbrand pisze:

Andrzej-

I just tested this, editing a file to remove the layers from a
pad and KiCad automatically adds the pad back to all copper
layers.  I see the pad in pcbnew and can edit it.

Can you provide a board that demonstrates the issue?  Maybe it
was only the test board I used?

-S

Am Fr., 22. Juni 2018 um 10:51 Uhr schrieb Andrzej Wolski
mailto:awolski.ki...@gmail.com>>:

Hi Seth,

current behavior is that malformed pad holes are always
hidden, so you can't see on the screen something that exists
on your PCB and will be plotted in drill files. This patch
makes those holes visible.

Andrzej

W dniu 2018-06-22 o 17:46, Seth Hillbrand pisze:

​Andrzej-

Can you explain the issue that this patch addresses?  I read
the commit message but it looks like malformed pads
(GetLayerSet().any() == 0) are no longer hidden.  This seems
counter-intuitive but maybe I'm just not seeing the problem.

Thanks!
Seth​



Am Fr., 22. Juni 2018 um 03:57 Uhr schrieb Andrzej Wolski
mailto:awolski.ki...@gmail.com>>:


___
Mailing list: https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
Post to     : kicad-developers@lists.launchpad.net
<mailto:kicad-developers@lists.launchpad.net>
Unsubscribe : https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-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] GAL: Draw hole even if pad has no layer

2018-06-22 Thread Andrzej Wolski

IIRC you have to leave (layers) to reproduce this.

This is a board where I found the issue:
https://github.com/mntmn/reform/blob/master/electronics/reform-motherboard.kicad_pcb
There are two mPCIE connectors in the center, they have NPTH alignment 
holes, you can see them in legacy mode.


Andrzej

W dniu 2018-06-22 o 20:06, Seth Hillbrand pisze:

Andrzej-

I just tested this, editing a file to remove the layers from a pad and 
KiCad automatically adds the pad back to all copper layers.  I see the 
pad in pcbnew and can edit it.


Can you provide a board that demonstrates the issue?  Maybe it was 
only the test board I used?


-S

Am Fr., 22. Juni 2018 um 10:51 Uhr schrieb Andrzej Wolski 
mailto:awolski.ki...@gmail.com>>:


Hi Seth,

current behavior is that malformed pad holes are always hidden, so
you can't see on the screen something that exists on your PCB and
will be plotted in drill files. This patch makes those holes visible.

Andrzej

W dniu 2018-06-22 o 17:46, Seth Hillbrand pisze:

​Andrzej-

Can you explain the issue that this patch addresses?  I read the
commit message but it looks like malformed pads
(GetLayerSet().any() == 0) are no longer hidden.  This seems
counter-intuitive but maybe I'm just not seeing the problem.

Thanks!
Seth​



Am Fr., 22. Juni 2018 um 03:57 Uhr schrieb Andrzej Wolski
mailto:awolski.ki...@gmail.com>>:


___
Mailing list: https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
Post to     : kicad-developers@lists.launchpad.net
<mailto:kicad-developers@lists.launchpad.net>
Unsubscribe : https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-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] GAL: Draw hole even if pad has no layer

2018-06-22 Thread Andrzej Wolski
Those pads are shown in 4.0 GAL and in 5.0 legacy, only 5.0 GAL has this 
problem, so to me this is a regression fix rather than workaround.


Fixing those pads may be a good idea, but that is another matter.

Andrzej


W dniu 2018-06-22 o 20:03, jp charras pisze:

Le 22/06/2018 à 19:51, Andrzej Wolski a écrit :

Hi Seth,

current behavior is that malformed pad holes are always hidden, so you can't 
see on the screen
something that exists on your PCB and will be plotted in drill files. This 
patch makes those holes
visible.

Andrzej

OK,

But perhaps a better way is to fix this kind of malformed pads, as perhaps they 
can create other
issues (especially related to DRC).

Showing them is a workaround, not a fix.



W dniu 2018-06-22 o 17:46, Seth Hillbrand pisze:

​Andrzej-

Can you explain the issue that this patch addresses?  I read the commit message 
but it looks like
malformed pads (GetLayerSet().any() == 0) are no longer hidden.  This seems 
counter-intuitive but
maybe I'm just not seeing the problem.

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


Re: [Kicad-developers] [PATCH] GAL: Draw hole even if pad has no layer

2018-06-22 Thread Andrzej Wolski

Hi Seth,

current behavior is that malformed pad holes are always hidden, so you 
can't see on the screen something that exists on your PCB and will be 
plotted in drill files. This patch makes those holes visible.


Andrzej

W dniu 2018-06-22 o 17:46, Seth Hillbrand pisze:

​Andrzej-

Can you explain the issue that this patch addresses?  I read the 
commit message but it looks like malformed pads (GetLayerSet().any() 
== 0) are no longer hidden.  This seems counter-intuitive but maybe 
I'm just not seeing the problem.


Thanks!
Seth​



Am Fr., 22. Juni 2018 um 03:57 Uhr schrieb Andrzej Wolski 
mailto:awolski.ki...@gmail.com>>:



___
Mailing list: https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
Post to     : kicad-developers@lists.launchpad.net
<mailto:kicad-developers@lists.launchpad.net>
Unsubscribe : https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-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] Fix overbar drawing for non-italic text

2018-06-22 Thread Andrzej Wolski

No, the patch didn't go the wrong way.
If you try to shorten the right side of the bar, for some characters it 
will look really bad, and in case of "I" it will turn into dot.

This is before patch:
https://imgur.com/a/TjibR0Q

Andrzej


W dniu 2018-06-22 o 15:40, Kevin Cozens pisze:

On 2018-06-22 07:01 AM, Andrzej Wolski wrote:

This is an illustration of what this patch do:
https://imgur.com/a/GxIeLkA


Hm... did the patch go the wrong way with the change to the position 
and length of the bar over non-italicized text? Before the bar started 
at the left side of the letter and extends past the right side of the 
letter. After it starts before the letter and extends past the right 
side. Contrast that to italicized text where the bar starts and ends 
based on the left-most and right-most part of the drawn letter.


I think a patch should shorten the right-hand extent of the bar over 
non-italicized text so it is only over the letter.





___
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] GAL: Draw hole even if pad has no layer

2018-06-22 Thread Andrzej Wolski


From d82e05f3328c95cb4443af7a2c0040ff1766fc96 Mon Sep 17 00:00:00 2001
From: Andrzej Wolski 
Date: Fri, 22 Jun 2018 12:07:56 +0200
Subject: [PATCH] GAL: Draw hole even if pad has no layer

While pcbnew does not allow to create THT pad without a copper layer,
there are boards that somehow have such pads. In that case, pad holes
(both PTH and NPTH) were not drawn in GAL.
---
 pcbnew/class_pad.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp
index c4a48c8e8..5bc6acc80 100644
--- a/pcbnew/class_pad.cpp
+++ b/pcbnew/class_pad.cpp
@@ -1316,7 +1316,8 @@ unsigned int D_PAD::ViewGetLOD( int aLayer, KIGFX::VIEW* 
aView ) const
 return HIDE;
 
 // Only draw the pad if at least one of the layers it crosses is being 
displayed
-if( board && !( board->GetVisibleLayers() & GetLayerSet() ).any() )
+// (or if pad has no layer)
+if( board && !( board->GetVisibleLayers() & GetLayerSet() ).any() && 
GetLayerSet().any() )
 return HIDE;
 
 // Netnames will be shown only if zoom is appropriate
-- 
2.16.2

___
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 overbar drawing for non-italic text

2018-06-22 Thread Andrzej Wolski

This is an illustration of what this patch do:
https://imgur.com/a/GxIeLkA

Andrzej

___
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] Save through hole pads color to config file

2018-06-22 Thread Andrzej Wolski


From ebfb1d5cc9ebdeddaa518f14e7c86b7e5c1bbdaa Mon Sep 17 00:00:00 2001
From: Andrzej Wolski 
Date: Fri, 22 Jun 2018 01:35:05 +0200
Subject: [PATCH] Save through hole pads color to config file

TH Pads color is now user settable, so should be saved in config file.
---
 common/colors_design_settings.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/colors_design_settings.cpp 
b/common/colors_design_settings.cpp
index 6a2ba5a1a..4a34f7737 100644
--- a/common/colors_design_settings.cpp
+++ b/common/colors_design_settings.cpp
@@ -217,6 +217,7 @@ void COLORS_DESIGN_SETTINGS::setupConfigParams()
 Add( "Color4DPadBackEx", ITEM_COLOR( LAYER_PAD_BK ), GREEN );
 Add( "Color4DAnchorEx", ITEM_COLOR( LAYER_ANCHOR ), BLUE );
 Add( "Color4DPadFrontEx", ITEM_COLOR( LAYER_PAD_FR ), RED );
+Add( "Color4DPadThruHoleEx", ITEM_COLOR( LAYER_PADS_TH ), YELLOW );
 Add( "Color4DNonPlatedEx", ITEM_COLOR( LAYER_NON_PLATEDHOLES ), YELLOW );
 Add( "Color4DPCBBackground", ITEM_COLOR( LAYER_PCB_BACKGROUND ), BLACK );
 Add( "Color4DPCBCursor", ITEM_COLOR( LAYER_CURSOR ), WHITE );
-- 
2.16.2

___
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] Fix overbar drawing for non-italic text

2018-06-22 Thread Andrzej Wolski


From db2243f6fff9f1666049b501f45f582c2837caf2 Mon Sep 17 00:00:00 2001
From: Andrzej Wolski 
Date: Fri, 22 Jun 2018 12:51:53 +0200
Subject: [PATCH] Fix overbar drawing for non-italic text

Overbar was always indented inward, regardless if text was italic or not.
---
 common/gal/stroke_font.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp
index a6958f39c..10cc9e2c1 100644
--- a/common/gal/stroke_font.cpp
+++ b/common/gal/stroke_font.cpp
@@ -326,7 +326,9 @@ void STROKE_FONT::drawSingleLineText( const UTF8& aText )
 
 if( !last_had_overbar )
 {
-overbar_start_x += overbar_italic_comp;
+if( m_gal->IsFontItalic() )
+overbar_start_x += overbar_italic_comp;
+
 last_had_overbar = true;
 }
 
-- 
2.16.2

___
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] Do not plot zero width oval holes in Gerber X2 drill, files

2018-06-17 Thread Andrzej Wolski


From 2be418ff0ef219960d53d5252d331b6def443bd0 Mon Sep 17 00:00:00 2001
From: Andrzej Wolski 
Date: Sun, 17 Jun 2018 14:37:49 +0200
Subject: [PATCH 2/2] Do not plot zero width oval holes in Gerber X2 drill
 files

In case there are zero width oval holes on the PCB,
it is safer to not plot them at all, rather than plotting
with width arbitrarily increased to 10 mils.
This also makes Gerber outputs consistent with Excellon outputs.
---
 pcbnew/exporters/gendrill_gerber_writer.cpp | 4 
 1 file changed, 4 insertions(+)

diff --git a/pcbnew/exporters/gendrill_gerber_writer.cpp 
b/pcbnew/exporters/gendrill_gerber_writer.cpp
index 351a330d8..2dc1db860 100644
--- a/pcbnew/exporters/gendrill_gerber_writer.cpp
+++ b/pcbnew/exporters/gendrill_gerber_writer.cpp
@@ -283,6 +283,10 @@ int GERBER_WRITER::createDrillFile( wxString& 
aFullFilename, bool aIsNpth,
 convertOblong2Segment( hole_descr.m_Hole_Size,
hole_descr.m_Hole_Orient, start, end );
 int width = std::min( hole_descr.m_Hole_Size.x, 
hole_descr.m_Hole_Size.y );
+
+if ( width == 0 )
+continue;
+
 plotter.ThickSegment( start+hole_pos, end+hole_pos,
   width, FILLED, _metadata );
 #endif
-- 
2.16.2

___
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] Do not allow setting zero Y size for oval holes

2018-06-17 Thread Andrzej Wolski


From 348f5456d427e22c16577fbfe3712052249e9aa2 Mon Sep 17 00:00:00 2001
From: Andrzej Wolski 
Date: Sun, 17 Jun 2018 14:29:26 +0200
Subject: [PATCH 1/2] Do not allow setting zero Y size for oval holes

---
 pcbnew/dialogs/dialog_pad_properties.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp 
b/pcbnew/dialogs/dialog_pad_properties.cpp
index 646546da8..cfc1b05a2 100644
--- a/pcbnew/dialogs/dialog_pad_properties.cpp
+++ b/pcbnew/dialogs/dialog_pad_properties.cpp
@@ -1196,7 +1196,8 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK()
 {
 case PAD_ATTRIB_HOLE_NOT_PLATED:   // Not plated, but through hole, a hole 
is expected
 case PAD_ATTRIB_STANDARD : // Pad through hole, a hole is also 
expected
-if( m_dummyPad->GetDrillSize().x <= 0 )
+if( m_dummyPad->GetDrillSize().x <= 0 ||
+( m_dummyPad->GetDrillSize().y <= 0 && m_dummyPad->GetDrillShape() 
== PAD_DRILL_SHAPE_OBLONG ) )
 error_msgs.Add( _( "Error: Through hole pad: drill diameter set to 
0" ) );
 break;
 
-- 
2.16.2

___
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] Selection filtering, and other missing GAL functionality

2018-03-08 Thread Andrzej Wolski
Legacy-like selection filter is already present in GAL: after selecting 
- right click and choose Select -> Filter Selection.


Andrzej

W dniu 2018-03-07 o 23:20, Jon Evans pisze:

Hi all,

As part of preparing a new 6.0 roadmap, I want to make sure we have 
all functionality that only exists in Legacy mode captured on 
Launchpad so we don't forget about it.  José just reminded me that 
Legacy mode in PcbNew has some selection filtering features that don't 
exist in GAL, so selection filtering is one case where I don't think 
we currently have a launchpad bug (or at least it's not easily 
searchable or tagged with missing-gal-tool).


Are there others besides this? (and printing, obviously)
Some stuff about polygon behavior I think?

-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] Rework footprint selection filtering to improve behavior

2018-03-05 Thread Andrzej Wolski

Hi Jon,

another small issue: if only enabled layer is In1.Cu, THT pads are 
visible, but footprint cannot be selected.

I think that breaks your visible=selectable rule.

Fragment of code from D_PAD::ViewGetLOD that may help here:

    if( ( GetAttribute() == PAD_ATTRIB_STANDARD || GetAttribute() == 
PAD_ATTRIB_HOLE_NOT_PLATED )

 && !aView->IsLayerVisible( LAYER_PADS_TH ) )
    return HIDE;

Cheers,
Andrzej

W dniu 2018-03-03 o 23:39, Jon Evans pisze:

Hey Andy, Andrzej,

Updated patch attached, let me know if this behavior makes more sense

Best,
Jon

On Fri, Mar 2, 2018 at 3:29 PM, Andy Peters <de...@latke.net 
<mailto:de...@latke.net>> wrote:





On Mar 2, 2018, at 10:28 AM, Andrzej Wolski
<awolski.ki...@gmail.com <mailto:awolski.ki...@gmail.com>> wrote:

Jon,

I probably didn't express myself clearly. What I mean is a
situation when *only* enabled layer if F.Paste and then you
disable "Pads Front". Now nothing is visible on the board, but
footprints are still selectable.

In other words, when no single item belonging to footprint is
visible, footprints should not be selectable.

Do you still disagree with me?


I agree with Andrzej. This is the crux of my bug report.

But I understand what Jon is saying, and it doesn’t contradict. If
the _pads_ (for example) are invisible, but say the silkscreen is
visible, then the footprint _should_ be selectable.

That, I think, is the difference between layer visibility and item
visibility. All of the layers could be visible, but if I disable
Footprints Front, then everything associated with all top-layer
footprints vanishes and none of the footprints can be selected.
That’s the proper operation.

The converse of that is if I leave Footprints Front visibility
enabled, and then I go and disable all of the layers associated
with front footprints, like I did in my bug report case (disable
all layers except Cmts.User), I am still able to select all of the
invisible footprints. That’s not correct (IMHO).

-a




Andrzej

W dniu 2018-03-02 o 15:42, Jon Evans pisze:

Hi Andrzej,

This was my intention, which is why I said I was prepared for
other people to have other opinions :-)

I think that you should still be able to select footprints even
if the "front pads" is hidden from layers like the paste layer,
*unless* you are in high contrast mode.

-Jon

On Fri, Mar 2, 2018 at 3:53 AM, Andrzej Wolski
<awolski.ki...@gmail.com <mailto:awolski.ki...@gmail.com>> wrote:

I've tried this patch, and there is a small issue: if you
have only eg front paste layer enabled and front pads are
hidden, footprint is still selectable.

Andrzej


W dniu 2018-02-27 o 04:11, Jon Evans pisze:

This patch changes the selection logic for footprints to
fix a reported issue[1] and to make the behavior more
logical to me.

I know that correct selection behavior is something of a
personal preference, so I'm ready to be flamed :-)

The new behavior:

A footprint may be selected if:
1) The corresponding "Footprints" switch is on in the Items
tab, AND
2) One or more of the layers that the footprint draws on is
visible

This means that if all of the layers are turned off,
footprints are not selectable (fixes the bug), but it also
means that now footprints can be selected if any draw
layers are visible (for example, if you have only F.Mask
enabled, you can select a footprint that has solder mask
and is on the front layer).

Before anyone complains, this is only if high-contrast mode
is turned OFF.  When it is on, you can still only select
items that *only* exist on that layer (to make moving
silkscreen around easier, for example)

Even though this adds some more for-loops to selection
filtering, I have not noticed any performance hits on some
selection of large boards that I tested. More testing is
welcome.

[1] https://bugs.launchpad.net/kicad/+bug/1751960
<https://bugs.launchpad.net/kicad/+bug/1751960>

-Jon




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




___
Mailing list: https://launchpad.net/~kicad-developers
Post to

Re: [Kicad-developers] [PATCH] Rework footprint selection filtering to improve behavior

2018-03-02 Thread Andrzej Wolski

Jon,

I probably didn't express myself clearly. What I mean is a situation 
when *only* enabled layer if F.Paste and then you disable "Pads Front". 
Now nothing is visible on the board, but footprints are still selectable.


In other words, when no single item belonging to footprint is visible, 
footprints should not be selectable.


Do you still disagree with me?

Andrzej

W dniu 2018-03-02 o 15:42, Jon Evans pisze:

Hi Andrzej,

This was my intention, which is why I said I was prepared for other 
people to have other opinions :-)


I think that you should still be able to select footprints even if the 
"front pads" is hidden from layers like the paste layer, *unless* you 
are in high contrast mode.


-Jon

On Fri, Mar 2, 2018 at 3:53 AM, Andrzej Wolski 
<awolski.ki...@gmail.com <mailto:awolski.ki...@gmail.com>> wrote:


I've tried this patch, and there is a small issue: if you have
only eg front paste layer enabled and front pads are hidden,
footprint is still selectable.

Andrzej


W dniu 2018-02-27 o 04:11, Jon Evans pisze:

This patch changes the selection logic for footprints to fix a
reported issue[1] and to make the behavior more logical to me.

I know that correct selection behavior is something of a personal
preference, so I'm ready to be flamed :-)

The new behavior:

A footprint may be selected if:
1) The corresponding "Footprints" switch is on in the Items tab, AND
2) One or more of the layers that the footprint draws on is visible

This means that if all of the layers are turned off, footprints
are not selectable (fixes the bug), but it also means that now
footprints can be selected if any draw layers are visible (for
example, if you have only F.Mask enabled, you can select a
footprint that has solder mask and is on the front layer).

Before anyone complains, this is only if high-contrast mode is
turned OFF.  When it is on, you can still only select items that
*only* exist on that layer (to make moving silkscreen around
easier, for example)

Even though this adds some more for-loops to selection filtering,
I have not noticed any performance hits on some selection of
large boards that I tested.  More testing is welcome.

[1] https://bugs.launchpad.net/kicad/+bug/1751960
<https://bugs.launchpad.net/kicad/+bug/1751960>

-Jon


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




___
Mailing list: https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
Post to     : kicad-developers@lists.launchpad.net
<mailto:kicad-developers@lists.launchpad.net>
Unsubscribe : https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
More help   : https://help.launchpad.net/ListHelp
<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] Rework footprint selection filtering to improve behavior

2018-03-02 Thread Andrzej Wolski
I've tried this patch, and there is a small issue: if you have only eg 
front paste layer enabled and front pads are hidden, footprint is still 
selectable.


Andrzej


W dniu 2018-02-27 o 04:11, Jon Evans pisze:
This patch changes the selection logic for footprints to fix a 
reported issue[1] and to make the behavior more logical to me.


I know that correct selection behavior is something of a personal 
preference, so I'm ready to be flamed :-)


The new behavior:

A footprint may be selected if:
1) The corresponding "Footprints" switch is on in the Items tab, AND
2) One or more of the layers that the footprint draws on is visible

This means that if all of the layers are turned off, footprints are 
not selectable (fixes the bug), but it also means that now footprints 
can be selected if any draw layers are visible (for example, if you 
have only F.Mask enabled, you can select a footprint that has solder 
mask and is on the front layer).


Before anyone complains, this is only if high-contrast mode is turned 
OFF.  When it is on, you can still only select items that *only* exist 
on that layer (to make moving silkscreen around easier, for example)


Even though this adds some more for-loops to selection filtering, I 
have not noticed any performance hits on some selection of large 
boards that I tested.  More testing is welcome.


[1] https://bugs.launchpad.net/kicad/+bug/1751960

-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] Restore some missing visibility items from board file

2018-03-01 Thread Andrzej Wolski

I'm resending a patch from this thread:
https://lists.launchpad.net/kicad-developers/msg34285.html

I believe it should go into rc2?

State of some recently added checkboxes to Render panel was not restored 
on file open. This patch fixes that.


Andrzej

>From 9ccc36e2d0de45175e928bb70f14340392bd35be Mon Sep 17 00:00:00 2001
From: Andrzej Wolski <awolski.ki...@gmail.com>
Date: Sat, 24 Feb 2018 21:51:33 +0100
Subject: [PATCH] Restore some missing visibility items from board file
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="2.7.4"

This is a multi-part message in MIME format.
--2.7.4
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


LAYER_TRACKS, LAYER_PADS_TH and LAYER_NON_PLATEDHOLES
now have their own visibility control, so do not force them on.
---
 include/layers_id_colors_and_visibility.h | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)


--2.7.4
Content-Type: text/x-patch; name="0001-Restore-some-missing-visibility-items-from-board-fil.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Restore-some-missing-visibility-items-from-board-fil.patch"

diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h
index 01b5df9..2cd5d31 100644
--- a/include/layers_id_colors_and_visibility.h
+++ b/include/layers_id_colors_and_visibility.h
@@ -302,10 +302,7 @@ enum GERBVIEW_LAYER_ID: int
 // from a dialog, but have a visibility control flag.
 // Here is a mask to set them visible, to be sure they are displayed
 // after loading a board for instance
-#define MIN_VISIBILITY_MASK int( (1 << GAL_LAYER_INDEX( LAYER_TRACKS ) ) +\
- ( 1 << GAL_LAYER_INDEX( LAYER_PADS_TH ) ) +\
- ( 1 << GAL_LAYER_INDEX( LAYER_PADS_PLATEDHOLES ) ) +\
- ( 1 << GAL_LAYER_INDEX( LAYER_NON_PLATEDHOLES ) ) +\
+#define MIN_VISIBILITY_MASK int( ( 1 << GAL_LAYER_INDEX( LAYER_PADS_PLATEDHOLES ) ) +\
  ( 1 << GAL_LAYER_INDEX( LAYER_VIAS_HOLES ) ) +\
  ( 1 << GAL_LAYER_INDEX( LAYER_DRC ) ) +\
  ( 1 << GAL_LAYER_INDEX( LAYER_GP_OVERLAY ) ) )

--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] Decimal separator characters

2018-02-25 Thread Andrzej Wolski
I wouldn't say it's rare. I have Kicad set to English language, so it 
displays ".", but numeric keyboard on my system puts ",".


Andrzej

W dniu 2018-02-26 o 00:10, Jeff Young pisze:

I think we can close it for now.

The patch only addresses one side of the issue (accepting a ‘.’ in a 
‘,’ locale), but the opposite (typing a ‘,’ in a ‘.’-locale) is 
probably extremely rare.


Cheers,
Jeff.


On 25 Feb 2018, at 20:53, Nick Østergaard > wrote:


I guess this is addressed with Michaels patch in that bug, or are 
there still any open questions?


Den 23. feb. 2018 6.24 PM skrev "Jeff Young" >:


We had a discussion a while back about local-specific decimal
characters in which JP made the point that we don’t have any use
for thousands separators, and so we might as well accept either
separator (. or ,).

I *thought* at the time that it was mentioned that Kicad already
did this, but I can’t find any evidence of it (certainly not in
libEval).

Am I looking in the wrong place?

If not, do we want to make this change?  (It would be a very
simple change in libEval.)

Cheers,
Jeff.

https://bugs.launchpad.net/kicad/+bug/1751315

___
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] Rearrange Render panel of PcbNew layer widget; add spacers

2018-02-25 Thread Andrzej Wolski
There is a similar issue with "New" and "Append Board" operations, but 
it existed way before Jon's improvements.

I've created a bug report, so it not gets lost:
https://bugs.launchpad.net/kicad/+bug/1751589

Andrzej


W dniu 2018-02-23 o 13:18, jp charras pisze:

Le 23/02/2018 à 01:04, Jon Evans a écrit :

Here are two more quick patches addressing some of the easier changes.
I have some other bugs to look at that seem more urgent, so I'm not going to 
work on the right-click
menu or settings persistence.

Thanks,
Jon


Hi Jon,

There is a (minor but annoying) issue about patch:

"Only show microvia and blind/buried via settings if they are enabled"

When I load a board that have microvia and blind/buried vias allowed, the layer 
manager does not
show the microvia and blind/buried vias menuitems.

They are displayed only after opening and closing by OK button the Design Rules 
menu.

(Tested on W7/32bits)




___
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] Rearrange Render panel of PcbNew layer widget; add spacers

2018-02-24 Thread Andrzej Wolski



4. State of some checkboxes is not saved.


Fix for that one in attachment.

Andrzej
>From 9ccc36e2d0de45175e928bb70f14340392bd35be Mon Sep 17 00:00:00 2001
From: Andrzej Wolski <awolski.ki...@gmail.com>
Date: Sat, 24 Feb 2018 21:51:33 +0100
Subject: [PATCH] Restore some missing visibility items from board file
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="2.7.4"

This is a multi-part message in MIME format.
--2.7.4
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


LAYER_TRACKS, LAYER_PADS_TH and LAYER_NON_PLATEDHOLES
now have their own visibility control, so do not force them on.
---
 include/layers_id_colors_and_visibility.h | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)


--2.7.4
Content-Type: text/x-patch; name="0001-Restore-some-missing-visibility-items-from-board-fil.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Restore-some-missing-visibility-items-from-board-fil.patch"

diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h
index 01b5df9..2cd5d31 100644
--- a/include/layers_id_colors_and_visibility.h
+++ b/include/layers_id_colors_and_visibility.h
@@ -302,10 +302,7 @@ enum GERBVIEW_LAYER_ID: int
 // from a dialog, but have a visibility control flag.
 // Here is a mask to set them visible, to be sure they are displayed
 // after loading a board for instance
-#define MIN_VISIBILITY_MASK int( (1 << GAL_LAYER_INDEX( LAYER_TRACKS ) ) +\
- ( 1 << GAL_LAYER_INDEX( LAYER_PADS_TH ) ) +\
- ( 1 << GAL_LAYER_INDEX( LAYER_PADS_PLATEDHOLES ) ) +\
- ( 1 << GAL_LAYER_INDEX( LAYER_NON_PLATEDHOLES ) ) +\
+#define MIN_VISIBILITY_MASK int( ( 1 << GAL_LAYER_INDEX( LAYER_PADS_PLATEDHOLES ) ) +\
  ( 1 << GAL_LAYER_INDEX( LAYER_VIAS_HOLES ) ) +\
  ( 1 << GAL_LAYER_INDEX( LAYER_DRC ) ) +\
  ( 1 << GAL_LAYER_INDEX( LAYER_GP_OVERLAY ) ) )

--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] Fabrication Outputs and Plot

2018-02-24 Thread Andrzej Wolski
Cairo have PDF, SVG and Postscript support. I was once wondering if 
GAL/Cairo could be used for printing.


Andrzej

W dniu 2018-02-24 o 19:24, Jon Evans pisze:
Yeah, there (at least) three different dialogs that all present 
similar things (i.e. a list of layers to include, settings, etc):


Export->SVG
Print
Plot

The Print code for Export->SVG seems to just use the same SVG plotter, 
so maybe it's just mostly GUI cleanup that is needed.


The main Print code does need an overhaul to use something other than 
wxDC for graphics generation (and perhaps adding some more features to 
PDF export)


-Jon

On Sat, Feb 24, 2018 at 1:16 PM, Jeff Young > wrote:


Plot SVG and Export SVG are different.  The former goes through
the Plot code while the later goes through the Print code.

Do we need both?  I haven’t a clue.

It would be nice to clean this stuff up, if there is in fact a
clean way to present it.

Cheers,
Jeff.



On 24 Feb 2018, at 14:54, Jon Evans > wrote:

I agree with this! It has always tripped me up when I switch back
and forth between kicad and other EDA tools.

On Feb 24, 2018 9:31 AM, "Diego Herranz"
> wrote:

Hi,

Now that so much work is happening on re-structuring menus,
I've remembered something I have always found weird on pcbnew.

"Plot", from wihch you can obtain Gerbers is not inside
"Fabrication Outputs", but on its own.
I find it weird to have the drill option inside "Fabrication
Outputs" but not the Gerbers (they are normally needed
together and in fact, you can go to "Drill" from "Plot").

If "Plot" was Gerber only, I would recommend moving it inside
"Fabrication Outputs" straight away but because it also
exports other formats, it's not so straightforward.

I think ideally we would have:

- Fabrication outputs
  - Gerber...
  - Drill
  - ...
- Export
  - STEP
  - PDF...
  - Postcript...
  - DXF...
  - ...

And I have just noticed SVG can be obtained from "Plot" or
the "Export" submenu. Is it the same?

What do you guys think? I'm not necessarily suggesting
looking into this before KiCad 5, just wanted to have your view.

Thanks,
Diego


___
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] Non copper zones

2018-02-23 Thread Andrzej Wolski


 There are a number of missing features in the polygon tool that exist 
in the zone editor.  Adding corners is a large one.




Cutouts would be a big regression. I think gr_poly is a single polygon 
and cannot have cutouts?


Andrzej

___
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] Non copper zones

2018-02-23 Thread Andrzej Wolski

I have just found nice bug in 4.0.
If you first edit copper zone and set corner smoothing to chamfer, then 
you can make non copper zone with chamfered corners:

https://imgur.com/a/GsLn2

Andrzej



W dniu 2018-02-24 o 02:15, Seth Hillbrand pisze:
Playing with the tool some more, I can see that Andrzej is right.  
There are a number of missing features in the polygon tool that exist 
in the zone editor.  Adding corners is a large one.


If you have an existing non-copper zone, it seems you can keep it, 
change its layer, add cut-outs, etc.  Even duplicate to create a new 
one.  But you can't draw a brand new one.


-S

2018-02-23 17:07 GMT-08:00 Andrzej Wolski <awolski.ki...@gmail.com 
<mailto:awolski.ki...@gmail.com>>:



Was it ever possible to run the fill algorithm (meaning, only
fill in parts of a polygon outline, based on some clearance to
other items on the same layer) on a non-copper zone?


No, I didn't mean it was already possible.

Seth, yes I see that dialog too in old builds, but the outline
appearance doesn't do anything (because non-copper zones are
always shown filled, not with an outline)

Zones on paste layer shown in outline::
https://imgur.com/a/5g4cI

Andrzej




___
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] Non copper zones

2018-02-23 Thread Andrzej Wolski


 Does the polygon tool allow you to edit zones on non-copper layers or 
were zones on non-copper layers saved as polygons?  If the latter is 
the case then I'm guessing this change is not significant but if that 
is not the case then there could be some editing issues. 


Zones on non copper layers were saved as zones:

(zone (net 0) (net_name "") (layer F.Mask) (tstamp 0) (hatch edge 0.508)
    (connect_pads (clearance 0.25))
    (min_thickness 0.254)
    (fill yes (arc_segments 16) (thermal_gap 0.508) 
(thermal_bridge_width 0.508))

    ...
  )


While polygons are saved as gr_poly:

(gr_poly (pts (xy 161.19 92.85) (xy 161.19 98.63) (xy 168.14 98.63) (xy 
168.14 93.32)) (layer F.Cu) (width 0.15))


Note that there are nice features in zones like corner smoothing, fill 
mode, priority, etc, which could be easily added to zones on non copper 
layers, while graphic polygons are simple objects and do not have these 
features.


Andrzej

___
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] Non copper zones

2018-02-23 Thread Andrzej Wolski


Was it ever possible to run the fill algorithm (meaning, only fill in 
parts of a polygon outline, based on some clearance to other items on 
the same layer) on a non-copper zone?


No, I didn't mean it was already possible.

Seth, yes I see that dialog too in old builds, but the outline 
appearance doesn't do anything (because non-copper zones are always 
shown filled, not with an outline)

Zones on paste layer shown in outline::
https://imgur.com/a/5g4cI

Andrzej

___
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] Non copper zones

2018-02-23 Thread Andrzej Wolski

I can edit existing zones on non copper layers, but I can't place new one.
What I mean is zones and polygons behave differently and I think they 
both should be there.

But maybe I do not fully understand the intentions.

Andrzej


W dniu 2018-02-24 o 01:37, Wayne Stambaugh pisze:
I'm seeing this as well.  Andrzej, are you sure this is correct?  Can 
you not edit zones on non-copper layers any longer?


On 02/23/2018 07:26 PM, Jon Evans wrote:
I went back to an older version of master (back around September of 
last year) and I can't make a zone on a non-copper layer that behaves 
like a copper zone.  Even when using the zone tool, they behave like 
graphic polygons.
Were you able to do this up until Orson's recent change?  If so, how 
do you do it?


On Fri, Feb 23, 2018 at 7:23 PM, Andrzej Wolski 
<awolski.ki...@gmail.com <mailto:awolski.ki...@gmail.com>> wrote:


    Polygons do work, but they are different kind of object than zones
    and I think they both should be there.

    I think zones suppose to flood, while polygons should be always 
solid.


    Polygons do not currently have "do not show filled".

    There are many designs which already have zones on non coppers
    layers, so Kicad will have to support them anyway, but users won't
    be able to place new ones?

    Also note that there is difference in how zone vs polygon outline is
    drawn. When you draw 10x10mm zone, resulting object will have the
    same dimensions, but polygon will be 10x10mm + outline width.

    Andrzej


    W dniu 2018-02-24 o 00:49, Seth Hillbrand pisze:

    The graphical polygon tool works for non-copper layers.

    Andrzej, does this tool not work?

    -S

    2018-02-23 15:28 GMT-08:00 Wayne Stambaugh <stambau...@gmail.com
    <mailto:stambau...@gmail.com>>:

    Orson,

    Is there any reason not to allow zones to be drawn on
    non-copper layers?
     The changes you made in this commit would seem to indicate
    there was a
    reason not to allow this.  I'm going to hold off on rc1 until
    we get
    this resolved.

    Thanks,

    Wayne

    On 02/23/2018 06:10 PM, Andrzej Wolski wrote:
    > Hello,
    >
    > after this change:
    >
https://git.launchpad.net/kicad/commit/?id=fea71c9f8f02c59a05de19293a8ce5a55432527b
<https://git.launchpad.net/kicad/commit/?id=fea71c9f8f02c59a05de19293a8ce5a55432527b>
    >
    >
    > I can no logner draw zones on non copper layers.
    > Was that intentional?
    >
    > Andrzej
    >
    >
    >
    > ___
    > Mailing list: https://launchpad.net/~kicad-developers
    <https://launchpad.net/%7Ekicad-developers>
    > Post to : kicad-developers@lists.launchpad.net
    <mailto:kicad-developers@lists.launchpad.net>
    > Unsubscribe : https://launchpad.net/~kicad-developers
    <https://launchpad.net/%7Ekicad-developers>
    > More help   : https://help.launchpad.net/ListHelp
    <https://help.launchpad.net/ListHelp>

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




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




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




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




Re: [Kicad-developers] Non copper zones

2018-02-23 Thread Andrzej Wolski


But setting the width of a graphical polygon to 0 removes the size 
issue Andrzej mentioned.


But the you don't have them with rounded corners :)

For filling vs. non-filling, I don't personally see the usefulness in 
having the fill algorithm run over a polygon that will always be 
filled.  But maybe there's a use-case I'm missing?




I didn't mean filling, but displaying in outline mode (hatched, fully 
hatched...)


Andrzej
___
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] Non copper zones

2018-02-23 Thread Andrzej Wolski

What behavior do you mean?
In 4.0 and nightly from few days ago zones on non copper layers:
- have outline drawn like zones, not like graphic polygons (I mean 
difference in size)
- can be displayed in outline mode (hatched, fully hatched etc), 
polygons can't


Moreover, zones have tools like "create corner", "add cutout", "merge", 
while polygons do not.


Andrzej

W dniu 2018-02-24 o 01:26, Jon Evans pisze:
I went back to an older version of master (back around September of 
last year) and I can't make a zone on a non-copper layer that behaves 
like a copper zone.  Even when using the zone tool, they behave like 
graphic polygons.
Were you able to do this up until Orson's recent change? If so, how do 
you do it?


On Fri, Feb 23, 2018 at 7:23 PM, Andrzej Wolski 
<awolski.ki...@gmail.com <mailto:awolski.ki...@gmail.com>> wrote:


Polygons do work, but they are different kind of object than zones
and I think they both should be there.

I think zones suppose to flood, while polygons should be always solid.

Polygons do not currently have "do not show filled".

There are many designs which already have zones on non coppers
layers, so Kicad will have to support them anyway, but users won't
be able to place new ones?

Also note that there is difference in how zone vs polygon outline
is drawn. When you draw 10x10mm zone, resulting object will have
the same dimensions, but polygon will be 10x10mm + outline width.

Andrzej


W dniu 2018-02-24 o 00:49, Seth Hillbrand pisze:

The graphical polygon tool works for non-copper layers.

Andrzej, does this tool not work?

-S

2018-02-23 15:28 GMT-08:00 Wayne Stambaugh <stambau...@gmail.com
<mailto:stambau...@gmail.com>>:

Orson,

Is there any reason not to allow zones to be drawn on
non-copper layers?
 The changes you made in this commit would seem to indicate
there was a
reason not to allow this.  I'm going to hold off on rc1 until
we get
this resolved.

    Thanks,

Wayne

On 02/23/2018 06:10 PM, Andrzej Wolski wrote:
> Hello,
>
> after this change:
>

https://git.launchpad.net/kicad/commit/?id=fea71c9f8f02c59a05de19293a8ce5a55432527b

<https://git.launchpad.net/kicad/commit/?id=fea71c9f8f02c59a05de19293a8ce5a55432527b>
>
>
> I can no logner draw zones on non copper layers.
> Was that intentional?
>
> Andrzej
>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
> Post to : kicad-developers@lists.launchpad.net
<mailto:kicad-developers@lists.launchpad.net>
> Unsubscribe : https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
> More help   : https://help.launchpad.net/ListHelp
<https://help.launchpad.net/ListHelp>

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




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




___
Mailing list: https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
Post to     : kicad-developers@lists.launchpad.net
<mailto:kicad-developers@lists.launchpad.net>
Unsubscribe : https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
More help   : https://help.launchpad.net/ListHelp
<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] Non copper zones

2018-02-23 Thread Andrzej Wolski
Polygons do work, but they are different kind of object than zones and I 
think they both should be there.


I think zones suppose to flood, while polygons should be always solid.

Polygons do not currently have "do not show filled".

There are many designs which already have zones on non coppers layers, 
so Kicad will have to support them anyway, but users won't be able to 
place new ones?


Also note that there is difference in how zone vs polygon outline is 
drawn. When you draw 10x10mm zone, resulting object will have the same 
dimensions, but polygon will be 10x10mm + outline width.


Andrzej


W dniu 2018-02-24 o 00:49, Seth Hillbrand pisze:

The graphical polygon tool works for non-copper layers.

Andrzej, does this tool not work?

-S

2018-02-23 15:28 GMT-08:00 Wayne Stambaugh <stambau...@gmail.com 
<mailto:stambau...@gmail.com>>:


Orson,

Is there any reason not to allow zones to be drawn on non-copper
layers?
 The changes you made in this commit would seem to indicate there
was a
reason not to allow this.  I'm going to hold off on rc1 until we get
this resolved.

Thanks,

Wayne

On 02/23/2018 06:10 PM, Andrzej Wolski wrote:
> Hello,
>
> after this change:
>

https://git.launchpad.net/kicad/commit/?id=fea71c9f8f02c59a05de19293a8ce5a55432527b

<https://git.launchpad.net/kicad/commit/?id=fea71c9f8f02c59a05de19293a8ce5a55432527b>
>
>
> I can no logner draw zones on non copper layers.
> Was that intentional?
>
> Andrzej
>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
> Post to : kicad-developers@lists.launchpad.net
<mailto:kicad-developers@lists.launchpad.net>
> Unsubscribe : https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
> More help   : https://help.launchpad.net/ListHelp
<https://help.launchpad.net/ListHelp>

___
Mailing list: https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
Post to     : kicad-developers@lists.launchpad.net
<mailto:kicad-developers@lists.launchpad.net>
Unsubscribe : https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
More help   : https://help.launchpad.net/ListHelp
<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


[Kicad-developers] Non copper zones

2018-02-23 Thread Andrzej Wolski

Hello,

after this change:
https://git.launchpad.net/kicad/commit/?id=fea71c9f8f02c59a05de19293a8ce5a55432527b

I can no logner draw zones on non copper layers.
Was that intentional?

Andrzej



___
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] Rearrange Render panel of PcbNew layer widget; add spacers

2018-02-23 Thread Andrzej Wolski
Actually that logic was already there, I just fixed hiding non footprint 
items together with pads.


Andrzej

W dniu 2018-02-23 o 21:46, Jon Evans pisze:

I'm fine with renaming to SMD pads.
Right now the logic (implemented by Andrzej, not me by the way) 
assumes that all pads are associated with footprints, and if footprint 
display is turned off, hides pads (SMD and through hole)
Seems like lots of people have different opinions on what those 
switches should do :-)


In my humble opinion, it would make more sense to hide everything 
*but* the pads when you uncheck the footprint boxes, but some other 
people really want the pads to be hidden so they can check for "stray 
traces" under the pads.


So, we can keep tweaking this, but maybe not until after RC1 so we 
stop delaying it any further :-)


-Jon

On Fri, Feb 23, 2018 at 3:38 PM, Jeff Young > wrote:


Hi Jon,

Just playing with the new render palette.  It’s a big improvement.

However, I noted that turning off Footprints turns off
through-hole pads.  Since we have a separate option for that, it’s
counter-intuitive to have Footprints also control it.  (And, when
one wants to see the copper and nothing else, you want pads
without footprints.)

Also, it’s easy to think Front Pads or Back Pads should show
them.  I understand the distinction, but shouldn’t we name them
Front SMD Pads and Back SMD Pads to make it clearer?

Cheers,
Jeff.

> On 23 Feb 2018, at 15:35, jp charras > wrote:
>
> Le 23/02/2018 à 16:12, Jon Evans a écrit :
>> You can commit that, but I can't quite tell why there are two
different functions ReFillRender() and
>> SyncRenderStates(); they do mostly the same thing so it seems
best to just collapse them into one to
>> avoid bugs in the future.
>> The attached patch removes SyncRenderStates -- please let me
know if this makes sense to you also.
>>
>> Thanks,
>> -Jon
>>
>
> I committed you patch.
>
> It makes sense to me, and this is the right way to fix this issue.
> Sometimes code cleanup is needed.
>
> Thanks.
>
>>
>> On Fri, Feb 23, 2018 at 10:05 AM, jp charras

>>
>> wrote:
>>
>>    Le 23/02/2018 à 15:57, Jon Evans a écrit :
>>> If you add a call to ReFillRender() at the top of
PCB_LAYER_WIDGET::SyncRenderStates() instead of my
>>> change, does it fix it?
>>>
>>
>>    Yes, just adding the call fixes this issue.
>>    Can I commit this fix?
>>
>>
>>> On Fri, Feb 23, 2018 at 9:54 AM, jp charras

>>    >  >> wrote:
>>>
>>>      Le 23/02/2018 à 14:24, Jon Evans a écrit :
>>>      > Hi JP, good catch, the attached fixes it for me
>>>      >
>>>      > -Jon
>>>      >
>>>      > On Fri, Feb 23, 2018 at 7:18 AM, jp charras

>
>>>       >>
>>    
>

>>    
>>>      > wrote:
>>>      >
>>>      >     Le 23/02/2018 à 01:04, Jon Evans a écrit :
>>>      >     > Here are two more quick patches addressing some
of the easier changes.
>>>      >     > I have some other bugs to look at that seem more
urgent, so I'm not going to work
>>    on the right-click
>>>      >     > menu or settings persistence.
>>>      >     >
>>>      >     > Thanks,
>>>      >     > Jon
>>>      >     >
>>>      >
>>>      >     Hi Jon,
>>>      >
>>>      >     There is a (minor but annoying) issue about patch:
>>>      >
>>>      >     "Only show microvia and blind/buried via settings
if they are enabled"
>>>      >
>>>      >     When I load a board that have microvia and
blind/buried vias allowed, the layer
>>    manager does not
>>>      >     show the microvia and blind/buried vias menuitems.
>>>      >
>>>      >     They are displayed only after opening and closing
by OK button the Design Rules menu.
>>>      >
>>>      >     (Tested on W7/32bits)
 

Re: [Kicad-developers] [PATCH] Rearrange Render panel of PcbNew layer widget; add spacers

2018-02-22 Thread Andrzej Wolski
I agree. I think layer visibility data should be saved in board file 
because that file should be independent of project file and any other 
files. I would like to be able to send only pcb file via email, and have 
all information contained there.


Some solution to problem Andy described might be not to mark board 
modified if only layer visibility was changed.


Both Altium and Kicad have small hole here: board is not marked modified 
if you flip view or enable high contrast mode, but it is marked if you 
enable/disable some layer :)


Andrzej


On 02/22/2018 06:48 PM, Jon Evans wrote:
The tradeoff there is that other users will have a workflow that 
involves setting up a nice set of layers displayed/hidden for working 
on a board, and want to switch to another set for another board.
Maybe saving in the app preferences is okay in the short term, but I 
think eventually it's best to be able to save custom display states 
(including layer visibility and other options) in the project.
Other software has solved this problem by making multiple project 
files, and having the idea of the "base" project file and the "user 
settings" project file, with the latter explicitly not going in to 
version control.


-Jon

On Thu, Feb 22, 2018 at 12:15 PM, Andy Peters <de...@latke.net 
<mailto:de...@latke.net>> wrote:



On Feb 22, 2018, at 7:58 AM, Jon Evans <j...@craftyjon.com
<mailto:j...@craftyjon.com>> wrote:


Currently some of the render visibility stuff is saved in the
application preferences, and some is not saved.
I think if there are layers related to board item visibility that
aren't saved, saving them in the project or board makes more
sense than saving in the app config.


User perspective:

Saving the render visibility in the project or pcb file “touches”
that file, so Kicad will want to save the file when you close the
project or PCB. And then your source-code control system thinks
that the file has been modified (because it was!). This sort of
change has nothing to do with the design, it is only a
rendering/display detail.

A common example: I often use pcbnew (or Altium, it has the same
problem) to view a design, without intending to actually modify
it. And when doing that, I often change layer visibility and such.
When closing the pcb file, the user will be asked to save the
file. “But all I did was look at different layers .. I didn’t
change the design!”

So, please, don’t keep layer visibility/rendering information in
the pcb or project file!

-a



Re. 3, yes I think that same framework could be used to add some
shortcuts for the "render" side pretty easily.

Re. 2, seems reasonable, haven't looked at the code yet

I can probably tackle this but can also leave it to Andrzej if
you are interested in it.

@Wayne I guess the first patch can be merged now if you are OK
with it, since Jeff isn't worried about conflicts?

-Jon

On Thu, Feb 22, 2018 at 9:53 AM, Wayne Stambaugh
<stambau...@gmail.com <mailto:stambau...@gmail.com>> wrote:

On 2/22/2018 9:10 AM, Andrzej Wolski wrote:
> If some work on Render panel is still being done, I would
have some
> suggestions:
> 1. "Text Front" and "Text Back" should be renamed to
something like
> "Footpr. Text Front" It is misleading now.

I'm fine with this but please do not abbreviate the word
footprint.

> 2. "Bl/Bburied Via" and "Micro Via" could be hidden if they
are disabled
> in design settings.

This makes sense as long as you do not couple the layer
manager UI code
to the board object code.

> 3. It would be nice to have right click menu with something
like:
>     "Show all footprint related"
>     "Hide all footprint related"
>     "Show all free primitives"
>     "Hide all free primitives"
>     "Show all other???"
>     "Hide all other???"
>     "Show all"
>     "Hide all"

Don't we already have something like this in the layer
manager (see
attached image)?

> 4. State of some checkboxes is not saved.

I think only the layer visibility states are saved in the
board file.  I
would rather not add any more non-board related information
the board
file format than is already there.  This state information
could be
saved in the project file or the application config file.  My
preference
is the project file but it's not a strong preference.

>
> If you can't, I cou

Re: [Kicad-developers] [PATCH] Rearrange Render panel of PcbNew layer widget; add spacers

2018-02-22 Thread Andrzej Wolski
I won't be able to do it before weekend, so if you have time, please go 
ahead.


Cheers,
Andrzej


On 02/22/2018 03:58 PM, Jon Evans wrote:
Currently some of the render visibility stuff is saved in the 
application preferences, and some is not saved.
I think if there are layers related to board item visibility that 
aren't saved, saving them in the project or board makes more sense 
than saving in the app config.


Re. 3, yes I think that same framework could be used to add some 
shortcuts for the "render" side pretty easily.


Re. 2, seems reasonable, haven't looked at the code yet

I can probably tackle this but can also leave it to Andrzej if you are 
interested in it.


@Wayne I guess the first patch can be merged now if you are OK with 
it, since Jeff isn't worried about conflicts?


-Jon

On Thu, Feb 22, 2018 at 9:53 AM, Wayne Stambaugh <stambau...@gmail.com 
<mailto:stambau...@gmail.com>> wrote:


On 2/22/2018 9:10 AM, Andrzej Wolski wrote:
> If some work on Render panel is still being done, I would have some
> suggestions:
> 1. "Text Front" and "Text Back" should be renamed to something like
> "Footpr. Text Front" It is misleading now.

I'm fine with this but please do not abbreviate the word footprint.

> 2. "Bl/Bburied Via" and "Micro Via" could be hidden if they are
disabled
> in design settings.

This makes sense as long as you do not couple the layer manager UI
code
to the board object code.

> 3. It would be nice to have right click menu with something like:
>     "Show all footprint related"
>     "Hide all footprint related"
>     "Show all free primitives"
>     "Hide all free primitives"
>     "Show all other???"
>     "Hide all other???"
>     "Show all"
>     "Hide all"

Don't we already have something like this in the layer manager (see
attached image)?

> 4. State of some checkboxes is not saved.

I think only the layer visibility states are saved in the board
file.  I
would rather not add any more non-board related information the board
file format than is already there.  This state information could be
saved in the project file or the application config file. My
preference
is the project file but it's not a strong preference.

>
> If you can't, I could do some of these changes (if it's not too
late for
> them).
>
> Cheers,
> Andrzej
>
>
> W dniu 2018-02-22 o 05:39, Jon Evans pisze:
>> Hi all,
>>
>> This patch rearranges the Render panel to be in a more logical
order,
>> and adds some whitespace.
>> I divided it into three groupings:
>> 1) footprint related
>> 2) other board objects
>> 3) non-board stuff like grid, ratlines, etc.
>>
>> I also bumped out the default size so that scrollbars aren't
needed by
>> default on my Linux system.
>>
>> -Jon
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
>> Post to     : kicad-developers@lists.launchpad.net
<mailto:kicad-developers@lists.launchpad.net>
>> Unsubscribe : https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
>> More help   : https://help.launchpad.net/ListHelp
<https://help.launchpad.net/ListHelp>
>
>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
> Post to     : kicad-developers@lists.launchpad.net
<mailto:kicad-developers@lists.launchpad.net>
> Unsubscribe : https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
> More help   : https://help.launchpad.net/ListHelp
<https://help.launchpad.net/ListHelp>
>

___
Mailing list: https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
Post to     : kicad-developers@lists.launchpad.net
<mailto:kicad-developers@lists.launchpad.net>
Unsubscribe : https://launchpad.net/~kicad-developers
<https://launchpad.net/%7Ekicad-developers>
More help   : https://help.launchpad.net/ListHelp
<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] Rearrange Render panel of PcbNew layer widget; add spacers

2018-02-22 Thread Andrzej Wolski



3. It would be nice to have right click menu with something like:
     "Show all footprint related"
     "Hide all footprint related"
     "Show all free primitives"
     "Hide all free primitives"
     "Show all other???"
     "Hide all other???"
     "Show all"
     "Hide all"

Don't we already have something like this in the layer manager (see
attached image)?


Yes, but Render tab should have separate menu.




4. State of some checkboxes is not saved.

I think only the layer visibility states are saved in the board file.  I
would rather not add any more non-board related information the board
file format than is already there.  This state information could be
saved in the project file or the application config file.  My preference
is the project file but it's not a strong preference.


Checkboxes which do not preserve state are: Through Hole Pads, Tracks, 
Non Plated Holes.
They all have separate layers, which I think are already in bitfield in 
a board file, so that won't be a problem.


I did not check if all colors are preserved.

Cheers,
Andrzej


___
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] [RFC] Change to object visibility system for usability/clarity

2018-02-22 Thread Andrzej Wolski

Hi Jeff,

I mean tracks hidden with "Tracks" checkbox in Render tab.

Cheers,
Andrzej

W dniu 2018-02-22 o 16:39, Jeff Young pisze:

Hi Andrzej,

If you mean tracks under footprints, I think that’s already been fixed.  See 
https://bugs.launchpad.net/kicad/+bug/1646339.

Cheers,
Jeff.



On 22 Feb 2018, at 13:43, Andrzej Wolski <awolski.ki...@gmail.com> wrote:

Wayne,

thanks for merging. I have a complementary patch that fixes problem with 
selecting hidden tracks.

Cheers,
Andrzej


On 02/21/2018 08:40 PM, Wayne Stambaugh wrote:

Andrzej,

I merged your patches.  Hopefully this will tamp down some of the layer
visibility complaints.  Thank you for your contribution to KiCad.

Cheers,

Wayne

On 2/21/2018 12:44 PM, Andrzej Wolski wrote:

Wayne,

in attachment all 3 patches I have, rebased.

Cheers,
Andrzej


On 02/21/2018 05:45 PM, Wayne Stambaugh wrote:

Andrzej,

This patch does not apply cleanly.  Please rebase and resubmit it when
you get a chance.

Thanks,

Wayne

On 2/21/2018 11:27 AM, Andrzej Wolski wrote:

Wayne,

I have attached that patch to bug report whom which you messaged me,
thought you will see it.

I'm attaching it again in this email.

Cheers,
Andrzej


On 02/21/2018 05:20 PM, Wayne Stambaugh wrote:

Andrzej,

You have not replied to my last message about your original patch that
you sent to the developers mailing list[1].  I need that one so I can
apply and test the rest of your layer visibility patches.  If you want
these to make it into rc1, please send me this patch as an attachment
soon.  I am planning to branch rc1 by Friday at the latest.

Cheers,

Wayne


[1]: https://lists.launchpad.net/kicad-developers/msg34009.html

On 2/19/2018 10:05 AM, Andrzej Wolski wrote:

Patch (in attachment) for "Tracks" turned out to be very simple.
If it gets accepted, I could make more of these.

Andrzej


On 02/19/2018 02:12 PM, Andrzej Wolski wrote:

It would be also nice to have separate controls for:
1. Tracks
2. Drawing primitives (graphic lines, arcs, and circles)
3. Zones
4. Polygons
5. Text (now there is control only for footprint text)
6. Dimensions
7. Plated holes

That would make Render tab (almost) complete.

Andrzej

W dniu 2018-02-18 o 21:00, Jon Evans pisze:

Hi all,

Right now the behavior of the "Layer" and "Render" tabs of the
layers
widget are confusing to users, resulting in complaints on the forum
and some bug reports:

https://bugs.launchpad.net/kicad/+bug/1748181
https://bugs.launchpad.net/kicad/+bug/1743890

I could take a crack at fixing this (before or after 5.0
depending on
what the complexity ends up being) but before I write any code I
wanted to propose how I think it should work.

I think the visibility of any object should be the AND of layer
visibility and render visibility.

To get there:

1) In the Render tab, get rid of the distinction between front/back.
For example "Pads Back" and "Pads Front" becomes just "Pads"

2) Change the visibility code so that an object is visible if (a)
the
associated Render setting is turned on for the type of object, and
(b) at least one of the layers the object is on is enabled in the
Layers tab.

3) (optionally) Rename "Render" to something more friendly like
"Items" or "Item Types" to make it more clear to the user that this
is where they can turn off the display of various types of items as
opposed to various layerse

If this plan is OK, I will start working out the details of how to
get there.  Right now the Render tab is directly controlling the
visibility of certain "GAL Layers" but unfortunately the set of
objects that appears on one GAL layer is not always equal to the set
of objects that the user would expect to turn on and off, as seen by
the bug reports.  So, there will have to be some additional logic
created to manage these settings beyond just turning on and off
layers in the GAL.

-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


___
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

<0001-Do-not-allow-selecting-tracks-if-they-are-hidden.patch>___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kica

Re: [Kicad-developers] [PATCH] Rearrange Render panel of PcbNew layer widget; add spacers

2018-02-22 Thread Andrzej Wolski
If some work on Render panel is still being done, I would have some 
suggestions:
1. "Text Front" and "Text Back" should be renamed to something like 
"Footpr. Text Front" It is misleading now.
2. "Bl/Bburied Via" and "Micro Via" could be hidden if they are disabled 
in design settings.

3. It would be nice to have right click menu with something like:
    "Show all footprint related"
    "Hide all footprint related"
    "Show all free primitives"
    "Hide all free primitives"
    "Show all other???"
    "Hide all other???"
    "Show all"
    "Hide all"
4. State of some checkboxes is not saved.

If you can't, I could do some of these changes (if it's not too late for 
them).


Cheers,
Andrzej


W dniu 2018-02-22 o 05:39, Jon Evans pisze:

Hi all,

This patch rearranges the Render panel to be in a more logical order, 
and adds some whitespace.

I divided it into three groupings:
1) footprint related
2) other board objects
3) non-board stuff like grid, ratlines, etc.

I also bumped out the default size so that scrollbars aren't needed by 
default on my Linux system.


-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] [RFC] Change to object visibility system for usability/clarity

2018-02-22 Thread Andrzej Wolski

Wayne,

thanks for merging. I have a complementary patch that fixes problem with 
selecting hidden tracks.


Cheers,
Andrzej


On 02/21/2018 08:40 PM, Wayne Stambaugh wrote:

Andrzej,

I merged your patches.  Hopefully this will tamp down some of the layer
visibility complaints.  Thank you for your contribution to KiCad.

Cheers,

Wayne

On 2/21/2018 12:44 PM, Andrzej Wolski wrote:

Wayne,

in attachment all 3 patches I have, rebased.

Cheers,
Andrzej


On 02/21/2018 05:45 PM, Wayne Stambaugh wrote:

Andrzej,

This patch does not apply cleanly.  Please rebase and resubmit it when
you get a chance.

Thanks,

Wayne

On 2/21/2018 11:27 AM, Andrzej Wolski wrote:

Wayne,

I have attached that patch to bug report whom which you messaged me,
thought you will see it.

I'm attaching it again in this email.

Cheers,
Andrzej


On 02/21/2018 05:20 PM, Wayne Stambaugh wrote:

Andrzej,

You have not replied to my last message about your original patch that
you sent to the developers mailing list[1].  I need that one so I can
apply and test the rest of your layer visibility patches.  If you want
these to make it into rc1, please send me this patch as an attachment
soon.  I am planning to branch rc1 by Friday at the latest.

Cheers,

Wayne


[1]: https://lists.launchpad.net/kicad-developers/msg34009.html

On 2/19/2018 10:05 AM, Andrzej Wolski wrote:

Patch (in attachment) for "Tracks" turned out to be very simple.
If it gets accepted, I could make more of these.

Andrzej


On 02/19/2018 02:12 PM, Andrzej Wolski wrote:

It would be also nice to have separate controls for:
1. Tracks
2. Drawing primitives (graphic lines, arcs, and circles)
3. Zones
4. Polygons
5. Text (now there is control only for footprint text)
6. Dimensions
7. Plated holes

That would make Render tab (almost) complete.

Andrzej

W dniu 2018-02-18 o 21:00, Jon Evans pisze:

Hi all,

Right now the behavior of the "Layer" and "Render" tabs of the
layers
widget are confusing to users, resulting in complaints on the forum
and some bug reports:

https://bugs.launchpad.net/kicad/+bug/1748181
https://bugs.launchpad.net/kicad/+bug/1743890

I could take a crack at fixing this (before or after 5.0
depending on
what the complexity ends up being) but before I write any code I
wanted to propose how I think it should work.

I think the visibility of any object should be the AND of layer
visibility and render visibility.

To get there:

1) In the Render tab, get rid of the distinction between front/back.
For example "Pads Back" and "Pads Front" becomes just "Pads"

2) Change the visibility code so that an object is visible if (a)
the
associated Render setting is turned on for the type of object, and
(b) at least one of the layers the object is on is enabled in the
Layers tab.

3) (optionally) Rename "Render" to something more friendly like
"Items" or "Item Types" to make it more clear to the user that this
is where they can turn off the display of various types of items as
opposed to various layerse

If this plan is OK, I will start working out the details of how to
get there.  Right now the Render tab is directly controlling the
visibility of certain "GAL Layers" but unfortunately the set of
objects that appears on one GAL layer is not always equal to the set
of objects that the user would expect to turn on and off, as seen by
the bug reports.  So, there will have to be some additional logic
created to manage these settings beyond just turning on and off
layers in the GAL.

-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


___
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 225e8641fbeffd39f7e2e17cff397a0a70cf22cf Mon Sep 17 00:00:00 2001
From: Andrzej Wolski <awolski.ki...@gmail.com>
Date: Thu, 22 Feb 2018 07:53:16 +0100
Subject: [PATCH 1/2] Do not allow selecting tracks if they are hidden
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="2.7.4"

This is a multi-part message in MIME format.
--2.7.4
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


This is a complementary patch to dbafdd39.
---
 pcbnew/collectors.cpp   |  2 ++
 pcbnew/collectors.h | 10 ++
 pcbnew/pcb_base_frame.c

Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-22 Thread Andrzej Wolski

It works fine now, thanks.

Andrzej

W dniu 2018-02-22 o 02:46, Jon Evans pisze:

Here's a patch that fixes the issues observed.
I have changed the algorithm to a simpler one that should be more 
bulletproof.
I think the optimal approach for complicated footprints is still not 
this way, but that would require more time to tweak and optimize (i.e. 
generating some kind of bounding hull that is non-convex, and caching 
it until the shape changes)


You can see the new patch on Andrzej's test files here:
https://imgur.com/a/L16ky
Purple shows the bounding boxes, yellow shows the selectable area 
under the new algorithm.

​
-Jon

On Wed, Feb 21, 2018 at 1:41 PM, Wayne Stambaugh <stambau...@gmail.com 
<mailto:stambau...@gmail.com>> wrote:


If you could get it done by Friday before I roll out rc1, that's fine.

Wayne

On 2/21/2018 1:37 PM, Jon Evans wrote:
> I'll be able to look at it this evening.  Can report then
whether or not
> I will have a patch tonight.  Up to you whether or not that is
too long
> of a delay.
>
> -Jon
>
> On Wed, Feb 21, 2018 at 1:32 PM, Wayne Stambaugh
<stambau...@gmail.com <mailto:stambau...@gmail.com>
> <mailto:stambau...@gmail.com <mailto:stambau...@gmail.com>>> wrote:
>
>     Jon,
>
>     Would you please take a look at this as soon as possible? 
If you cannot
>     get to it in a reasonable amount of time, please let me know
so I can
>     back out your polygon hit test patch.  We need to be able to
select
>     footprints.
>
    >     Thanks,
>
>     Wayne
>
>     On 2/21/2018 11:41 AM, Andrzej Wolski wrote:
>     > After this patch, I can no longer select some footprints
by clicking
>     > inside their area.
>     > Please see the board in an attachment.
>     >
>     > Andrzej
>     >
>     > W dniu 2018-02-20 o 16:44, Wayne Stambaugh pisze:
>     >> Jon,
>     >>
>     >> I merged your patch.
>     >>
>     >> Thanks,
>     >>
>     >> Wayne
>     >>
>     >> On 2/18/2018 7:01 PM, Jon Evans wrote:
>     >>> Hi Wayne,
>     >>>
>     >>> In my testing there is no performance impact, but more
testing is
>     >>> welcome.  It shouldn't be doing the calculation on too many
>     objects in
>     >>> general, since this is a "second pass" hit test that
applies to
>     modules
>     >>> that have a bounding box overlapping the mouse cursor.
>     >>> However, I did some more testing and discovered some weird
>     behavior, so
>     >>> I have tweaked the algorithm in the attached new version
of the
>     patch.
>     >>>
>     >>> -Jon
>     >>>
>     >>> On Sun, Feb 18, 2018 at 5:25 PM, Wayne Stambaugh
>     <stambau...@gmail.com <mailto:stambau...@gmail.com>
<mailto:stambau...@gmail.com <mailto:stambau...@gmail.com>>
>     >>> <mailto:stambau...@gmail.com
<mailto:stambau...@gmail.com> <mailto:stambau...@gmail.com
<mailto:stambau...@gmail.com>>>> wrote:
>     >>>
>     >>>  Hey Jon,
>     >>>
>     >>>  Did you notice an performance hit with your patch?
>     Obviously there
>     >>>  is going to be more overhead calculating a polygon
versus a
>     >>>  rectangle.  I just want to be sure we are not
causing any
>     usability
>     >>>  issues due to the polygon calculations.
>     >>>
>     >>>  Thanks,
>     >>>
>     >>>  Wayne
>     >>>
>     >>>
>     >>>  On 02/18/2018 12:10 PM, Jon Evans wrote:
>     >>>
>     >>>  Hi all,
>     >>>
>     >>>  The attached patch adds some plumbing to
calculate and
>     make use
>     >>>  of a polygonal bounding area for modules.  It
fixes the
>     below
>     >>>  issue and in general improves the accuracy of
selection
>     in my
>     >>>  testing.
>     >>>
>     >>>  This mechanism could be extended to other
objects besides
>     >>>  modules if it's useful. I figured I'

Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-21 Thread Andrzej Wolski

Seems to happen when there is no closed outline drawn in the footprint.
Another test cases in an attachment.

Andrzej

W dniu 2018-02-21 o 17:41, Andrzej Wolski pisze:
After this patch, I can no longer select some footprints by clicking 
inside their area.

Please see the board in an attachment.

Andrzej

W dniu 2018-02-20 o 16:44, Wayne Stambaugh pisze:

Jon,

I merged your patch.

Thanks,

Wayne

On 2/18/2018 7:01 PM, Jon Evans wrote:

Hi Wayne,

In my testing there is no performance impact, but more testing is
welcome.  It shouldn't be doing the calculation on too many objects in
general, since this is a "second pass" hit test that applies to modules
that have a bounding box overlapping the mouse cursor.
However, I did some more testing and discovered some weird behavior, so
I have tweaked the algorithm in the attached new version of the patch.

-Jon

On Sun, Feb 18, 2018 at 5:25 PM, Wayne Stambaugh <stambau...@gmail.com
<mailto:stambau...@gmail.com>> wrote:

 Hey Jon,

 Did you notice an performance hit with your patch? Obviously there
 is going to be more overhead calculating a polygon versus a
 rectangle.  I just want to be sure we are not causing any 
usability

 issues due to the polygon calculations.

 Thanks,

 Wayne


 On 02/18/2018 12:10 PM, Jon Evans wrote:

 Hi all,

 The attached patch adds some plumbing to calculate and make 
use

 of a polygonal bounding area for modules.  It fixes the below
 issue and in general improves the accuracy of selection in my
 testing.

 This mechanism could be extended to other objects besides
 modules if it's useful.  I figured I'd start by sending out 
this

 patch to get feedback, and if it gets merged, look for other
 areas where we could improve things by using polygons 
instead of

 bounding boxes.

 https://bugs.launchpad.net/kicad/+bug/1749077
 <https://bugs.launchpad.net/kicad/+bug/1749077>

 -Jon


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


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



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





(kicad_pcb (version 20171130) (host pcbnew "(5.0-dev-4108-g1013f8160)")

  (general
(thickness 1.6)
(drawings 0)
(tracks 0)
(zones 0)
(modules 3)
(nets 1)
  )

  (page A4)
  (layers
(0 F.Cu signal)
(31 B.Cu signal)
(32 B.Adhes user)
(33 F.Adhes user)
(34 B.Paste user)
(35 F.Paste user)
(36 B.SilkS user)
(37 F.SilkS user)
(38 B.Mask user)
(39 F.Mask user)
(40 Dwgs.User user)
(41 Cmts.User user)
(42 Eco1.User user)
(43 Eco2.User user)
(44 Edge.Cuts user)
(45 Margin user)
(46 B.CrtYd user)
(47 F.CrtYd user)
(48 B.Fab user)
(49 F.Fab user)
  )

  (setup
(last_trace_width 0.25)
(trace_clearance 0.2)
(zone_clearance 0.508)
(zone_45_only no)
(trace_min 0.2)
(segment_width 0.2)
(edge_width 0.15)
(via_size 0.8)
(via_drill 0.4)
(via_min_size 0.4)
(via_min_drill 0.3)
(uvia_size 0.3)
(uvia_drill 0.1)
(uvias_allowed no)
(uvia_min_size 0.2)
(uvia_min_drill 0.1)
(pcb_text_width 0.3)
(pcb_text_size 1.5 1.5)
(mod_edge_width 0.15)
(mod_text_size 1 1)
(mod_text_width 0.15)
(pad_size 1.524 1.524)
(pad_drill 0.762)
(pad_to_mask_clearance 0.2)
(aux_axis_origin 0 0)
(visible_elements EF7F)
(pcbplotparams
  (layerselection 0x010fc_)
  (usegerberextensions false)
  (usegerberattributes false)
  (usegerberadvancedattributes false)
  (creategerberjobfile false)
  (excludeedgelayer true)
  (linewidth 0.10)
  (plotframeref false)
  (viasonmask false)
  (mode 1)
  (useauxo

Re: [Kicad-developers] [RFC] Change to object visibility system for usability/clarity

2018-02-21 Thread Andrzej Wolski

Wayne,

in attachment all 3 patches I have, rebased.

Cheers,
Andrzej


On 02/21/2018 05:45 PM, Wayne Stambaugh wrote:

Andrzej,

This patch does not apply cleanly.  Please rebase and resubmit it when
you get a chance.

Thanks,

Wayne

On 2/21/2018 11:27 AM, Andrzej Wolski wrote:

Wayne,

I have attached that patch to bug report whom which you messaged me,
thought you will see it.

I'm attaching it again in this email.

Cheers,
Andrzej


On 02/21/2018 05:20 PM, Wayne Stambaugh wrote:

Andrzej,

You have not replied to my last message about your original patch that
you sent to the developers mailing list[1].  I need that one so I can
apply and test the rest of your layer visibility patches.  If you want
these to make it into rc1, please send me this patch as an attachment
soon.  I am planning to branch rc1 by Friday at the latest.

Cheers,

Wayne


[1]: https://lists.launchpad.net/kicad-developers/msg34009.html

On 2/19/2018 10:05 AM, Andrzej Wolski wrote:

Patch (in attachment) for "Tracks" turned out to be very simple.
If it gets accepted, I could make more of these.

Andrzej


On 02/19/2018 02:12 PM, Andrzej Wolski wrote:

It would be also nice to have separate controls for:
1. Tracks
2. Drawing primitives (graphic lines, arcs, and circles)
3. Zones
4. Polygons
5. Text (now there is control only for footprint text)
6. Dimensions
7. Plated holes

That would make Render tab (almost) complete.

Andrzej

W dniu 2018-02-18 o 21:00, Jon Evans pisze:

Hi all,

Right now the behavior of the "Layer" and "Render" tabs of the layers
widget are confusing to users, resulting in complaints on the forum
and some bug reports:

https://bugs.launchpad.net/kicad/+bug/1748181
https://bugs.launchpad.net/kicad/+bug/1743890

I could take a crack at fixing this (before or after 5.0 depending on
what the complexity ends up being) but before I write any code I
wanted to propose how I think it should work.

I think the visibility of any object should be the AND of layer
visibility and render visibility.

To get there:

1) In the Render tab, get rid of the distinction between front/back.
For example "Pads Back" and "Pads Front" becomes just "Pads"

2) Change the visibility code so that an object is visible if (a) the
associated Render setting is turned on for the type of object, and
(b) at least one of the layers the object is on is enabled in the
Layers tab.

3) (optionally) Rename "Render" to something more friendly like
"Items" or "Item Types" to make it more clear to the user that this
is where they can turn off the display of various types of items as
opposed to various layerse

If this plan is OK, I will start working out the details of how to
get there.  Right now the Render tab is directly controlling the
visibility of certain "GAL Layers" but unfortunately the set of
objects that appears on one GAL layer is not always equal to the set
of objects that the user would expect to turn on and off, as seen by
the bug reports.  So, there will have to be some additional logic
created to manage these settings beyond just turning on and off
layers in the GAL.

-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


___
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 7b764ae730d80feac0c2c4560359fb2cdaa32b1d Mon Sep 17 00:00:00 2001
From: Andrzej Wolski <awolski.ki...@gmail.com>
Date: Sat, 17 Feb 2018 19:03:22 +0100
Subject: [PATCH 1/3] Fix pads and footprints rendering switches behavior
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="2.7.4"

This is a multi-part message in MIME format.
--2.7.4
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


Pads and footprints rendering switches in Render tab were working incorrectly, as described in bug report:
https://bugs.launchpad.net/kicad/+bug/1743890

This patch fixes it and makes GAL behave as the legacy canvas.

Fixes: lp:1743890
---
 pcbnew/class_edge_mod.cpp | 26 ++
 pcbnew/class_edge_mod.h   |  3 +++
 pcbnew/class_pad.cpp  | 22 +-
 pcbnew/class_text_mod.cpp | 31 ++-
 pcbnew/class_text_mod.h   |  2 ++
 pcbnew/pcb_draw_panel_gal.cpp |

Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-21 Thread Andrzej Wolski
After this patch, I can no longer select some footprints by clicking 
inside their area.

Please see the board in an attachment.

Andrzej

W dniu 2018-02-20 o 16:44, Wayne Stambaugh pisze:

Jon,

I merged your patch.

Thanks,

Wayne

On 2/18/2018 7:01 PM, Jon Evans wrote:

Hi Wayne,

In my testing there is no performance impact, but more testing is
welcome.  It shouldn't be doing the calculation on too many objects in
general, since this is a "second pass" hit test that applies to modules
that have a bounding box overlapping the mouse cursor.
However, I did some more testing and discovered some weird behavior, so
I have tweaked the algorithm in the attached new version of the patch.

-Jon

On Sun, Feb 18, 2018 at 5:25 PM, Wayne Stambaugh > wrote:

 Hey Jon,

 Did you notice an performance hit with your patch?  Obviously there
 is going to be more overhead calculating a polygon versus a
 rectangle.  I just want to be sure we are not causing any usability
 issues due to the polygon calculations.

 Thanks,

 Wayne


 On 02/18/2018 12:10 PM, Jon Evans wrote:

 Hi all,

 The attached patch adds some plumbing to calculate and make use
 of a polygonal bounding area for modules.  It fixes the below
 issue and in general improves the accuracy of selection in my
 testing.

 This mechanism could be extended to other objects besides
 modules if it's useful.  I figured I'd start by sending out this
 patch to get feedback, and if it gets merged, look for other
 areas where we could improve things by using polygons instead of
 bounding boxes.

 https://bugs.launchpad.net/kicad/+bug/1749077
 

 -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
 



___
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_pcb (version 20171130) (host pcbnew "(5.0-dev-4108-g1013f8160)")

  (general
(thickness 1.6)
(drawings 0)
(tracks 0)
(zones 0)
(modules 2)
(nets 1)
  )

  (page A4)
  (layers
(0 F.Cu signal)
(31 B.Cu signal)
(32 B.Adhes user hide)
(33 F.Adhes user hide)
(34 B.Paste user hide)
(35 F.Paste user hide)
(36 B.SilkS user hide)
(37 F.SilkS user)
(38 B.Mask user hide)
(39 F.Mask user hide)
(40 Dwgs.User user)
(41 Cmts.User user)
(42 Eco1.User user)
(43 Eco2.User user)
(44 Edge.Cuts user)
(45 Margin user)
(46 B.CrtYd user)
(47 F.CrtYd user)
(48 B.Fab user)
(49 F.Fab user)
  )

  (setup
(last_trace_width 0.25)
(trace_clearance 0.2)
(zone_clearance 0.508)
(zone_45_only no)
(trace_min 0.2)
(segment_width 0.2)
(edge_width 0.15)
(via_size 0.8)
(via_drill 0.4)
(via_min_size 0.4)
(via_min_drill 0.3)
(uvia_size 0.3)
(uvia_drill 0.1)
(uvias_allowed no)
(uvia_min_size 0.2)
(uvia_min_drill 0.1)
(pcb_text_width 0.3)
(pcb_text_size 1.5 1.5)
(mod_edge_width 0.15)
(mod_text_size 1 1)
(mod_text_width 0.15)
(pad_size 1.524 1.524)
(pad_drill 0.762)
(pad_to_mask_clearance 0.2)
(aux_axis_origin 0 0)
(visible_elements EF7F)
(pcbplotparams
  (layerselection 0x010fc_)
  (usegerberextensions false)
  (usegerberattributes false)
  (usegerberadvancedattributes false)
  (creategerberjobfile false)
  (excludeedgelayer true)
  (linewidth 0.15)
  (plotframeref false)
  (viasonmask false)
  (mode 1)
  (useauxorigin false)
  (hpglpennumber 1)
  (hpglpenspeed 20)
  (hpglpendiameter 15)
  (psnegative false)
  (psa4output false)
  (plotreference true)
  (plotvalue true)
  (plotinvisibletext false)
  (padsonsilk 

Re: [Kicad-developers] [RFC] Change to object visibility system for usability/clarity

2018-02-19 Thread Andrzej Wolski

It would also be great to see all the holes like in a drill file


Something like this? :)
http://bit.ly/2ojZEq7

Cheers,


___
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] [RFC] Change to object visibility system for usability/clarity

2018-02-19 Thread Andrzej Wolski

Patch (in attachment) for "Tracks" turned out to be very simple.
If it gets accepted, I could make more of these.

Andrzej


On 02/19/2018 02:12 PM, Andrzej Wolski wrote:

It would be also nice to have separate controls for:
1. Tracks
2. Drawing primitives (graphic lines, arcs, and circles)
3. Zones
4. Polygons
5. Text (now there is control only for footprint text)
6. Dimensions
7. Plated holes

That would make Render tab (almost) complete.

Andrzej

W dniu 2018-02-18 o 21:00, Jon Evans pisze:

Hi all,

Right now the behavior of the "Layer" and "Render" tabs of the layers 
widget are confusing to users, resulting in complaints on the forum 
and some bug reports:


https://bugs.launchpad.net/kicad/+bug/1748181
https://bugs.launchpad.net/kicad/+bug/1743890

I could take a crack at fixing this (before or after 5.0 depending on 
what the complexity ends up being) but before I write any code I 
wanted to propose how I think it should work.


I think the visibility of any object should be the AND of layer 
visibility and render visibility.


To get there:

1) In the Render tab, get rid of the distinction between front/back. 
For example "Pads Back" and "Pads Front" becomes just "Pads"


2) Change the visibility code so that an object is visible if (a) the 
associated Render setting is turned on for the type of object, and 
(b) at least one of the layers the object is on is enabled in the 
Layers tab.


3) (optionally) Rename "Render" to something more friendly like 
"Items" or "Item Types" to make it more clear to the user that this 
is where they can turn off the display of various types of items as 
opposed to various layerse


If this plan is OK, I will start working out the details of how to 
get there.  Right now the Render tab is directly controlling the 
visibility of certain "GAL Layers" but unfortunately the set of 
objects that appears on one GAL layer is not always equal to the set 
of objects that the user would expect to turn on and off, as seen by 
the bug reports.  So, there will have to be some additional logic 
created to manage these settings beyond just turning on and off 
layers in the GAL.


-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





>From 006ca0f34b1f3b3350de7a15ffcb3bb1c5b3f7da Mon Sep 17 00:00:00 2001
From: Andrzej Wolski <awolski.ki...@gmail.com>
Date: Mon, 19 Feb 2018 15:48:22 +0100
Subject: [PATCH] Add tracks display control to Render tab
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="2.7.4"

This is a multi-part message in MIME format.
--2.7.4
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

---
 pcbnew/class_track.cpp  | 9 -
 pcbnew/pcb_layer_widget.cpp | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)


--2.7.4
Content-Type: text/x-patch; name="0001-Add-tracks-display-control-to-Render-tab.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Add-tracks-display-control-to-Render-tab.patch"

diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp
index 1d5e3e7..1c5f69b 100644
--- a/pcbnew/class_track.cpp
+++ b/pcbnew/class_track.cpp
@@ -45,6 +45,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /**
  * Function ShowClearance
@@ -670,7 +671,8 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
 auto frame = static_cast<PCB_BASE_FRAME*> ( panel->GetParent() );
 auto color = frame->Settings().Colors().GetLayerColor( m_Layer );
 
-if( brd->IsLayerVisible( m_Layer ) == false && !( aDrawMode & GR_HIGHLIGHT ) )
+if( ( !brd->IsLayerVisible( m_Layer ) || !brd->IsElementVisible( LAYER_TRACKS ) )
+&& !( aDrawMode & GR_HIGHLIGHT ) )
 return;
 
 #ifdef USE_WX_OVERLAY
@@ -798,6 +800,11 @@ void TRACK::ViewGetLayers( int aLayers[], int& aCount ) const
 
 unsigned int TRACK::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
 {
+const int HIDE = std::numeric_limits::max();
+
+if( !aView->IsLayerVisible( LAYER_TRACKS ) )
+return HIDE;
+
 // Netnames will be shown only if zoom is appropriate
 if( IsNetnameLayer( aLayer ) )
 {
diff --git a/pcbnew/pcb_layer_widget.cpp b/pcbnew/pcb_layer_widget.cpp
index f874e25..a2a184b 100644
--- a/pcbnew/pcb_layer_widget.cpp
+++ b/pcbnew/pcb_layer_widget.cpp
@@ -60,6 +60,7 @@ const LAYER_WIDGET::ROW PCB_LAYER_WIDGET::s_render_rows[] = {
 #define NOCOLOR COLOR4D::UNSPECIFIED// specify rows that do not have a color selector icon
 
  // textid  color   tooltip
+RR( _( &qu

Re: [Kicad-developers] [RFC] Change to object visibility system for usability/clarity

2018-02-19 Thread Andrzej Wolski

It would be also nice to have separate controls for:
1. Tracks
2. Drawing primitives (graphic lines, arcs, and circles)
3. Zones
4. Polygons
5. Text (now there is control only for footprint text)
6. Dimensions
7. Plated holes

That would make Render tab (almost) complete.

Andrzej

W dniu 2018-02-18 o 21:00, Jon Evans pisze:

Hi all,

Right now the behavior of the "Layer" and "Render" tabs of the layers 
widget are confusing to users, resulting in complaints on the forum 
and some bug reports:


https://bugs.launchpad.net/kicad/+bug/1748181
https://bugs.launchpad.net/kicad/+bug/1743890

I could take a crack at fixing this (before or after 5.0 depending on 
what the complexity ends up being) but before I write any code I 
wanted to propose how I think it should work.


I think the visibility of any object should be the AND of layer 
visibility and render visibility.


To get there:

1) In the Render tab, get rid of the distinction between front/back. 
For example "Pads Back" and "Pads Front" becomes just "Pads"


2) Change the visibility code so that an object is visible if (a) the 
associated Render setting is turned on for the type of object, and (b) 
at least one of the layers the object is on is enabled in the Layers tab.


3) (optionally) Rename "Render" to something more friendly like 
"Items" or "Item Types" to make it more clear to the user that this is 
where they can turn off the display of various types of items as 
opposed to various layerse


If this plan is OK, I will start working out the details of how to get 
there.  Right now the Render tab is directly controlling the 
visibility of certain "GAL Layers" but unfortunately the set of 
objects that appears on one GAL layer is not always equal to the set 
of objects that the user would expect to turn on and off, as seen by 
the bug reports.  So, there will have to be some additional logic 
created to manage these settings beyond just turning on and off layers 
in the GAL.


-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] Pads front and F.Cu visibility, possible bugs?

2018-02-17 Thread Andrzej Wolski
There is a simple fix to this problem, patch in attachment. It needs to 
be applied on top of this patch:

https://bugs.launchpad.net/kicad/+bug/1743890

Witch this patch there is another issue: when all layers (in Layer tab) 
are hidden, anchors and invisible text are still displayed.

I'm not sure what to do about it, maybe they also should be hidden?

Cheers,
Andrzej


On 02/07/2018 04:24 PM, Kristoffer Ödmark wrote:

Hey!

Another confusion arised when I was speaking to a friend. When 
disabling the F.Cu layer, the pads are still visible. I can understand 
the need to be able to disable the pads on the front layer separate 
from everything else, to check for things under pads etc.


What I cannot understand is why the pads are visible if I want to 
disable the entire front layer in pcbnew, also if one wants 
transparent layers, one can actually se the compositioning for the 
front pads and front traces, and allowing them to be different colors 
also seem a bit confusing actually.


I could basically change the front pad colors to look like they belong 
to the back layer, I know its stupid, but this seems like the kind of 
thing one would not want to even be possible, except maybe for pranks.


TLDR;

Possible bugs:
1. pads not affected by layer visibility setting
2. pads and layer compositioning even when same setting
3. pads and corresponding layer color setting

Possible solution:
1. Both layer and pads setting must be enabled for pads to render.
2. Seems hard, Dont know
3. pads and layer share color setting, not necessarily opacity setting.

Comments on these?




>From 2c624e9ce413a6066c589c77cb0aedfeb2e0dea7 Mon Sep 17 00:00:00 2001
From: Andrzej Wolski <awolski.ki...@gmail.com>
Date: Sat, 17 Feb 2018 23:53:44 +0100
Subject: [PATCH 2/2] Do not draw pads on hidden copper layers.
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="2.7.4"

This is a multi-part message in MIME format.
--2.7.4
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

---
 pcbnew/class_pad.cpp  | 5 +
 pcbnew/pcb_draw_panel_gal.cpp | 2 ++
 2 files changed, 7 insertions(+)


--2.7.4
Content-Type: text/x-patch; name="0002-Do-not-draw-pads-on-hidden-copper-layers.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0002-Do-not-draw-pads-on-hidden-copper-layers.patch"

diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp
index 379cf45..75540aa 100644
--- a/pcbnew/class_pad.cpp
+++ b/pcbnew/class_pad.cpp
@@ -1276,6 +1276,7 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const
 unsigned int D_PAD::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
 {
 const int HIDE = std::numeric_limits::max();
+BOARD* board = GetBoard();
 
 // Handle Render tab switches
 if( ( GetAttribute() == PAD_ATTRIB_STANDARD || GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED )
@@ -1294,6 +1295,10 @@ unsigned int D_PAD::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
 if( IsBackLayer( ( PCB_LAYER_ID )aLayer ) && !aView->IsLayerVisible( LAYER_PAD_BK ) )
 return HIDE;
 
+// Only draw the pad if at least one of the layers it crosses is being displayed
+if( board && !( board->GetVisibleLayers() & GetLayerSet() ).any() )
+return HIDE;
+
 // Netnames will be shown only if zoom is appropriate
 if( IsNetnameLayer( aLayer ) )
 {
diff --git a/pcbnew/pcb_draw_panel_gal.cpp b/pcbnew/pcb_draw_panel_gal.cpp
index d9476fc..d4f7f2a 100644
--- a/pcbnew/pcb_draw_panel_gal.cpp
+++ b/pcbnew/pcb_draw_panel_gal.cpp
@@ -446,10 +446,12 @@ void PCB_DRAW_PANEL_GAL::setDefaultLayerDeps()
 m_view->SetRequired( LAYER_PADS_NETNAMES, LAYER_PADS_TH );
 
 // Front modules
+m_view->SetRequired( LAYER_PAD_FR, F_Cu );
 m_view->SetRequired( LAYER_MOD_TEXT_FR, LAYER_MOD_FR );
 m_view->SetRequired( LAYER_PAD_FR_NETNAMES, LAYER_PAD_FR );
 
 // Back modules
+m_view->SetRequired( LAYER_PAD_BK, B_Cu );
 m_view->SetRequired( LAYER_MOD_TEXT_BK, LAYER_MOD_BK );
 m_view->SetRequired( LAYER_PAD_BK_NETNAMES, LAYER_PAD_BK );
 

--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] Zone vs polygon outline

2018-02-16 Thread Andrzej Wolski

Hello,

there is an inconsistency between the way zones and polygons handle 
their outline. In zones outline is drawn on the inside, so the size of 
the zone is exactly the same as drawn by the user. In polygons, half of 
the width of the outline is added to the size of the polygon. 
Illustration on an image below:


Is there a good reason for doing it this way, or is it just 
implementation bug?

If it is a bug, maybe it can be still fixed before 5.0?
Leaving it this way may have some implications in the future, for 
example when someone would want to make a tool to convert zone to a 
polygon, etc.


Cheers,
Andrzej


___
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] Initialize color of vias netnames text

2018-01-15 Thread Andrzej Wolski
LAYER_VIAS_NETNAMES color was not initialized which resulted in black 
text, not visible in outline mode.


This patch sets color to gray, similar to that on tracks when they have 
bright color.


>From 811184477d0113f48fd18e6cbf4d4b72936c8617 Mon Sep 17 00:00:00 2001
From: Andrzej Wolski <awolski.ki...@gmail.com>
Date: Mon, 15 Jan 2018 14:52:00 +0100
Subject: [PATCH] Initialize color of vias netnames text

LAYER_VIAS_NETNAMES color was not initialized which resulted in black text, not visible in outline mode.
---
 pcbnew/pcb_painter.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp
index 156835c..a167711 100644
--- a/pcbnew/pcb_painter.cpp
+++ b/pcbnew/pcb_painter.cpp
@@ -90,6 +90,7 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( const COLORS_DESIGN_SETTINGS* aSet
 // Default colors for specific layers (not really board layers).
 m_layerColors[LAYER_VIAS_HOLES] = COLOR4D( 0.5, 0.4, 0.0, 0.8 );
 m_layerColors[LAYER_PADS_PLATEDHOLES]   = aSettings->GetItemColor( LAYER_PCB_BACKGROUND );
+m_layerColors[LAYER_VIAS_NETNAMES]  = COLOR4D( 0.2, 0.2, 0.2, 0.9 );
 m_layerColors[LAYER_PADS_NETNAMES]  = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
 m_layerColors[LAYER_PAD_FR_NETNAMES]= COLOR4D( 1.0, 1.0, 1.0, 0.9 );
 m_layerColors[LAYER_PAD_BK_NETNAMES]= COLOR4D( 1.0, 1.0, 1.0, 0.9 );
-- 
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