[Kicad-developers] [PATCH] portability: replace round() with KiROUND()

2015-07-16 Thread Simon Richter
The round() function is C98/C++11 only, which is why there is a special KiROUND() function that is used almost everywhere for rounding. This collects the remaining stragglers. --- common/gal/graphics_abstraction_layer.cpp | 16 pcbnew/dialogs/dialog_move_exact.cpp | 2 +-

Re: [Kicad-developers] About collaboration, simulation, documentation, organisation, usability and documentation

2015-11-17 Thread Simon Richter
Hi, Am 05.11.2015 um 03:45 schrieb Mark Roszko: >> I have repeatedly asked that devs do incremental changes so I can >> easily review them. > It's hard to do refactoring when your one commit has to throw out the > kitchen sink. However, it is often possible to submit multiple commits of the

[Kicad-developers] [PATCH] Update copyright year in template

2015-10-09 Thread Simon Richter
Hi, this should get us over the next three months. Simon --- copyright.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/copyright.h b/copyright.h index 79a50ec..4110151 100644 --- a/copyright.h +++ b/copyright.h @@ -12,8 +12,8 @@ may choose to document this

[Kicad-developers] Ownership semantics for EDA_DRAW_FRAME::m_currentScreen

2015-09-05 Thread Simon Richter
Hi, I'm trying to figure out who is owning the *_SCREEN object pointed to by EDA_DRAW_FRAME::m_currentScreen. In EDA_DRAW_FRAME::~EDA_DRAW_FRAME(), the object pointed to is deleted, which suggests to me that the draw frame has some sort of ownership, however this will only delete the last object

[Kicad-developers] [PATCH] Use CMake provided tests for -fvisibility

2015-09-05 Thread Simon Richter
Hi, CMake provides a readymade test for the GCC/CLang -fvisibility= flag. This removes our own test and uses the result from CMake. I've left the test for "NOT APPLE" in place -- is there a particular reason why we do that? Simon --- CMakeLists.txt | 16

[Kicad-developers] [PATCH] Clarify ownership semantics

2015-09-05 Thread Simon Richter
SCREEN objects are typically owned by the DRAW_FRAME they are attached to. SCH_SCREEN objects may additionally be shared between one DRAW_FRAME, and multiple SCH_SHEET objects, so they are reference counted. To make this distinction more obvious, and avoid potential errors, move the pointer

[Kicad-developers] [PATCH] Cleanup: Drop unnecessary casts

2015-09-02 Thread Simon Richter
Hi, small cleanup: there are a few unnecessary casts because the covariant return already does the right thing. Where we get the screen object only in order to get the active layer, use the accessor function directly. Simon --- include/wxBasePcbFrame.h | 4 ++--

Re: [Kicad-developers] c++ CXX?

2015-09-06 Thread Simon Richter
Hi, On 06.09.2015 13:11, Mário Luzeiro wrote: > what is the c++ standard? that kicad is building? Please make a X in one of > the following options: Currently we appear to be using C++98, with a number of nonstandard GNU extensions. C++11 would be nice. C++14 is too new, compiler support is

[Kicad-developers] [PATCH v2] merge FindwxWidgets.cmake with newer version

2015-09-06 Thread Simon Richter
Hi, this updates our copy of FindwxWidgets.cmake to a state that is fairly close to what is in the CMake repository. The remaining improvements over their version are - version check - forward compatibility with 3.1 (looking for wx-config-3.1) - handling for the "webview" component These

[Kicad-developers] [PATCH] Move OpenMP out of gcc/clang conditional

2015-09-06 Thread Simon Richter
Hi, CMake's test for OpenMP is generic enough to work anywhere, so there is no good reason to make it conditional on gcc/clang. This moves the OpenMP handling to the CMakeLists.txt toplevel. Simon --- CMakeLists.txt | 33 +++-- 1 file changed, 19 insertions(+),

[Kicad-developers] [PATCH] Drop gcc optimizer bug workaround

2015-09-06 Thread Simon Richter
Hi, As boost::polygon is gone, we can drop the workaround for older gcc. Simon --- CMakeLists.txt | 15 --- 1 file changed, 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e79fc9..b76c48d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -171,21 +171,6 @@

[Kicad-developers] [PATCH] Remove superfluous include in the middle of source file

2015-09-06 Thread Simon Richter
Hi, probably an oversight after removing debug code. This is not needed, and in the middle of a source file, between functions. Simon --- pcbnew/autorouter/rect_placement/rect_placement.cpp | 1 - 1 file changed, 1 deletion(-) diff --git

[Kicad-developers] [PATCH] Use CMake function for position independent code

2015-09-06 Thread Simon Richter
Hi, CMake provides a simple declarative statement to enable PIC, so no compiler dependent handling is required. There is also no need to tell Boost to build with -fPIC, their build system is smart enough. Simon --- CMakeLists.txt| 13 -

[Kicad-developers] [PATCH v2] Use CMake high-level facility for visibility

2015-09-06 Thread Simon Richter
Hi, this is an improved version of the earlier patch, using the visibility handling in CMake 3.3, and falling back to changing the global CXXFLAGS on previous versions. As CMake 3.3 attempts to be compatible with earlier versions, the new behaviour needs to be explicitly enabled until 3.3

[Kicad-developers] [PATCH] pin table: Allow ungrouping

2015-09-06 Thread Simon Richter
Hi, this allows to undo the grouping in the pin table, by right clicking on the column header of the currently active grouping column -- this allows you to go back to a fully flat table. Simon --- eeschema/dialogs/dialog_lib_edit_pin_table.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3

[Kicad-developers] [PATCH 2/2] Add missing dependency pcbcommon -> netlist_lexer_source_files

2015-09-13 Thread Simon Richter
netlist_reader.h is also used by pcbcommon, so a dependency is necessary. --- common/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 2b558c4..2d843cf 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -388,6

[Kicad-developers] [PATCH] Make declarations of SELECTION consistent

2015-09-13 Thread Simon Richter
Hi, this is an actual problem with VS 2015, which uses different name mangling rules for "struct" and "class". This makes all instances use "struct". Simon --- pcbnew/dialogs/dialog_track_via_properties.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Kicad-developers] [PATCH] portability: add missing C++ stdlib headers

2015-09-13 Thread Simon Richter
Hi, this adds a number of missing includes. On gcc, other system includes use these internally, but that is not guaranteed. Simon --- common/gal/graphics_abstraction_layer.cpp | 2 ++ common/grid_tricks.cpp | 2 ++ common/selcolor.cpp

Re: [Kicad-developers] [PATCH] Fixed a False BZR Version Number Built From Local Branch of GIT-Source-Mirror

2015-09-14 Thread Simon Richter
Hi, On 14.09.2015 04:28, Mark Roszko wrote: > Now anyone using the newer git-remote-bzr is in for fun as well > because there is no such thing as "origin/HEAD". origin/HEAD is automatically created with git-remote-bzr, but not restored if lost. You can recreate it via echo "ref:

Re: [Kicad-developers] [PATCH] Fixed a False BZR Version Number Built From Local Branch of GIT-Source-Mirror

2015-09-13 Thread Simon Richter
Hi, > Looks ok to me, except that the naming of the _git_LONG_HASH_ORIGIN > variable does not match what it is, it should have been > _git_LONG_HASH_LOCAL instead. This completely fails to compile for me: | [ 11%] Generating version string header | -- Using Git to determine build version

Re: [Kicad-developers] [PATCH 1/2] Last argument before ellipsis may not be reference

2015-09-13 Thread Simon Richter
Hi, On 13.09.2015 17:55, Lorenzo Marcantonio wrote: > I suppose that is talking about the implementation of va_start: address > of last+sizeof of last gives the starting point of the va_list (in the > 'correct' stack direction, obviously); am I correct? Indeed. The standard is written so va_*

Re: [Kicad-developers] [PATCH] Fixed a False BZR Version Number Built From Local Branch of GIT-Source-Mirror

2015-09-13 Thread Simon Richter
Hi, On 13.09.2015 20:29, Simon Richter wrote: > This completely fails to compile for me: Okay, when I wipe my local repository and repeat the checkout, it works. Having a fallback to origin/master and/or more graceful handling of a missing origin/HEAD reference would be great though. Si

[Kicad-developers] BOX2::SetMaximum()

2015-09-14 Thread Simon Richter
Hi, while investigating an internal compiler error[1] in MSVC, I ran across this function. My feeling is that it is broken: For int: top_left = std::numeric_limits::min() / 2 + std::numeric_limits::epsilon(); size = std::numeric_limits::max() -

Re: [Kicad-developers] BOX2::SetMaximum()

2015-09-14 Thread Simon Richter
Hi, On 14.09.2015 19:10, Mark Roszko wrote: > Weird, its supposed to be 0 for ints. > http://en.cppreference.com/w/cpp/types/numeric_limits/epsilon I was referring to the bit where it says "It is only meaningful if std::numeric_limits::is_integer == false". I think it's not a big problem for

Re: [Kicad-developers] Version 4 stable branch rc1 released.

2015-09-14 Thread Simon Richter
Hi, Am 14.09.2015 um 23:58 schrieb Adam Wolf: [.deb packages] > Isn't that what's in the reynauld PPA? No, that's for Ubuntu -- they happen to use the same package format, but packages are generally not expected to be compatible. Simon signature.asc Description: OpenPGP digital

Re: [Kicad-developers] Supported platforms / compiler / standard library versions

2015-09-22 Thread Simon Richter
Hi, On 19.09.2015 23:05, Wayne Stambaugh wrote: > No such document but basically gcc on linux and windows and clang on > osx. The official policy on MS VS is that we will not support it. VS 2015 is broken to the extent that it fails to compile some of the template code in VECTOR2<> and BOX<>,

Re: [Kicad-developers] Printer HP laserjet P1102w OS debian 8.2 Kicad BZR 4027 not printing tracks only solder marks.

2015-12-04 Thread Simon Richter
Hi, Am 04.12.2015 um 06:46 schrieb Ike Shields: > In the print screen on R/H side; > > Under Copper layers Tick is on “B.cu” In the main window, on the right hand side, there are two tabs, "Layers" and "Render". The former is overridden by the layer selection in the print dialog, but the

[Kicad-developers] Debian packages

2015-12-05 Thread Simon Richter
Hi, I've made a backport of RC1 to Debian jessie -- release backports will happen once the release has hit unstable. The same packages have been uploaded to Debian, so if you have jessie-backports configured in your sources.list, your system should silently switch over to the release package

Re: [Kicad-developers] [PATCH 2/4] Use CMake function for position independent code

2015-12-08 Thread Simon Richter
Hi, On 08.12.2015 22:52, Wayne Stambaugh wrote: > I asked Simon if he could figure out how to make it less noisy. I > haven't heard back from him yet. >>> CMake Warning (dev) at utils/idftools/CMakeLists.txt:17 (add_executable): >>> Policy CMP0063 is not set: Honor visibility properties for

Re: [Kicad-developers] [PATCH] Copper layers selected by default in plot dialog

2015-12-03 Thread Simon Richter
Hi, Am 03.12.2015 um 20:11 schrieb Jon Neal: > With this patch when you add new layers in pcbnew they will be selected > by default for plotting. that is LP#1507822. -- https://bugs.launchpad.net/kicad/+bug/1507822 Simon signature.asc Description: OpenPGP digital signature

Re: [Kicad-developers] [PATCH 2/4] Use CMake function for position independent code

2015-12-10 Thread Simon Richter
Hi, > - set( BOOST_CFLAGS "cflags=${PIC_FLAG}" ) > - set( BOOST_CXXFLAGS "cxxflags=${PIC_FLAG}" ) > because cmake will only set -fpic in CFLAGS but the entire cmake file > uses BOOST_CFLAGS and never passes the plain CFLAGS The Boost build knows on its own that it needs -fPIC -- except if you

[Kicad-developers] On pin/unit swapping

2015-12-10 Thread Simon Richter
Hi, I'm thinking about adding some support for pin and unit swapping. To make it maximally useful, I'd like to generate a list of alternative mappings inside the netlist, and add the actual swap functionality inside pcbnew -- so if it turns out that the layout becomes easier if two pins are

Re: [Kicad-developers] [PATCH 4/4] Drop gcc optimizer bug workaround

2015-12-14 Thread Simon Richter
Hi, Am 14.12.2015 um 16:01 schrieb Mark Roszko: > Stupid question, doesn't this change remove -O2 entirely for all gcc > builds? Previously it defaulted to -O2 if the bug wasn't present. Now > it never optimizes as -O0 is the default. The default depends on the build type -- if your source tree

Re: [Kicad-developers] On pin/unit swapping

2015-12-11 Thread Simon Richter
Hi Wayne, On 11.12.2015 20:23, Wayne Stambaugh wrote: > Not until after the new schematic and symbol library file formats are > implemented. Support for pin and unit swapping will be built in to the > new symbol library file format. That would be fairly orthogonal to what I'm suggesting -- I'd

Re: [Kicad-developers] [PATCH] Remove remaining references to KICAD_SKIP_BOOST

2016-01-03 Thread Simon Richter
Hi Wayne, On 04.01.2016 00:50, Wayne Stambaugh wrote: > I forgot to delete download_avhttp.cmake and the avhttp source zip file > so this patch wont be necessary. There is still a paragraph on KICAD_SKIP_BOOST in the documentation. Simon signature.asc Description: OpenPGP digital

[Kicad-developers] [PATCH] Remove remaining references to KICAD_SKIP_BOOST

2016-01-03 Thread Simon Richter
Hi, this removes two leftover references to KICAD_SKIP_BOOST. Simon --- CMakeModules/download_avhttp.cmake | 9 + Documentation/development/compiling.md | 8 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/CMakeModules/download_avhttp.cmake

Re: [Kicad-developers] Changing the CMAKE_BUILD_TYPE flag

2016-01-04 Thread Simon Richter
Hi, On 04.01.2016 04:50, Jon Neal wrote: > Is there any chance that the CMAKE_BUILD_TYPE flag could be changed from > Product to Debug by default? It is the only flag I have to include when > I run cmake now and I often forget to set it. The goal is to make it easy for the people who want to

Re: [Kicad-developers] [rfc] actual sexpression parsing

2015-12-20 Thread Simon Richter
Hi, On 21.12.2015 08:35, Lorenzo Marcantonio wrote: > After this I'm *not* advocating a binary format, there would be no > advantage for it in pcbnew. There are no performance restraints in > either speed or space for kicad files so just use whatever is easier for > you to manage (i.e.

Re: [Kicad-developers] FOSDEM 2016

2015-12-18 Thread Simon Richter
Hi, > Just a quick heads up. I just made my travel arrangements for FOSDEM > 2016. That always makes it feel official to me. Please try to attend > if you can manage it. I would like to meet as many of the KiCad > developers as possible. I can tell you that EDA dev room dinner > Saturday

[Kicad-developers] [PATCH 0/5] Pin summary for pin table

2015-12-27 Thread Simon Richter
Hi, this patch set implements a summary line for the pin table, listing the currently defined pins, to quickly check whether any pins have been forgotten. If pins 1,2,3,4,5,6,8,9,10,11,12 are defined, the status bar then reads "1-6,8-12". Simon Simon Richter (5): Split off

[Kicad-developers] [PATCH 1/5] Split off pin number comparison

2015-12-27 Thread Simon Richter
/eeschema/pin_number.cpp b/eeschema/pin_number.cpp new file mode 100644 index 000..9f5f9ea --- /dev/null +++ b/eeschema/pin_number.cpp @@ -0,0 +1,134 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2015 Simon Richter + * Copyright (C) 20

[Kicad-developers] [PATCH 4/5] Add pin number summary

2015-12-27 Thread Simon Richter
Below the pin table, display which pins are currently defined, in order to find gaps. --- eeschema/dialogs/dialog_lib_edit_pin_table.cpp | 27 +++ eeschema/dialogs/dialog_lib_edit_pin_table.h | 2 + .../dialogs/dialog_lib_edit_pin_table_base.cpp | 3 +

[Kicad-developers] [PATCH 2/5] Move comparison helper class to generic header

2015-12-27 Thread Simon Richter
This class wraps the comparison function in a way that is compatible with std::map and std::set. This, too is generally useful, so it should be moved to the generic header. At the same time, the criterium for less-than is changed from "equal to -1" to "smaller than 0", because technically the

[Kicad-developers] [PATCH 3/5] Move container functionality

2015-12-27 Thread Simon Richter
The "set of pin numbers" functionality is also useful outside the pin table dialog, so create a wrapper class that exposes the relevant interfaces. --- eeschema/dialogs/dialog_lib_edit_pin_table.cpp | 2 +- eeschema/pin_number.h | 21 + 2 files

[Kicad-developers] [PATCH 5/5] Compress consecutive numbers in pin summary.

2015-12-27 Thread Simon Richter
For pin numbers ending in digits, consecutive numbers are collapsed to ranges for a better overview. --- eeschema/pin_number.cpp | 49 +++-- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/eeschema/pin_number.cpp

[Kicad-developers] [PATCH 4/4] Drop gcc optimizer bug workaround

2015-11-30 Thread Simon Richter
As boost::polygon is gone, we can drop the workaround for older gcc. --- CMakeLists.txt | 15 --- 1 file changed, 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec89978..cd3e1bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -171,21 +171,6 @@ if(

Re: [Kicad-developers] Not Print Debian 8.2 Kicad BZR 4027 Printer HP Laserjet P1102w

2015-11-30 Thread Simon Richter
Hi, On 01.12.2015 07:52, Ike Shields wrote: > I did an update and it back that I was up to date? Also, I just noticed. The bzr 4027 version is ancient. The 4.0.0 version is not contained in Debian stable, and will not be included there either, as Debian never updates stable releases. I believe

[Kicad-developers] [PATCH 3/4] Allow OpenMP with non-gcc compilers

2015-11-30 Thread Simon Richter
This simply moves the OpenMP handling code out of the gcc specific block with no code changes. This is safe because OpenMP detection is portable. --- CMakeLists.txt | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt

[Kicad-developers] [PATCH 1/4] Use CMake high-level facility for visibility

2015-11-30 Thread Simon Richter
CMake 3.0 defines two new variables, * CMAKE_CXX_VISIBILITY_PRESET and * CMAKE_VISIBILITY_INLINES_HIDDEN to control whether symbols not explicitly tagged for export are implicitly exported. Because only version 3.3 and following also applies that to static libraries when in 3.3 mode,

[Kicad-developers] [PATCH 2/4] Use CMake function for position independent code

2015-11-30 Thread Simon Richter
CMake provides a simple declarative statement to enable PIC, so no compiler dependent handling is required. There is also no need to tell Boost to build with -fPIC, their build system is smart enough. --- CMakeLists.txt| 13 - CMakeModules/download_boost.cmake |

Re: [Kicad-developers] Not Print Debian 8.2 Kicad BZR 4027 Printer HP Laserjet P1102w

2015-11-30 Thread Simon Richter
Hi, On 01.12.2015 07:52, Ike Shields wrote: > I am having trouble printing the last part (print to copper. it is the > printed to photo paper then laminated onto Copper) when I print all I > get is the small drill holes and solder pads no tracks. Could it be that some of the "Layer" or

Re: [Kicad-developers] [PATCH 4/4] Drop gcc optimizer bug workaround

2015-12-01 Thread Simon Richter
Hi, On 01.12.2015 09:07, jp charras wrote: >> As boost::polygon is gone, we can drop the workaround for older gcc. > boost::polygon is gone, not the gcc bug. > This is likely a gcc bug, not a boost::polygon bug. Indeed, but the code that triggered the bug is gone, so it shouldn't affect us any

Re: [Kicad-developers] [PATCH 1/2] pin table: Add GetString() to retrieve string value for column

2016-01-13 Thread Simon Richter
Hi Chris, Am 13.01.2016 um 02:23 schrieb Chris Pavlina: > This patch doesn't apply to the latest revision for me, at very least > the line numbers are off. Might have to rebase. Ah yes, that is on top of the other stack of patches I sent, where I split out the comparison function into a new

Re: [Kicad-developers] [PATCH 0/2] Two small pin table improvements

2016-01-13 Thread Simon Richter
Hi Nick, Am 13.01.2016 um 09:03 schrieb Nick Østergaard: > There is no attached patch. Yes, if there are multiple patches I occasionally write a cover letter marked [0/x] that contains the blurb that shouldn't go into the commit log -- so "git am" can import my commit messages directly. This is

[Kicad-developers] [PATCH] portability: synchronize FindwxWidgets.cmake with CMake project

2016-01-12 Thread Simon Richter
Hi, this brings our copy of FindwxWidgets.cmake in sync with the version in the CMake repository. Since last September, CMake includes our changes (version check, wx 3.1, support for webview component), and these have been released with CMake 3.4. The change to drop the -isystem special handling

[Kicad-developers] [PATCH 2/2] pin table: Support flat table

2016-01-12 Thread Simon Richter
--- eeschema/dialogs/dialog_lib_edit_pin_table.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp index 63d8226..52c399f 100644 ---

[Kicad-developers] [PATCH 1/2] pin table: Add GetString() to retrieve string value for column

2016-01-12 Thread Simon Richter
This is in anticipation of the introduction of icons -- retrieving all the icons and throwing them away during sorting takes ages. --- eeschema/dialogs/dialog_lib_edit_pin_table.cpp | 88 ++ 1 file changed, 47 insertions(+), 41 deletions(-) diff --git

[Kicad-developers] [PATCH 0/2] Two small pin table improvements

2016-01-12 Thread Simon Richter
Hi, these are two small pin table improvements: a direct string access avoiding the wxVariant wrapping/unwrapping for internal functions (major speedup in sorting), and a way to undo the grouping in the pin table in order to get a flat table. Simon Simon Richter (2): pin table: Add

Re: [Kicad-developers] DEBUG vs NDEBUG

2016-06-04 Thread Simon Richter
Hi, On 02.06.2016 02:32, Wayne Stambaugh wrote: > Ahh, the old double negative. Using !NDEBUG would be ugly but I suppose > it would be effective. I'm not sure why cmake isn't defining DEBUG for > debug builds. I thought at one time it did but I could be wrong. We define it manually in the

[Kicad-developers] [PATCH 13/16] Avoid static variable in wire merge

2016-06-07 Thread Simon Richter
There is little to no reason why this variable should be static, given that it is cleared after each iteration. --- eeschema/sch_line.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eeschema/sch_line.cpp b/eeschema/sch_line.cpp index 72efb5c..050b786 100644 ---

[Kicad-developers] [PATCH 08/16] Drop extra copy ctors from IFSG_NODE

2016-06-07 Thread Simon Richter
This is unnecessary -- explicitly specifying the regular copy ctor will inhibit any generated versions anyway. --- include/plugins/3dapi/ifsg_node.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/plugins/3dapi/ifsg_node.h b/include/plugins/3dapi/ifsg_node.h index 6b3641e..f949c80

[Kicad-developers] [PATCH 11/16] Clarify ownership semantics

2016-06-07 Thread Simon Richter
SCREEN objects are typically owned by the DRAW_FRAME they are attached to. SCH_SCREEN objects may additionally be shared between one DRAW_FRAME, and multiple SCH_SHEET objects, so they are reference counted. To make this distinction more obvious, and avoid potential errors, move the pointer

[Kicad-developers] [PATCH 00/16] Simple patches

2016-06-07 Thread Simon Richter
Simon Richter (16): Fix spelling "propage" -> "propagate" Add missing dependency github_plugin -> pcbcommon Clarify ERC: we're iterating netlist items, not nets Explain how ERC works. Cache netlist item during ERC Check sorting of netlist during ERC Kill unuse

[Kicad-developers] [PATCH 10/16] Replace unshared boost::shared_array with std::unique_ptr

2016-06-07 Thread Simon Richter
These are never shared, so std::unique_ptr works fine, and std::unique_ptr has a specialisation for array types that uses "operator delete[]", so this is still correct. --- common/gal/opengl/opengl_gal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Kicad-developers] [PATCH 12/16] Make NETLIST_OBJECT::GetConnectionType() const

2016-06-07 Thread Simon Richter
This function does not need to modify object state. --- eeschema/class_netlist_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/class_netlist_object.h b/eeschema/class_netlist_object.h index 9608f90..403bade 100644 --- a/eeschema/class_netlist_object.h +++

[Kicad-developers] [PATCH 14/16] Reserve appropriate space in local vector

2016-06-07 Thread Simon Richter
This is just a speed optimization -- preallocate four items to avoid reallocations. --- eeschema/sch_line.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/eeschema/sch_line.cpp b/eeschema/sch_line.cpp index 050b786..6d86b5d 100644 --- a/eeschema/sch_line.cpp +++ b/eeschema/sch_line.cpp

[Kicad-developers] [PATCH 07/16] Kill unused NETLIST_EXPORTER_GENERIC::writeListOfNets

2016-06-07 Thread Simon Richter
This function is unused, and looks similar to the tree builder above, so it might likely be left over from a refactoring effort. --- .../netlist_exporters/netlist_exporter_generic.cpp | 73 -- .../netlist_exporters/netlist_exporter_generic.h | 7 --- 2 files changed, 80

[Kicad-developers] [PATCH 09/16] Replace boost::shared_ptr with std::shared_ptr

2016-06-07 Thread Simon Richter
This is a simple 1:1 replacement for all cases where shared_ptr is not used to point at an array (array handling is not in C++11). --- 3d-viewer/3d_mesh_model.h | 4 ++-- common/gal/opengl/opengl_gal.cpp | 2 +- common/geometry/hetriang.cpp | 34

[Kicad-developers] [PATCH 16/16] Clean up warnings from exception handlers

2016-06-07 Thread Simon Richter
The exception objects caught are either not referenced at all, or only in debug builds. This avoids the warnings for the unused variables. --- eeschema/class_libentry.cpp| 2 +- eeschema/class_library.cpp | 4 ++-- eeschema/cross-probing.cpp | 2 +-

[Kicad-developers] [PATCH 15/16] Avoid switch with only default case

2016-06-07 Thread Simon Richter
These switch statements only have a single "default" case, so they are unneeded. --- bitmap2component/bitmap2cmp_gui.cpp | 10 +- pcb_calculator/pcb_calculator.cpp | 12 +--- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/bitmap2component/bitmap2cmp_gui.cpp

Re: [Kicad-developers] pcbnew feature: Vias on Solder Mask Layers

2016-06-12 Thread Simon Richter
Hi, On 12.06.2016 22:22, Wayne Stambaugh wrote: > Plotting is definitely more accurate than printing although I wont > completely rule it out. I make a lot of prototype boards and I've found > through trial and error the plotting is the way to go. I think it is wrong in both dialogs. Whether

[Kicad-developers] [PATCH v2] Use size_t for sizes and offsets

2016-06-10 Thread Simon Richter
This shouldn't affect code because these are compile time constants anyway, but gets rid of some annoying warnings about casting integers to pointers of different size. --- include/gal/opengl/vertex_common.h | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff

Re: [Kicad-developers] Boost 1.61.0

2016-06-09 Thread Simon Richter
Hi, On 05.06.2016 20:12, Chris Pavlina wrote: > Uh, has anyone besides Nick and Simon seen this? Windows builds against 1.60 still AFAIK, mainly because FindBoost.cmake has an explicit list of versions to look for, so it isn't a simple drop in replacement. Simon signature.asc

Re: [Kicad-developers] Failed to build on my system

2016-06-09 Thread Simon Richter
Hi, On 09.06.2016 20:28, Mário Luzeiro wrote: [Using iterator instead of const_iterator as place hint for std::list] > This workaround works! I think this gcc version we can support with only little effort, since we need to have a non-const reference to the container anyway, so getting a

[Kicad-developers] [PATCH 1/2] Avoid pointer truncation in debug message

2016-06-09 Thread Simon Richter
--- common/gal/opengl/cached_container.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/gal/opengl/cached_container.cpp b/common/gal/opengl/cached_container.cpp index 40d4969..2029929 100644 --- a/common/gal/opengl/cached_container.cpp +++

[Kicad-developers] [PATCH 2/2] Avoid warning about int -> pointer conversion

2016-06-09 Thread Simon Richter
--- common/gal/opengl/gpu_manager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/gal/opengl/gpu_manager.cpp b/common/gal/opengl/gpu_manager.cpp index 2cba5cc..f14a994 100644 --- a/common/gal/opengl/gpu_manager.cpp +++ b/common/gal/opengl/gpu_manager.cpp @@

Re: [Kicad-developers] How to SCH_SCREEN::SchematicCleanup?

2016-06-15 Thread Simon Richter
Hi, On 15.06.2016 08:53, jp charras wrote: > I do not understand why net ties are related to schematic cleanup. > They are 2 separate features. For the "net ties as special junctions" implementation, the cleanup code needs to be adjusted -- that's where they come together. > Although no

[Kicad-developers] [PATCH 04/16] Explain how ERC works.

2016-06-07 Thread Simon Richter
This is just a comment explaining the use of the local variables. --- eeschema/dialogs/dialog_erc.cpp | 9 + 1 file changed, 9 insertions(+) diff --git a/eeschema/dialogs/dialog_erc.cpp b/eeschema/dialogs/dialog_erc.cpp index 2f9a1f2..7323a64 100644 --- a/eeschema/dialogs/dialog_erc.cpp

[Kicad-developers] [PATCH 03/16] Clarify ERC: we're iterating netlist items, not nets

2016-06-07 Thread Simon Richter
This renames the "net", "lastNet" and "nextNet" variables to "item", "lastItem" and "nextItem", respectively, because these refer to netlist items, not nets. --- eeschema/dialogs/dialog_erc.cpp | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git

[Kicad-developers] [PATCH 06/16] Check sorting of netlist during ERC

2016-06-07 Thread Simon Richter
The ERC code depends on netlist items to be sorted by net code, so verify that in debug builds. While this condition is stricter than necessary, it should still hold with the current code, and provide a good canary if a change to the sorting code might break ERC. ---

[Kicad-developers] [PATCH 02/16] Add missing dependency github_plugin -> pcbcommon

2016-06-07 Thread Simon Richter
The GitHub plugin needs the generated PCB parser code, so introduce an artificial dependency. --- pcbnew/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index e77cbd9..aea5469 100644 --- a/pcbnew/CMakeLists.txt +++

[Kicad-developers] [PATCH 05/16] Cache netlist item during ERC

2016-06-07 Thread Simon Richter
This adds a suffix "_idx" to the indexes into the list, and introduces local copies of the pointers to the objects we are looking at, in order to have a shorter way of addressing them. --- eeschema/dialogs/dialog_erc.cpp | 30 -- 1 file changed, 16 insertions(+), 14

[Kicad-developers] [PATCH 11/12] Use wxIMPLEMENT_APP_CONSOLE for console apps

2016-05-27 Thread Simon Richter
--- utils/idftools/idf2vrml.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/idftools/idf2vrml.cpp b/utils/idftools/idf2vrml.cpp index 05e375e..a62db0f 100644 --- a/utils/idftools/idf2vrml.cpp +++ b/utils/idftools/idf2vrml.cpp @@ -100,7 +100,7 @@ static const

[Kicad-developers] [PATCH 05/12] Avoid conflicting declaration for Pgm()

2016-05-27 Thread Simon Richter
From: Simon Richter <ge...@kiwi.hogyros.de> This function has two conflicting definitions in the "kicad" executable and the other wrapper programs. As the kifaces can be loaded from either, this silently assumes compatible data layout for the PGM_KICAD and PGM_BASE types when pas

[Kicad-developers] [PATCH 06/12] Make sure KIFACE_GETTER linkage is consistent

2016-05-27 Thread Simon Richter
This makes sure that the declaration is always the same within a single module, so all users have the same idea of whether the symbol is imported. In all dynamically linked objects, all users should be aware that the symbol is imported, while in the statically linked bitmap2component program, no

[Kicad-developers] [PATCH 03/12] Open namespace around definitions

2016-05-27 Thread Simon Richter
While defining functions in another namespace is technically allowed as long as the definition can be matched to a declaration, this can lead to ambiguous resolutions, such as here (GAL vs KIGFX). --- pcbnew/ratsnest_viewitem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[Kicad-developers] [PATCH 09/12] Narrow assumption on OpenSSL use

2016-05-27 Thread Simon Richter
CURL on Windows uses OpenSSL on MSYS, and SChannel on MSVC. --- common/kicad_curl/kicad_curl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/kicad_curl/kicad_curl.cpp b/common/kicad_curl/kicad_curl.cpp index a5670a7..fb4413c 100644 ---

[Kicad-developers] [PATCH 04/12] Avoid C99 style compound statement

2016-05-27 Thread Simon Richter
Support for C99 in C++ programs is a gcc extension. --- eeschema/autoplace_fields.cpp | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eeschema/autoplace_fields.cpp b/eeschema/autoplace_fields.cpp index 9af6247..96ee6c0 100644 --- a/eeschema/autoplace_fields.cpp +++

[Kicad-developers] [PATCH 07/12] Work around VC++ 2015 bug.

2016-05-27 Thread Simon Richter
The combination of - template resolution - optimization - structured exception handling - chained operator= appears to trigger a bug in the compiler. As this code is nonsensical anyway (numeric_limits<>::min() returns the smallest positive value for floating point types, but the largest

[Kicad-developers] [PATCH 00/12] A few well-aged patches

2016-05-27 Thread Simon Richter
to use wxApp etc for option processing Simon Richter (11): Use std::atomic for portable locale init counting Add missing C++ stdlib headers Open namespace around definitions Avoid C99 style compound statement Avoid conflicting declaration for Pgm() Make sure KIFACE_GETTER linkage is consistent

[Kicad-developers] [PATCH 02/12] Add missing C++ stdlib headers

2016-05-27 Thread Simon Richter
The GCC standard library headers often include other headers, which makes some code compile that forgets to include several headers. --- common/gal/graphics_abstraction_layer.cpp | 2 ++ common/grid_tricks.cpp | 2 ++ common/selcolor.cpp|

[Kicad-developers] [PATCH 01/12] Use std::atomic for portable locale init counting

2016-05-27 Thread Simon Richter
--- common/common.cpp | 10 +++--- include/common.h | 4 +++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/common/common.cpp b/common/common.cpp index 388a803..976e419 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -64,14 +64,12 @@ EDA_COLOR_Tg_GhostColor;

[Kicad-developers] [PATCH 12/12] Drop and , no longer needed

2016-05-27 Thread Simon Richter
--- utils/idftools/idf2vrml.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/utils/idftools/idf2vrml.cpp b/utils/idftools/idf2vrml.cpp index a62db0f..47821d0 100644 --- a/utils/idftools/idf2vrml.cpp +++ b/utils/idftools/idf2vrml.cpp @@ -52,8 +52,6 @@ #include #include #include

[Kicad-developers] [PATCH 10/12] Convert idf2vrml to use wxApp etc for option processing

2016-05-27 Thread Simon Richter
From: Cirilo Bernardo --- utils/idftools/idf2vrml.cpp | 267 +--- 1 file changed, 126 insertions(+), 141 deletions(-) diff --git a/utils/idftools/idf2vrml.cpp b/utils/idftools/idf2vrml.cpp index df66e4b..05e375e 100644 ---

[Kicad-developers] [PATCH 08/12] windows: provide performance measurement primitives

2016-05-27 Thread Simon Richter
On Windows, performance measurement is best performed using QueryPerformanceCounter, which reports ticks with an arbitrary but fixed frequency. --- include/profile.h | 32 1 file changed, 32 insertions(+) diff --git a/include/profile.h b/include/profile.h index

[Kicad-developers] [PATCH 2/2] Remove redundant old copy of cimage class

2016-05-26 Thread Simon Richter
The same class is defined below the 3d_rendering/ directory as well, with more functionality. --- 3d-viewer/3d_draw.cpp| 2 +- 3d-viewer/3d_draw_board_body.cpp | 2 +- 3d-viewer/CImage.cpp | 440 --- 3d-viewer/CImage.h

[Kicad-developers] [PATCH 1/2] Drop extra copy ctors from IFSG_NODE

2016-05-26 Thread Simon Richter
This is unnecessary -- explicitly specifying the regular copy ctor will inhibit any generated versions anyway. --- include/plugins/3dapi/ifsg_node.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/plugins/3dapi/ifsg_node.h b/include/plugins/3dapi/ifsg_node.h index 6b3641e..f949c80

[Kicad-developers] DEBUG vs NDEBUG

2016-06-01 Thread Simon Richter
Hi, there was a small hiccup with a missing symbol in Release builds, which I also saw in the MSVC builds, and expected to be affecting those only because I don't have explicit logic to set DEBUG and NDEBUG in CMakeLists.txt, assuming that CMake does that for me. CMake does not set DEBUG in

[Kicad-developers] How to SCH_SCREEN::SchematicCleanup?

2016-06-14 Thread Simon Richter
Hi, for net ties, I have to touch the schematic cleanup, because that will merge adjacent wires going in the same direction, which is not useful for me, as I need all wires going into a tie as separate nets (except for ERC, where they are connected). I'd like to generalize this to "wires are

[Kicad-developers] [PATCH] Rewrite loop conditions in SchematicCleanUp

2016-06-21 Thread Simon Richter
These are a tiny bit more readable, and do not depend on all branches to correctly advance the loop variable. --- eeschema/sch_screen.cpp | 27 +++ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index

<    1   2   3   4   5   6   7   8   9   >