Re: [Kicad-developers] [RFC]: New non copper pad paste and mask clearances behavior V2

2018-05-05 Thread Eeli Kaikkonen
2018-05-06 2:48 GMT+03:00 Jeff Young :

> Yes, we’re talking about the same thing.  Net clearance only applies
> between items on the same layer: i.e. a track on F.Cu must not be within
> that distance of a pad on F.Cu.
>
> But a track on B.Cu doesn’t have any clearance constraints against a pad
> on F.Cu.  It’s not that aperture pads have no clearance values, but rather
> that non-matching copper layers don’t have clearance values.  And that's
> the way it’s always been (unlike the behaviour of aperture pads which was
> just changed).
>
>
>
OK. But non-copper pads (or non-copper layers in normal pads) don't have
"net pad clearance" at all, even when they collide with another pad's items
in the same layer. And because the other clearance values aren't applied to
aperture pads it would be appropriate to say "clearance values are used
only for pads on copper layers".
___
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]: New non copper pad paste and mask clearances behavior V2

2018-05-05 Thread Jeff Young
Yes, we’re talking about the same thing.  Net clearance only applies between 
items on the same layer: i.e. a track on F.Cu must not be within that distance 
of a pad on F.Cu.

But a track on B.Cu doesn’t have any clearance constraints against a pad on 
F.Cu.  It’s not that aperture pads have no clearance values, but rather that 
non-matching copper layers don’t have clearance values.  And that's the way 
it’s always been (unlike the behaviour of aperture pads which was just changed).

> On 6 May 2018, at 00:38, Eeli Kaikkonen  wrote:
> 
> 
> Are we talking about the same thing, and have I completely understood what 
> "net pad clearance" means? I don't quite get what you mean.
> 
> I'm talking about the pad-to-pad and pad-to-track clearances. Paste-only and 
> mask-only pads don't seem to have that at all in practice and it's not 
> applied to mask or paste layers even in pads which have copper layers.
> 
> For example I have experimental footprints with separate copper, paste and 
> mask pads in separate locations. When they are put into a board the mask or 
> paste pads of two different footprints can even overlap without DRC errors 
> while copper pads can't be too close to each other. If in the Display Options 
> I check Show pad clearance, the copper pads have clearance lines around them 
> but paste and mask pads don't. So I think that "Net pad clearance" haven't 
> had any effect for non-copper pads even before these recent changes. There's 
> no clearance value left in these four fields which would be applied on 
> non-copper pads (which Wayne called "aperture pads").
> 
> Based on that I think it would be correct to say "clearance values are used 
> only for pads on copper layers". Unless "pads on copper layers" is too 
> inaccurate. It looks like "pads which have at least one copper layer" would 
> be more accurate because that seems to make the difference whether clearances 
> are applied or not, and only the copper layers have "net pad clearance". 
> Anyways, the current text leads one to think that "net pad clearance" would 
> be used for non-copper pads.
> 
> 
> Eeli Kaikkonen
> 
> 
> 2018-05-06 1:38 GMT+03:00 Jeff Young mailto:j...@rokeby.ie>>:
> Hmmm… I actually changed that on purpose because I thought the other was 
> misleading.
> 
> We build the masks for the mask layers differently depending on whether or 
> not the pads have any copper layers.
> 
> We don’t treat the pad clearance differently based on that constraint.
> 
> Now it’s true that we only check clearance between two items on the same 
> copper layer, but that’s subtly different than “not on any copper layer”.
> 
> Perhaps too subtle?
> 
> 
>> On 5 May 2018, at 20:19, Eeli Kaikkonen > > wrote:
>> 
>> 
>> 
>> 2018-05-03 23:39 GMT+03:00 Jeff Young > >:
>> I’m happy to clean up the dialog if JP wants to check in what he has.  Just 
>> let me know….
>> 
>> It looks cleaner now, but I noticed that the information is a bit 
>> misleading. It says "solder mask and paste values are used only for pads on 
>> copper layers" while actually it seems to be true for all the clearance 
>> values, also the net pad clearance. That would make the text simpler and 
>> shorter: "clearance values are used..."
>> 
>> I still don't know why the value fields should be editable for non-copper 
>> pads because they are not applied anyways. Well, this is nitpicking, so it 
>> can be ignored...
>> 
>> Eeli Kaikkonen
> 
> 

___
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]: New non copper pad paste and mask clearances behavior V2

2018-05-05 Thread Eeli Kaikkonen
Are we talking about the same thing, and have I completely understood what
"net pad clearance" means? I don't quite get what you mean.

I'm talking about the pad-to-pad and pad-to-track clearances. Paste-only
and mask-only pads don't seem to have that at all in practice and it's not
applied to mask or paste layers even in pads which have copper layers.

For example I have experimental footprints with separate copper, paste and
mask pads in separate locations. When they are put into a board the mask or
paste pads of two different footprints can even overlap without DRC errors
while copper pads can't be too close to each other. If in the Display
Options I check Show pad clearance, the copper pads have clearance lines
around them but paste and mask pads don't. So I think that "Net pad
clearance" haven't had any effect for non-copper pads even before these
recent changes. There's no clearance value left in these four fields which
would be applied on non-copper pads (which Wayne called "aperture pads").

Based on that I think it would be correct to say "clearance values are used
only for pads on copper layers". Unless "pads on copper layers" is too
inaccurate. It looks like "pads which have at least one copper layer" would
be more accurate because that seems to make the difference whether
clearances are applied or not, and only the copper layers have "net pad
clearance". Anyways, the current text leads one to think that "net pad
clearance" would be used for non-copper pads.


Eeli Kaikkonen


2018-05-06 1:38 GMT+03:00 Jeff Young :

> Hmmm… I actually changed that on purpose because I thought the other was
> misleading.
>
> We build the masks for the mask layers differently depending on whether or
> not the pads have *any* copper layers.
>
> We don’t treat the pad clearance differently based on that constraint.
>
> Now it’s true that we only check clearance between two items on the same
> copper layer, but that’s subtly different than “not on any copper layer”.
>
> Perhaps too subtle?
>
>
> On 5 May 2018, at 20:19, Eeli Kaikkonen  wrote:
>
>
>
> 2018-05-03 23:39 GMT+03:00 Jeff Young :
>
>> I’m happy to clean up the dialog if JP wants to check in what he has.
>> Just let me know….
>>
>
> It looks cleaner now, but I noticed that the information is a bit
> misleading. It says "solder mask and paste values are used only for pads on
> copper layers" while actually it seems to be true for all the clearance
> values, also the net pad clearance. That would make the text simpler and
> shorter: "clearance values are used..."
>
> I still don't know why the value fields should be editable for non-copper
> pads because they are not applied anyways. Well, this is nitpicking, so it
> can be ignored...
>
> Eeli Kaikkonen
>
>
>
___
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]: New non copper pad paste and mask clearances behavior V2

2018-05-05 Thread Jeff Young
Hmmm… I actually changed that on purpose because I thought the other was 
misleading.

We build the masks for the mask layers differently depending on whether or not 
the pads have any copper layers.

We don’t treat the pad clearance differently based on that constraint.

Now it’s true that we only check clearance between two items on the same copper 
layer, but that’s subtly different than “not on any copper layer”.

Perhaps too subtle?


> On 5 May 2018, at 20:19, Eeli Kaikkonen  wrote:
> 
> 
> 
> 2018-05-03 23:39 GMT+03:00 Jeff Young  >:
> I’m happy to clean up the dialog if JP wants to check in what he has.  Just 
> let me know….
> 
> It looks cleaner now, but I noticed that the information is a bit misleading. 
> It says "solder mask and paste values are used only for pads on copper 
> layers" while actually it seems to be true for all the clearance values, also 
> the net pad clearance. That would make the text simpler and shorter: 
> "clearance values are used..."
> 
> I still don't know why the value fields should be editable for non-copper 
> pads because they are not applied anyways. Well, this is nitpicking, so it 
> can be ignored...
> 
> Eeli Kaikkonen

___
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]: New non copper pad paste and mask clearances behavior V2

2018-05-05 Thread Eeli Kaikkonen
2018-05-03 23:39 GMT+03:00 Jeff Young :

> I’m happy to clean up the dialog if JP wants to check in what he has.
> Just let me know….
>

It looks cleaner now, but I noticed that the information is a bit
misleading. It says "solder mask and paste values are used only for pads on
copper layers" while actually it seems to be true for all the clearance
values, also the net pad clearance. That would make the text simpler and
shorter: "clearance values are used..."

I still don't know why the value fields should be editable for non-copper
pads because they are not applied anyways. Well, this is nitpicking, so it
can be ignored...

Eeli Kaikkonen
___
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]: New non copper pad paste and mask clearances behavior V2

2018-05-04 Thread jp charras
Le 04/05/2018 à 14:45, Wayne Stambaugh a écrit :
> JP,
> 
> If you are OK with Jeff's proposal, please push your patch so we can get
> some more testing on this before the v5 release.
> 
> Thanks,
> 
> Wayne
> 
> On 5/3/2018 4:39 PM, Jeff Young wrote:
>> I’m happy to clean up the dialog if JP wants to check in what he has.
>>  Just let me know….


I pushed the patch (with a few very minor fixes).

Jeff,
Be careful if you are thinking show or hide messages in pad setting dialog:
It usually create sizing issues when enabling/disabling copper layers in the 
dialog.

-- 
Jean-Pierre CHARRAS

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


Re: [Kicad-developers] [RFC]: New non copper pad paste and mask clearances behavior V2

2018-05-04 Thread Wayne Stambaugh
JP,

If you are OK with Jeff's proposal, please push your patch so we can get
some more testing on this before the v5 release.

Thanks,

Wayne

On 5/3/2018 4:39 PM, Jeff Young wrote:
> I’m happy to clean up the dialog if JP wants to check in what he has.
>  Just let me know….
> 
> 
>> On 3 May 2018, at 19:54, Eeli Kaikkonen > > wrote:
>>
>> The feature seems to work well, clearances don't have effect on a
>> board or in the gerbers with paste or mask pads.
>>
>>
>> The dialog isn't very good as you told yourself. First, the text is
>> sentences, unlike titles, checkbox option, menu items etc. Therefore
>> they should all end with a period. (Now there are two sentences which
>> end with a period and three which don't.)
>>
>> Also, why not hide altogether the texts which aren't relevant for the
>> pad type? And actually hide or set to invisible, not just grey out?
>> The relevant instructions would be much easier to read and understand.
>>
>> Copper    Non-copper    Text
>> show  hide  "Set fields to 0..."
>> hide  show  "These parameters are used only... Pads only
>> on..."
>> show  hide  "Positive... Negative..."
>>
>> And that would be only one step from disabling the clearance fields
>> for non-copper pads.
>>
>> But I'm already happy with the changes in this patch or even the
>> previous patch, it was the idea of applying global clearances to
>> non-copper pads which bugged me and was tedious to work around. Thank
>> you very much.
>>
>> Eeli Kaikkonen
>>
>>
>> 2018-05-03 12:37 GMT+03:00 jp charras > >:
>>
>> Attached a patch (against the current master version) with these
>> changes:
>>
>> Fixes in Pad settings dialog.
>> And mainly for pads not on copper layers, all margins/clearances
>> are ignored, even margins defined
>> in the Pad settings dialog (it was not the case in the previous
>> patch).
>>
>> This new behavior has my preference, because it is more intuitive.
>>
>> -- 
>> 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
> 


___
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]: New non copper pad paste and mask clearances behavior V2

2018-05-03 Thread Jeff Young
I’m happy to clean up the dialog if JP wants to check in what he has.  Just let 
me know….


> On 3 May 2018, at 19:54, Eeli Kaikkonen  wrote:
> 
> The feature seems to work well, clearances don't have effect on a board or in 
> the gerbers with paste or mask pads.
> 
> 
> The dialog isn't very good as you told yourself. First, the text is 
> sentences, unlike titles, checkbox option, menu items etc. Therefore they 
> should all end with a period. (Now there are two sentences which end with a 
> period and three which don't.)
> 
> Also, why not hide altogether the texts which aren't relevant for the pad 
> type? And actually hide or set to invisible, not just grey out? The relevant 
> instructions would be much easier to read and understand.
> 
> CopperNon-copperText
> show  hide  "Set fields to 0..."
> hide  show  "These parameters are used only... Pads only on..."
> show  hide  "Positive... Negative..."
> 
> And that would be only one step from disabling the clearance fields for 
> non-copper pads.
> 
> But I'm already happy with the changes in this patch or even the previous 
> patch, it was the idea of applying global clearances to non-copper pads which 
> bugged me and was tedious to work around. Thank you very much.
> 
> Eeli Kaikkonen
> 
> 
> 2018-05-03 12:37 GMT+03:00 jp charras  >:
> Attached a patch (against the current master version) with these changes:
> 
> Fixes in Pad settings dialog.
> And mainly for pads not on copper layers, all margins/clearances are ignored, 
> even margins defined
> in the Pad settings dialog (it was not the case in the previous patch).
> 
> This new behavior has my preference, because it is more intuitive.
> 
> -- 
> 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] [RFC]: New non copper pad paste and mask clearances behavior V2

2018-05-03 Thread Eeli Kaikkonen
The feature seems to work well, clearances don't have effect on a board or
in the gerbers with paste or mask pads.


The dialog isn't very good as you told yourself. First, the text is
sentences, unlike titles, checkbox option, menu items etc. Therefore they
should all end with a period. (Now there are two sentences which end with a
period and three which don't.)

Also, why not hide altogether the texts which aren't relevant for the pad
type? And actually hide or set to invisible, not just grey out? The
relevant instructions would be much easier to read and understand.

CopperNon-copperText
show  hide  "Set fields to 0..."
hide  show  "These parameters are used only... Pads only on..."
show  hide  "Positive... Negative..."

And that would be only one step from disabling the clearance fields for
non-copper pads.

But I'm already happy with the changes in this patch or even the previous
patch, it was the idea of applying global clearances to non-copper pads
which bugged me and was tedious to work around. Thank you very much.

Eeli Kaikkonen


2018-05-03 12:37 GMT+03:00 jp charras :

> Attached a patch (against the current master version) with these changes:
>
> Fixes in Pad settings dialog.
> And mainly for pads not on copper layers, all margins/clearances are
> ignored, even margins defined
> in the Pad settings dialog (it was not the case in the previous patch).
>
> This new behavior has my preference, because it is more intuitive.
>
> --
> Jean-Pierre CHARRAS
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [RFC]: New non copper pad paste and mask clearances behavior V2

2018-05-03 Thread jp charras
Attached a patch (against the current master version) with these changes:

Fixes in Pad settings dialog.
And mainly for pads not on copper layers, all margins/clearances are ignored, 
even margins defined
in the Pad settings dialog (it was not the case in the previous patch).

This new behavior has my preference, because it is more intuitive.

-- 
Jean-Pierre CHARRAS
From 604a793221226a95b94efbe62498dbb853ab67df Mon Sep 17 00:00:00 2001
From: jean-pierre charras 
Date: Wed, 2 May 2018 10:31:10 +0200
Subject: [PATCH] mask clearance parameters: use clearances only for pads on
 copper layers, and never for pads on technical layers only.

---
 pcbnew/class_pad.cpp   |  24 -
 pcbnew/class_pad.h |  26 +++--
 .../dialog_edit_footprint_for_BoardEditor_base.cpp |  10 +-
 .../dialog_edit_footprint_for_BoardEditor_base.fbp |  84 ++-
 .../dialog_edit_footprint_for_BoardEditor_base.h   |   6 +-
 .../dialog_edit_footprint_for_fp_editor_base.cpp   |  10 +-
 .../dialog_edit_footprint_for_fp_editor_base.fbp   |  84 ++-
 .../dialog_edit_footprint_for_fp_editor_base.h |   6 +-
 pcbnew/dialogs/dialog_mask_clearance_base.cpp  |  15 ++-
 pcbnew/dialogs/dialog_mask_clearance_base.fbp  |  89 ++-
 pcbnew/dialogs/dialog_mask_clearance_base.h|   9 +-
 pcbnew/dialogs/dialog_pad_properties.h |   5 +
 pcbnew/dialogs/dialog_pad_properties_base.cpp  |  38 ---
 pcbnew/dialogs/dialog_pad_properties_base.fbp  | 120 +
 pcbnew/dialogs/dialog_pad_properties_base.h|   9 +-
 15 files changed, 467 insertions(+), 68 deletions(-)

diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp
index 75540aa..c4a48c8 100644
--- a/pcbnew/class_pad.cpp
+++ b/pcbnew/class_pad.cpp
@@ -1,9 +1,9 @@
 /*
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
- * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
  * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck 
-  * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
+  * Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -576,7 +576,17 @@ int D_PAD::GetClearance( BOARD_CONNECTED_ITEM* aItem ) 
const
 
 int D_PAD::GetSolderMaskMargin() const
 {
+// The pad inherits the margin only to calculate a default shape,
+// therefore only if it is also a copper layer
+// Pads defined only on mask layers (and perhaps on other tech layers) use 
the shape
+// defined by the pad settings only
+bool isOnCopperLayer = ( m_layerMask & LSET::AllCuMask() ).any();
+
+if( !isOnCopperLayer )
+return 0;
+
 int margin = m_LocalSolderMaskMargin;
+
 MODULE* module = GetParent();
 
 if( module )
@@ -609,8 +619,18 @@ int D_PAD::GetSolderMaskMargin() const
 
 wxSize D_PAD::GetSolderPasteMargin() const
 {
+// The pad inherits the margin only to calculate a default shape,
+// therefore only if it is also a copper layer.
+// Pads defined only on mask layers (and perhaps on other tech layers) use 
the shape
+// defined by the pad settings only
+bool isOnCopperLayer = ( m_layerMask & LSET::AllCuMask() ).any();
+
+if( !isOnCopperLayer )
+return wxSize( 0, 0 );
+
 int margin = m_LocalSolderPasteMargin;
 double  mratio = m_LocalSolderPasteMarginRatio;
+
 MODULE* module = GetParent();
 
 if( module )
diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h
index 7eeb289..e251304 100644
--- a/pcbnew/class_pad.h
+++ b/pcbnew/class_pad.h
@@ -1,8 +1,8 @@
 /*
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
- * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
- * Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -454,23 +454,29 @@ public:
  * Function GetSolderMaskMargin
  * @return the margin for the solder mask layer
  * usually > 0 (mask shape bigger than pad
- * value is
+ * For pads also on copper layers, the value (used to build a default 
shape) is
  * 1 - the local value
- * 2 - if null, the parent footprint value
- * 1 - if null, the global value
+ * 2 - if 0, the parent footprint value
+ * 3 - if 0, the global value
+ * For pads NOT on copper layers, the value is the local value because 
there is
+ * not default shape to build
  */
 int GetSolderMaskMargin() const;
 
  

Re: [Kicad-developers] [RFC]: New non copper pad paste and mask clearances behavior

2018-05-02 Thread Rene Pöschl

This sounds like a reasonable solution for kicad 5 to me.
Thanks for taking care of it.

On 02/05/18 14:58, jp charras wrote:

Hi All,

Dick Hollenbeck ( who wrote a lot of code for Kicad) proposed to use global 
mask margin values only
for pad at least on a copper layer.

(I am thinking this is also what was expected by some of guys)

Attached, a patch to use global mask settings only for pads on copper layers to 
build the mask shape
(solder or paste layer) of the pad.

Therefore pads *only* on a solder or paste layer are no longer affected by 
global settings.
(The drawback is a change in the behavior of previous Pcbnew versions, but it 
should not impact a
lot of old boards or old footprints)

The change in code is very small.

I added a info message in dialogs, in the pad clearance setup sub-window to 
explain the purpose of
this setting.
This is perhaps the main problem, because a message in a dialog must be short, 
and yet understandable...
The info messages are not perfect.

Please, test it.



___
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]: New non copper pad paste and mask clearances behavior (was: What are the smallest values for pad paste and mask clearances)

2018-05-02 Thread Seth Hillbrand
​Hi JP-

The patch seems to function as expected.  Minor issue is that the pad
properties dialog now opens to the second tab active and doesn't focus (so
pressing escape doesn't work until you click on the dialog).

I'm in favor of the change as long as we keep it minimized like you have.

-S
​



Am Mi., 2. Mai 2018 um 14:11 Uhr schrieb Jeff Young :

> Personally I think this is one of those times to be pragmatic.  Yes, the
> patch changes the interpretation of existing files (which in principle is a
> bad thing), but we’re willing to live with it in this case.
>
> I don’t have much of an opinion on the exact algorithm we should use.
>
> Cheers,
> Jeff.
>
> On 2 May 2018, at 21:57, Eeli Kaikkonen  wrote:
>
> The patch seems to work as intented.
>
> But I thought Wayne said this won't be done because it would alter
> interpretation of old existing board and footprints files. On the other
> hand it's hard to imagine someone having designed footprints and boards
> using and taking into consideration the global values, without noticing and
> using this trick of using a very small value instead.
>
> If this kind of change is made I think a more radical change would be more
> logical. Why use these clearances for non-copper pads at all? I just can't
> see why I or anyone would design a pad with certain dimensions and then
> alter those dimensions on purpose with those clearance values. For example
> I want a paste pad of 1.5x1.5mm. Why would I make it 2.0x2.0 and then
> calculate values for paste clearance and % to make it smaller? Being able
> to define the mask clearance for a paste-only pad makes even less sense.
> Therefore they could be ignored completely and the corresponding GUI items
> could be disabled or hidden. Instead of one explanation text which would
> cover all cases with all pads it could be conditional: in the copper pads
> it would read as it is, in the non-copper pads it would be "Clearance
> values are not used for non-copper pads" or something as simple.
>
> Eeli Kaikkonen
>
> 2018-05-02 15:58 GMT+03:00 jp charras :
>
>> Hi All,
>>
>> Dick Hollenbeck ( who wrote a lot of code for Kicad) proposed to use
>> global mask margin values only
>> for pad at least on a copper layer.
>>
>> (I am thinking this is also what was expected by some of guys)
>>
>
> Attached, a patch to use global mask settings only for pads on copper
>> layers to build the mask shape
>> (solder or paste layer) of the pad.
>>
>> Therefore pads *only* on a solder or paste layer are no longer affected
>> by global settings.
>> (The drawback is a change in the behavior of previous Pcbnew versions,
>> but it should not impact a
>> lot of old boards or old footprints)
>>
>> The change in code is very small.
>>
>> I added a info message in dialogs, in the pad clearance setup sub-window
>> to explain the purpose of
>> this setting.
>> This is perhaps the main problem, because a message in a dialog must be
>> short, and yet understandable...
>> The info messages are not perfect.
>>
>> Please, test it.
>>
>> --
>> Jean-Pierre CHARRAS
>>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
> ___
> 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]: New non copper pad paste and mask clearances behavior

2018-05-02 Thread Wayne Stambaugh
Pragmatism is the reason I've asked JP to create this patch.  Rather 
than create a lot of extra work for our librarians and creating a file 
format change that doesn't really buy us much, I reconsidered my 
original decision.  I doubt many users are currently using "aperture 
pads" so I think the risk is low and the longer we push this off, the 
greater the problem will be.  I already have an announcement prepared 
for the website once this makes its way into the repo.  I will also post 
a link to the announcement on the user forum and update the Pcbnew 
documentation.


On 05/02/2018 05:11 PM, Jeff Young wrote:
Personally I think this is one of those times to be pragmatic.  Yes, the 
patch changes the interpretation of existing files (which in principle 
is a bad thing), but we’re willing to live with it in this case.


I don’t have much of an opinion on the exact algorithm we should use.

Cheers,
Jeff.

On 2 May 2018, at 21:57, Eeli Kaikkonen > wrote:


The patch seems to work as intented.

But I thought Wayne said this won't be done because it would alter 
interpretation of old existing board and footprints files. On the 
other hand it's hard to imagine someone having designed footprints and 
boards using and taking into consideration the global values, without 
noticing and using this trick of using a very small value instead.


If this kind of change is made I think a more radical change would be 
more logical. Why use these clearances for non-copper pads at all? I 
just can't see why I or anyone would design a pad with certain 
dimensions and then alter those dimensions on purpose with those 
clearance values. For example I want a paste pad of 1.5x1.5mm. Why 
would I make it 2.0x2.0 and then calculate values for paste clearance 
and % to make it smaller? Being able to define the mask clearance for 
a paste-only pad makes even less sense. Therefore they could be 
ignored completely and the corresponding GUI items could be disabled 
or hidden. Instead of one explanation text which would cover all cases 
with all pads it could be conditional: in the copper pads it would 
read as it is, in the non-copper pads it would be "Clearance values 
are not used for non-copper pads" or something as simple.


Eeli Kaikkonen

2018-05-02 15:58 GMT+03:00 jp charras >:


Hi All,

Dick Hollenbeck ( who wrote a lot of code for Kicad) proposed to
use global mask margin values only
for pad at least on a copper layer.

(I am thinking this is also what was expected by some of guys)

Attached, a patch to use global mask settings only for pads on
copper layers to build the mask shape
(solder or paste layer) of the pad.

Therefore pads *only* on a solder or paste layer are no longer
affected by global settings.
(The drawback is a change in the behavior of previous Pcbnew
versions, but it should not impact a
lot of old boards or old footprints)

The change in code is very small.

I added a info message in dialogs, in the pad clearance setup
sub-window to explain the purpose of
this setting.
This is perhaps the main problem, because a message in a dialog
must be short, and yet understandable...
The info messages are not perfect.

Please, test it.

-- 
Jean-Pierre CHARRAS


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


Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp




___
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]: New non copper pad paste and mask clearances behavior (was: What are the smallest values for pad paste and mask clearances)

2018-05-02 Thread Jeff Young
Personally I think this is one of those times to be pragmatic.  Yes, the patch 
changes the interpretation of existing files (which in principle is a bad 
thing), but we’re willing to live with it in this case.

I don’t have much of an opinion on the exact algorithm we should use.

Cheers,
Jeff.

> On 2 May 2018, at 21:57, Eeli Kaikkonen  wrote:
> 
> The patch seems to work as intented.
> 
> But I thought Wayne said this won't be done because it would alter 
> interpretation of old existing board and footprints files. On the other hand 
> it's hard to imagine someone having designed footprints and boards using and 
> taking into consideration the global values, without noticing and using this 
> trick of using a very small value instead.
> 
> If this kind of change is made I think a more radical change would be more 
> logical. Why use these clearances for non-copper pads at all? I just can't 
> see why I or anyone would design a pad with certain dimensions and then alter 
> those dimensions on purpose with those clearance values. For example I want a 
> paste pad of 1.5x1.5mm. Why would I make it 2.0x2.0 and then calculate values 
> for paste clearance and % to make it smaller? Being able to define the mask 
> clearance for a paste-only pad makes even less sense. Therefore they could be 
> ignored completely and the corresponding GUI items could be disabled or 
> hidden. Instead of one explanation text which would cover all cases with all 
> pads it could be conditional: in the copper pads it would read as it is, in 
> the non-copper pads it would be "Clearance values are not used for non-copper 
> pads" or something as simple.
> 
> Eeli Kaikkonen
> 
> 2018-05-02 15:58 GMT+03:00 jp charras  >:
> Hi All,
> 
> Dick Hollenbeck ( who wrote a lot of code for Kicad) proposed to use global 
> mask margin values only
> for pad at least on a copper layer.
> 
> (I am thinking this is also what was expected by some of guys)
>  
> Attached, a patch to use global mask settings only for pads on copper layers 
> to build the mask shape
> (solder or paste layer) of the pad.
> 
> Therefore pads *only* on a solder or paste layer are no longer affected by 
> global settings.
> (The drawback is a change in the behavior of previous Pcbnew versions, but it 
> should not impact a
> lot of old boards or old footprints)
> 
> The change in code is very small.
> 
> I added a info message in dialogs, in the pad clearance setup sub-window to 
> explain the purpose of
> this setting.
> This is perhaps the main problem, because a message in a dialog must be 
> short, and yet understandable...
> The info messages are not perfect.
> 
> Please, test it.
> 
> -- 
> Jean-Pierre CHARRAS
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

___
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]: New non copper pad paste and mask clearances behavior (was: What are the smallest values for pad paste and mask clearances)

2018-05-02 Thread Eeli Kaikkonen
The patch seems to work as intented.

But I thought Wayne said this won't be done because it would alter
interpretation of old existing board and footprints files. On the other
hand it's hard to imagine someone having designed footprints and boards
using and taking into consideration the global values, without noticing and
using this trick of using a very small value instead.

If this kind of change is made I think a more radical change would be more
logical. Why use these clearances for non-copper pads at all? I just can't
see why I or anyone would design a pad with certain dimensions and then
alter those dimensions on purpose with those clearance values. For example
I want a paste pad of 1.5x1.5mm. Why would I make it 2.0x2.0 and then
calculate values for paste clearance and % to make it smaller? Being able
to define the mask clearance for a paste-only pad makes even less sense.
Therefore they could be ignored completely and the corresponding GUI items
could be disabled or hidden. Instead of one explanation text which would
cover all cases with all pads it could be conditional: in the copper pads
it would read as it is, in the non-copper pads it would be "Clearance
values are not used for non-copper pads" or something as simple.

Eeli Kaikkonen

2018-05-02 15:58 GMT+03:00 jp charras :

> Hi All,
>
> Dick Hollenbeck ( who wrote a lot of code for Kicad) proposed to use
> global mask margin values only
> for pad at least on a copper layer.
>
> (I am thinking this is also what was expected by some of guys)
>

Attached, a patch to use global mask settings only for pads on copper
> layers to build the mask shape
> (solder or paste layer) of the pad.
>
> Therefore pads *only* on a solder or paste layer are no longer affected by
> global settings.
> (The drawback is a change in the behavior of previous Pcbnew versions, but
> it should not impact a
> lot of old boards or old footprints)
>
> The change in code is very small.
>
> I added a info message in dialogs, in the pad clearance setup sub-window
> to explain the purpose of
> this setting.
> This is perhaps the main problem, because a message in a dialog must be
> short, and yet understandable...
> The info messages are not perfect.
>
> Please, test it.
>
> --
> Jean-Pierre CHARRAS
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] [RFC]: New non copper pad paste and mask clearances behavior (was: What are the smallest values for pad paste and mask clearances)

2018-05-02 Thread jp charras
Hi All,

Dick Hollenbeck ( who wrote a lot of code for Kicad) proposed to use global 
mask margin values only
for pad at least on a copper layer.

(I am thinking this is also what was expected by some of guys)

Attached, a patch to use global mask settings only for pads on copper layers to 
build the mask shape
(solder or paste layer) of the pad.

Therefore pads *only* on a solder or paste layer are no longer affected by 
global settings.
(The drawback is a change in the behavior of previous Pcbnew versions, but it 
should not impact a
lot of old boards or old footprints)

The change in code is very small.

I added a info message in dialogs, in the pad clearance setup sub-window to 
explain the purpose of
this setting.
This is perhaps the main problem, because a message in a dialog must be short, 
and yet understandable...
The info messages are not perfect.

Please, test it.

-- 
Jean-Pierre CHARRAS
From 3fde6b1978fda791c6f21017967bce5a0391a720 Mon Sep 17 00:00:00 2001
From: jean-pierre charras 
Date: Wed, 2 May 2018 10:31:10 +0200
Subject: [PATCH] mask clearances: use global clearances only for pads on
 copper layers.

---
 pcbnew/class_pad.cpp   | 68 +++--
 pcbnew/class_pad.h | 26 ---
 .../dialog_edit_footprint_for_BoardEditor_base.cpp | 10 ++-
 .../dialog_edit_footprint_for_BoardEditor_base.fbp | 84 +++-
 .../dialog_edit_footprint_for_BoardEditor_base.h   |  6 +-
 .../dialog_edit_footprint_for_fp_editor_base.cpp   | 10 ++-
 .../dialog_edit_footprint_for_fp_editor_base.fbp   | 84 +++-
 .../dialog_edit_footprint_for_fp_editor_base.h |  6 +-
 pcbnew/dialogs/dialog_mask_clearance_base.cpp  | 15 ++--
 pcbnew/dialogs/dialog_mask_clearance_base.fbp  | 89 +-
 pcbnew/dialogs/dialog_mask_clearance_base.h|  9 ++-
 pcbnew/dialogs/dialog_pad_properties_base.cpp  | 10 +--
 pcbnew/dialogs/dialog_pad_properties_base.fbp  |  7 +-
 pcbnew/dialogs/dialog_pad_properties_base.h|  6 +-
 14 files changed, 364 insertions(+), 66 deletions(-)

diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp
index 75540aa..58998ff 100644
--- a/pcbnew/class_pad.cpp
+++ b/pcbnew/class_pad.cpp
@@ -1,9 +1,9 @@
 /*
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
- * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
  * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck 
-  * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
+  * Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -577,20 +577,30 @@ int D_PAD::GetClearance( BOARD_CONNECTED_ITEM* aItem ) 
const
 int D_PAD::GetSolderMaskMargin() const
 {
 int margin = m_LocalSolderMaskMargin;
-MODULE* module = GetParent();
 
-if( module )
+// The pad inherits the margin only to calculate a default shape,
+// therefore only if it is also a copper layer
+// Pads defined only on mask layers (and perhaps on other tech layers) use 
the shape
+// defined by the pad settings only
+bool isOnCopperLayer = ( m_layerMask & LSET::AllCuMask() ).any();
+
+if( isOnCopperLayer )
 {
-if( margin == 0 )
-{
-if( module->GetLocalSolderMaskMargin() )
-margin = module->GetLocalSolderMaskMargin();
-}
+MODULE* module = GetParent();
 
-if( margin == 0 )
+if( module )
 {
-BOARD* brd = GetBoard();
-margin = brd->GetDesignSettings().m_SolderMaskMargin;
+if( margin == 0 )
+{
+if( module->GetLocalSolderMaskMargin() )
+margin = module->GetLocalSolderMaskMargin();
+}
+
+if( margin == 0 )
+{
+BOARD* brd = GetBoard();
+margin = brd->GetDesignSettings().m_SolderMaskMargin;
+}
 }
 }
 
@@ -611,24 +621,34 @@ wxSize D_PAD::GetSolderPasteMargin() const
 {
 int margin = m_LocalSolderPasteMargin;
 double  mratio = m_LocalSolderPasteMarginRatio;
-MODULE* module = GetParent();
 
-if( module )
+// The pad inherits the margin only to calculate a default shape,
+// therefore only if it is also a copper layer.
+// Pads defined only on mask layers (and perhaps on other tech layers) use 
the shape
+// defined by the pad settings only
+bool isOnCopperLayer = ( m_layerMask & LSET::AllCuMask() ).any();
+
+if( isOnCopperLayer )
 {
-if( margin == 0 )
-margin = module->GetLocalSolderPasteMargin();
+MODULE* module = GetParent();
 
-BOARD * brd = GetBoard();
+if( module )
+{
+if( ma