Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-24 Thread Seth Hillbrand
Hi Chris, Eldar-

I looked at the drop-down button option and, as far as I can tell, this is
possible but non-trivial in wx.  As Wayne is freezing this weekend, I'll
look at ways of specifying current draw styles for 6.x dev branch.

-S

On Fri, Nov 17, 2017 at 11:25 PM, eldar.khayrullin <eldar.khayrul...@mail.ru
> wrote:

> The same feature request how Chris suggested.
>
>
>
> Отправлено с устройства Samsung.
>
>  Исходное сообщение 
> От: Chris Pavlina <pavlina.ch...@gmail.com>
> Дата: 18.11.17 3:44 (GMT+03:00)
> Кому: Seth Hillbrand <seth.hillbr...@gmail.com>
> Копия: KiCad Developers <kicad-developers@lists.launchpad.net>
> Тема: Re: [Kicad-developers] [FEATURE] Eeschema Line Styles
>
> Nice! I've wanted this for ages, thank you so much!
>
> Can I make a minor feature request? It'd be really nice if I could set
> the color and style before placing lines, so I can place arbitrarily
> many without having to change the style for each segment. Some editors
> do this by adding a style dropdown to the toolbar button (and displaying
> the selected style on the button). I can't remember how hard wx makes it
> to add dropdowns to toolbar buttons, but this sounds like a nice way to
> do it.
>
> --
> Chris
>
> On Fri, Nov 10, 2017 at 06:50:26PM +, Seth Hillbrand wrote:
> > One of the Eeschema features that has been requested for a while is
> > customizable graphic line styles that allow greater differentiation in
> > schematic documentation.  c.f.
> > https://bugs.launchpad.net/kicad/+bug/594059
> > https://bugs.launchpad.net/kicad/+bug/1405026
> >
> > The limitation has been not wanting to change the existing schematic
> format.
> >
> > I propose a way around this while implementing the desired feature.
> > Specifically, the attached patch allows the user to customize graphic
> lines
> > (schematic wires are disallowed), with the extra wire data being stored
> at
> > the end of the wire line.  This change should be transparent to the
> > existing schematic format as the trailing characters are ignored in the
> > legacy file reader.  Thus customization will be ignored if you are
> sharing
> > files between versions.
> >
> > Second, to avoid large, useless diffs in versioning storage, the patch
> does
> > not store any additional formatting data unless it has been changed from
> > the default.
> >
> > I'm attaching an image showing the line edit dialog as well as the patch
> > implementing this.  Please let me know if there are any questions or
> > suggestions for improvement.
> >
> > Best-
> > Seth
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-17 Thread eldar.khayrullin
The same feature request how Chris suggested.


Отправлено с устройства Samsung.
 Исходное сообщение От: Chris Pavlina <pavlina.ch...@gmail.com> 
Дата: 18.11.17  3:44  (GMT+03:00) Кому: Seth Hillbrand 
<seth.hillbr...@gmail.com> Копия: KiCad Developers 
<kicad-developers@lists.launchpad.net> Тема: Re: [Kicad-developers] [FEATURE] 
Eeschema Line Styles 
Nice! I've wanted this for ages, thank you so much!

Can I make a minor feature request? It'd be really nice if I could set
the color and style before placing lines, so I can place arbitrarily
many without having to change the style for each segment. Some editors
do this by adding a style dropdown to the toolbar button (and displaying
the selected style on the button). I can't remember how hard wx makes it
to add dropdowns to toolbar buttons, but this sounds like a nice way to
do it.

--
Chris

On Fri, Nov 10, 2017 at 06:50:26PM +, Seth Hillbrand wrote:
> One of the Eeschema features that has been requested for a while is
> customizable graphic line styles that allow greater differentiation in
> schematic documentation.  c.f.
> https://bugs.launchpad.net/kicad/+bug/594059
> https://bugs.launchpad.net/kicad/+bug/1405026
> 
> The limitation has been not wanting to change the existing schematic format.
> 
> I propose a way around this while implementing the desired feature.
> Specifically, the attached patch allows the user to customize graphic lines
> (schematic wires are disallowed), with the extra wire data being stored at
> the end of the wire line.  This change should be transparent to the
> existing schematic format as the trailing characters are ignored in the
> legacy file reader.  Thus customization will be ignored if you are sharing
> files between versions.
> 
> Second, to avoid large, useless diffs in versioning storage, the patch does
> not store any additional formatting data unless it has been changed from
> the default.
> 
> I'm attaching an image showing the line edit dialog as well as the patch
> implementing this.  Please let me know if there are any questions or
> suggestions for improvement.
> 
> Best-
> Seth


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


Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-17 Thread Chris Pavlina
Nice! I've wanted this for ages, thank you so much!

Can I make a minor feature request? It'd be really nice if I could set
the color and style before placing lines, so I can place arbitrarily
many without having to change the style for each segment. Some editors
do this by adding a style dropdown to the toolbar button (and displaying
the selected style on the button). I can't remember how hard wx makes it
to add dropdowns to toolbar buttons, but this sounds like a nice way to
do it.

--
Chris

On Fri, Nov 10, 2017 at 06:50:26PM +, Seth Hillbrand wrote:
> One of the Eeschema features that has been requested for a while is
> customizable graphic line styles that allow greater differentiation in
> schematic documentation.  c.f.
> https://bugs.launchpad.net/kicad/+bug/594059
> https://bugs.launchpad.net/kicad/+bug/1405026
> 
> The limitation has been not wanting to change the existing schematic format.
> 
> I propose a way around this while implementing the desired feature.
> Specifically, the attached patch allows the user to customize graphic lines
> (schematic wires are disallowed), with the extra wire data being stored at
> the end of the wire line.  This change should be transparent to the
> existing schematic format as the trailing characters are ignored in the
> legacy file reader.  Thus customization will be ignored if you are sharing
> files between versions.
> 
> Second, to avoid large, useless diffs in versioning storage, the patch does
> not store any additional formatting data unless it has been changed from
> the default.
> 
> I'm attaching an image showing the line edit dialog as well as the patch
> implementing this.  Please let me know if there are any questions or
> suggestions for improvement.
> 
> Best-
> Seth


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


Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-17 Thread jp charras
Le 17/11/2017 à 01:02, Seth Hillbrand a écrit :
> Hi Fabrizio-
> 
> Good call.  Attached is a patch to do this.  
> 
> Chris, I am unable to re-create your issue.  Can you send along more 
> information about your system?  
> 
> -Seth
> 
> On Thu, Nov 16, 2017 at 10:41 AM, Fabrizio Tappero  > wrote:
> 
> Hi Seth,
> Thanks a lot for this! I will definetly use it a lot!
> 
> Maybe millimeters should be mm?
> 
> Cheers
> Fabrizio
> 

<...>

Hi Seth,
I committed your patch. Thanks.

-- 
Jean-Pierre CHARRAS

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


Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-16 Thread Chris Fiege
Hi Seth,

On 11/17/2017 01:02 AM, Seth Hillbrand wrote:
> Chris, I am unable to re-create your issue.  Can you send along more
> information about your system?

I tried to reproduce the issue.
Good news: It's still reproducible on my system.
Also good news: It's reproducible on a build without your patches.

My system is a Debian stretch with XFCE as WindowManager.
KiCad looks like:
> Application: kicad
> Version: (2017-11-12 revision 2337b83ba)-master, release build
> Libraries:
> wxWidgets 3.0.2
> libcurl/7.52.1 OpenSSL/1.0.2l zlib/1.2.8 libidn2/0.16 libpsl/0.17.0 
> (+libidn2/0.16) libssh2/1.7.0 nghttp2/1.18.1 librtmp/2.3
> Platform: Linux 4.13.0-0.bpo.1-amd64 x86_64, 64 bit, Little endian, wxGTK
> Build Info:
> wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
> Boost: 1.62.0
> Curl: 7.52.1
> Compiler: GCC 6.3.0 with C++ ABI 1010
> 
> Build settings:
> USE_WX_GRAPHICS_CONTEXT=OFF
> USE_WX_OVERLAY=OFF
> KICAD_SCRIPTING=OFF
> KICAD_SCRIPTING_MODULES=OFF
> KICAD_SCRIPTING_WXPYTHON=OFF
> KICAD_SCRIPTING_ACTION_MENU=OFF
> BUILD_GITHUB_PLUGIN=ON
> KICAD_USE_OCE=OFF
> KICAD_SPICE=OFF

Digging a little into this I found out, that the behavior changes with enabling 
the
glx-backend in my compositor.

Since running without a compositor isn't the usual use-case I am not sure if 
this issue
is worth tracking down.

--
Chris

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


Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-16 Thread Seth Hillbrand
Hi Fabrizio-

Good call.  Attached is a patch to do this.

Chris, I am unable to re-create your issue.  Can you send along more
information about your system?

-Seth

On Thu, Nov 16, 2017 at 10:41 AM, Fabrizio Tappero <
fabrizio.tapp...@gmail.com> wrote:

> Hi Seth,
> Thanks a lot for this! I will definetly use it a lot!
>
> Maybe millimeters should be mm?
>
> Cheers
> Fabrizio
>
>
> On Nov 15, 2017 2:18 PM, "jp charras"  wrote:
>
> Le 15/11/2017 à 01:27, Seth Hillbrand a écrit :
> > Attached is the updated line styles patchset.  This implements the
> COLOR4D_PICKER_DIALOG and ensures
> > that the alpha channel remains opaque.
> >
> > The dotted line, I agree doesn't look too dotted.  This is the wxDOT
> style but apparently, it
> > doesn't account for the line caps.  I've replaced this with a
> user-defined dotted line.  This is the
> > smallest length of dot that we are allowed in wx.  Better than the
> default even if it isn't quite
> > "dotted".
> >
> > -Seth
> >
>
> Thanks.
>
> I committed your patch.
>
> I also modified the way the style parameters are stored in files, because
> the style was not very
> user readable, and did not work in some non English countries.
>
> --
> Jean-Pierre CHARRAS
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
>
From 06238cab2407660accc37164077cb81206c15756 Mon Sep 17 00:00:00 2001
From: Seth Hillbrand 
Date: Thu, 16 Nov 2017 15:56:41 -0800
Subject: [PATCH] Eeschema: Show abbreviated units

CHANGED: Edit Line Style shows "in" and "mm" instead of full word
---
 eeschema/dialogs/dialog_edit_line_style_base.cpp | 4 ++--
 eeschema/dialogs/dialog_edit_line_style_base.fbp | 4 ++--
 eeschema/dialogs/dialog_edit_line_style_base.h   | 8 +++-
 eeschema/sch_line.cpp| 2 +-
 4 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/eeschema/dialogs/dialog_edit_line_style_base.cpp b/eeschema/dialogs/dialog_edit_line_style_base.cpp
index 1503c9d4f..e33b74aa6 100644
--- a/eeschema/dialogs/dialog_edit_line_style_base.cpp
+++ b/eeschema/dialogs/dialog_edit_line_style_base.cpp
@@ -1,8 +1,8 @@
 ///
-// C++ code generated with wxFormBuilder (version Aug  4 2017)
+// C++ code generated with wxFormBuilder (version Oct 30 2017)
 // http://www.wxformbuilder.org/
 //
-// PLEASE DO "NOT" EDIT THIS FILE!
+// PLEASE DO *NOT* EDIT THIS FILE!
 ///
 
 #include "dialog_edit_line_style_base.h"
diff --git a/eeschema/dialogs/dialog_edit_line_style_base.fbp b/eeschema/dialogs/dialog_edit_line_style_base.fbp
index 867d305d8..de5cec913 100644
--- a/eeschema/dialogs/dialog_edit_line_style_base.fbp
+++ b/eeschema/dialogs/dialog_edit_line_style_base.fbp
@@ -44,7 +44,7 @@
 
 DIALOG_EDIT_LINE_STYLE_BASE
 
-417,204
+298,204
 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
 DIALOG_SHIM; dialog_shim.h
 Line Style
@@ -250,7 +250,7 @@
 0
 
 0
-50,-1
+20,-1
 0
 80,-1
 1
diff --git a/eeschema/dialogs/dialog_edit_line_style_base.h b/eeschema/dialogs/dialog_edit_line_style_base.h
index f9260b2d2..062a94d4e 100644
--- a/eeschema/dialogs/dialog_edit_line_style_base.h
+++ b/eeschema/dialogs/dialog_edit_line_style_base.h
@@ -1,8 +1,8 @@
 ///
-// C++ code generated with wxFormBuilder (version Aug  4 2017)
+// C++ code generated with wxFormBuilder (version Oct 30 2017)
 // http://www.wxformbuilder.org/
 //
-// PLEASE DO "NOT" EDIT THIS FILE!
+// PLEASE DO *NOT* EDIT THIS FILE!
 ///
 
 #ifndef __DIALOG_EDIT_LINE_STYLE_BASE_H__
@@ -11,8 +11,6 @@
 #include 
 #include 
 #include 
-class DIALOG_SHIM;
-
 #include "dialog_shim.h"
 #include 
 #include 
@@ -73,7 +71,7 @@ class DIALOG_EDIT_LINE_STYLE_BASE : public DIALOG_SHIM
 	public:
 		bool m_isValid; 
 		
-		DIALOG_EDIT_LINE_STYLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Line Style"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 417,204 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); 
+		DIALOG_EDIT_LINE_STYLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const 

Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-16 Thread Fabrizio Tappero
Hi Seth,
Thanks a lot for this! I will definetly use it a lot!

Maybe millimeters should be mm?

Cheers
Fabrizio


On Nov 15, 2017 2:18 PM, "jp charras"  wrote:

Le 15/11/2017 à 01:27, Seth Hillbrand a écrit :
> Attached is the updated line styles patchset.  This implements the
COLOR4D_PICKER_DIALOG and ensures
> that the alpha channel remains opaque.
>
> The dotted line, I agree doesn't look too dotted.  This is the wxDOT
style but apparently, it
> doesn't account for the line caps.  I've replaced this with a
user-defined dotted line.  This is the
> smallest length of dot that we are allowed in wx.  Better than the
default even if it isn't quite
> "dotted".
>
> -Seth
>

Thanks.

I committed your patch.

I also modified the way the style parameters are stored in files, because
the style was not very
user readable, and did not work in some non English countries.

--
Jean-Pierre CHARRAS

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


Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-15 Thread jp charras
Le 15/11/2017 à 01:27, Seth Hillbrand a écrit :
> Attached is the updated line styles patchset.  This implements the 
> COLOR4D_PICKER_DIALOG and ensures
> that the alpha channel remains opaque.
> 
> The dotted line, I agree doesn't look too dotted.  This is the wxDOT style 
> but apparently, it
> doesn't account for the line caps.  I've replaced this with a user-defined 
> dotted line.  This is the
> smallest length of dot that we are allowed in wx.  Better than the default 
> even if it isn't quite
> "dotted".
> 
> -Seth
> 

Thanks.

I committed your patch.

I also modified the way the style parameters are stored in files, because the 
style was not very
user readable, and did not work in some non English countries.

-- 
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] [FEATURE] Eeschema Line Styles

2017-11-14 Thread Chris Fiege
Hi Seth,

On 11/15/2017 01:27 AM, Seth Hillbrand wrote:
> Attached is the updated line styles patchset.  This implements the
> COLOR4D_PICKER_DIALOG and ensures that the alpha channel remains opaque.

I tested your patches and it looks great. Thank you :)

I found a minor issue when drawing new lines:
When drawing at small zoom levels (eg. fitting a whole A3 sheet on screen) new 
lines are
not previewed while drawing. Nevertheless they are displayed correctly after 
stopping
drawing.

When I zoom in on a smaller area of the sheet the preview is shown correctly.


Chris

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


Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-14 Thread Nick Østergaard
2017-11-14 8:59 GMT+01.00, jp charras :
> Le 13/11/2017 à 23:32, Seth Hillbrand a écrit :
>> Thanks for the heads up.  I rebased the patches to the current master at
>> d98fc85a836b861c29abae55f439aff2be856add
>>
>> The whitespace warnings appear to be wxFormBuilder generated code, so as
>> long as you don't have
>> strict whitespace checking, these should apply cleanly.
>>
>> Let me know if you have additional problems.
>>
>> Best-
>> Seth
>>
>
> Hi Seth,
> I tested your patch, and do not have issues.
>
> However I noticed you are using to select the line color the wxWidgets color
> selector dialog.
> We have a much better dialog (used in Pcbnew in GAL mode and Eeschema in the
> color config dialog).
> see: widgets/color4Dpickerdlg
> The Alpha channel must be disabled for Eeschema.
>
> Please use it.
>
> Thanks.
>
> --
> Jean-Pierre CHARRAS
>

Hi Seth

Thank you, the patched appied. But I only had time to test it now.

I just noticed that it seems like the dotted type is not with real
dots, but still quite elongated dots. This looks strange, because it
just look like a line with tiny "holes" in it. Is this how it is
supposed to be?

Nick

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


Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-14 Thread jp charras
Le 13/11/2017 à 23:32, Seth Hillbrand a écrit :
> Thanks for the heads up.  I rebased the patches to the current master at
> d98fc85a836b861c29abae55f439aff2be856add
> 
> The whitespace warnings appear to be wxFormBuilder generated code, so as long 
> as you don't have
> strict whitespace checking, these should apply cleanly.
> 
> Let me know if you have additional problems.
> 
> Best-
> Seth
> 

Hi Seth,
I tested your patch, and do not have issues.

However I noticed you are using to select the line color the wxWidgets color 
selector dialog.
We have a much better dialog (used in Pcbnew in GAL mode and Eeschema in the 
color config dialog).
see: widgets/color4Dpickerdlg
The Alpha channel must be disabled for Eeschema.

Please use it.

Thanks.

-- 
Jean-Pierre CHARRAS

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


Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-13 Thread Nick Østergaard
Hi Seth

This feature sounds great and something that I have wished for for a
long time. Thanks.

I just attempted to apply your patches, but the first does not apply
on d98fc85a8, which should be the current HEAD of upstream master
unless I did something stupid locally.

Nick

2017-11-13 19:35 GMT+01.00, Seth Hillbrand :
> Thanks JP for catching!
>
> I'm attaching the revised patchset with plot functionality implemented.  In
> digging through this, I also found a bug/typo that prevented HPGL from
> outputting any dashed lines.  This is now corrected.
>
> Additionally, the DXF plot had suppressed all non-solid lines, so I added
> the export functionality there for our 4 line types.
>
> I also bumped the eeschema version.
>
> Best-
> Seth
>
> On Sat, Nov 11, 2017 at 7:36 AM, Wayne Stambaugh 
> wrote:
>
>> On 11/11/2017 03:07 AM, jp charras wrote:
>> > Le 11/11/2017 à 05:51, Seth Hillbrand a écrit :
>> >> Wayne-
>> >>
>> >> Thank you for taking the time to look at this patch.  I recognize that
>> you and the other devs have a
>> >> lot on your plate, so I appreciate the constructive feedback. I'll
>> approach the list with a sketch
>> >> in the future for large patches.
>> >>
>> >> I've addressed the coding policy violations and dialog alignment
>> >> issues
>> in the attached patch.
>> >
>> > Hi Seth,
>> > Are you sure the plot functions can handle this line style parameter?
>>
>> Good catch JP.  Seth, this needs to be addressed for all of the plog and
>> print functions otherwise there will be a bunch of bug reports.  You may
>> have a substantial amount of additional work in order to fix all of this.
>>
>> >
>> >>
>> >> On Fri, Nov 10, 2017 at 4:40 PM, Wayne Stambaugh > >> > wrote:
>> >>
>> >>
>> >> Just because you found a work around in the parser does not mean
>> your
>> >> change does not constitute a file format change.  When someone
>> loads a
>> >> schematic in an earlier version of eeschema and saves the
>> schematic, all
>> >> of this information will be lost.  That smells like a file format
>> change
>> >> to me.  If I were going to accept this patch, it would require a
>> file
>> >> version bump.  I would also prefer that you didn't use tabs in the
>> file
>> >> writer.  Did you try loading this with stable version 4 which uses
>> the
>> >> old parser?
>> >>
>> >>
>> >> ​Agreed.  This is a format change and I understand the preference even
>> if it is backwards
>> >> compatible.  I have verified that schematics do open as expected in
>> 4.0.5 and 4.0.7 under Linux and
>> >> Mac.  Of course, 4.0.5 and 4.0.7 expect file format version '2' and
>> master currently writes version
>> >> '3', so there is the standard warning message about possible
>> >> problems.​
>>  But formatted lines revert
>> >> to standard graphic lines as expected.
>> >>
>> >> On the tabs issue, I'm afraid I'm not clear which tabs you are
>> referencing.  In the current
>> >> schematic file format, the wire data lines are indented with a tab but
>> that has been in place for
>> >> some time (at least since version 2).  But maybe I am misinterpreting
>> your comment here?
>> >>
>> >> ​Best-
>> >> Seth​
>> >
>> >
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>

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


Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-11 Thread Wayne Stambaugh
On 11/11/2017 03:07 AM, jp charras wrote:
> Le 11/11/2017 à 05:51, Seth Hillbrand a écrit :
>> Wayne-
>>
>> Thank you for taking the time to look at this patch.  I recognize that you 
>> and the other devs have a
>> lot on your plate, so I appreciate the constructive feedback. I'll approach 
>> the list with a sketch
>> in the future for large patches.
>>
>> I've addressed the coding policy violations and dialog alignment issues in 
>> the attached patch.
> 
> Hi Seth,
> Are you sure the plot functions can handle this line style parameter?

Good catch JP.  Seth, this needs to be addressed for all of the plog and
print functions otherwise there will be a bunch of bug reports.  You may
have a substantial amount of additional work in order to fix all of this.

> 
>>
>> On Fri, Nov 10, 2017 at 4:40 PM, Wayne Stambaugh > > wrote:
>>
>>
>> Just because you found a work around in the parser does not mean your
>> change does not constitute a file format change.  When someone loads a
>> schematic in an earlier version of eeschema and saves the schematic, all
>> of this information will be lost.  That smells like a file format change
>> to me.  If I were going to accept this patch, it would require a file
>> version bump.  I would also prefer that you didn't use tabs in the file
>> writer.  Did you try loading this with stable version 4 which uses the
>> old parser?
>>
>>
>> ​Agreed.  This is a format change and I understand the preference even if it 
>> is backwards
>> compatible.  I have verified that schematics do open as expected in 4.0.5 
>> and 4.0.7 under Linux and
>> Mac.  Of course, 4.0.5 and 4.0.7 expect file format version '2' and master 
>> currently writes version
>> '3', so there is the standard warning message about possible problems.​  But 
>> formatted lines revert
>> to standard graphic lines as expected.
>>
>> On the tabs issue, I'm afraid I'm not clear which tabs you are referencing.  
>> In the current
>> schematic file format, the wire data lines are indented with a tab but that 
>> has been in place for
>> some time (at least since version 2).  But maybe I am misinterpreting your 
>> comment here? 
>>
>> ​Best-
>> Seth​
> 
> 

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


Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-11 Thread Wayne Stambaugh
I don't see here you bumped the schematic file version.  Also, I forgot
to mention that you need to add the "Fixes lp:XXX" to the commit
message when a patch fixes a bug report so that the kicad janitor can
automatically tag the bug report as "fix committed".

Thanks,

Wayne

On 11/10/2017 11:51 PM, Seth Hillbrand wrote:
> Wayne-
> 
> Thank you for taking the time to look at this patch.  I recognize that
> you and the other devs have a lot on your plate, so I appreciate the
> constructive feedback. I'll approach the list with a sketch in the
> future for large patches.
> 
> I've addressed the coding policy violations and dialog alignment issues
> in the attached patch.
> 
> On Fri, Nov 10, 2017 at 4:40 PM, Wayne Stambaugh  > wrote:
> 
> 
> Just because you found a work around in the parser does not mean your
> change does not constitute a file format change.  When someone loads a
> schematic in an earlier version of eeschema and saves the schematic, all
> of this information will be lost.  That smells like a file format change
> to me.  If I were going to accept this patch, it would require a file
> version bump.  I would also prefer that you didn't use tabs in the file
> writer.  Did you try loading this with stable version 4 which uses the
> old parser?
> 
> 
> ​Agreed.  This is a format change and I understand the preference even
> if it is backwards compatible.  I have verified that schematics do open
> as expected in 4.0.5 and 4.0.7 under Linux and Mac.  Of course, 4.0.5
> and 4.0.7 expect file format version '2' and master currently writes
> version '3', so there is the standard warning message about possible
> problems.​  But formatted lines revert to standard graphic lines as
> expected.
> 
> On the tabs issue, I'm afraid I'm not clear which tabs you are
> referencing.  In the current schematic file format, the wire data lines
> are indented with a tab but that has been in place for some time (at
> least since version 2).  But maybe I am misinterpreting your comment here? 
> 
> ​Best-
> Seth​
> 

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


Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-11 Thread jp charras
Le 11/11/2017 à 05:51, Seth Hillbrand a écrit :
> Wayne-
> 
> Thank you for taking the time to look at this patch.  I recognize that you 
> and the other devs have a
> lot on your plate, so I appreciate the constructive feedback. I'll approach 
> the list with a sketch
> in the future for large patches.
> 
> I've addressed the coding policy violations and dialog alignment issues in 
> the attached patch.

Hi Seth,
Are you sure the plot functions can handle this line style parameter?

> 
> On Fri, Nov 10, 2017 at 4:40 PM, Wayne Stambaugh  > wrote:
> 
> 
> Just because you found a work around in the parser does not mean your
> change does not constitute a file format change.  When someone loads a
> schematic in an earlier version of eeschema and saves the schematic, all
> of this information will be lost.  That smells like a file format change
> to me.  If I were going to accept this patch, it would require a file
> version bump.  I would also prefer that you didn't use tabs in the file
> writer.  Did you try loading this with stable version 4 which uses the
> old parser?
> 
> 
> ​Agreed.  This is a format change and I understand the preference even if it 
> is backwards
> compatible.  I have verified that schematics do open as expected in 4.0.5 and 
> 4.0.7 under Linux and
> Mac.  Of course, 4.0.5 and 4.0.7 expect file format version '2' and master 
> currently writes version
> '3', so there is the standard warning message about possible problems.​  But 
> formatted lines revert
> to standard graphic lines as expected.
> 
> On the tabs issue, I'm afraid I'm not clear which tabs you are referencing.  
> In the current
> schematic file format, the wire data lines are indented with a tab but that 
> has been in place for
> some time (at least since version 2).  But maybe I am misinterpreting your 
> comment here? 
> 
> ​Best-
> Seth​


-- 
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] [FEATURE] Eeschema Line Styles

2017-11-10 Thread Seth Hillbrand
Wayne-

Thank you for taking the time to look at this patch.  I recognize that you
and the other devs have a lot on your plate, so I appreciate the
constructive feedback. I'll approach the list with a sketch in the future
for large patches.

I've addressed the coding policy violations and dialog alignment issues in
the attached patch.

On Fri, Nov 10, 2017 at 4:40 PM, Wayne Stambaugh 
wrote:

>
> Just because you found a work around in the parser does not mean your
> change does not constitute a file format change.  When someone loads a
> schematic in an earlier version of eeschema and saves the schematic, all
> of this information will be lost.  That smells like a file format change
> to me.  If I were going to accept this patch, it would require a file
> version bump.  I would also prefer that you didn't use tabs in the file
> writer.  Did you try loading this with stable version 4 which uses the
> old parser?
>

​Agreed.  This is a format change and I understand the preference even if
it is backwards compatible.  I have verified that schematics do open as
expected in 4.0.5 and 4.0.7 under Linux and Mac.  Of course, 4.0.5 and
4.0.7 expect file format version '2' and master currently writes version
'3', so there is the standard warning message about possible problems.​
 But formatted lines revert to standard graphic lines as expected.

On the tabs issue, I'm afraid I'm not clear which tabs you are
referencing.  In the current schematic file format, the wire data lines are
indented with a tab but that has been in place for some time (at least
since version 2).  But maybe I am misinterpreting your comment here?

​Best-
Seth​
From 1de93ee05557026f0d36ee119815ffa307927f7e Mon Sep 17 00:00:00 2001
From: Seth Hillbrand 
Date: Tue, 31 Oct 2017 09:33:37 -0700
Subject: [PATCH] Eeschema: Adding line styling options

NEW: Adds support in eeschema for changing the default line style,
width and color on a case-by-case basis.

CHANGED: "Wire" lines now optionally include data on the line style,
width and color if they differ from the default.

Fixes: lp:594059
* https://bugs.launchpad.net/kicad/+bug/594059

Fixes: lp:1405026
* https://bugs.launchpad.net/kicad/+bug/1405026
---
 common/gr_basic.cpp  |  29 +-
 eeschema/CMakeLists.txt  |   2 +
 eeschema/dialogs/dialog_edit_line_style.cpp  |  95 +++
 eeschema/dialogs/dialog_edit_line_style.h|  67 +++
 eeschema/dialogs/dialog_edit_line_style_base.cpp | 111 
 eeschema/dialogs/dialog_edit_line_style_base.fbp | 721 +++
 eeschema/dialogs/dialog_edit_line_style_base.h   |  67 +++
 eeschema/sch_collectors.cpp  |   1 +
 eeschema/sch_legacy_plugin.cpp   |  33 +-
 eeschema/sch_line.cpp| 164 +-
 eeschema/sch_line.h  |  25 +
 eeschema/schedit.cpp |   2 +
 eeschema/schframe.h  |  10 +
 include/gr_basic.h   |   6 +-
 14 files changed, 1312 insertions(+), 21 deletions(-)
 create mode 100644 eeschema/dialogs/dialog_edit_line_style.cpp
 create mode 100644 eeschema/dialogs/dialog_edit_line_style.h
 create mode 100644 eeschema/dialogs/dialog_edit_line_style_base.cpp
 create mode 100644 eeschema/dialogs/dialog_edit_line_style_base.fbp
 create mode 100644 eeschema/dialogs/dialog_edit_line_style_base.h

diff --git a/common/gr_basic.cpp b/common/gr_basic.cpp
index 0ca4edccb..258a3eada 100644
--- a/common/gr_basic.cpp
+++ b/common/gr_basic.cpp
@@ -356,18 +356,19 @@ void GRLine( EDA_RECT* ClipBox,
  int   x2,
  int   y2,
  int   width,
- COLOR4D   Color )
+ COLOR4D   Color,
+ wxPenStyle aStyle)
 {
-GRSetColorPen( DC, Color, width );
+GRSetColorPen( DC, Color, width, aStyle );
 WinClipAndDrawLine( ClipBox, DC, x1, y1, x2, y2, width );
 GRLastMoveToX = x2;
 GRLastMoveToY = y2;
 }
 
 
-void GRLine( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd, int aWidth, COLOR4D aColor )
+void GRLine( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd, int aWidth, COLOR4D aColor, wxPenStyle aStyle )
 {
-GRLine( aClipBox, aDC, aStart.x, aStart.y, aEnd.x, aEnd.y, aWidth, aColor );
+GRLine( aClipBox, aDC, aStart.x, aStart.y, aEnd.x, aEnd.y, aWidth, aColor, aStyle );
 }
 
 
@@ -375,13 +376,15 @@ void GRDashedLine( EDA_RECT* ClipBox, wxDC* DC,
int x1, int y1, int x2, int  y2,
int   width, COLOR4D Color )
 {
-GRLastMoveToX  = x2;
-GRLastMoveToY  = y2;
-s_DC_lastcolor = COLOR4D::UNSPECIFIED;
-GRSetColorPen( DC, Color, width, wxPENSTYLE_SHORT_DASH );
-WinClipAndDrawLine( ClipBox, DC, x1, y1, x2, y2, width );
-s_DC_lastcolor = COLOR4D::UNSPECIFIED;
-GRSetColorPen( DC, Color, width );
+GRLine( ClipBox, DC, 

Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-10 Thread Wayne Stambaugh
Seth,

I have a few comments on this patch.

First and foremost, you should have gotten input before you spent the
time and effort doing this.  It may have saved you some grief.  I also
know there is a tendency to make a big push to get last minute changes
in before the upcoming feature freeze so that is not helping your cause.

There are few coding policy issues.  Two spaces are required between
function definitions in cpp source files.  It also preferable to have a
empty line before and after control blocks so it's easier to see where
they begin and end.  Other than that, everything else looks fine.

On 11/10/2017 1:50 PM, Seth Hillbrand wrote:
> One of the Eeschema features that has been requested for a while is
> customizable graphic line styles that allow greater differentiation in
> schematic documentation.  c.f. 
> https://bugs.launchpad.net/kicad/+bug/594059
> https://bugs.launchpad.net/kicad/+bug/1405026
> 
> The limitation has been not wanting to change the existing schematic format.
> 
> I propose a way around this while implementing the desired feature. 
> Specifically, the attached patch allows the user to customize graphic
> lines (schematic wires are disallowed), with the extra wire data being
> stored at the end of the wire line.  This change should be transparent
> to the existing schematic format as the trailing characters are ignored
> in the legacy file reader.  Thus customization will be ignored if you
> are sharing files between versions.

Just because you found a work around in the parser does not mean your
change does not constitute a file format change.  When someone loads a
schematic in an earlier version of eeschema and saves the schematic, all
of this information will be lost.  That smells like a file format change
to me.  If I were going to accept this patch, it would require a file
version bump.  I would also prefer that you didn't use tabs in the file
writer.  Did you try loading this with stable version 4 which uses the
old parser?

> 
> Second, to avoid large, useless diffs in versioning storage, the patch
> does not store any additional formatting data unless it has been changed
> from the default.

This is always a good idea IMO.  Creating unnecessary file diffs makes
our VCS users happy.

> 
> I'm attaching an image showing the line edit dialog as well as the patch
> implementing this.  Please let me know if there are any questions or
> suggestions for improvement.

The dialog alignment could use some work but overall it looks good.  If
you make the changes I suggested and no one else strongly objects, I
would be willing to permit this change even though it goes against my
better judgement.

Cheers,

Wayne

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


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


Re: [Kicad-developers] [FEATURE] Eeschema Line Styles

2017-11-10 Thread eldar.khayrullin
Good work. I want to this change will be merged too


Отправлено с устройства Samsung.
 Исходное сообщение От: Seth Hillbrand 
<seth.hillbr...@gmail.com> Дата: 10.11.17  21:50  (GMT+03:00) Кому: KiCad 
Developers <kicad-developers@lists.launchpad.net> Тема: [Kicad-developers] 
[FEATURE] Eeschema Line Styles 
One of the Eeschema features that has been requested for a while is 
customizable graphic line styles that allow greater differentiation in 
schematic documentation.  c.f. 
https://bugs.launchpad.net/kicad/+bug/594059https://bugs.launchpad.net/kicad/+bug/1405026

The limitation has been not wanting to change the existing schematic format.
I propose a way around this while implementing the desired feature.  
Specifically, the attached patch allows the user to customize graphic lines 
(schematic wires are disallowed), with the extra wire data being stored at the 
end of the wire line.  This change should be transparent to the existing 
schematic format as the trailing characters are ignored in the legacy file 
reader.  Thus customization will be ignored if you are sharing files between 
versions.
Second, to avoid large, useless diffs in versioning storage, the patch does not 
store any additional formatting data unless it has been changed from the 
default.
I'm attaching an image showing the line edit dialog as well as the patch 
implementing this.  Please let me know if there are any questions or 
suggestions for improvement.
Best-Seth

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