Compare commits

...

39 Commits

Author SHA1 Message Date
jean-pierre charras 9f35e384c1 Pcbnew: fix a few plot issues (from master branch) 2017-08-01 12:39:06 +02:00
Chris Pavlina 6b1b6d4ff7 Add several missing libraries 2017-07-31 12:50:45 -04:00
jean-pierre charras be070d95be Fix issues in plot functions, when used from python scripts. 2017-07-25 10:12:08 +02:00
jean-pierre charras 17f7921311 kicad: create zip archive: test for write file error (crashes when the folder was not writable) 2017-07-24 18:07:29 +02:00
Wayne Stambaugh 631f6d53d3 Tag stable release 4.0.7 2017-07-14 15:17:29 -04:00
Wayne Stambaugh aba04c6ec5 Remove leading/trailing white space error message from field validator.
The illegal white space testing for reference and value (library editor
only) fields are adequate to ensure the user cannot enter invalid white
space characters.  Leading and/or trailing white space should not be an
issue for field storage in the schematic file as they are quoted.  Rather
than silently removing the leading and/or trailing white space which is
frowned upon, let the user fix it.

Fixes lp:1659526

https://bugs.launchpad.net/kicad/+bug/1659526
2017-07-14 13:43:27 -04:00
Maciej Suminski 133cb01f79 Fix crash when dragging a track
Fixes: lp:1657226
* https://bugs.launchpad.net/kicad/+bug/1657226
2017-07-13 10:54:12 +02:00
jean-pierre charras 464175e995 Fix possible crash and issues when a incorrect fp lib table is loaded:
correct lines are loaded, and pcbnew is no longer aborted.
2017-07-12 20:27:18 +02:00
jean-pierre charras c0fab4b350 Cvpcb: fix incorrect automatic assignments when using .equ files and the automatic association.
Fix from master branch.
2017-06-10 20:12:02 +02:00
jean-pierre charras 17c8198c05 Better error messages when throwing an io error or parse error.
Only the name of the .cpp file throwing the error instead of its full path is printed, like in master branch.
2017-06-04 11:15:45 +02:00
Cirilo Bernardo 683da9acd1 Fix default line widths for non-mm units in DXF import 2017-05-29 09:51:28 +02:00
jean-pierre charras 5a67fc99d3 Fixes: pl-editor doesn't save text thickness when it is not the default value (from master) 2017-05-29 08:00:38 +02:00
jean-pierre charras a7223a95b9 Fix style of gost page layouts in accordance with GOST (from master) 2017-05-29 07:57:16 +02:00
jean-pierre charras 58f90b3adb Eeschema bom scripts: move python scripts to eeschema/plugins/python_scripts and xsl scripts to subdir xsl_scripts.
Python scripts are now installed (previously: were ignored by the make install command)
Better comments in python scripts.
2017-05-15 16:40:21 +02:00
Eldar Khayrullin a374f46b5e Pcbnew: add option to plot DXF editable text
Add option to plot DXF oneline ASCII text as editable text (in non-outline mode)

Fixes: lp:1423515
* https://bugs.launchpad.net/kicad/+bug/1423515
2017-05-08 08:24:22 -04:00
Eldar Khayrullin bfacf02360 Pcbnew: add option to plot DXF lines in outline mode
Add option to plot dialog to plot DXF layers *.Cu, *.Adhes, *.Paste, and
*.Mask in outline mode or line mode.

Fixes lp:1643330

https://bugs.launchpad.net/kicad/+bug/1643330
2017-05-08 08:24:10 -04:00
Wayne Stambaugh 4e8a35cb84 Don't apply last line width to text thickness in symbol library editor.
The symbol library header was setting the text thickness using the
last line thickness setting which is incorrect so use the default
thickness when creating new text objects.

Fixes lp:1635344

https://bugs.launchpad.net/kicad/+bug/1635344
2017-05-04 16:31:02 -04:00
Wayne Stambaugh 6a9f38ecc4 Pcbnew: continue loading footprints after first failure.
The footprint library cache handler would throw an exception on the
first error it encountered preventing all subsequent footprint files
from being parsed even if there was nothing wrong with them.  This
commit queues errors until all of the footprint files in the folder
have been parsed.

Fixes lp:1416736

https://bugs.launchpad.net/kicad/+bug/1416736
2017-05-04 16:25:14 -04:00
jean-pierre charras 593136aca3 Remove some useless or incorrect wxASSERT in plot functions.
Fixes: lp:1685188 Crash on export SVG file with mirrored option
https://bugs.launchpad.net/kicad/+bug/1685188
2017-04-26 09:10:05 +02:00
jean-pierre charras 1754b42ba3 Dialog copper zones: fix a tooltip error 2017-04-22 10:17:59 +02:00
jean-pierre charras 3ae069ed4f Fixes: lp:1684998 (append a board in GAL mode can crashes Pcbnew)
https://bugs.launchpad.net/kicad/+bug/1684998

The crash is due to the fact updating nets and netclasses was made too late, after use.
2017-04-22 09:09:31 +02:00
Wayne Stambaugh fc527f3cc1 Fix zone properties dialog level setting tooltip.
Fix a spelling error and improve the clarity of the zone priority level
tooltip information.

Fixes lp:1681024

https://bugs.launchpad.net/kicad/+bug/1681024
2017-04-10 14:31:11 -04:00
hauptmech 7a5e632455 Prevent segfault when aOutline has no vertices.
When attempting to read a pcad file exported from Altium, kicad was
segfaulting because it was trying to access an empty array. This patch
fixes that.

The reason the array was empty was the the board outline in the pcad
file was composed of only arcs and the plugin only processes lines in
the board outline. Adding this functionality is for another patch I
suppose.

Signed-off-by: Clemens Koller <cko@embeon.de>
2017-04-03 10:46:57 -04:00
Chris Pavlina 82d7a4e61e Highlight the first choice in rescue dialog
Fixes: lp:1455970
* https://bugs.launchpad.net/kicad/+bug/1455970
2017-03-27 09:20:28 -04:00
Wayne Stambaugh 63569551a4 Fix broken links and add correct links to about dialog.
Fixes lp:1670582

https://bugs.launchpad.net/kicad/+bug/1670582
2017-03-08 08:28:15 -05:00
jean-pierre charras 3b7aa48d16 Pcbnew: fix bug: files written when layers have numeric name (like +24)cannot be read
Remove a printf clearly for debug, certainly a very old bug.
2017-02-27 08:12:07 +01:00
Wayne Stambaugh 249b0a0ce5 Reset KiCad version for 4.0.7 stable release development. 2017-02-26 11:30:35 -05:00
Wayne Stambaugh 3c6959b7de Tag stable release 4.0.6 2017-02-17 15:11:08 -05:00
Oliver e5307ca1fb Fix for bug where rotating / editing a selected item would remove it from screen
- Added test to see if there was a currently-editing item

Fixes: lp:1661866

https://bugs.launchpad.net/kicad/+bug/1661866
2017-02-07 09:30:11 -05:00
Wayne Stambaugh d1f8dbb9de Fix rotate bug in symbol library editor.
The rotate hotkey was rotating individual items when a block was selected
which is invalid behavior.  Add check for block mode and disable rotating
items when block mode is active.

Fixes: lp:1660875

https://bugs.launchpad.net/kicad/+bug/1660875
2017-02-01 15:10:07 -05:00
Chris Pavlina 99d7a35797 Reorder eeschema toolbar slightly
- Put the output generation steps (annotation through pcbnew) in the
  correct order as expected by the user running through them.

- Add a Plot button to match pcbnew
2017-01-31 16:08:57 -05:00
jean-pierre charras 0145a03f79 In SetActiveLayer(): fix a potential bug, as a GAL method was called in Legacy mode.
This is a fix from commit b66cb871e6 in master branch.
2017-01-31 11:11:03 +01:00
jean-pierre charras df191606ab Fix a potential incompatibility (due to an old bug) with files which could be created by some recent pcbnew versions
It is unusual to fix an incompatibility with later versions, but it is due to a bug existing in this version,
and this is especially important for footprint files.
2017-01-28 09:00:54 +01:00
Wayne Stambaugh 556be7b431 Do not use default board solder mask clearance in footprint editor.
The footprint editor was displaying the default solder mask clearance
defined by the temporary BOARD object created a start up.  Change the
temporary BOARD default solder mask to 0 so the pad or footprint solder
mask clearance setting is displayed when editing the footprint.

fixes lp:1653980

https://bugs.launchpad.net/kicad/+bug/1653980
2017-01-27 07:52:12 -05:00
Simon Richter e15ba3bf32 Add missing include directory
The common library uses CURL.
2017-01-27 07:38:23 -05:00
jean-pierre charras c23c52834c cleanup a comment 2017-01-24 17:53:33 +01:00
jean-pierre charras 981fddc649 Try to replace avhttp by Curl 2017-01-24 17:44:06 +01:00
jean-pierre charras 5127a6bd09 Fix an issue (from a patch of the master branch): slashes are not translated from \ in windows to / on unix
(see https://bugs.launchpad.net/kicad/+bug/16585)
2017-01-24 17:41:03 +01:00
Wayne Stambaugh 136ba26896 Reset KiCad version for 4.0.6 stable release development. 2017-01-24 10:26:54 -05:00
88 changed files with 5563 additions and 4757 deletions
+4
View File
@@ -569,6 +569,10 @@ if( NOT GLEW_FOUND )
check_find_package_result( GLEW_FOUND "GLEW" )
endif()
# Find CURL library
find_package( CURL REQUIRED )
######################
# Find Cairo library #
######################
+1 -1
View File
@@ -34,4 +34,4 @@
# time this should be set to a value other than "no-vcs-found" is when
# a source archive is created. This eliminates the need to set
# KICAD_VERSION during the build configuration step.
set( KICAD_VERSION "4.0.5" )
set( KICAD_VERSION "4.0.7" )
-65
View File
@@ -1,65 +0,0 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
# Copyright (C) 2013 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
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# Download av_http and install into ${PREFIX}, typically in our KiCad source tree.
# Assumes include( ExternalProject ) was done inline previous to this file
# and that set( DOWNLOAD_DIR ... ) was set in a higher context.
#-----<configure>-------------------------------------------------------------------------------------
# soon cmake will have https support, switch to a true download then:
#set( AVHTTP_RELEASE ??? )
#set( AVHTTP_MD5 ???? ) # re-calc this on every RELEASE change
#-----</configure>-----------------------------------------------------------------------------------
# Where the library is to be installed.
set( PREFIX ${DOWNLOAD_DIR}/avhttp )
if( KICAD_SKIP_BOOST )
set( AVHTTP_DEPEND "" )
else()
set( AVHTTP_DEPEND "boost" )
endif()
# Install the AVHTTP header only library ${PREFIX}
ExternalProject_Add( avhttp
PREFIX ${PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_DIR} # no true download yet
# grab it from a local zip file for now, cmake caller's source dir
URL ${CMAKE_CURRENT_SOURCE_DIR}/avhttp-master.zip
DEPENDS ${AVHTTP_DEPEND}
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR> <INSTALL_DIR>
)
set( AVHTTP_INCLUDE_DIR "${PREFIX}/include" CACHE FILEPATH "AVHTTP include directory" )
mark_as_advanced( AVHTTP_INCLUDE_DIR )
+1 -11
View File
@@ -78,14 +78,6 @@ specific patches required to build a working Boost library. These patches can b
[patches folder][] in the KiCad source. These patches are named by the platform name they should
be applied against.
## OpenSSL Secure Socket Layer Library ## {#openssl}
The [OpenSSL][] library is only required when the KiCad build is configured with the Github plugin
enabled. See the [KiCad Build Configuration Options](#build_opts)` section for more information.
Please note that KiCad will download and build version 1.0.1e of OpenSSL by default. You should
probably use the version of OpenSSL installed on your system as it will most likely be more up to
date and contain the latest security fixes.
## GLEW OpenGL Extension Wrangler Library ## {#glew}
The [OpenGL Extension Wrangler][GLEW] is an OpenGL helper library used by the KiCad graphics
@@ -299,7 +291,7 @@ the following commands:
mingw-w64-x86_64-boost \
mingw-w64-x86_64-cairo \
mingw-w64-x86_64-glew \
mingw-w64-x86_64-openssl \
mingw-w64-x86_64-curl \
mingw-w64-x86_64-wxPython \
mingw-w64-x86_64-wxWidgets
cd kicad-source
@@ -311,7 +303,6 @@ the following commands:
-DCMAKE_PREFIX_PATH=/mingw64 \
-DCMAKE_INSTALL_PREFIX=/mingw64 \
-DDEFAULT_INSTALL_PATH=/mingw64 \
-DOPENSSL_ROOT_DIR=/mingw64 \
-DKICAD_SKIP_BOOST=ON \
-DKICAD_SCRIPTING=ON \
-DKICAD_SCRIPTING_MODULES=ON \
@@ -408,7 +399,6 @@ Boost patches in the KiCad source [patch folder][].
[wxWidgets]: http://wxwidgets.org/
[patches folder]: http://bazaar.launchpad.net/~kicad-product-committers/kicad/product/files/head:/patches/
[Boost]: http://www.boost.org/
[OpenSSL]: https://www.openssl.org/
[GLEW]: http://glew.sourceforge.net/
[GLUT]: https://www.opengl.org/resources/libraries/glut/
[Cairo]: http://cairographics.org/
+15 -1
View File
@@ -4,12 +4,19 @@ include_directories(
./dialog_about
${CAIRO_INCLUDE_DIR}
${GLEW_INCLUDE_DIR}
${CURL_INCLUDE_DIRS}
../3d-viewer
../pcbnew
../polygon
${INC_AFTER}
)
if( NOT APPLE ) # windows and linux use openssl under curl
find_package( OpenSSL REQUIRED )
endif()
# Generate header files containing shader programs
# Order of input files is significant
add_custom_command(
@@ -257,6 +264,9 @@ endif()
set( COMMON_SRCS
${COMMON_SRCS}
kicad_curl/kicad_curl.cpp
kicad_curl/kicad_curl_easy.cpp
view/view.cpp
view/view_item.cpp
view/view_group.cpp
@@ -282,7 +292,11 @@ set( COMMON_SRCS
add_library( common STATIC ${COMMON_SRCS} )
add_dependencies( common lib-dependencies )
add_dependencies( common version_header )
target_link_libraries( common ${Boost_LIBRARIES} )
target_link_libraries( common
${Boost_LIBRARIES}
${CURL_LIBRARIES}
${OPENSSL_LIBRARIES} # empty on Apple
)
set( PCB_COMMON_SRCS
+13
View File
@@ -27,6 +27,14 @@
* @file basicframe.cpp
* @brief EDA_BASE_FRAME class implementation.
*/
#include <config.h>
// kicad_curl.h must be included before wx headers, to avoid
// conflicts for some defines, at least on Windows
#ifdef BUILD_GITHUB_PLUGIN
#include <curl/curlver.h>
#include <kicad_curl/kicad_curl.h>
#endif
#include <wx/aboutdlg.h>
#include <wx/fontdlg.h>
@@ -580,6 +588,11 @@ void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event )
<< ( BOOST_VERSION / 100 % 1000 ) << wxT( "." )
<< ( BOOST_VERSION % 100 ) << wxT( "\n" );
#ifdef BUILD_GITHUB_PLUGIN
// Shows the Curl library version in use:
msg_version << "Curl version: " << KICAD_CURL::GetVersion() << "\n";
#endif
msg_version << wxT( " USE_WX_GRAPHICS_CONTEXT=" );
#ifdef USE_WX_GRAPHICS_CONTEXT
msg_version << wxT( "ON\n" );
-1
View File
@@ -515,6 +515,5 @@ void PLOTTER::ThickCircle( const wxPoint& pos, int diametre, int width, EDA_DRAW
void PLOTTER::SetPageSettings( const PAGE_INFO& aPageSettings )
{
wxASSERT( !outputFile );
pageInfo = aPageSettings;
}
+4 -9
View File
@@ -49,7 +49,6 @@ static const double DXF_OBLIQUE_ANGLE = 15;
void DXF_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
double aScale, bool aMirror )
{
wxASSERT( !outputFile );
plotOffset = aOffset;
plotScale = aScale;
@@ -277,7 +276,6 @@ bool DXF_PLOTTER::EndPlot()
*/
void DXF_PLOTTER::SetColor( EDA_COLOR_T color )
{
wxASSERT( outputFile );
if( ( color >= 0 && colorMode )
|| ( color == BLACK )
|| ( color == WHITE ) )
@@ -293,7 +291,6 @@ void DXF_PLOTTER::SetColor( EDA_COLOR_T color )
*/
void DXF_PLOTTER::Rect( const wxPoint& p1, const wxPoint& p2, FILL_T fill, int width )
{
wxASSERT( outputFile );
MoveTo( p1 );
LineTo( wxPoint( p1.x, p2.y ) );
LineTo( wxPoint( p2.x, p2.y ) );
@@ -427,7 +424,7 @@ void DXF_PLOTTER::PlotPoly( const std::vector<wxPoint>& aCornerList,
// Now, output the final polygon to DXF file:
last = path.PointCount() - 1;
VECTOR2I point = path.CPoint( 0 );
VECTOR2I point = path.CPoint( 0 );
wxPoint startPoint( point.x, point.y );
MoveTo( startPoint );
@@ -483,7 +480,8 @@ void DXF_PLOTTER::SetDash( bool dashed )
void DXF_PLOTTER::ThickSegment( const wxPoint& aStart, const wxPoint& aEnd, int aWidth,
EDA_DRAW_MODE_T aPlotMode )
{
segmentAsOval( aStart, aEnd, aWidth, aPlotMode );
MoveTo( aStart );
FinishTo( aEnd );
}
/* Plot an arc in DXF format
@@ -523,7 +521,6 @@ void DXF_PLOTTER::Arc( const wxPoint& centre, double StAngle, double EndAngle, i
void DXF_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, double orient,
EDA_DRAW_MODE_T trace_mode )
{
wxASSERT( outputFile );
wxSize size( aSize );
/* The chip is reduced to an oval tablet with size.y > size.x
@@ -545,7 +542,6 @@ void DXF_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, double
void DXF_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre,
EDA_DRAW_MODE_T trace_mode )
{
wxASSERT( outputFile );
Circle( pos, diametre, NO_FILL );
}
@@ -624,7 +620,6 @@ void DXF_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& padsize,
void DXF_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCorners,
double aPadOrient, EDA_DRAW_MODE_T aTrace_Mode )
{
wxASSERT( outputFile );
wxPoint coord[4]; /* coord actual corners of a trapezoidal trace */
for( int ii = 0; ii < 4; ii++ )
@@ -680,7 +675,7 @@ void DXF_PLOTTER::Text( const wxPoint& aPos,
if( textAsLines || containsNonAsciiChars( aText ) || aMultilineAllowed )
{
// output text as graphics.
// Perhaps miltiline texts could be handled as DXF text entity
// Perhaps multiline texts could be handled as DXF text entity
// but I do not want spend time about this (JPC)
PLOTTER::Text( aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify,
aWidth, aItalic, aBold, aMultilineAllowed );
-5
View File
@@ -61,7 +61,6 @@ GERBER_PLOTTER::GERBER_PLOTTER()
void GERBER_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
double aScale, bool aMirror )
{
wxASSERT( !outputFile );
wxASSERT( aMirror == false );
m_plotMirror = false;
plotOffset = aOffset;
@@ -318,7 +317,6 @@ void GERBER_PLOTTER::writeApertureList()
void GERBER_PLOTTER::PenTo( const wxPoint& aPos, char plume )
{
wxASSERT( outputFile );
DPOINT pos_dev = userToDeviceCoordinates( aPos );
switch( plume )
@@ -434,7 +432,6 @@ void GERBER_PLOTTER:: PlotPoly( const std::vector< wxPoint >& aCornerList,
void GERBER_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, EDA_DRAW_MODE_T trace_mode )
{
wxASSERT( outputFile );
wxSize size( diametre, diametre );
if( trace_mode == SKETCH )
@@ -454,7 +451,6 @@ void GERBER_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, EDA_DRAW_
void GERBER_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, double orient,
EDA_DRAW_MODE_T trace_mode )
{
wxASSERT( outputFile );
int x0, y0, x1, y1, delta;
wxSize size( aSize );
@@ -508,7 +504,6 @@ void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize,
double orient, EDA_DRAW_MODE_T trace_mode )
{
wxASSERT( outputFile );
wxSize size( aSize );
// Plot as an aperture flash
-4
View File
@@ -212,7 +212,6 @@ HPGL_PLOTTER::HPGL_PLOTTER()
void HPGL_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
double aScale, bool aMirror )
{
wxASSERT( !outputFile );
plotOffset = aOffset;
plotScale = aScale;
m_IUsPerDecimil = aIusPerDecimil;
@@ -386,7 +385,6 @@ void HPGL_PLOTTER::SetDash( bool dashed )
void HPGL_PLOTTER::ThickSegment( const wxPoint& start, const wxPoint& end,
int width, EDA_DRAW_MODE_T tracemode )
{
wxASSERT( outputFile );
wxPoint center;
wxSize size;
@@ -449,7 +447,6 @@ void HPGL_PLOTTER::Arc( const wxPoint& centre, double StAngle, double EndAngle,
void HPGL_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, double orient,
EDA_DRAW_MODE_T trace_mode )
{
wxASSERT( outputFile );
int deltaxy, cx, cy;
wxSize size( aSize );
@@ -635,7 +632,6 @@ void HPGL_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& padsize,
void HPGL_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint* aCorners,
double aPadOrient, EDA_DRAW_MODE_T aTrace_Mode )
{
wxASSERT( outputFile );
wxPoint polygone[4]; // coordinates of corners relatives to the pad
wxPoint coord[4]; // absolute coordinates of corners (coordinates in plotter space)
int move;
+6 -4
View File
@@ -7,7 +7,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2012 Lorenzo Marcantonio, l.marcantonio@logossrl.com
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2017 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
@@ -70,7 +70,6 @@ void PDF_PLOTTER::SetPageSettings( const PAGE_INFO& aPageSettings )
void PDF_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
double aScale, bool aMirror )
{
wxASSERT( !workFile );
m_plotMirror = aMirror;
plotOffset = aOffset;
plotScale = aScale;
@@ -767,7 +766,10 @@ void PDF_PLOTTER::Text( const wxPoint& aPos,
aMultilineAllowed = false; // the text has only one line.
// Emit native PDF text (if requested)
if( m_textMode != PLOTTEXTMODE_STROKE && !aMultilineAllowed )
// Currently: does not work: disable it
bool use_native = false; // = m_textMode != PLOTTEXTMODE_STROKE && !aMultilineAllowed;
if( use_native )
{
const char *fontname = aItalic ? (aBold ? "/KicadFontBI" : "/KicadFontI")
: (aBold ? "/KicadFontB" : "/KicadFont");
@@ -823,7 +825,7 @@ void PDF_PLOTTER::Text( const wxPoint& aPos,
}
// Plot the stroked text (if requested)
if( m_textMode != PLOTTEXTMODE_NATIVE || aMultilineAllowed )
if( !use_native )
{
PLOTTER::Text( aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify,
aWidth, aItalic, aBold, aMultilineAllowed );
+7 -6
View File
@@ -1,8 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2017 KiCad Developers, see CHANGELOG.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
@@ -91,7 +91,6 @@ void PSLIKE_PLOTTER::SetColor( EDA_COLOR_T color )
void PSLIKE_PLOTTER::FlashPadOval( const wxPoint& aPadPos, const wxSize& aSize,
double aPadOrient, EDA_DRAW_MODE_T aTraceMode )
{
wxASSERT( outputFile );
int x0, y0, x1, y1, delta;
wxSize size( aSize );
@@ -339,7 +338,6 @@ void PSLIKE_PLOTTER::postscriptOverlinePositions( const wxString& aText, int aXS
void PS_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
double aScale, bool aMirror )
{
wxASSERT( !outputFile );
m_plotMirror = aMirror;
plotOffset = aOffset;
plotScale = aScale;
@@ -875,7 +873,10 @@ void PS_PLOTTER::Text( const wxPoint& aPos,
aMultilineAllowed = false; // the text has only one line.
// Draw the native postscript text (if requested)
if( m_textMode == PLOTTEXTMODE_NATIVE && !aMultilineAllowed )
// Currently: does not work: disable it
bool use_native = false; // = m_textMode == PLOTTEXTMODE_NATIVE && !aMultilineAllowed;
if( use_native )
{
const char *fontname = aItalic ? (aBold ? "/KicadFont-BoldOblique"
: "/KicadFont-Oblique")
@@ -928,7 +929,7 @@ void PS_PLOTTER::Text( const wxPoint& aPos,
}
// Draw the stroked text (if requested)
if( m_textMode != PLOTTEXTMODE_NATIVE || aMultilineAllowed )
if( !use_native )
{
PLOTTER::Text( aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify,
aWidth, aItalic, aBold, aMultilineAllowed );
-1
View File
@@ -172,7 +172,6 @@ SVG_PLOTTER::SVG_PLOTTER()
void SVG_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
double aScale, bool aMirror )
{
wxASSERT( !outputFile );
m_plotMirror = aMirror;
m_yaxisReversed = true; // unlike other plotters, SVG has Y axis reversed
plotOffset = aOffset;
+24 -22
View File
@@ -148,45 +148,47 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
description << wxT( "<ul>" );
description << wxT( "<li>" )
<< HtmlHyperlink( wxT( "http://www.kicad-pcb.org" ),
_( "The official KiCad site" ) )
<< wxT( "</li>" );
description << wxT( "<li>" )
<< HtmlHyperlink( wxT( "http://iut-tice.ujf-grenoble.fr/kicad" ),
_( "The original site of the KiCad project founder" ) )
_( "The official KiCad website" ) )
<< wxT( "</li>" );
description << wxT( "<li>" )
<< HtmlHyperlink( wxT( "https://launchpad.net/kicad" ),
_( "Developer's website on Launchpad" ) )
<< wxT("</li>" );
description << wxT( "<li>" )
<< HtmlHyperlink( wxT( "http://www.kicadlib.org" ),
_( "Repository with additional component libraries" ) )
<< HtmlHyperlink( wxT( "https://github.com/KiCad/" ),
_( "Official repository for component and footprint libraries" ) )
<< wxT( "</li>" );
description << wxT( "</ul>" );
description << wxT( "</p>" );
description << wxT( "<p>" );
description << wxT( "<b><u>" )
<< _( "Contribute to KiCad" )
description << wxT( "<p><b><u>" )
<< _( "Bug tracker" )
<< wxT( "</u></b>" ); // bold & underlined font caption
// bullet-ed list with some http links
description << wxT( "<ul>" );
description << wxT( "<li>" )
<<HtmlHyperlink( wxT( "https://bugs.launchpad.net/kicad" ),
_( "Report bugs if you found any" ) )
<< HtmlHyperlink( wxT( "https://bugs.launchpad.net/kicad/+bugs?orderby=-id&start=0" ),
_( "Report or examine bugs" ) )
<< wxT( "</li>" );
description << wxT( "<li>" )
<< HtmlHyperlink( wxT( "https://blueprints.launchpad.net/kicad" ),
_( "File an idea for improvement" ) )
<< wxT( "</li>" );
description << wxT( "<li>" )
<< HtmlHyperlink( wxT( "http://www.kicadlib.org/Kicad_related_links.html" ),
_( "KiCad links to user groups, tutorials and much more" ) )
<< wxT( "</li>" );
description << wxT( "</ul>" );
description << wxT( "</ul></p>" );
description << wxT( "</p>" );
description << wxT( "<p><b><u>" )
<< _( "KiCad user's groups and community" )
<< wxT( "</u></b>" ); // bold & underlined font caption
description << wxT( "<ul>" );
description << wxT( "<li>" )
<< HtmlHyperlink( wxT( "https://groups.yahoo.com/neo/groups/kicad-users/info" ),
_( "KiCad user's group" ) )
<< wxT( "</li>" );
description << wxT( "<li>" )
<< HtmlHyperlink( wxT( "https://forum.kicad.info" ),
_( "KiCad forum" ) )
<< wxT( "</li>" );
description << wxT( "</ul></p>" );
info.SetDescription( description );
+15 -19
View File
@@ -2,8 +2,8 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2011 Jean-Pierre Charras, <jp.charras@wanadoo.fr>
* Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2013-2016 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-2017 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
@@ -28,7 +28,12 @@
*/
#define USE_WORKER_THREADS 1 // 1:yes, 0:no. use worker thread to load libraries
/**
No. concurrent threads doing "http(s) GET". More than 6 is not significantly
faster, less than 6 is likely slower. Main thread is in this count, so if
set to 1 then no temp threads are created.
*/
#define READER_THREADS 6
/*
* Functions to read footprint libraries and fill m_footprints by available footprints names
@@ -120,13 +125,6 @@ void FOOTPRINT_INFO::load()
}
#define JOBZ 6 // no. libraries per worker thread. It takes about
// a second to load a GITHUB library, so assigning
// this no. libraries to each thread should give a little
// over this no. seconds total time if the original delay
// were caused by latencies alone.
// (If https://github.com does not mind.)
void FOOTPRINT_LIST::loader_job( const wxString* aNicknameList, int aJobZ )
{
for( int i=0; i<aJobZ; ++i )
@@ -204,8 +202,6 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* a
// do all of them
nicknames = aTable->GetLogicalLibs();
#if USE_WORKER_THREADS
// Even though the PLUGIN API implementation is the place for the
// locale toggling, in order to keep LOCAL_IO::C_count at 1 or greater
// for the duration of all helper threads, we increment by one here via instantiation.
@@ -221,22 +217,23 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* a
MYTHREADS threads;
unsigned jobz = (nicknames.size() + READER_THREADS - 1) / READER_THREADS;
// Give each thread JOBZ nicknames to process. The last portion of, or if the entire
// size() is small, I'll do myself.
for( unsigned i=0; i<nicknames.size(); )
{
int jobz = JOBZ;
if( i + jobz >= nicknames.size() ) // on the last iteration of this for(;;)
{
jobz = nicknames.size() - i;
// Only a little bit to do, I'll do it myself, on current thread.
// Only a little bit to do, I'll do it myself on current thread.
// I am part of the READER_THREADS count.
loader_job( &nicknames[i], jobz );
}
else
{
// Delegate the job to a worker thread created here.
// Delegate the job to a temporary thread created here.
threads.push_back( new boost::thread( &FOOTPRINT_LIST::loader_job,
this, &nicknames[i], jobz ) );
}
@@ -251,9 +248,6 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* a
{
threads[i].join();
}
#else
loader_job( &nicknames[0], nicknames.size() );
#endif
m_list.sort();
}
@@ -315,6 +309,8 @@ void FOOTPRINT_LIST::DisplayErrors( wxTopLevelWindow* aWindow )
msg += wxT( "<p>" ) + m_errors[i].errorText + wxT( "</p>" );
}
// Preserve new lines in error messages so queued errors don't run together.
msg.Replace( "\n", "<BR>" );
dlg.AddHTML_Text( msg );
dlg.ShowModal();
+25 -7
View File
@@ -260,6 +260,7 @@ void FP_LIB_TABLE::Parse( FP_LIB_TABLE_LEXER* in ) throw( IO_ERROR, PARSE_ERROR
*/
T tok;
wxString errMsg; // to collect error messages
// This table may be nested within a larger s-expression, or not.
// Allow for parser of that optional containing s-epression to have looked ahead.
@@ -280,10 +281,6 @@ void FP_LIB_TABLE::Parse( FP_LIB_TABLE_LEXER* in ) throw( IO_ERROR, PARSE_ERROR
if( tok != T_LEFT )
in->Expecting( T_LEFT );
// in case there is a "row integrity" error, tell where later.
int lineNum = in->CurLineNumber();
int offset = in->CurOffset();
if( ( tok = in->NextTok() ) != T_lib )
in->Expecting( T_lib );
@@ -323,7 +320,17 @@ void FP_LIB_TABLE::Parse( FP_LIB_TABLE_LEXER* in ) throw( IO_ERROR, PARSE_ERROR
in->Duplicate( tok );
sawUri = true;
in->NeedSYMBOLorNUMBER();
row.SetFullURI( in->FromUTF8() );
// Saved path and file names use the Unix notation (separator = '/')
// However old files, and files edited by hand can use the windows
// separator. Force the unix notation.
// (It works on windows, and moreover, wxFileName and wxDir takes care to that
// on windows)
// moreover, URLs use the '/' as separator
{
wxString uri = in->FromUTF8();
uri.Replace( '\\', '/' );
row.SetFullURI( uri );
}
break;
case T_type:
@@ -372,9 +379,15 @@ void FP_LIB_TABLE::Parse( FP_LIB_TABLE_LEXER* in ) throw( IO_ERROR, PARSE_ERROR
wxString msg = wxString::Format(
_( "'%s' is a duplicate footprint library nickName" ),
GetChars( row.nickName ) );
THROW_PARSE_ERROR( msg, in->CurSource(), in->CurLine(), lineNum, offset );
if( !errMsg.IsEmpty() )
errMsg << '\n';
errMsg << msg;
}
}
if( !errMsg.IsEmpty() )
THROW_IO_ERROR( errMsg );
}
@@ -393,10 +406,15 @@ void FP_LIB_TABLE::Format( OUTPUTFORMATTER* out, int nestLevel ) const
void FP_LIB_TABLE::ROW::Format( OUTPUTFORMATTER* out, int nestLevel ) const
throw( IO_ERROR, boost::interprocess::lock_exception )
{
// In Kicad, we save path and file names using the Unix notation (separator = '/')
// So ensure separator is always '/' is saved URI string
wxString uri = GetFullURI();
uri.Replace( '\\', '/' );
out->Print( nestLevel, "(lib (name %s)(type %s)(uri %s)(options %s)(descr %s))\n",
out->Quotew( GetNickName() ).c_str(),
out->Quotew( GetType() ).c_str(),
out->Quotew( GetFullURI() ).c_str(),
out->Quotew( uri ).c_str(),
out->Quotew( GetOptions() ).c_str(),
out->Quotew( GetDescr() ).c_str()
);
+224
View File
@@ -0,0 +1,224 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 2016 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2015 KiCad Developers, see CHANGELOG.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
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// kicad_curl.h must be included before wx headers, to avoid
// conflicts for some defines, at least on Windows
#include <kicad_curl/kicad_curl.h>
#include <wx/log.h>
#include <wx/dynlib.h>
#include <macros.h>
#include <fctsys.h>
#include <ki_mutex.h> // MUTEX and MUTLOCK
#include <richio.h>
// These are even more private than class members, and since there is only
// one instance of KICAD_CURL ever, these statics are hidden here to simplify the
// client (API) header file.
static volatile bool s_initialized;
static MUTEX s_lock; // for s_initialized
// Assume that on these platforms libcurl uses OpenSSL
#if defined(__linux__) || defined(__MINGW32__)
#include <openssl/crypto.h>
static MUTEX* s_crypto_locks;
static void lock_callback( int mode, int type, const char* file, int line )
{
(void)file;
(void)line;
wxASSERT( s_crypto_locks && unsigned( type ) < unsigned( CRYPTO_num_locks() ) );
//DBG( printf( "%s: mode=0x%x type=%d file=%s line=%d\n", __func__, mode, type, file, line );)
if( mode & CRYPTO_LOCK )
{
s_crypto_locks[ type ].lock();
}
else
{
s_crypto_locks[ type ].unlock();
}
}
static void init_locks()
{
s_crypto_locks = new MUTEX[ CRYPTO_num_locks() ];
// From http://linux.die.net/man/3/crypto_set_id_callback:
/*
OpenSSL can safely be used in multi-threaded applications provided that at
least two callback functions are set, locking_function and threadid_func.
locking_function(int mode, int n, const char *file, int line) is needed to
perform locking on shared data structures. (Note that OpenSSL uses a number
of global data structures that will be implicitly shared whenever multiple
threads use OpenSSL.) Multi-threaded applications will crash at random if it
is not set.
threadid_func( CRYPTO_THREADID *id) is needed to record the
currently-executing thread's identifier into id. The implementation of this
callback should not fill in id directly, but should use
CRYPTO_THREADID_set_numeric() if thread IDs are numeric, or
CRYPTO_THREADID_set_pointer() if they are pointer-based. If the application
does not register such a callback using CRYPTO_THREADID_set_callback(), then
a default implementation is used - on Windows and BeOS this uses the
system's default thread identifying APIs, and on all other platforms it uses
the address of errno. The latter is satisfactory for thread-safety if and
only if the platform has a thread-local error number facility.
Dick: "sounds like CRYPTO_THREADID_set_callback() is not mandatory on our
2 OpenSSL platforms."
*/
CRYPTO_set_locking_callback( &lock_callback );
}
static void kill_locks()
{
CRYPTO_set_locking_callback( NULL );
delete[] s_crypto_locks;
s_crypto_locks = NULL;
}
#else
inline void init_locks() { /* dummy */ }
inline void kill_locks() { /* dummy */ }
#endif
/// At process termination, using atexit() keeps the CURL stuff out of the
/// singletops and PGM_BASE.
static void at_terminate()
{
KICAD_CURL::Cleanup();
}
void KICAD_CURL::Init()
{
// We test s_initialized twice in an effort to avoid
// unnecessarily locking s_lock. This understands that the common case
// will not need to lock.
if( !s_initialized )
{
MUTLOCK lock( s_lock );
if( !s_initialized )
{
if( curl_global_init( CURL_GLOBAL_ALL ) != CURLE_OK )
{
THROW_IO_ERROR( "curl_global_init() failed." );
}
init_locks();
wxLogDebug( "Using %s", GetVersion() );
s_initialized = true;
}
}
}
void KICAD_CURL::Cleanup()
{
/*
Calling MUTLOCK() from a static destructor will typically be bad, since the
s_lock may already have been statically destroyed itself leading to a boost
exception. (Remember C++ does not provide certain sequencing of static
destructor invocation.)
To prevent this we test s_initialized twice, which ensures that the MUTLOCK
is only instantiated on the first call, which should be from
PGM_BASE::destroy() which is first called earlier than static destruction.
Then when called again from the actual PGM_BASE::~PGM_BASE() function,
MUTLOCK will not be instantiated because s_initialized will be false.
*/
if( s_initialized )
{
MUTLOCK lock( s_lock );
if( s_initialized )
{
curl_global_cleanup();
kill_locks();
atexit( &at_terminate );
s_initialized = false;
}
}
}
std::string KICAD_CURL::GetSimpleVersion()
{
if( !s_initialized )
Init();
curl_version_info_data* info = curl_version_info( CURLVERSION_NOW );
std::string res;
if( info->version )
{
res += "libcurl version: " + std::string( info->version );
}
res += " (";
if( info->features & CURL_VERSION_SSL )
{
res += "with SSL - ";
res += std::string( info->ssl_version );
}
else
{
res += "without SSL";
}
res += ")";
return res;
}
+94
View File
@@ -0,0 +1,94 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 2015 KiCad Developers, see CHANGELOG.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
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <kicad_curl/kicad_curl_easy.h>
#include <cstddef>
#include <exception>
#include <stdarg.h>
#include <sstream>
#include <richio.h>
static size_t write_callback( void* contents, size_t size, size_t nmemb, void* userp )
{
size_t realsize = size * nmemb;
std::string* p = (std::string*) userp;
p->append( (const char*) contents, realsize );
return realsize;
}
KICAD_CURL_EASY::KICAD_CURL_EASY() :
m_headers( NULL )
{
// Call KICAD_CURL::Init() from in here everytime, but only the first time
// will incur any overhead. This strategy ensures that libcurl is never loaded
// unless it is needed.
KICAD_CURL::Init();
m_CURL = curl_easy_init();
if( !m_CURL )
{
THROW_IO_ERROR( "Unable to initialize CURL session" );
}
curl_easy_setopt( m_CURL, CURLOPT_WRITEFUNCTION, write_callback );
curl_easy_setopt( m_CURL, CURLOPT_WRITEDATA, (void*) &m_buffer );
}
KICAD_CURL_EASY::~KICAD_CURL_EASY()
{
if( m_headers )
curl_slist_free_all( m_headers );
curl_easy_cleanup( m_CURL );
}
void KICAD_CURL_EASY::Perform()
{
if( m_headers )
{
curl_easy_setopt( m_CURL, CURLOPT_HTTPHEADER, m_headers );
}
// bonus: retain worst case memory allocation, should re-use occur
m_buffer.clear();
CURLcode res = curl_easy_perform( m_CURL );
if( res != CURLE_OK )
{
std::string msg = StrPrintf( "curl_easy_perform()=%d: %s",
res, GetErrorText( res ).c_str() );
THROW_IO_ERROR( msg );
}
}
+2 -2
View File
@@ -100,7 +100,7 @@ std::string StrPrintf( const char* format, ... )
void IO_ERROR::init( const char* aThrowersFile, const char* aThrowersLoc, const wxString& aMsg )
{
errorText.Printf( IO_FORMAT, aMsg.GetData(),
wxString::FromUTF8( aThrowersFile ).GetData(),
wxString::FromUTF8( aThrowersFile ).AfterLast( '/' ).GetData(),
wxString::FromUTF8( aThrowersLoc ).GetData() );
}
@@ -117,7 +117,7 @@ void PARSE_ERROR::init( const char* aThrowersFile, const char* aThrowersLoc,
errorText.Printf( PARSE_FORMAT, aMsg.GetData(), aSource.GetData(),
aLineNumber, aByteIndex,
wxString::FromUTF8( aThrowersFile ).GetData(),
wxString::FromUTF8( aThrowersFile ).AfterLast( '/' ).GetData(),
wxString::FromUTF8( aThrowersLoc ).GetData() );
}
+31 -18
View File
@@ -53,7 +53,7 @@
* put text in aTarget
* return a pointer to the last read char (the second quote if OK)
*/
wxString GetQuotedText( wxString & text )
wxString GetQuotedText( wxString& text )
{
int i = text.Find( QUOTE );
@@ -82,7 +82,7 @@ bool sortListbyCmpValue( const FOOTPRINT_EQUIVALENCE& ref, const FOOTPRINT_EQUIV
// read the .equ files and populate the list of equivalents
int CVPCB_MAINFRAME::buildEquivalenceList( FOOTPRINT_EQUIVALENCE_LIST& aList, wxString * aErrorMessages )
{
char Line[1024];
char line[1024];
int error_count = 0;
FILE* file;
wxFileName fn;
@@ -136,17 +136,18 @@ int CVPCB_MAINFRAME::buildEquivalenceList( FOOTPRINT_EQUIVALENCE_LIST& aList, wx
continue;
}
while( GetLine( file, Line, NULL, sizeof(Line) ) != NULL )
while( GetLine( file, line, NULL, sizeof( line ) ) != NULL )
{
char* text = Line;
wxString value, footprint, wtext = FROM_UTF8( Line );
value = GetQuotedText( wtext );
if( text == NULL || ( *text == 0 ) || value.IsEmpty() )
if( *line == 0 )
continue;
footprint = GetQuotedText( wtext );
wxString wtext = FROM_UTF8( line );
wxString value = GetQuotedText( wtext );
if( value.IsEmpty() )
continue;
wxString footprint = GetQuotedText( wtext );
if( footprint.IsEmpty() )
continue;
@@ -169,9 +170,7 @@ int CVPCB_MAINFRAME::buildEquivalenceList( FOOTPRINT_EQUIVALENCE_LIST& aList, wx
void CVPCB_MAINFRAME::AutomaticFootprintMatching( wxCommandEvent& event )
{
FOOTPRINT_EQUIVALENCE_LIST equiv_List;
COMPONENT* component;
wxString msg, error_msg;
size_t ii;
if( m_netlist.IsEmpty() )
return;
@@ -191,15 +190,13 @@ void CVPCB_MAINFRAME::AutomaticFootprintMatching( wxCommandEvent& event )
// Now, associate each free component with a footprint, when the association
// is found in list
m_skipComponentSelect = true;
ii = 0;
error_msg.Empty();
for( unsigned kk = 0; kk < m_netlist.GetCount(); kk++ )
{
component = m_netlist.GetComponent( kk );
COMPONENT* component = m_netlist.GetComponent( kk );
bool found = false;
m_compListBox->SetSelection( ii++, true );
if( !component->GetFPID().empty() ) // the component has already a footprint
continue;
@@ -208,6 +205,8 @@ void CVPCB_MAINFRAME::AutomaticFootprintMatching( wxCommandEvent& event )
// When happens, using the footprint filter of components can remove the ambiguity by
// filtering equivItem so one can use multiple equiv_List (for polar and
// non-polar caps for example)
wxString fpid_candidate;
for( unsigned idx = 0; idx < equiv_List.size(); idx++ )
{
FOOTPRINT_EQUIVALENCE& equivItem = equiv_List[idx];
@@ -232,13 +231,19 @@ void CVPCB_MAINFRAME::AutomaticFootprintMatching( wxCommandEvent& event )
// If the equivalence is unique, no ambiguity: use the association
if( module && equ_is_unique )
{
SetNewPkg( equivItem.m_FootprintFPID );
SetNewPkg( equivItem.m_FootprintFPID, kk );
found = true;
break;
}
// Store the first candidate found in list, when equivalence is not unique
// We use it later.
if( module && fpid_candidate.IsEmpty() )
fpid_candidate = equivItem.m_FootprintFPID;
// The equivalence is not unique: use the footprint filter to try to remove
// ambiguity
// if the footprint filter does not remove ambiguity, we will use fpid_candidate
if( module )
{
size_t filtercount = component->GetFootprintFilters().GetCount();
@@ -264,13 +269,18 @@ void CVPCB_MAINFRAME::AutomaticFootprintMatching( wxCommandEvent& event )
if( found )
{
SetNewPkg( equivItem.m_FootprintFPID );
SetNewPkg( equivItem.m_FootprintFPID, kk );
break;
}
}
if( found )
continue;
else if( !fpid_candidate.IsEmpty() )
{
SetNewPkg( fpid_candidate, kk );
continue;
}
// obviously the last chance: there's only one filter matching one footprint
if( 1 == component->GetFootprintFilters().GetCount() )
@@ -280,7 +290,9 @@ void CVPCB_MAINFRAME::AutomaticFootprintMatching( wxCommandEvent& event )
const FOOTPRINT_INFO* module = m_footprints.GetModuleInfo( component->GetFootprintFilters()[0] );
if( module )
SetNewPkg( component->GetFootprintFilters()[0] );
{
SetNewPkg( component->GetFootprintFilters()[0], kk );
}
}
}
@@ -288,4 +300,5 @@ void CVPCB_MAINFRAME::AutomaticFootprintMatching( wxCommandEvent& event )
wxMessageBox( error_msg, _( "CvPcb Warning" ), wxOK | wxICON_WARNING, this );
m_skipComponentSelect = false;
m_compListBox->Refresh();
}
+11 -2
View File
@@ -174,12 +174,21 @@ public:
/**
* Function SetNewPkg
* links the footprint to the current selected component
* set the footprint name for all selected components in component list
* and selects the next component.
* @param aFootprintName = the selected footprint
* @param aFootprintName = the new footprint name
*/
void SetNewPkg( const wxString& aFootprintName );
/**
* Function SetNewPkg
* Set the footprint name for the component of position aIndex in the component list
*
* @param aFootprintName = the new footprint name
* @param aIndex = the index of the component to modify in the component list
*/
void SetNewPkg( const wxString& aFootprintName, int aIndex );
void BuildCmpListBox();
void BuildFOOTPRINTS_LISTBOX();
void BuildLIBRARY_LISTBOX();
+4 -3
View File
@@ -91,9 +91,10 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
KiBitmap( editor_xpm ) );
AddMenuItem( preferencesMenu, ID_CVPCB_EQUFILES_LIST_EDIT,
_( "&Edit Footprint Association File" ),
_( "Modify footprint association file (.equ). This is the file which "
"assigns the footprint name by the component value" ),
_( "Footprint &Association Files" ),
_( "Configure footprint association file (.equ) list."
"These files are used to automatically assign"
"the footprint name from the component value" ),
KiBitmap( library_table_xpm ) );
// Language submenu
+50 -28
View File
@@ -48,7 +48,6 @@
void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName )
{
COMPONENT* component;
bool hasFootprint = false;
int componentIndex;
if( m_netlist.IsEmpty() )
@@ -71,34 +70,8 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName )
if( component == NULL )
return;
// Check to see if the component has already a footprint set.
hasFootprint = !component->GetFPID().empty();
SetNewPkg( aFootprintName, componentIndex );
FPID fpid;
if( !aFootprintName.IsEmpty() )
{
wxCHECK_RET( fpid.Parse( aFootprintName ) < 0,
wxString::Format( wxT( "<%s> is not a valid FPID." ),
GetChars( aFootprintName ) ) );
}
component->SetFPID( fpid );
// create the new component description
wxString description = wxString::Format( CMP_FORMAT, componentIndex + 1,
GetChars( component->GetReference() ),
GetChars( component->GetValue() ),
GetChars( FROM_UTF8( component->GetFPID().Format().c_str() ) ) );
// If the component hasn't had a footprint associated with it
// it now has, so we decrement the count of components without
// a footprint assigned.
if( !hasFootprint )
m_undefinedComponentCnt -= 1;
// Set the new description and deselect the processed component
m_compListBox->SetString( componentIndex, description );
m_compListBox->SetSelection( componentIndex, false );
}
@@ -116,6 +89,55 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName )
}
void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName, int aIndex )
{
COMPONENT* component;
if( m_netlist.IsEmpty() )
return;
component = m_netlist.GetComponent( aIndex );
if( component == NULL )
return;
// Check to see if the component has already a footprint set.
bool hasFootprint = !component->GetFPID().empty();
FPID fpid;
if( !aFootprintName.IsEmpty() )
{
wxCHECK_RET( fpid.Parse( aFootprintName ) < 0,
wxString::Format( wxT( "<%s> is not a valid FPID." ),
GetChars( aFootprintName ) ) );
}
component->SetFPID( fpid );
// create the new component description
wxString description = wxString::Format( CMP_FORMAT, aIndex + 1,
GetChars( component->GetReference() ),
GetChars( component->GetValue() ),
GetChars( FROM_UTF8( component->GetFPID().Format().c_str() ) ) );
// If the component hasn't had a footprint associated with it
// it now has, so we decrement the count of components without
// a footprint assigned.
if( !hasFootprint )
m_undefinedComponentCnt -= 1;
// Set the new description and deselect the processed component
m_compListBox->SetString( aIndex, description );
// Mark this "session" as modified
m_modified = true;
// update the statusbar
DisplayStatus();
}
/// Return true if the resultant FPID has a certain nickname. The guess
/// is only made if this footprint resides in only one library.
/// @return int - 0 on success, 1 on not found, 2 on ambiguous i.e. multiple matches
@@ -36,11 +36,11 @@ popt = pctl.GetPlotOptions()
popt.SetOutputDirectory(plotDir)
# Set some important plot options:
popt.SetPlotFrameRef(False)
popt.SetPlotFrameRef(False) #do not change it
popt.SetLineWidth(FromMM(0.35))
popt.SetAutoScale(False)
popt.SetScale(1)
popt.SetAutoScale(False) #do not change it
popt.SetScale(1) #do not change it
popt.SetMirror(False)
popt.SetUseGerberAttributes(True)
popt.SetUseGerberProtelExtensions(False)
@@ -100,7 +100,10 @@ drlwriter.SetMapFileFormat( PLOT_FORMAT_PDF )
mirror = False
minimalHeader = False
offset = wxPoint(0,0)
drlwriter.SetOptions( mirror, minimalHeader, offset )
# False to generate 2 separate drill files (one for plated holes, one for non plated holes)
# True to generate only one drill file
mergeNPTH = False
drlwriter.SetOptions( mirror, minimalHeader, offset, mergeNPTH )
metricFmt = True
drlwriter.SetFormat( metricFmt )
+6
View File
@@ -136,6 +136,12 @@ void DIALOG_RESCUE_EACH::PopulateConflictList()
m_ListOfConflicts->AppendItem( data );
}
if( !m_Rescuer->m_all_candidates.empty() )
{
// Select the first choice
m_ListOfConflicts->SelectRow( 0 );
}
}
+22 -13
View File
@@ -2,8 +2,8 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2008-2017 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2017 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
@@ -621,8 +621,6 @@ bool LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
cmd.SetEventObject( this );
bool itemInEdit = m_drawItem && m_drawItem->InEditMode();
/* Convert lower to upper case (the usual toupper function has problem
* with non ascii codes like function keys */
if( (aHotKey >= 'a') && (aHotKey <= 'z') )
@@ -636,6 +634,10 @@ bool LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
if( hotKey == NULL )
return false;
bool itemInEdit = m_drawItem && m_drawItem->InEditMode();
bool blocInProgress = GetScreen()->m_BlockLocate.GetState() != STATE_NO_BLOCK;
switch( hotKey->m_Idcommand )
{
default:
@@ -687,7 +689,7 @@ bool LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
break;
case HK_EDIT:
if( ! itemInEdit )
if( !itemInEdit )
m_drawItem = LocateItemUsingCursor( aPosition );
if( m_drawItem )
@@ -720,13 +722,21 @@ bool LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
break;
case HK_ROTATE:
if( ! itemInEdit )
m_drawItem = LocateItemUsingCursor( aPosition );
if( m_drawItem )
if( blocInProgress )
{
cmd.SetId( ID_LIBEDIT_ROTATE_ITEM );
GetEventHandler()->ProcessEvent( cmd );
GetScreen()->m_BlockLocate.SetCommand( BLOCK_ROTATE );
HandleBlockPlace( aDC );
}
else
{
if( !itemInEdit )
m_drawItem = LocateItemUsingCursor( aPosition );
if( m_drawItem )
{
cmd.SetId( ID_LIBEDIT_ROTATE_ITEM );
GetEventHandler()->ProcessEvent( cmd );
}
}
break;
@@ -792,8 +802,7 @@ EDA_HOTKEY* LIB_VIEW_FRAME::GetHotKeyDescription( int aCommand ) const
}
bool LIB_VIEW_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
EDA_ITEM* aItem )
bool LIB_VIEW_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, EDA_ITEM* aItem )
{
if( aHotKey == 0 )
return false;
+20 -9
View File
@@ -3,17 +3,28 @@
# See chapter 14 of eeschema.pdf
set( xsl_lst
bom2csv.xsl
bom_cvs.xsl
netlist_form_cadstar-RINF.xsl
netlist_form_cadstar.xsl
netlist_form_OrcadPcb2.xsl
netlist_form_pads-pcb.xsl
bom_with_title_block_2_csv.xsl
set( XSL_SCRIPTS_LIST
xsl_scripts/bom_with_title_block_2_csv.xsl
xsl_scripts/bom2csv.xsl
xsl_scripts/bom2grouped_csv.xsl
xsl_scripts/netlist_form_cadstar-RINF.xsl
xsl_scripts/netlist_form_cadstar.xsl
xsl_scripts/netlist_form_OrcadPcb2.xsl
xsl_scripts/netlist_form_pads-pcb.xsl
)
install( FILES ${xsl_lst}
set( PYTHON_SCRIPTS_LIST
python_scripts/README-bom.txt
python_scripts/kicad_netlist_reader.py
python_scripts/bom_csv_grouped_by_value.py
python_scripts/bom_csv_grouped_by_value_with_fp.py
python_scripts/bom_csv_sorted_by_ref.py
python_scripts/bom_html_grouped_by_value.py
python_scripts/bom_html_with_advanced_grouping.py
python_scripts/bom_sorted_by_ref.py
)
install( FILES ${XSL_SCRIPTS_LIST} ${PYTHON_SCRIPTS_LIST}
DESTINATION ${KICAD_PLUGINS}
COMPONENT binary
)
-45
View File
@@ -1,45 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet that takes EESCHEMA's Generic Netlist Format as input and
outputs a simple BOM in CSV format. Feel free to enhance this and submit
patches.
How to use:
Eeschema.pdf: chapter 14
-->
<!--
@package
Generate a comma separated value BOM list (csv file type).
Components are sorted by value
One component per line
Fields are
Quantity, 'Part name', Description, lib
-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nl "&#xd;&#xa;"> <!--new line CR, LF -->
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>
<!-- for each component -->
<xsl:template match="libpart">
<!-- -->
<xsl:value-of select="count(//comp/libsource/@part[@part])"/><xsl:text>,"</xsl:text>
<xsl:value-of select="@part"/><xsl:text>","</xsl:text>
<xsl:value-of select="description"/><xsl:text>","</xsl:text>
<xsl:value-of select="@lib"/>
<xsl:text>"&nl;</xsl:text>
</xsl:template>
<xsl:template match="/export">
<xsl:text>Qty,partname,description,lib&nl;</xsl:text>
<xsl:apply-templates select="libparts/libpart"/>
</xsl:template>
</xsl:stylesheet>
@@ -9,6 +9,9 @@
Components are sorted by ref and grouped by value
Fields are (if exist)
Item, Qty, Reference(s), Value, LibPart, Footprint, Datasheet
Command line:
python "pathToFile/bom_csv_grouped_by_value.py" "%I" "%O.csv"
"""
from __future__ import print_function
@@ -25,7 +28,6 @@ def myEqu(self, other):
In this example of a custom equivalency operator we compare the
value, the part name and the footprint.
"""
result = True
if self.getValue() != other.getValue():
@@ -76,7 +78,7 @@ columnset = compfields | partfields # union
columns = ['Item', 'Qty', 'Reference(s)', 'Value', 'LibPart', 'Footprint', 'Datasheet'] + sorted(list(columnset))
# Create a new csv writer object to use as the output formatter
out = csv.writer( f, lineterminator='\n', delimiter=',', quotechar='\"', quoting=csv.QUOTE_MINIMAL )
out = csv.writer( f, lineterminator='\n', delimiter=',', quotechar='\"', quoting=csv.QUOTE_ALL )
# override csv.writer's writerow() to support encoding conversion (initial encoding is utf8):
def writerow( acsvwriter, columns ):
@@ -10,6 +10,9 @@
Components are sorted by ref and grouped by value with same footprint
Fields are (if exist)
'Ref', 'Qnty', 'Value', 'Cmp name', 'Footprint', 'Description', 'Vendor'
Command line:
python "pathToFile/bom_csv_grouped_by_value_with_fp.py" "%I" "%O.csv"
"""
# Import the KiCad python helper module and the csv formatter
@@ -11,6 +11,9 @@
One component per line
Fields are (if exist)
Ref, value, Part, footprint, Datasheet, Manufacturer, Vendor
Command line:
python "pathToFile/bom_csv_sorted_by_ref.py" "%I" "%O.csv"
"""
from __future__ import print_function
@@ -9,6 +9,9 @@
Components are sorted by ref and grouped by value
Fields are (if exist)
Ref, Quantity, Value, Part, Datasheet, Description, Vendor
Command line:
python "pathToFile/bom_html_grouped_by_value.py" "%I" "%O.html"
"""
from __future__ import print_function
@@ -10,6 +10,9 @@
Components are sorted and grouped by value
Fields are (if exist)
Ref, Quantity, Value, Part, Footprint, Description, Vendor
Command line:
python "pathToFile/bom_with_advanced_grouping.py" "%I" "%O.html"
"""
@@ -3,12 +3,15 @@
#
"""
@package
Generate a BOM list file.
Generate a BOM list file (a simple text).
Components are sorted by ref
One component per line
Fields are (if exist)
Ref, Quantity, value, Part, footprint, Description, Vendor
Fields are separated by tabs
Command line:
python "pathToFile/bom_sorted_by_ref.py" "%I" "%O.txt"
"""
from __future__ import print_function
@@ -25,6 +25,9 @@
One component per line
Fields are
Ref,Value, Footprint, Datasheet, Field5, Field4, price
Command line
xsltproc -o "%O.csv" "pathToFile/bom2csv.xsl" "%I"
-->
<!DOCTYPE xsl:stylesheet [
@@ -0,0 +1,104 @@
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format
Copyright (C) 2014, Wolf Walter.
Copyright (C) 2013, Stefan Helmert.
GPL v2.
Functionality:
Generation of Digi-Key ordering system compatible BOM
How to use this is explained in eeschema.pdf chapter 14. You enter a command line into the
netlist exporter using a new (custom) tab in the netlist export dialog.
The command line is
xsltproc -o "%O.csv" "FullPathToFile/bom2groupedCsv.xsl" "%I"
-->
<!--
@package
Functionality:
* Generate a comma separated value BOM list (csv file type).
* Components are sorted by ref and grouped by same value+footprint
One value per line
Fields are
Reference, Quantity, Value, Footprint, Datasheet
The command line is
xsltproc -o "%O.csv" "FullPathToFile/bom2groupedCsv.xsl" "%I"
-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nl "&#xd;&#xa;"> <!--new line CR, LF, or LF, your choice -->
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text"/>
<!-- for Muenchian grouping of footprint and value combination -->
<xsl:key name="partTypeByValueAndFootprint" match="comp" use="concat(footprint, '-', value)" />
<!-- for table head and empty table fields-->
<xsl:key name="headentr" match="field" use="@name"/>
<!-- main part -->
<xsl:template match="/export">
<xsl:text>Reference, Quantity, Value, Footprint, Datasheet</xsl:text>
<!-- find all existing table head entries and list each one once -->
<xsl:for-each select="components/comp/fields/field[generate-id(.) = generate-id(key('headentr',@name)[1])]">
<xsl:text>, </xsl:text>
<xsl:value-of select="@name"/>
</xsl:for-each>
<!-- all table entries -->
<xsl:apply-templates select="components"/>
</xsl:template>
<xsl:template match="components">
<!-- for Muenchian grouping of footprint and value combination -->
<xsl:for-each select="comp[count(. | key('partTypeByValueAndFootprint', concat(footprint, '-', value))[1]) = 1]">
<xsl:sort select="@ref" />
<xsl:text>&nl;</xsl:text>
<!-- list of all references -->
<xsl:for-each select="key('partTypeByValueAndFootprint', concat(footprint, '-', value))">
<xsl:sort select="@ref" />
<xsl:value-of select="@ref"/><xsl:text> </xsl:text>
</xsl:for-each><xsl:text>,</xsl:text>
<!-- quantity of parts with same footprint and value -->
<xsl:value-of select="count(key('partTypeByValueAndFootprint', concat(footprint, '-', value)))"/><xsl:text>,</xsl:text>
<xsl:text>"</xsl:text>
<xsl:value-of select="value"/><xsl:text>","</xsl:text>
<xsl:value-of select="footprint"/><xsl:text>","</xsl:text>
<xsl:value-of select="datasheet"/><xsl:text>"</xsl:text>
<xsl:apply-templates select="fields"/>
</xsl:for-each>
</xsl:template>
<!-- table entries with dynamic table head -->
<xsl:template match="fields">
<!-- remember current fields section -->
<xsl:variable name="fieldvar" select="field"/>
<!-- for all existing head entries -->
<xsl:for-each select="/export/components/comp/fields/field[generate-id(.) = generate-id(key('headentr',@name)[1])]">
<xsl:variable name="allnames" select="@name"/>
<xsl:text>,"</xsl:text>
<!-- for all field entries in the remembered fields section -->
<xsl:for-each select="$fieldvar">
<!-- only if this field entry exists in this fields section -->
<xsl:if test="@name=$allnames">
<!-- content of the field -->
<xsl:value-of select="."/>
<xsl:text>"</xsl:text>
</xsl:if>
<!--
If it does not exist, use an empty cell in output for this row.
Every non-blank entry is assigned to its proper column.
-->
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
@@ -1,26 +1,19 @@
<!--
@package
EESCHEMA BOM plugin. Creates BOM CSV files from the project net file.
Based on Stefan Helmert bom2csv.xsl
Note:
The project infomation (i.e title, company and revision) is taken from and the root sheet.
The project infomation (i.e title, company and revision) is taken from the root sheet.
Arthur:
Ronald Sousa HashDefineElectronics.com
Usage:
on Windows:
xsltproc -o "%O.csv" "C:\Program Files (x86)\KiCad\bin\plugins\bom2csv.xsl" "%I"
on Linux:
xsltproc -o "%O.csv" /usr/local/lib/kicad/plugins/bom2csv.xsl "%I"
Ouput Example:
Source,
Kicad Rev, working director and file source
Generated Date, date this file was generated
Title, the project's tile
Title, the project's title
Company, the project's company
Rev, the project's revision
Date Source, project's issue date
@@ -28,9 +21,15 @@
Comment, This is comment 2
Comment, This is comment 3
Comment, This is comment 4
-->
<!--
@package
Output format
Reference, Value, Fields[n], Library, Library Ref
U1, PIC32MX, Fields[n], KicadLib, PIC
Command line:
xsltproc -o "%O.csv" "pathToFile/bom2csv.xsl" "%I"
-->
<!DOCTYPE xsl:stylesheet [
-3
View File
@@ -206,9 +206,6 @@ void SCH_SHEET_PIN::ConstrainOnEdge( wxPoint Pos )
if( m_Pos.x > (sheet->m_pos.x + sheet->m_size.x) )
m_Pos.x = sheet->m_pos.x + sheet->m_size.x;
}
printf( "centre %d %d, pos %d %d, pinpos %d %d, edge %d\n",
center.x, center.y, Pos.x, Pos.y, m_Pos.x, m_Pos.y, m_edge);
}
+1 -6
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2016 Wayne Stambaugh, stambaughw@gmail.com
* Copyright (C) 2016 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2016-2017 KiCad Developers, see change_log.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
@@ -126,11 +126,6 @@ bool SCH_FIELD_VALIDATOR::Validate( wxWindow *aParent )
errorMsg.Printf( _( "The %s field cannot contain %s characters." ), fieldName, badChars );
}
else if( (tmp.Trim().Length() != val.Length()) || (tmp.Trim( false ).Length() != val.Length()) )
{
errorMsg.Printf( _( "The %s field cannot contain leading and/or trailing white space." ),
fieldName );
}
if ( !errorMsg.empty() )
{
+14 -7
View File
@@ -2,8 +2,8 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2009-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2009-2017 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2017 KiCad Developers, see change_log.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
@@ -115,6 +115,7 @@ void LIB_EDIT_FRAME::EditGraphicSymbol( wxDC* DC, LIB_ITEM* DrawItem )
if( component )
component->GetDrawItemList().sort();
OnModify( );
MSG_PANEL_ITEMS items;
@@ -206,11 +207,17 @@ LIB_ITEM* LIB_EDIT_FRAME::CreateGraphicItem( LIB_PART* LibEntry, wxDC* DC )
if( m_drawItem )
{
m_drawItem->BeginEdit( IS_NEW, drawPos );
m_drawItem->SetWidth( m_drawLineWidth );
m_drawItem->SetFillMode( m_drawFillStyle );
// Don't set line parameters for text objects.
if( m_drawItem->Type() != LIB_TEXT_T )
{
m_drawItem->SetWidth( m_drawLineWidth );
m_drawItem->SetFillMode( m_drawFillStyle );
}
if( m_drawSpecificUnit )
m_drawItem->SetUnit( m_unit );
if( m_drawSpecificConvert )
m_drawItem->SetConvert( m_convert );
@@ -322,14 +329,14 @@ static void SymbolDisplayDraw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
return;
item->SetEraseLastDrawItem( aErase );
item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ), UNSPECIFIED_COLOR, g_XorMode, NULL,
DefaultTransform );
item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ), UNSPECIFIED_COLOR,
g_XorMode, NULL, DefaultTransform );
}
void LIB_EDIT_FRAME::EndDrawGraphicItem( wxDC* DC )
{
if( LIB_PART* part = GetCurPart() )
if( LIB_PART* part = GetCurPart() )
{
if( !m_drawItem )
return;
+10 -9
View File
@@ -3,7 +3,7 @@
*
* Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2013 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2004-2017 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
@@ -74,6 +74,8 @@ void SCH_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar->AddTool( wxID_PRINT, wxEmptyString, KiBitmap( print_button_xpm ),
_( "Print schematic" ) );
m_mainToolBar->AddTool( ID_GEN_PLOT_SCHEMATIC, wxEmptyString, KiBitmap( plot_xpm ),
_( "Plot schematic" ) );
m_mainToolBar->AddSeparator();
@@ -138,6 +140,10 @@ void SCH_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar->AddTool( ID_TO_LIBVIEW, wxEmptyString, KiBitmap( library_browse_xpm ),
HELP_RUN_LIB_VIEWER );
// modedit is with libedit in a "library section" because the user must have footprints before
// they can be assigned.
m_mainToolBar->AddTool( ID_RUN_PCB_MODULE_EDITOR, wxEmptyString, KiBitmap( module_editor_xpm ),
_( "Footprint Editor" ) );
m_mainToolBar->AddSeparator();
@@ -147,6 +153,9 @@ void SCH_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar->AddTool( ID_GET_ERC, wxEmptyString, KiBitmap( erc_xpm ),
_( "Perform electrical rules check" ) );
m_mainToolBar->AddTool( ID_RUN_CVPCB, wxEmptyString, KiBitmap( cvpcb_xpm ),
_( "Run CvPcb to associate components and footprints" ) );
m_mainToolBar->AddTool( ID_GET_NETLIST, wxEmptyString, KiBitmap( netlist_xpm ),
_( "Generate netlist" ) );
@@ -156,14 +165,6 @@ void SCH_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar->AddSeparator();
// The user must have footprints before he can assign them. So put this before CvPcb.
m_mainToolBar->AddTool( ID_RUN_PCB_MODULE_EDITOR, wxEmptyString, KiBitmap( module_editor_xpm ),
_( "Footprint Editor" ) );
m_mainToolBar->AddTool( ID_RUN_CVPCB, wxEmptyString, KiBitmap( cvpcb_xpm ),
_( "Run CvPcb to associate components and footprints" ) );
m_mainToolBar->AddTool( ID_RUN_PCB, wxEmptyString, KiBitmap( pcbnew_xpm ),
_( "Run Pcbnew to layout printed circuit board" ) );
+108
View File
@@ -0,0 +1,108 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 2015 KiCad Developers, see CHANGELOG.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
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef KICAD_CURL_H_
#define KICAD_CURL_H_
/*
* KICAD_CURL.h must be included before wxWidgets because on Windows,
* wxWidgets ends up including windows.h before winsocks2.h inside curl
* this causes build warnings
* Because we are before wx, we must explicitly define we are building with unicode.
* wxWidgets defaults to supporting unicode now, so this should be safe.
*/
#if defined(WIN32)
#ifndef UNICODE
# define UNICODE
#endif
#ifndef _UNICODE
# define _UNICODE
#endif
#endif
#include <curl/curl.h>
#include <string>
// CURL_EXTERN expands to dllimport on MinGW which causes gcc warnings. This really should
// expand to nothing on MinGW.
#if defined( __MINGW32__)
# if defined( CURL_EXTERN )
# undef CURL_EXTERN
# define CURL_EXTERN
# endif
#endif
struct DYN_LOOKUP;
/**
* Class KICAD_CURL
* simple wrapper class to call curl_global_init and curl_global_cleanup for KiCad.
*/
class KICAD_CURL
{
friend class KICAD_CURL_EASY;
public:
/**
* Function Init
* calls curl_global_init for the application. It must be used only once
* and before any curl functions that perform requests.
*
* @return bool - True if successful, false if CURL returned an error
* @throw IO_ERROR on failure, hopefully with helpful text in it.
*/
static void Init();
/**
* Function Cleanup
* calls curl_global_cleanup for the application. It must be used only after
* curl_global_init was called.
*/
static void Cleanup();
/**
* Function GetVersion
* wrapper for curl_version(). Reports back a short string of loaded libraries.
*
* @return const char* - String reported by libcurl and owned by it.
* @throw IO_ERROR on failure, hopefully with helpful text in it.
*/
static const char* GetVersion()
{
return curl_version();
}
/**
* Function GetSimpleVersion
* Reports back curl version only and SSL library support
*
* @return std::string - Generated version string
*/
static std::string GetSimpleVersion();
};
#endif // KICAD_CURL_H_
+184
View File
@@ -0,0 +1,184 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 2015 KiCad Developers, see CHANGELOG.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
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef KICAD_CURL_EASY_H_
#define KICAD_CURL_EASY_H_
/*
* KICAD_CURL_EASY.h must included before wxWidgets because on Windows,
* wxWidgets ends up including windows.h before winsocks2.h inside curl
* this causes build warnings
* Because we are before wx, we must explicitly define we are building with unicode
* wxWidgets defaults to supporting unicode now, so this should be safe.
*/
#if defined(WIN32)
#ifndef UNICODE
# define UNICODE
#endif
#ifndef _UNICODE
# define _UNICODE
#endif
#endif
#include <string>
#include <curl/curl.h>
#include <kicad_curl/kicad_curl.h>
/**
* Class KICAD_CURL_EASY
* wrapper interface around the curl_easy API
*
* Handling of using the curl_easy API to make a request and save the response to
* a memory buffer
*
* Here is a small example usage:
* @code
* KICAD_CURL_EASY curl;
*
* curl.SetURL( "http://github.com" );
* curl.SetUserAgent( <http-client-indentifier> );
* curl.SetHeader( "Accept", "application/json" );
* curl.Perform();
* @endcode
*/
class KICAD_CURL_EASY
{
public:
KICAD_CURL_EASY();
~KICAD_CURL_EASY();
/**
* Function perform
* equivalent to curl_easy_perform. Executes the request
* that was previously setup.
*
* @throw IO_ERROR, if there is a CURL request error
*/
void Perform();
/**
* Function SetHeader
* sets an arbitrary header for the HTTP(s) request.
*
* @param aName is the left hand side of the header, i.e. Accept without the colon
* @param aValue is the right hand side of the header, i.e. application/json
*/
void SetHeader( const std::string& aName, const std::string& aValue )
{
std::string header = aName + ':' + aValue;
m_headers = curl_slist_append( m_headers, header.c_str() );
}
/**
* Function SetUserAgent
* sets the request user agent
*
* @param aAgent is the string to set for the user agent
* @return bool - True if successful, false if not
*/
bool SetUserAgent( const std::string& aAgent )
{
if( SetOption<const char*>( CURLOPT_USERAGENT, aAgent.c_str() ) == CURLE_OK )
{
return true;
}
return false;
}
/**
* Function SetURL
* sets the request URL
*
* @param aURL is the URL
* @return bool - True if successful, false if not
*/
bool SetURL( const std::string& aURL )
{
if( SetOption<const char *>( CURLOPT_URL, aURL.c_str() ) == CURLE_OK )
{
return true;
}
return false;
}
/**
* Function SetFollowRedirects
* enables the following of HTTP(s) and other redirects, by default curl
* does not follow redirects.
*
* @param aFollow is a boolean where true will enable following redirects
* @return bool - True if successful, false if not
*/
bool SetFollowRedirects( bool aFollow )
{
if( SetOption<long>( CURLOPT_FOLLOWLOCATION , (aFollow ? 1 : 0) ) == CURLE_OK )
{
return true;
}
return false;
}
/**
* Function GetErrorText
* fetches CURL's "friendly" error string for a given error code
*
* @param aCode is CURL error code
* @return const std::string - the corresponding error string for the given code
*/
const std::string GetErrorText( CURLcode aCode )
{
return curl_easy_strerror( aCode );
}
/**
* Function SetOption
* sets a curl option, only supports single parameter curl options
*
* @param aOption is CURL option, see CURL manual for options
* @param aArg is the argument being passed to CURL, ensure it is the right type per manual
* @return CURLcode - CURL error code, will return CURLE_OK unless a problem was encountered
*/
template <typename T> CURLcode SetOption( CURLoption aOption, T aArg )
{
return curl_easy_setopt( m_CURL, aOption, aArg );
}
/**
* Function GetBuffer
* returns a const reference to the recevied data buffer
*/
const std::string& GetBuffer()
{
return m_buffer;
}
private:
CURL* m_CURL;
curl_slist* m_headers;
std::string m_buffer;
};
#endif // KICAD_CURL_EASY_H_
+10 -3
View File
@@ -5,8 +5,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004-2015 Jean-Pierre Charras
* Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2004-2017 Jean-Pierre Charras
* Copyright (C) 2004-2017 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
@@ -168,7 +168,7 @@ void KICAD_MANAGER_FRAME::OnArchiveFiles( wxCommandEvent& event )
wxString currdirname = fileName.GetPathWithSep();
wxDir dir( currdirname );
if( !dir.IsOpened() )
if( !dir.IsOpened() ) // wxWidgets display a error message on issue.
return;
wxSetWorkingDirectory( currdirname );
@@ -177,6 +177,13 @@ void KICAD_MANAGER_FRAME::OnArchiveFiles( wxCommandEvent& event )
wxString zipfilename = zip.GetFullPath();
wxFFileOutputStream ostream( zipfilename );
if( !ostream.IsOk() ) // issue to create the file. Perhaps not writable dir
{
wxMessageBox( wxString::Format( _( "Unable to create zip archive file '%s'" ), zipfilename ) );
return;
}
wxZipOutputStream zipstream( ostream );
// Build list of filenames to put in zip archive
+8 -1
View File
@@ -239,11 +239,18 @@ void WORKSHEET_LAYOUT_IO::format( WORKSHEET_DATAITEM_TEXT* aItem, int aNestLevel
// Write font info, only if it is not the default setup
bool write_size = aItem->m_TextSize.x != 0.0 || aItem->m_TextSize.y != 0.0;
bool write_thickness = aItem->m_LineWidth != 0.0;
if( write_size || aItem->IsBold() || aItem->IsItalic() )
if( write_thickness || write_size || aItem->IsBold() || aItem->IsItalic() )
{
m_out->Print( 0, " (%s", getTokenName( T_font ) );
if( write_thickness )
{
m_out->Print( 0, " (%s %s)", getTokenName( T_linewidth ),
double2Str(aItem->m_LineWidth ).c_str() );
}
if( write_size )
{
m_out->Print( 0, " (%s %s %s)", getTokenName( T_size ),
+2 -2
View File
@@ -424,11 +424,11 @@ if( KICAD_SCRIPTING_MODULES )
pcad2kicadpcb
lib_dxf
idf3
${GITHUB_PLUGIN_LIBRARIES}
polygon
bitmaps
gal
${wxWidgets_LIBRARIES}
${GITHUB_PLUGIN_LIBRARIES}
${GDI_PLUS_LIBRARIES}
${PYTHON_LIBRARIES}
${PCBNEW_EXTRA_LIBS}
@@ -594,8 +594,8 @@ target_link_libraries( pcbnew_kiface
gal
lib_dxf
idf3
${GITHUB_PLUGIN_LIBRARIES}
${wxWidgets_LIBRARIES}
${GITHUB_PLUGIN_LIBRARIES}
${GDI_PLUS_LIBRARIES}
${PYTHON_LIBRARIES}
${Boost_LIBRARIES} # must follow GITHUB
-5
View File
@@ -337,11 +337,6 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName, bool aOnlyO
plot_opts.SetMirror( m_printMirror );
plot_opts.SetFormat( PLOT_FORMAT_SVG );
EDA_COLOR_T color = UNSPECIFIED_COLOR; // Used layer color to plot ref and value
plot_opts.SetReferenceColor( color );
plot_opts.SetValueColor( color );
PAGE_INFO pageInfo = m_board->GetPageSettings();
wxPoint axisorigin = m_board->GetAuxOrigin();
+273 -280
View File
@@ -1,280 +1,273 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 17 2015)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_copper_zones_base.h"
///////////////////////////////////////////////////////////////////////////
BEGIN_EVENT_TABLE( DIALOG_COPPER_ZONE_BASE, DIALOG_SHIM )
EVT_CLOSE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnClose )
EVT_CHOICE( ID_M_NETDISPLAYOPTION, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected )
EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
EVT_BUTTON( wxID_APPLY_FILTERS, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
EVT_CHOICE( ID_CORNER_SMOOTHING, DIALOG_COPPER_ZONE_BASE::_wxFB_OnCornerSmoothingModeChoice )
EVT_CHOICE( ID_M_PADINZONEOPT, DIALOG_COPPER_ZONE_BASE::_wxFB_OnPadsInZoneClick )
EVT_BUTTON( wxID_BUTTON_EXPORT, DIALOG_COPPER_ZONE_BASE::_wxFB_ExportSetupToOtherCopperZones )
EVT_BUTTON( wxID_CANCEL, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonCancelClick )
EVT_BUTTON( wxID_OK, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonOkClick )
END_EVENT_TABLE()
DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
m_MainBoxSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* m_OptionsBoxSizer;
m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* m_layerSizer;
m_layerSizer = new wxBoxSizer( wxVERTICAL );
m_staticText17 = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText17->Wrap( -1 );
m_layerSizer->Add( m_staticText17, 0, wxTOP|wxRIGHT, 5 );
m_LayerSelectionCtrl = new wxListView( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ALIGN_LEFT|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL );
m_layerSizer->Add( m_LayerSelectionCtrl, 1, wxRIGHT, 5 );
m_OptionsBoxSizer->Add( m_layerSizer, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerNets;
bSizerNets = new wxBoxSizer( wxVERTICAL );
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2->Wrap( -1 );
bSizerNets->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
bSizerNets->Add( m_ListNetNameSelection, 1, wxEXPAND, 5 );
m_OptionsBoxSizer->Add( bSizerNets, 1, wxEXPAND, 5 );
wxStaticBoxSizer* m_NetSortOptSizer;
m_NetSortOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Filtering") ), wxVERTICAL );
m_staticText16 = new wxStaticText( m_NetSortOptSizer->GetStaticBox(), wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText16->Wrap( -1 );
m_NetSortOptSizer->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (pad count)"), _("Filtered (alphabetical)"), _("Filtered (pad count)") };
int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString );
m_NetDisplayOption = new wxChoice( m_NetSortOptSizer->GetStaticBox(), ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 );
m_NetDisplayOption->SetSelection( 0 );
m_NetSortOptSizer->Add( m_NetDisplayOption, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_staticText5 = new wxStaticText( m_NetSortOptSizer->GetStaticBox(), wxID_ANY, _("Hidden net filter:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText5->Wrap( -1 );
m_NetSortOptSizer->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_DoNotShowNetNameFilter = new wxTextCtrl( m_NetSortOptSizer->GetStaticBox(), ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
m_DoNotShowNetNameFilter->SetMaxLength( 0 );
m_DoNotShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") );
m_NetSortOptSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText51 = new wxStaticText( m_NetSortOptSizer->GetStaticBox(), wxID_ANY, _("Visible net filter:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText51->Wrap( -1 );
m_NetSortOptSizer->Add( m_staticText51, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ShowNetNameFilter = new wxTextCtrl( m_NetSortOptSizer->GetStaticBox(), ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
m_ShowNetNameFilter->SetMaxLength( 0 );
m_ShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nOnly net names matching this pattern are displayed.") );
m_NetSortOptSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_buttonRunFilter = new wxButton( m_NetSortOptSizer->GetStaticBox(), wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 );
m_NetSortOptSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 );
m_OptionsBoxSizer->Add( m_NetSortOptSizer, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* m_ExportableSetupSizer;
m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings") ), wxHORIZONTAL );
wxBoxSizer* bSizerSettings;
bSizerSettings = new wxBoxSizer( wxVERTICAL );
m_ClearanceValueTitle = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 );
m_ClearanceValueTitle->Wrap( -1 );
bSizerSettings->Add( m_ClearanceValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ZoneClearanceCtrl = new wxTextCtrl( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_ZoneClearanceCtrl->SetMaxLength( 0 );
bSizerSettings->Add( m_ZoneClearanceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_MinThicknessValueTitle = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Minimum width"), wxDefaultPosition, wxDefaultSize, 0 );
m_MinThicknessValueTitle->Wrap( -1 );
m_MinThicknessValueTitle->SetToolTip( _("Minimum thickness of filled areas.") );
bSizerSettings->Add( m_MinThicknessValueTitle, 0, wxRIGHT|wxLEFT, 5 );
m_ZoneMinThicknessCtrl = new wxTextCtrl( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_ZoneMinThicknessCtrl->SetMaxLength( 0 );
bSizerSettings->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText151 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText151->Wrap( -1 );
bSizerSettings->Add( m_staticText151, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") };
int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString );
m_cornerSmoothingChoice = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_CORNER_SMOOTHING, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 );
m_cornerSmoothingChoice->SetSelection( 0 );
bSizerSettings->Add( m_cornerSmoothingChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_cornerSmoothingTitle = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Chamfer distance (mm):"), wxDefaultPosition, wxDefaultSize, 0 );
m_cornerSmoothingTitle->Wrap( -1 );
bSizerSettings->Add( m_cornerSmoothingTitle, 0, wxRIGHT|wxLEFT, 5 );
m_cornerSmoothingCtrl = new wxTextCtrl( m_ExportableSetupSizer->GetStaticBox(), ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_cornerSmoothingCtrl->SetMaxLength( 0 );
bSizerSettings->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_ExportableSetupSizer->Add( bSizerSettings, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerPadsConnection;
bSizerPadsConnection = new wxBoxSizer( wxVERTICAL );
m_staticText13 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText13->Wrap( -1 );
bSizerPadsConnection->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("THT thermal"), _("None") };
int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString );
m_PadInZoneOpt = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 );
m_PadInZoneOpt->SetSelection( 0 );
bSizerPadsConnection->Add( m_PadInZoneOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
wxStaticBoxSizer* m_ThermalShapesParamsSizer;
m_ThermalShapesParamsSizer = new wxStaticBoxSizer( new wxStaticBox( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Thermal Reliefs") ), wxVERTICAL );
m_AntipadSizeText = new wxStaticText( m_ThermalShapesParamsSizer->GetStaticBox(), wxID_ANY, _("Antipad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
m_AntipadSizeText->Wrap( -1 );
m_ThermalShapesParamsSizer->Add( m_AntipadSizeText, 0, wxTOP|wxRIGHT, 5 );
m_AntipadSizeValue = new wxTextCtrl( m_ThermalShapesParamsSizer->GetStaticBox(), wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_AntipadSizeValue->SetMaxLength( 0 );
m_AntipadSizeValue->SetToolTip( _("Clearance between pads in the same net and filled areas.") );
m_ThermalShapesParamsSizer->Add( m_AntipadSizeValue, 0, wxEXPAND|wxBOTTOM, 5 );
m_CopperBridgeWidthText = new wxStaticText( m_ThermalShapesParamsSizer->GetStaticBox(), wxID_ANY, _("Spoke width"), wxDefaultPosition, wxDefaultSize, 0 );
m_CopperBridgeWidthText->Wrap( -1 );
m_ThermalShapesParamsSizer->Add( m_CopperBridgeWidthText, 0, wxTOP|wxRIGHT, 5 );
m_CopperWidthValue = new wxTextCtrl( m_ThermalShapesParamsSizer->GetStaticBox(), wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_CopperWidthValue->SetMaxLength( 0 );
m_CopperWidthValue->SetToolTip( _("Width of copper in thermal reliefs.") );
m_ThermalShapesParamsSizer->Add( m_CopperWidthValue, 0, wxEXPAND|wxBOTTOM, 5 );
bSizerPadsConnection->Add( m_ThermalShapesParamsSizer, 0, wxALL|wxEXPAND, 5 );
m_ExportableSetupSizer->Add( bSizerPadsConnection, 0, wxEXPAND, 5 );
wxBoxSizer* m_MiddleBox;
m_MiddleBox = new wxBoxSizer( wxVERTICAL );
m_staticText171 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Priority level:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText171->Wrap( -1 );
m_staticText171->SetToolTip( _("On each copper layer, zones are filled by priority order.\nSo when a zone is inside an other zone:\n* If its priority is highter: its outlines are removed from the other layer.\n* If its priority is equal: a DRC error is set.") );
m_MiddleBox->Add( m_staticText171, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PriorityLevelCtrl = new wxSpinCtrl( m_ExportableSetupSizer->GetStaticBox(), ID_M_PRIORITYLEVELCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0 );
m_MiddleBox->Add( m_PriorityLevelCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText11 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Fill mode:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText11->Wrap( -1 );
m_MiddleBox->Add( m_staticText11, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_FillModeCtrlChoices[] = { _("Polygon"), _("Segment") };
int m_FillModeCtrlNChoices = sizeof( m_FillModeCtrlChoices ) / sizeof( wxString );
m_FillModeCtrl = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_FILLMODECTRL, wxDefaultPosition, wxDefaultSize, m_FillModeCtrlNChoices, m_FillModeCtrlChoices, 0 );
m_FillModeCtrl->SetSelection( 0 );
m_MiddleBox->Add( m_FillModeCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_staticText12 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Segments / 360 deg:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText12->Wrap( -1 );
m_MiddleBox->Add( m_staticText12, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_ArcApproximationOptChoices[] = { _("16"), _("32") };
int m_ArcApproximationOptNChoices = sizeof( m_ArcApproximationOptChoices ) / sizeof( wxString );
m_ArcApproximationOpt = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_ARCAPPROXIMATIONOPT, wxDefaultPosition, wxDefaultSize, m_ArcApproximationOptNChoices, m_ArcApproximationOptChoices, 0 );
m_ArcApproximationOpt->SetSelection( 0 );
m_MiddleBox->Add( m_ArcApproximationOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_ExportableSetupSizer->Add( m_MiddleBox, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerLowerRight;
bSizerLowerRight = new wxBoxSizer( wxVERTICAL );
m_staticText14 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Outline slope:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText14->Wrap( -1 );
bSizerLowerRight->Add( m_staticText14, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_OrientEdgesOptChoices[] = { _("Arbitrary"), _("H, V, and 45 deg only") };
int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString );
m_OrientEdgesOpt = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_ORIENTEDGESOPT, wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 0 );
m_OrientEdgesOpt->SetSelection( 0 );
bSizerLowerRight->Add( m_OrientEdgesOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_staticText15 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText15->Wrap( -1 );
bSizerLowerRight->Add( m_staticText15, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") };
int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString );
m_OutlineAppearanceCtrl = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_OUTLINEAPPEARANCECTRL, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 );
m_OutlineAppearanceCtrl->SetSelection( 0 );
bSizerLowerRight->Add( m_OutlineAppearanceCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_ExportableSetupSizer->Add( bSizerLowerRight, 0, wxEXPAND, 5 );
m_MainBoxSizer->Add( m_ExportableSetupSizer, 0, wxALL|wxEXPAND, 5 );
wxBoxSizer* bSizerbottom;
bSizerbottom = new wxBoxSizer( wxHORIZONTAL );
m_ExportSetupButton = new wxButton( this, wxID_BUTTON_EXPORT, _("Export Settings to Other Zones"), wxDefaultPosition, wxDefaultSize, 0 );
m_ExportSetupButton->SetToolTip( _("Export this zone setup (excluding layer and net selection) to all other copper zones.") );
bSizerbottom->Add( m_ExportSetupButton, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizerOK = new wxButton( this, wxID_OK );
m_sdbSizer->AddButton( m_sdbSizerOK );
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer->AddButton( m_sdbSizerCancel );
m_sdbSizer->Realize();
bSizerbottom->Add( m_sdbSizer, 1, wxEXPAND, 5 );
m_MainBoxSizer->Add( bSizerbottom, 0, wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
this->SetSizer( m_MainBoxSizer );
this->Layout();
}
DIALOG_COPPER_ZONE_BASE::~DIALOG_COPPER_ZONE_BASE()
{
}
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version May 6 2016)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_copper_zones_base.h"
///////////////////////////////////////////////////////////////////////////
BEGIN_EVENT_TABLE( DIALOG_COPPER_ZONE_BASE, DIALOG_SHIM )
EVT_CLOSE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnClose )
EVT_CHOICE( ID_M_NETDISPLAYOPTION, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected )
EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
EVT_BUTTON( wxID_APPLY_FILTERS, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
EVT_CHOICE( ID_CORNER_SMOOTHING, DIALOG_COPPER_ZONE_BASE::_wxFB_OnCornerSmoothingModeChoice )
EVT_CHOICE( ID_M_PADINZONEOPT, DIALOG_COPPER_ZONE_BASE::_wxFB_OnPadsInZoneClick )
EVT_BUTTON( wxID_BUTTON_EXPORT, DIALOG_COPPER_ZONE_BASE::_wxFB_ExportSetupToOtherCopperZones )
EVT_BUTTON( wxID_CANCEL, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonCancelClick )
EVT_BUTTON( wxID_OK, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonOkClick )
END_EVENT_TABLE()
DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
m_MainBoxSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* m_OptionsBoxSizer;
m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* m_layerSizer;
m_layerSizer = new wxBoxSizer( wxVERTICAL );
m_staticText17 = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText17->Wrap( -1 );
m_layerSizer->Add( m_staticText17, 0, wxTOP|wxRIGHT, 5 );
m_LayerSelectionCtrl = new wxListView( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ALIGN_LEFT|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL );
m_layerSizer->Add( m_LayerSelectionCtrl, 1, wxRIGHT, 5 );
m_OptionsBoxSizer->Add( m_layerSizer, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerNets;
bSizerNets = new wxBoxSizer( wxVERTICAL );
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2->Wrap( -1 );
bSizerNets->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
bSizerNets->Add( m_ListNetNameSelection, 1, wxEXPAND, 5 );
m_OptionsBoxSizer->Add( bSizerNets, 1, wxEXPAND, 5 );
wxStaticBoxSizer* m_NetSortOptSizer;
m_NetSortOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Filtering") ), wxVERTICAL );
m_staticText16 = new wxStaticText( m_NetSortOptSizer->GetStaticBox(), wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText16->Wrap( -1 );
m_NetSortOptSizer->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (pad count)"), _("Filtered (alphabetical)"), _("Filtered (pad count)") };
int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString );
m_NetDisplayOption = new wxChoice( m_NetSortOptSizer->GetStaticBox(), ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 );
m_NetDisplayOption->SetSelection( 0 );
m_NetSortOptSizer->Add( m_NetDisplayOption, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_staticText5 = new wxStaticText( m_NetSortOptSizer->GetStaticBox(), wxID_ANY, _("Hidden net filter:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText5->Wrap( -1 );
m_NetSortOptSizer->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_DoNotShowNetNameFilter = new wxTextCtrl( m_NetSortOptSizer->GetStaticBox(), ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
m_DoNotShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") );
m_NetSortOptSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText51 = new wxStaticText( m_NetSortOptSizer->GetStaticBox(), wxID_ANY, _("Visible net filter:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText51->Wrap( -1 );
m_NetSortOptSizer->Add( m_staticText51, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ShowNetNameFilter = new wxTextCtrl( m_NetSortOptSizer->GetStaticBox(), ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
m_ShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nOnly net names matching this pattern are displayed.") );
m_NetSortOptSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_buttonRunFilter = new wxButton( m_NetSortOptSizer->GetStaticBox(), wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 );
m_NetSortOptSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 );
m_OptionsBoxSizer->Add( m_NetSortOptSizer, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* m_ExportableSetupSizer;
m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings") ), wxHORIZONTAL );
wxBoxSizer* bSizerSettings;
bSizerSettings = new wxBoxSizer( wxVERTICAL );
m_ClearanceValueTitle = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 );
m_ClearanceValueTitle->Wrap( -1 );
bSizerSettings->Add( m_ClearanceValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ZoneClearanceCtrl = new wxTextCtrl( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerSettings->Add( m_ZoneClearanceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_MinThicknessValueTitle = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Minimum width"), wxDefaultPosition, wxDefaultSize, 0 );
m_MinThicknessValueTitle->Wrap( -1 );
m_MinThicknessValueTitle->SetToolTip( _("Minimum thickness of filled areas.") );
bSizerSettings->Add( m_MinThicknessValueTitle, 0, wxRIGHT|wxLEFT, 5 );
m_ZoneMinThicknessCtrl = new wxTextCtrl( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerSettings->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText151 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText151->Wrap( -1 );
bSizerSettings->Add( m_staticText151, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") };
int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString );
m_cornerSmoothingChoice = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_CORNER_SMOOTHING, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 );
m_cornerSmoothingChoice->SetSelection( 0 );
bSizerSettings->Add( m_cornerSmoothingChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_cornerSmoothingTitle = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Chamfer distance (mm):"), wxDefaultPosition, wxDefaultSize, 0 );
m_cornerSmoothingTitle->Wrap( -1 );
bSizerSettings->Add( m_cornerSmoothingTitle, 0, wxRIGHT|wxLEFT, 5 );
m_cornerSmoothingCtrl = new wxTextCtrl( m_ExportableSetupSizer->GetStaticBox(), ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerSettings->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_ExportableSetupSizer->Add( bSizerSettings, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerPadsConnection;
bSizerPadsConnection = new wxBoxSizer( wxVERTICAL );
m_staticText13 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText13->Wrap( -1 );
bSizerPadsConnection->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("THT thermal"), _("None") };
int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString );
m_PadInZoneOpt = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 );
m_PadInZoneOpt->SetSelection( 0 );
bSizerPadsConnection->Add( m_PadInZoneOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
wxStaticBoxSizer* m_ThermalShapesParamsSizer;
m_ThermalShapesParamsSizer = new wxStaticBoxSizer( new wxStaticBox( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Thermal Reliefs") ), wxVERTICAL );
m_AntipadSizeText = new wxStaticText( m_ThermalShapesParamsSizer->GetStaticBox(), wxID_ANY, _("Antipad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
m_AntipadSizeText->Wrap( -1 );
m_ThermalShapesParamsSizer->Add( m_AntipadSizeText, 0, wxTOP|wxRIGHT, 5 );
m_AntipadSizeValue = new wxTextCtrl( m_ThermalShapesParamsSizer->GetStaticBox(), wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_AntipadSizeValue->SetToolTip( _("Clearance between pads in the same net and filled areas.") );
m_ThermalShapesParamsSizer->Add( m_AntipadSizeValue, 0, wxEXPAND|wxBOTTOM, 5 );
m_CopperBridgeWidthText = new wxStaticText( m_ThermalShapesParamsSizer->GetStaticBox(), wxID_ANY, _("Spoke width"), wxDefaultPosition, wxDefaultSize, 0 );
m_CopperBridgeWidthText->Wrap( -1 );
m_ThermalShapesParamsSizer->Add( m_CopperBridgeWidthText, 0, wxTOP|wxRIGHT, 5 );
m_CopperWidthValue = new wxTextCtrl( m_ThermalShapesParamsSizer->GetStaticBox(), wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_CopperWidthValue->SetToolTip( _("Width of copper in thermal reliefs.") );
m_ThermalShapesParamsSizer->Add( m_CopperWidthValue, 0, wxEXPAND|wxBOTTOM, 5 );
bSizerPadsConnection->Add( m_ThermalShapesParamsSizer, 0, wxALL|wxEXPAND, 5 );
m_ExportableSetupSizer->Add( bSizerPadsConnection, 0, wxEXPAND, 5 );
wxBoxSizer* m_MiddleBox;
m_MiddleBox = new wxBoxSizer( wxVERTICAL );
m_staticText171 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Priority level:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText171->Wrap( -1 );
m_staticText171->SetToolTip( _("Zones are filled by priority level, level 3 has higher priority than level 2.\nWhen a zone is inside an other zone:\n* If its priority is higher, its outlines are removed from the other zone.\n* If its priority is equal, a DRC error is set.") );
m_MiddleBox->Add( m_staticText171, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PriorityLevelCtrl = new wxSpinCtrl( m_ExportableSetupSizer->GetStaticBox(), ID_M_PRIORITYLEVELCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0 );
m_MiddleBox->Add( m_PriorityLevelCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText11 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Fill mode:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText11->Wrap( -1 );
m_MiddleBox->Add( m_staticText11, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_FillModeCtrlChoices[] = { _("Polygon"), _("Segment") };
int m_FillModeCtrlNChoices = sizeof( m_FillModeCtrlChoices ) / sizeof( wxString );
m_FillModeCtrl = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_FILLMODECTRL, wxDefaultPosition, wxDefaultSize, m_FillModeCtrlNChoices, m_FillModeCtrlChoices, 0 );
m_FillModeCtrl->SetSelection( 0 );
m_MiddleBox->Add( m_FillModeCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_staticText12 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Segments / 360 deg:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText12->Wrap( -1 );
m_MiddleBox->Add( m_staticText12, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_ArcApproximationOptChoices[] = { _("16"), _("32") };
int m_ArcApproximationOptNChoices = sizeof( m_ArcApproximationOptChoices ) / sizeof( wxString );
m_ArcApproximationOpt = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_ARCAPPROXIMATIONOPT, wxDefaultPosition, wxDefaultSize, m_ArcApproximationOptNChoices, m_ArcApproximationOptChoices, 0 );
m_ArcApproximationOpt->SetSelection( 0 );
m_MiddleBox->Add( m_ArcApproximationOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_ExportableSetupSizer->Add( m_MiddleBox, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerLowerRight;
bSizerLowerRight = new wxBoxSizer( wxVERTICAL );
m_staticText14 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Outline slope:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText14->Wrap( -1 );
bSizerLowerRight->Add( m_staticText14, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_OrientEdgesOptChoices[] = { _("Arbitrary"), _("H, V, and 45 deg only") };
int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString );
m_OrientEdgesOpt = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_ORIENTEDGESOPT, wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 0 );
m_OrientEdgesOpt->SetSelection( 0 );
bSizerLowerRight->Add( m_OrientEdgesOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_staticText15 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText15->Wrap( -1 );
bSizerLowerRight->Add( m_staticText15, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") };
int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString );
m_OutlineAppearanceCtrl = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_OUTLINEAPPEARANCECTRL, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 );
m_OutlineAppearanceCtrl->SetSelection( 0 );
bSizerLowerRight->Add( m_OutlineAppearanceCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_ExportableSetupSizer->Add( bSizerLowerRight, 0, wxEXPAND, 5 );
m_MainBoxSizer->Add( m_ExportableSetupSizer, 0, wxALL|wxEXPAND, 5 );
wxBoxSizer* bSizerbottom;
bSizerbottom = new wxBoxSizer( wxHORIZONTAL );
m_ExportSetupButton = new wxButton( this, wxID_BUTTON_EXPORT, _("Export Settings to Other Zones"), wxDefaultPosition, wxDefaultSize, 0 );
m_ExportSetupButton->SetToolTip( _("Export this zone setup (excluding layer and net selection) to all other copper zones.") );
bSizerbottom->Add( m_ExportSetupButton, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizerOK = new wxButton( this, wxID_OK );
m_sdbSizer->AddButton( m_sdbSizerOK );
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer->AddButton( m_sdbSizerCancel );
m_sdbSizer->Realize();
bSizerbottom->Add( m_sdbSizer, 1, wxEXPAND, 5 );
m_MainBoxSizer->Add( bSizerbottom, 0, wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
this->SetSizer( m_MainBoxSizer );
this->Layout();
}
DIALOG_COPPER_ZONE_BASE::~DIALOG_COPPER_ZONE_BASE()
{
}
File diff suppressed because it is too large Load Diff
+135 -135
View File
@@ -1,135 +1,135 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 17 2015)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_COPPER_ZONES_BASE_H__
#define __DIALOG_COPPER_ZONES_BASE_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
class wxListView;
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/listctrl.h>
#include <wx/sizer.h>
#include <wx/listbox.h>
#include <wx/choice.h>
#include <wx/textctrl.h>
#include <wx/button.h>
#include <wx/statbox.h>
#include <wx/spinctrl.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_COPPER_ZONE_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM
{
DECLARE_EVENT_TABLE()
private:
// Private event handlers
void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); }
void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); }
void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); }
void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); }
void _wxFB_OnPadsInZoneClick( wxCommandEvent& event ){ OnPadsInZoneClick( event ); }
void _wxFB_ExportSetupToOtherCopperZones( wxCommandEvent& event ){ ExportSetupToOtherCopperZones( event ); }
void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); }
void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); }
protected:
enum
{
ID_DIALOG_COPPER_ZONE_BASE = 1000,
ID_NETNAME_SELECTION,
ID_M_NETDISPLAYOPTION,
ID_TEXTCTRL_NETNAMES_FILTER,
wxID_APPLY_FILTERS,
ID_CORNER_SMOOTHING,
ID_M_CORNERSMOOTHINGCTRL,
ID_M_PADINZONEOPT,
wxID_ANTIPAD_SIZE,
wxID_COPPER_BRIDGE_VALUE,
ID_M_PRIORITYLEVELCTRL,
ID_M_FILLMODECTRL,
ID_M_ARCAPPROXIMATIONOPT,
ID_M_ORIENTEDGESOPT,
ID_M_OUTLINEAPPEARANCECTRL,
wxID_BUTTON_EXPORT
};
wxBoxSizer* m_MainBoxSizer;
wxStaticText* m_staticText17;
wxListView* m_LayerSelectionCtrl;
wxStaticText* m_staticText2;
wxListBox* m_ListNetNameSelection;
wxStaticText* m_staticText16;
wxChoice* m_NetDisplayOption;
wxStaticText* m_staticText5;
wxTextCtrl* m_DoNotShowNetNameFilter;
wxStaticText* m_staticText51;
wxTextCtrl* m_ShowNetNameFilter;
wxButton* m_buttonRunFilter;
wxStaticText* m_ClearanceValueTitle;
wxTextCtrl* m_ZoneClearanceCtrl;
wxStaticText* m_MinThicknessValueTitle;
wxTextCtrl* m_ZoneMinThicknessCtrl;
wxStaticText* m_staticText151;
wxChoice* m_cornerSmoothingChoice;
wxStaticText* m_cornerSmoothingTitle;
wxTextCtrl* m_cornerSmoothingCtrl;
wxStaticText* m_staticText13;
wxChoice* m_PadInZoneOpt;
wxStaticText* m_AntipadSizeText;
wxTextCtrl* m_AntipadSizeValue;
wxStaticText* m_CopperBridgeWidthText;
wxTextCtrl* m_CopperWidthValue;
wxStaticText* m_staticText171;
wxSpinCtrl* m_PriorityLevelCtrl;
wxStaticText* m_staticText11;
wxChoice* m_FillModeCtrl;
wxStaticText* m_staticText12;
wxChoice* m_ArcApproximationOpt;
wxStaticText* m_staticText14;
wxChoice* m_OrientEdgesOpt;
wxStaticText* m_staticText15;
wxChoice* m_OutlineAppearanceCtrl;
wxButton* m_ExportSetupButton;
wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPadsInZoneClick( wxCommandEvent& event ) { event.Skip(); }
virtual void ExportSetupToOtherCopperZones( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonOkClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Copper Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 567,507 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_COPPER_ZONE_BASE();
};
#endif //__DIALOG_COPPER_ZONES_BASE_H__
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version May 6 2016)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_COPPER_ZONES_BASE_H__
#define __DIALOG_COPPER_ZONES_BASE_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
class wxListView;
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/listctrl.h>
#include <wx/sizer.h>
#include <wx/listbox.h>
#include <wx/choice.h>
#include <wx/textctrl.h>
#include <wx/button.h>
#include <wx/statbox.h>
#include <wx/spinctrl.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_COPPER_ZONE_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM
{
DECLARE_EVENT_TABLE()
private:
// Private event handlers
void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); }
void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); }
void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); }
void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); }
void _wxFB_OnPadsInZoneClick( wxCommandEvent& event ){ OnPadsInZoneClick( event ); }
void _wxFB_ExportSetupToOtherCopperZones( wxCommandEvent& event ){ ExportSetupToOtherCopperZones( event ); }
void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); }
void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); }
protected:
enum
{
ID_DIALOG_COPPER_ZONE_BASE = 1000,
ID_NETNAME_SELECTION,
ID_M_NETDISPLAYOPTION,
ID_TEXTCTRL_NETNAMES_FILTER,
wxID_APPLY_FILTERS,
ID_CORNER_SMOOTHING,
ID_M_CORNERSMOOTHINGCTRL,
ID_M_PADINZONEOPT,
wxID_ANTIPAD_SIZE,
wxID_COPPER_BRIDGE_VALUE,
ID_M_PRIORITYLEVELCTRL,
ID_M_FILLMODECTRL,
ID_M_ARCAPPROXIMATIONOPT,
ID_M_ORIENTEDGESOPT,
ID_M_OUTLINEAPPEARANCECTRL,
wxID_BUTTON_EXPORT
};
wxBoxSizer* m_MainBoxSizer;
wxStaticText* m_staticText17;
wxListView* m_LayerSelectionCtrl;
wxStaticText* m_staticText2;
wxListBox* m_ListNetNameSelection;
wxStaticText* m_staticText16;
wxChoice* m_NetDisplayOption;
wxStaticText* m_staticText5;
wxTextCtrl* m_DoNotShowNetNameFilter;
wxStaticText* m_staticText51;
wxTextCtrl* m_ShowNetNameFilter;
wxButton* m_buttonRunFilter;
wxStaticText* m_ClearanceValueTitle;
wxTextCtrl* m_ZoneClearanceCtrl;
wxStaticText* m_MinThicknessValueTitle;
wxTextCtrl* m_ZoneMinThicknessCtrl;
wxStaticText* m_staticText151;
wxChoice* m_cornerSmoothingChoice;
wxStaticText* m_cornerSmoothingTitle;
wxTextCtrl* m_cornerSmoothingCtrl;
wxStaticText* m_staticText13;
wxChoice* m_PadInZoneOpt;
wxStaticText* m_AntipadSizeText;
wxTextCtrl* m_AntipadSizeValue;
wxStaticText* m_CopperBridgeWidthText;
wxTextCtrl* m_CopperWidthValue;
wxStaticText* m_staticText171;
wxSpinCtrl* m_PriorityLevelCtrl;
wxStaticText* m_staticText11;
wxChoice* m_FillModeCtrl;
wxStaticText* m_staticText12;
wxChoice* m_ArcApproximationOpt;
wxStaticText* m_staticText14;
wxChoice* m_OrientEdgesOpt;
wxStaticText* m_staticText15;
wxChoice* m_OutlineAppearanceCtrl;
wxButton* m_ExportSetupButton;
wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPadsInZoneClick( wxCommandEvent& event ) { event.Skip(); }
virtual void ExportSetupToOtherCopperZones( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonOkClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Copper Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 567,507 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_COPPER_ZONE_BASE();
};
#endif //__DIALOG_COPPER_ZONES_BASE_H__
+46 -5
View File
@@ -5,7 +5,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2017 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
@@ -46,14 +46,14 @@ DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) :
m_plotOpts( aParent->GetPlotSettings() )
{
m_config = Kiface().KifaceSettings();
Init_Dialog();
init_Dialog();
GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this );
}
void DIALOG_PLOT::Init_Dialog()
void DIALOG_PLOT::init_Dialog()
{
wxString msg;
wxFileName fileName;
@@ -194,6 +194,12 @@ void DIALOG_PLOT::Init_Dialog()
// Plot mode
setPlotModeChoiceSelection( m_plotOpts.GetPlotMode() );
// Plot outline mode
m_DXF_plotModeOpt->SetValue( m_plotOpts.GetDXFPlotPolygonMode() );
// Plot text mode
m_DXF_plotTextStrokeFontOpt->SetValue( m_plotOpts.GetTextMode() == PLOTTEXTMODE_DEFAULT );
// Plot mirror option
m_plotMirrorOpt->SetValue( m_plotOpts.GetMirror() );
@@ -288,6 +294,19 @@ void DIALOG_PLOT::CreateDrillFile( wxCommandEvent& event )
}
void DIALOG_PLOT::OnChangeDXFPlotMode( wxCommandEvent& event )
{
// m_DXF_plotTextStrokeFontOpt is disabled if m_DXF_plotModeOpt
// is checked (plot in DXF polygon mode)
m_DXF_plotTextStrokeFontOpt->Enable( !m_DXF_plotModeOpt->GetValue() );
// if m_DXF_plotTextStrokeFontOpt option is disabled (plot DXF in polygon mode),
// force m_DXF_plotTextStrokeFontOpt to true to use Pcbnew stroke font
if( !m_DXF_plotTextStrokeFontOpt->IsEnabled() )
m_DXF_plotTextStrokeFontOpt->SetValue( true );
}
void DIALOG_PLOT::OnSetScaleOpt( wxCommandEvent& event )
{
/* Disable sheet reference for scale != 1:1 */
@@ -355,6 +374,9 @@ PlotFormat DIALOG_PLOT::getPlotFormat()
// and clear also some optional values
void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
{
// this option exist only in DXF format:
m_DXF_plotModeOpt->Enable( getPlotFormat() == PLOT_FORMAT_DXF );
switch( getPlotFormat() )
{
case PLOT_FORMAT_PDF:
@@ -387,6 +409,7 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_PlotOptionsSizer->Hide( m_GerberOptionsSizer );
m_PlotOptionsSizer->Hide( m_HPGLOptionsSizer );
m_PlotOptionsSizer->Hide( m_PSOptionsSizer );
m_PlotOptionsSizer->Hide( m_SizerDXF_options );
break;
case PLOT_FORMAT_POST:
@@ -415,6 +438,7 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_PlotOptionsSizer->Hide( m_GerberOptionsSizer );
m_PlotOptionsSizer->Hide( m_HPGLOptionsSizer );
m_PlotOptionsSizer->Show( m_PSOptionsSizer );
m_PlotOptionsSizer->Hide( m_SizerDXF_options );
break;
case PLOT_FORMAT_GERBER:
@@ -445,6 +469,7 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_PlotOptionsSizer->Show( m_GerberOptionsSizer );
m_PlotOptionsSizer->Hide( m_HPGLOptionsSizer );
m_PlotOptionsSizer->Hide( m_PSOptionsSizer );
m_PlotOptionsSizer->Hide( m_SizerDXF_options );
break;
case PLOT_FORMAT_HPGL:
@@ -474,11 +499,13 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_PlotOptionsSizer->Hide( m_GerberOptionsSizer );
m_PlotOptionsSizer->Show( m_HPGLOptionsSizer );
m_PlotOptionsSizer->Hide( m_PSOptionsSizer );
m_PlotOptionsSizer->Hide( m_SizerDXF_options );
break;
case PLOT_FORMAT_DXF:
m_drillShapeOpt->Enable( true );
m_plotModeOpt->Enable( false );
setPlotModeChoiceSelection( FILLED );
m_plotMirrorOpt->Enable( false );
m_plotMirrorOpt->SetValue( false );
m_useAuxOriginCheckBox->Enable( true );
@@ -505,6 +532,9 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_PlotOptionsSizer->Hide( m_GerberOptionsSizer );
m_PlotOptionsSizer->Hide( m_HPGLOptionsSizer );
m_PlotOptionsSizer->Hide( m_PSOptionsSizer );
m_PlotOptionsSizer->Show( m_SizerDXF_options );
OnChangeDXFPlotMode( event );
break;
default:
@@ -578,8 +608,15 @@ void DIALOG_PLOT::applyPlotSettings()
( m_drillShapeOpt->GetSelection() ) );
tempOptions.SetMirror( m_plotMirrorOpt->GetValue() );
tempOptions.SetPlotMode( m_plotModeOpt->GetSelection() == 1 ? SKETCH : FILLED );
tempOptions.SetDXFPlotPolygonMode( m_DXF_plotModeOpt->GetValue() );
tempOptions.SetPlotViaOnMaskLayer( m_plotNoViaOnMaskOpt->GetValue() );
if( !m_DXF_plotTextStrokeFontOpt->IsEnabled() ) // Currently, only DXF supports this option
tempOptions.SetTextMode( PLOTTEXTMODE_DEFAULT );
else
tempOptions.SetTextMode( m_DXF_plotTextStrokeFontOpt->GetValue() ?
PLOTTEXTMODE_DEFAULT : PLOTTEXTMODE_NATIVE );
// Update settings from text fields. Rewrite values back to the fields,
// since the values may have been constrained by the setters.
@@ -694,11 +731,15 @@ void DIALOG_PLOT::applyPlotSettings()
dirStr.Replace( wxT( "\\" ), wxT( "/" ) );
tempOptions.SetOutputDirectory( dirStr );
if( m_plotOpts != tempOptions )
if( !m_plotOpts.IsSameAs( tempOptions, false ) )
{
// First, mark board as modified only for parameters saved in file
if( !m_plotOpts.IsSameAs( tempOptions, true ) )
m_parent->OnModify();
// Now, save any change, for the session
m_parent->SetPlotSettings( tempOptions );
m_plotOpts = tempOptions;
m_parent->OnModify();
}
}
+14 -13
View File
@@ -5,7 +5,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2017 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
@@ -31,8 +31,8 @@
#include <pcb_plot_params.h>
/**
* Class DIALOG_PLOT
*
* Class DIALOG_PLOT is the dialog to set the plot options, and create plot files
* in various formats.
*/
class DIALOG_PLOT : public DIALOG_PLOT_BASE
{
@@ -58,18 +58,19 @@ private:
PCB_PLOT_PARAMS m_plotOpts;
// Event called functions
void Init_Dialog();
void Plot( wxCommandEvent& event );
void OnQuit( wxCommandEvent& event );
void OnClose( wxCloseEvent& event );
void OnOutputDirectoryBrowseClicked( wxCommandEvent& event );
void OnRightClick( wxMouseEvent& event );
void OnPopUpLayers( wxCommandEvent& event );
void SetPlotFormat( wxCommandEvent& event );
void OnSetScaleOpt( wxCommandEvent& event );
void CreateDrillFile( wxCommandEvent& event );
void Plot( wxCommandEvent& event ) override;
void OnQuit( wxCommandEvent& event ) override;
void OnClose( wxCloseEvent& event ) override;
void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
void OnRightClick( wxMouseEvent& event ) override;
void OnPopUpLayers( wxCommandEvent& event ) override;
void SetPlotFormat( wxCommandEvent& event ) override;
void OnChangeDXFPlotMode( wxCommandEvent& event ) override;
void OnSetScaleOpt( wxCommandEvent& event ) override;
void CreateDrillFile( wxCommandEvent& event ) override;
// orther functions
void init_Dialog(); // main initialization
void applyPlotSettings();
PlotFormat getPlotFormat();
+20 -8
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 17 2015)
// C++ code generated with wxFormBuilder (version Jul 2 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -47,7 +47,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bSizer29 = new wxBoxSizer( wxHORIZONTAL );
m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_outputDirectoryName->SetMaxLength( 0 );
m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the board file location.") );
bSizer29->Add( m_outputDirectoryName, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
@@ -171,7 +170,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bSizer14->Add( m_textDefaultPenSize, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_linesWidth = new wxTextCtrl( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_linesWidth->SetMaxLength( 0 );
m_linesWidth->SetToolTip( _("Line width for, e.g., sheet references.") );
bSizer14->Add( m_linesWidth, 0, wxBOTTOM|wxEXPAND|wxLEFT, 5 );
@@ -266,7 +264,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bSizer20->Add( m_textPenSize, 0, wxRIGHT|wxLEFT, 5 );
m_HPGLPenSizeOpt = new wxTextCtrl( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_HPGLPenSizeOpt->SetMaxLength( 0 );
bSizer20->Add( m_HPGLPenSizeOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
@@ -280,7 +277,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bSizer21->Add( m_textPenOvr, 0, wxRIGHT|wxLEFT, 5 );
m_HPGLPenOverlayOpt = new wxTextCtrl( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_HPGLPenOverlayOpt->SetMaxLength( 0 );
m_HPGLPenOverlayOpt->SetToolTip( _("Set plot overlay for filling") );
bSizer21->Add( m_HPGLPenOverlayOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
@@ -307,7 +303,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bSizer18->Add( m_staticText7, 0, wxRIGHT|wxLEFT, 5 );
m_fineAdjustXscaleOpt = new wxTextCtrl( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_fineAdjustXscaleOpt->SetMaxLength( 0 );
m_fineAdjustXscaleOpt->SetToolTip( _("Set global X scale adjust for exact scale postscript output.") );
bSizer18->Add( m_fineAdjustXscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
@@ -323,7 +318,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bSizer19->Add( m_staticText8, 0, wxRIGHT|wxLEFT, 5 );
m_fineAdjustYscaleOpt = new wxTextCtrl( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_fineAdjustYscaleOpt->SetMaxLength( 0 );
m_fineAdjustYscaleOpt->SetToolTip( _("Set global Y scale adjust for exact scale postscript output.") );
bSizer19->Add( m_fineAdjustYscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
@@ -339,7 +333,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bSizer191->Add( m_textPSFineAdjustWidth, 0, wxRIGHT|wxLEFT, 5 );
m_PSFineAdjustWidthOpt = new wxTextCtrl( m_PSOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_PSFineAdjustWidthOpt->SetMaxLength( 0 );
m_PSFineAdjustWidthOpt->SetToolTip( _("Set global width correction for exact width postscript output.\nThese width correction is intended to compensate tracks width and also pads and vias size errors.\nThe reasonable width correction value must be in a range of [-(MinTrackWidth-1), +(MinClearanceValue-1)] in decimils.") );
bSizer191->Add( m_PSFineAdjustWidthOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
@@ -356,6 +349,23 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
m_PlotOptionsSizer->Add( m_PSOptionsSizer, 0, wxALL|wxEXPAND, 3 );
m_SizerDXF_options = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("DXF options") ), wxVERTICAL );
m_DXF_plotModeOpt = new wxCheckBox( m_SizerDXF_options->GetStaticBox(), wxID_ANY, _("Plot all layers in outline (polygon) mode"), wxDefaultPosition, wxDefaultSize, 0 );
m_DXF_plotModeOpt->SetValue(true);
m_DXF_plotModeOpt->SetToolTip( _("DXF only:\nCheck to plot all layers in polygon mode.\nUncheck to plot in sketch mode layers that don't support polygons (*.SilkS, *_User, Edge.Cuts, Margin, *.CrtYd, *.Fab)\nand plot in polygon mode other layers (*.Cu, *.Adhes, *.Paste, *.Mask)") );
m_SizerDXF_options->Add( m_DXF_plotModeOpt, 0, wxALL, 2 );
m_DXF_plotTextStrokeFontOpt = new wxCheckBox( m_SizerDXF_options->GetStaticBox(), wxID_ANY, _("Use Pcbnew font to plot texts"), wxDefaultPosition, wxDefaultSize, 0 );
m_DXF_plotTextStrokeFontOpt->SetValue(true);
m_DXF_plotTextStrokeFontOpt->SetToolTip( _("Check to use Pcbnew stroke font\nUncheck to plot oneline ASCII texts as editable text (using DXF font)") );
m_SizerDXF_options->Add( m_DXF_plotTextStrokeFontOpt, 0, wxALL, 2 );
m_PlotOptionsSizer->Add( m_SizerDXF_options, 0, wxEXPAND, 5 );
bmiddleSizer->Add( m_PlotOptionsSizer, 0, 0, 5 );
@@ -426,6 +436,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
m_layerCheckListBox->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::OnRightClick ), NULL, this );
m_scaleOpt->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this );
m_DXF_plotModeOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnChangeDXFPlotMode ), NULL, this );
m_plotButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
m_buttonDrill->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this );
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );
@@ -446,6 +457,7 @@ DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE()
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
m_layerCheckListBox->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::OnRightClick ), NULL, this );
m_scaleOpt->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this );
m_DXF_plotModeOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnChangeDXFPlotMode ), NULL, this );
m_plotButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
m_buttonDrill->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this );
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );
+201 -4
View File
@@ -44,7 +44,7 @@
<property name="minimum_size">-1,-1</property>
<property name="name">DIALOG_PLOT_BASE</property>
<property name="pos"></property>
<property name="size">566,711</property>
<property name="size">733,809</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Plot</property>
@@ -106,7 +106,7 @@
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property>
<property name="name">bSizerPlotFmt</property>
<property name="orient">wxVERTICAL</property>
@@ -589,6 +589,7 @@
<property name="minimum_size"></property>
<property name="name">m_LayersSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="parent">1</property>
<property name="permission">protected</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0">
@@ -701,6 +702,7 @@
<property name="minimum_size"></property>
<property name="name">sbOptionsSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
@@ -2315,6 +2317,7 @@
<property name="minimum_size"></property>
<property name="name">sbSizerSoldMaskLayerOpt</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0">
@@ -2679,6 +2682,7 @@
<property name="minimum_size"></property>
<property name="name">m_GerberOptionsSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="parent">1</property>
<property name="permission">protected</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0">
@@ -3058,6 +3062,7 @@
<property name="minimum_size"></property>
<property name="name">m_HPGLOptionsSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">protected</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0">
@@ -3453,6 +3458,7 @@
<property name="minimum_size"></property>
<property name="name">m_PSOptionsSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">protected</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0">
@@ -4111,11 +4117,202 @@
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">DXF options</property>
<property name="minimum_size"></property>
<property name="name">m_SizerDXF_options</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">protected</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0">
<property name="border">2</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">1</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Plot all layers in outline (polygon) mode</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_DXF_plotModeOpt</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">DXF only:&#x0A;Check to plot all layers in polygon mode.&#x0A;Uncheck to plot in sketch mode layers that don&apos;t support polygons (*.SilkS, *_User, Edge.Cuts, Margin, *.CrtYd, *.Fab)&#x0A;and plot in polygon mode other layers (*.Cu, *.Adhes, *.Paste, *.Mask)</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox">OnChangeDXFPlotMode</event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">2</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">1</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Use Pcbnew font to plot texts</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_DXF_plotTextStrokeFontOpt</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Check to use Pcbnew stroke font&#x0A;Uncheck to plot oneline ASCII texts as editable text (using DXF font)</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
@@ -4206,7 +4403,7 @@
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
+6 -2
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 17 2015)
// C++ code generated with wxFormBuilder (version Jul 2 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -108,6 +108,9 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
wxStaticText* m_textPSFineAdjustWidth;
wxTextCtrl* m_PSFineAdjustWidthOpt;
wxCheckBox* m_forcePSA4OutputOpt;
wxStaticBoxSizer* m_SizerDXF_options;
wxCheckBox* m_DXF_plotModeOpt;
wxCheckBox* m_DXF_plotTextStrokeFontOpt;
WX_HTML_REPORT_PANEL* m_messagesPanel;
wxButton* m_plotButton;
wxButton* m_buttonDrill;
@@ -121,6 +124,7 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
virtual void SetPlotFormat( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSetScaleOpt( wxCommandEvent& event ) { event.Skip(); }
virtual void OnChangeDXFPlotMode( wxCommandEvent& event ) { event.Skip(); }
virtual void Plot( wxCommandEvent& event ) { event.Skip(); }
virtual void CreateDrillFile( wxCommandEvent& event ) { event.Skip(); }
virtual void OnQuit( wxCommandEvent& event ) { event.Skip(); }
@@ -129,7 +133,7 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
public:
DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 566,711 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 733,809 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PLOT_BASE();
void DIALOG_PLOT_BASEOnContextMenu( wxMouseEvent &event )
+2 -2
View File
@@ -1385,8 +1385,8 @@ bool PCB_EDIT_FRAME::ExportVRML_File( const wxString& aFullFileName, double aMMt
export_vrml_module( model3d, pcb, module, output_file, wrml_3D_models_scaling_factor,
aExport3DFiles, aUseRelativePaths, a3D_Subdir );
// write out the board and all layers
write_layers( model3d, output_file, pcb );
// write out the board and all layers
write_layers( model3d, output_file, pcb );
// Close the outer 'transform' node
output_file << "]\n}\n";
+6 -34
View File
@@ -22,44 +22,21 @@
# Download avhttp and install the headers, not actually compiled
#################################################
include( download_avhttp )
if( MINGW AND NOT OPENSSL_ROOT_DIR )
# download, compile and install to scratch dir a recent OPENSSL library and headers
include( download_openssl )
else()
find_package( OpenSSL REQUIRED )
#message( STATUS "OPENSSL_FOUND:${OPENSSL_FOUND} OPENSSL_LIBRARIES:${OPENSSL_LIBRARIES}" )
# FindOpenSSL.cmake does not set this var into cache, so is not globally visible,
# do it here incase some other link image needs these libraries
set( OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES}" CACHE FILEPATH "OpenSSL link libraries" )
set( OPENSSL_INCLUDE_DIR "${OPENSSL_INCLUDE_DIR}" CACHE FILEPATH "OpenSSL include dir" )
endif()
# These are additions to any inherited from pcbnew dir:
include_directories( . ${OPENSSL_INCLUDE_DIR} ${AVHTTP_INCLUDE_DIR} )
include_directories( . )
# Tell AVHTTP we have SSL.
add_definitions( -DAVHTTP_ENABLE_OPENSSL )
# tone down the compiler warnings for avhttp header library:
set( CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wno-sign-compare -Wno-reorder -Wno-unused-variable -Wno-unused-function -Wno-strict-aliasing" )
include_directories( ${CURL_INCLUDE_DIRS} )
set( GITHUB_PLUGIN_SRCS
github_plugin.cpp github_getliblist.cpp html_link_parser.cpp
github_plugin.cpp
github_getliblist.cpp
html_link_parser.cpp
)
add_library( github_plugin STATIC ${GITHUB_PLUGIN_SRCS} )
# No, you don't get github without boost and openssl. Boost_LIBRARIES now moved up
# into CMakeLists.txt for pcbnew and cvpcb:
target_link_libraries( github_plugin
${OPENSSL_LIBRARIES}
common
)
if( MINGW )
@@ -70,9 +47,4 @@ if( MINGW )
endif()
add_dependencies( github_plugin boost )
add_dependencies( github_plugin avhttp )
if( MINGW AND NOT OPENSSL_ROOT_DIR )
add_dependencies( github_plugin openssl )
endif()
+39 -34
View File
@@ -35,41 +35,10 @@
*
* This gets just information on the repo in JSON format.
*
* I used avhttp, already used in the pcbnew Github plugin to download
* the json file.
*
* JP Charras.
*/
#if 0
/*
* FIX ME
* I do not include avhttp.hpp here, because it is already included in
* github_plugin.cpp
* and if it is also included in this file, the link fails (double definiton of modules)
* therefore, the GITHUB_GETLIBLIST method which uses avhttp to download dats from gitub
* is in github_plugin.cpp
*/
#ifndef WIN32_LEAN_AND_MEAN
// when WIN32_LEAN_AND_MEAN is defined, some useless includes in <window.h>
// are skipped, and this avoid some compil issues
#define WIN32_LEAN_AND_MEAN
#endif
#ifdef WIN32
// defines needed by avhttp
// Minimal Windows version is XP: Google for _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#define WINVER 0x0501
#endif
#include <wx/wx.h>
#include <avhttp.hpp>
#endif
#include <kicad_curl/kicad_curl_easy.h> // Include before any wx file
#include <wx/uri.h>
#include <github_getliblist.h>
@@ -90,6 +59,7 @@ bool GITHUB_GETLIBLIST::Get3DshapesLibsList( wxArrayString* aList,
bool (*aFilter)( const wxString& aData ) )
{
std::string fullURLCommand;
strcpy( m_option_string, "text/html" );
wxString repoURL = m_repoURL;
@@ -97,7 +67,7 @@ bool GITHUB_GETLIBLIST::Get3DshapesLibsList( wxArrayString* aList,
wxString errorMsg;
fullURLCommand = repoURL.utf8_str();
bool success = remote_get_json( &fullURLCommand, &errorMsg );
bool success = remoteGetJSON( fullURLCommand, &errorMsg );
if( !success )
{
@@ -123,6 +93,7 @@ bool GITHUB_GETLIBLIST::GetFootprintLibraryList( wxArrayString& aList )
std::string fullURLCommand;
int page = 1;
int itemCountMax = 99; // Do not use a valu > 100, it does not work
strcpy( m_option_string, "application/json" );
// Github max items returned is 100 per page
@@ -147,7 +118,7 @@ bool GITHUB_GETLIBLIST::GetFootprintLibraryList( wxArrayString& aList )
while( 1 )
{
bool success = remote_get_json( &fullURLCommand, &errorMsg );
bool success = remoteGetJSON( fullURLCommand, &errorMsg );
if( !success )
{
@@ -235,3 +206,37 @@ bool GITHUB_GETLIBLIST::repoURL2listURL( const wxString& aRepoURL,
return false;
}
bool GITHUB_GETLIBLIST::remoteGetJSON( const std::string& aFullURLCommand, wxString* aMsgError )
{
KICAD_CURL_EASY kcurl;
wxLogDebug( wxT( "Attempting to download: " ) + aFullURLCommand );
kcurl.SetURL( aFullURLCommand );
kcurl.SetUserAgent( "http://kicad-pcb.org" );
kcurl.SetHeader( "Accept", m_option_string );
kcurl.SetFollowRedirects( true );
try
{
kcurl.Perform();
m_image = kcurl.GetBuffer();
return true;
}
catch( const IO_ERROR& ioe )
{
if( aMsgError )
{
UTF8 fmt( _( "Error fetching JSON data from URL '%s'.\nReason: '%s'" ) );
std::string msg = StrPrintf( fmt.c_str(),
aFullURLCommand.c_str(),
TO_UTF8( ioe.errorText ) );
*aMsgError = FROM_UTF8( msg.c_str() );
}
return false;
}
}
+2 -2
View File
@@ -103,7 +103,7 @@ protected:
int aItemCountMax, int aPage = 1 );
/**
* Function remote_get_json
* Function remoteGetJSON
* Download a json text from a github repo. The text image
* is received into the m_input_stream.
* @param aFullURLCommand the full command, i.e. the url with options like
@@ -111,7 +111,7 @@ protected:
* @param aMsgError a pointer to a wxString which can store an error message
* @return true if OK, false if error (which an error message in *aMsgError
*/
bool remote_get_json( std::string* aFullURLCommand, wxString* aMsgError );
bool remoteGetJSON( const std::string& aFullURLCommand, wxString* aMsgError );
wxString m_github_path; ///< Something like https://api.github.com/orgs/KiCad
std::string m_image; ///< image of the downloaded data in its entirety.
+53 -133
View File
@@ -38,8 +38,7 @@ I have lost my enthusiasm for local caching until a faster time stamp retrieval
mechanism can be found, or github gets more servers. But note that the occasionally
slow response is the exception rather than the norm. Normally the response is
down around a 1/3 of a second. The information we would use is in the header
named "Last-Modified" as seen below. This would need parsing, but avhttp may
offer some help there, if not, then boost async probably does.
named "Last-Modified" as seen below.
HTTP/1.1 200 OK
@@ -62,23 +61,9 @@ Access-Control-Expose-Headers: ETag, Link, X-RateLimit-Limit, X-RateLimit-Remain
Access-Control-Allow-Origin: *
X-GitHub-Request-Id: 411087C2:659E:50FD6E6:52E67F66
Vary: Accept-Encoding
*/
#ifndef WIN32_LEAN_AND_MEAN
// when WIN32_LEAN_AND_MEAN is defined, some useless includes in <window.h>
// are skipped, and this avoid some compil issues
#define WIN32_LEAN_AND_MEAN
#endif
#ifdef WIN32
// defines needed by avhttp
// Minimal Windows version is XP: Google for _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#define WINVER 0x0501
#endif
#include <kicad_curl/kicad_curl_easy.h> // Include before any wx file
#include <sstream>
#include <boost/ptr_container/ptr_map.hpp>
#include <set>
@@ -88,10 +73,6 @@ Vary: Accept-Encoding
#include <wx/uri.h>
#include <fctsys.h>
// Under Windows Mingw/msys, avhttp.hpp should be included after fctsys.h
// in fact after wx/wx.h, included by fctsys.h,
// to avoid issues (perhaps due to incompatible defines)
#include <avhttp.hpp> // chinese SSL magic
#include <io_mgr.h>
#include <richio.h>
@@ -103,6 +84,7 @@ Vary: Accept-Encoding
#include <fp_lib_table.h> // ExpandSubstitutions()
#include <github_getliblist.h>
using namespace std;
@@ -139,7 +121,7 @@ GITHUB_PLUGIN::~GITHUB_PLUGIN()
const wxString GITHUB_PLUGIN::PluginName() const
{
return wxT( "Github" );
return "Github";
}
@@ -212,7 +194,8 @@ MODULE* GITHUB_PLUGIN::FootprintLoad( const wxString& aLibraryPath,
if( it != m_gh_cache->end() ) // fp_name is present
{
wxMemoryInputStream mis( &m_zip_image[0], m_zip_image.size() );
//std::string::data() ensures that the referenced data block is contiguous.
wxMemoryInputStream mis( m_zip_image.data(), m_zip_image.size() );
// This decoder should always be UTF8, since it was saved that way by git.
// That is, since pretty footprints are UTF8, and they were pushed to the
@@ -223,21 +206,17 @@ MODULE* GITHUB_PLUGIN::FootprintLoad( const wxString& aLibraryPath,
if( zis.OpenEntry( *entry ) )
{
INPUTSTREAM_LINE_READER reader( &zis, aLibraryPath );
#if 1
// I am a PCB_IO derivative with my own PCB_PARSER
m_parser->SetLineReader( &reader ); // ownership not passed
MODULE* ret = (MODULE*) m_parser->Parse();
#else
PCB_PARSER parser( &reader );
MODULE* ret = (MODULE*) parser.Parse();
#endif
// Dude, the footprint name comes from the file name in
// a github library. Zero out the library name, we don't know it here.
// Some caller may set the library nickname, one such instance is
// FP_LIB_TABLE::FootprintLoad().
// In a github library, (as well as in a "KiCad" library) the name of
// the pretty file defines the footprint name. That filename trumps
// any name found in the pretty file; any name in the pretty file
// must be ignored here. Also, the library nickname is unknown in
// this context so clear it just in case.
ret->SetFPID( fp_name );
return ret;
@@ -408,7 +387,7 @@ void GITHUB_PLUGIN::cacheLib( const wxString& aLibraryPath, const PROPERTIES* aP
if( !wx_pretty_fn.IsOk() ||
!wx_pretty_fn.IsDirWritable() ||
wx_pretty_fn.GetExt() != wxT( "pretty" )
wx_pretty_fn.GetExt() != "pretty"
)
{
wxString msg = wxString::Format(
@@ -425,13 +404,13 @@ void GITHUB_PLUGIN::cacheLib( const wxString& aLibraryPath, const PROPERTIES* aP
}
// operator==( wxString, wxChar* ) does not exist, construct wxString once here.
const wxString kicad_mod( wxT( "kicad_mod" ) );
const wxString kicad_mod( "kicad_mod" );
//D(printf("%s: this:%p m_lib_path:'%s' aLibraryPath:'%s'\n", __func__, this, TO_UTF8( m_lib_path), TO_UTF8(aLibraryPath) );)
m_gh_cache = new GH_CACHE();
// INIT_LOGGER( "/tmp", "test.log" );
remote_get_zip( aLibraryPath );
remoteGetZip( aLibraryPath );
// UNINIT_LOGGER();
m_lib_path = aLibraryPath;
@@ -460,7 +439,7 @@ void GITHUB_PLUGIN::cacheLib( const wxString& aLibraryPath, const PROPERTIES* aP
}
bool GITHUB_PLUGIN::repoURL_zipURL( const wxString& aRepoURL, string* aZipURL )
bool GITHUB_PLUGIN::repoURL_zipURL( const wxString& aRepoURL, std::string* aZipURL )
{
// e.g. "https://github.com/liftoff-sr/pretty_footprints"
//D(printf("aRepoURL:%s\n", TO_UTF8( aRepoURL ) );)
@@ -470,12 +449,12 @@ bool GITHUB_PLUGIN::repoURL_zipURL( const wxString& aRepoURL, string* aZipURL )
if( repo.HasServer() && repo.HasPath() )
{
// scheme might be "http" or if truly github.com then "https".
wxString zip_url = repo.GetScheme();
zip_url += "://";
wxString zip_url;
if( repo.GetServer() == "github.com" )
{
//codeload.github.com only supports https
zip_url = "https://";
#if 0 // A proper code path would be this one, but it is not the fastest.
zip_url += repo.GetServer();
zip_url += repo.GetPath(); // path comes with a leading '/'
@@ -488,8 +467,6 @@ bool GITHUB_PLUGIN::repoURL_zipURL( const wxString& aRepoURL, string* aZipURL )
// In order to bypass this redirect, saving time, we use the
// redirected URL on first attempt to save one HTTP GET hit.
// avhttp would do the redirect behind the scenes normally, but that would
// be slower than doing this bypass.
zip_url += "codeload.github.com";
zip_url += repo.GetPath(); // path comes with a leading '/'
zip_url += "/zip/master";
@@ -498,9 +475,11 @@ bool GITHUB_PLUGIN::repoURL_zipURL( const wxString& aRepoURL, string* aZipURL )
else
{
zip_url = repo.GetScheme();
zip_url += "://";
// This is the generic code path for any server which can serve
// up zip files. The schemes tested include: http and https.
// (I don't know what the avhttp library supports beyond that.)
// zip_url goal: "<scheme>://<server>[:<port>]/<path>"
@@ -533,9 +512,9 @@ bool GITHUB_PLUGIN::repoURL_zipURL( const wxString& aRepoURL, string* aZipURL )
}
void GITHUB_PLUGIN::remote_get_zip( const wxString& aRepoURL ) throw( IO_ERROR )
void GITHUB_PLUGIN::remoteGetZip( const wxString& aRepoURL ) throw( IO_ERROR )
{
string zip_url;
std::string zip_url;
if( !repoURL_zipURL( aRepoURL, &zip_url ) )
{
@@ -543,107 +522,48 @@ void GITHUB_PLUGIN::remote_get_zip( const wxString& aRepoURL ) throw( IO_ERROR )
THROW_IO_ERROR( msg );
}
boost::asio::io_service io;
avhttp::http_stream h( io );
avhttp::request_opts options;
wxLogDebug( wxT( "Attempting to download: " ) + zip_url );
options.insert( "Accept", "application/zip" );
options.insert( "User-Agent", "http://kicad-pcb.org" ); // THAT WOULD BE ME.
h.request_options( options );
KICAD_CURL_EASY kcurl; // this can THROW_IO_ERROR
kcurl.SetURL( zip_url.c_str() );
kcurl.SetUserAgent( "http://kicad-pcb.org" );
kcurl.SetHeader( "Accept", "application/zip" );
kcurl.SetFollowRedirects( true );
try
{
ostringstream os;
h.open( zip_url ); // only one file, therefore do it synchronously.
os << &h;
// Keep zip file byte image in RAM. That plus the MODULE_MAP will constitute
// the cache. We don't cache the MODULEs per se, we parse those as needed from
// this zip file image.
m_zip_image = os.str();
// 4 lines, using SSL, top that.
kcurl.Perform();
m_zip_image = kcurl.GetBuffer();
}
catch( const boost::system::system_error& e )
catch( const IO_ERROR& ioe )
{
// https "GET" has faild, report this to API caller.
// https "GET" has failed, report this to API caller.
// Note: kcurl.Perform() does not return an error if the file to download is not found
static const char errorcmd[] = "http GET command failed"; // Do not translate this message
UTF8 fmt( _( "%s\nCannot get/download Zip archive: '%s'\nfor library path: '%s'.\nReason: '%s'" ) );
string msg = StrPrintf( fmt.c_str(),
errorcmd,
// Report both secret zip_url and Lib Path, to user. The secret
// zip_url may go bad at some point in future if github changes
// their server architecture. Then fix repoURL_zipURL() to reflect
// new architecture.
zip_url.c_str(), TO_UTF8( aRepoURL ),
e.what() );
THROW_IO_ERROR( msg );
}
catch( const exception& exc )
{
UTF8 error( _( "Exception '%s' in avhttp while open()-ing URI:'%s'" ) );
string msg = StrPrintf( error.c_str(), exc.what(), zip_url.c_str() );
THROW_IO_ERROR( msg );
}
}
// This GITHUB_GETLIBLIST method should not be here, but in github_getliblist.cpp !
// However it is here just because we need to include <avhttp.hpp> to compile it.
// and when we include avhttp in two .cpp files, the link fails because it detects duplicate
// avhttp functions.
// So until it is fixed, this code is here.
bool GITHUB_GETLIBLIST::remote_get_json( std::string* aFullURLCommand, wxString* aMsgError )
{
boost::asio::io_service io;
avhttp::http_stream h( io );
avhttp::request_opts options;
options.insert( "Accept", m_option_string );
options.insert( "User-Agent", "http://kicad-pcb.org" ); // THAT WOULD BE ME.
h.request_options( options );
try
{
std::ostringstream os;
h.open( *aFullURLCommand ); // only one file, therefore do it synchronously.
os << &h;
// Keep downloaded text file image in RAM.
m_image = os.str();
// 4 lines, using SSL, top that.
}
catch( boost::system::system_error& e )
{
// https "GET" has faild, report this to API caller.
static const char errorcmd[] = "https GET command failed"; // Do not translate this message
UTF8 fmt( _( "%s\nCannot get/download data from: '%s'\nReason: '%s'" ) );
std::string msg = StrPrintf( fmt.c_str(),
errorcmd,
// Report secret list_url to user. The secret
// list_url may go bad at some point in future if github changes
// their server architecture. Then fix repoURL_zipURL() to reflect
// new architecture.
aFullURLCommand->c_str(), e.what() );
errorcmd,
zip_url.c_str(),
TO_UTF8( aRepoURL ),
TO_UTF8( ioe.errorText )
);
if( aMsgError )
{
*aMsgError = FROM_UTF8( msg.c_str() );
return false;
}
THROW_IO_ERROR( msg );
}
return true;
// If the zip archive is not existing, the received data is "Not Found" or "404: Not Found",
// and no error is returned by kcurl.Perform().
if( ( m_zip_image.compare( 0, 9, "Not Found", 9 ) == 0 ) ||
( m_zip_image.compare( 0, 14, "404: Not Found", 14 ) == 0 ) )
{
UTF8 fmt( _( "Cannot download library '%s'.\nThe library does not exist on the server" ) );
std::string msg = StrPrintf( fmt.c_str(), TO_UTF8( aRepoURL ) );
THROW_IO_ERROR( msg );
}
}
#if 0 && defined(STANDALONE)
@@ -657,7 +577,7 @@ int main( int argc, char** argv )
try
{
wxArrayString fps = gh.FootprintEnumerate(
wxT( "https://github.com/liftoff-sr/pretty_footprints" ),
"https://github.com/liftoff-sr/pretty_footprints",
NULL
);
+2 -2
View File
@@ -213,11 +213,11 @@ protected:
static bool repoURL_zipURL( const wxString& aRepoURL, std::string* aZipURL );
/**
* Function remote_get_zip
* Function remoteGetZip
* fetches a zip file image from a github repo synchronously. The byte image
* is received into the m_input_stream.
*/
void remote_get_zip( const wxString& aRepoURL ) throw( IO_ERROR );
void remoteGetZip( const wxString& aRepoURL ) throw( IO_ERROR );
wxString m_lib_path; ///< from aLibraryPath, something like https://github.com/liftoff-sr/pretty_footprints
std::string m_zip_image; ///< byte image of the zip file in its entirety.
+13 -8
View File
@@ -120,7 +120,8 @@ void DXF2BRD_CONVERTER::addLine( const DRW_Line& aData )
segm->SetStart( start );
wxPoint end( mapX( aData.secPoint.x ), mapY( aData.secPoint.y ) );
segm->SetEnd( end );
segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness : aData.thickness ) );
segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness / m_DXF2mm
: aData.thickness ) );
m_newItemsList.push_back( segm );
}
@@ -153,7 +154,7 @@ void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& aData )
segm->SetStart( segment_startpoint );
wxPoint segment_endpoint( mapX( vertex->basePoint.x ), mapY( vertex->basePoint.y ) );
segm->SetEnd( segment_endpoint );
segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness
segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness / m_DXF2mm
: aData.thickness ) );
m_newItemsList.push_back( segm );
segment_startpoint = segment_endpoint;
@@ -169,7 +170,7 @@ void DXF2BRD_CONVERTER::addPolyline(const DRW_Polyline& aData )
closing_segm->SetLayer( ToLAYER_ID( m_brdLayer ) );
closing_segm->SetStart( segment_startpoint );
closing_segm->SetEnd( polyline_startpoint );
closing_segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness
closing_segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness / m_DXF2mm
: aData.thickness ) );
m_newItemsList.push_back( closing_segm );
}
@@ -186,7 +187,7 @@ void DXF2BRD_CONVERTER::addLWPolyline(const DRW_LWPolyline& aData )
wxRealPoint seg_start;
wxRealPoint poly_start;
double bulge = 0.0;
int lineWidth = mapDim( aData.thickness == 0 ? m_defaultThickness
int lineWidth = mapDim( aData.thickness == 0 ? m_defaultThickness / m_DXF2mm
: aData.thickness );
for( unsigned ii = 0; ii < aData.vertlist.size(); ii++ )
@@ -235,7 +236,8 @@ void DXF2BRD_CONVERTER::addCircle( const DRW_Circle& aData )
segm->SetCenter( center );
wxPoint circle_start( mapX( aData.basePoint.x + aData.radious ), mapY( aData.basePoint.y ) );
segm->SetArcStart( circle_start );
segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness : aData.thickness ) );
segm->SetWidth( mapDim( aData.thickness == 0 ? m_defaultThickness / m_DXF2mm
: aData.thickness ) );
m_newItemsList.push_back( segm );
}
@@ -274,7 +276,8 @@ void DXF2BRD_CONVERTER::addArc( const DRW_Arc& data )
segm->SetAngle( angle );
segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness : data.thickness ) );
segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness / m_DXF2mm
: data.thickness ) );
m_newItemsList.push_back( segm );
}
@@ -384,7 +387,8 @@ void DXF2BRD_CONVERTER::addText( const DRW_Text& aData )
// The 0.8 factor gives a better height/width ratio with our font
textItem->SetWidth( mapDim( aData.height * 0.8 ) );
textItem->SetHeight( mapDim( aData.height ) );
textItem->SetThickness( mapDim( aData.thickness == 0 ? m_defaultThickness : aData.thickness ) );
textItem->SetThickness( mapDim( aData.thickness == 0 ? m_defaultThickness / m_DXF2mm
: aData.thickness ) );
textItem->SetText( text );
m_newItemsList.push_back( static_cast< BOARD_ITEM* >( brdItem ) );
@@ -446,7 +450,8 @@ void DXF2BRD_CONVERTER::addMText( const DRW_MText& aData )
// The 0.8 factor gives a better height/width ratio with our font
textItem->SetWidth( mapDim( aData.height * 0.8 ) );
textItem->SetHeight( mapDim( aData.height ) );
textItem->SetThickness( mapDim( aData.thickness == 0 ? m_defaultThickness : aData.thickness ) );
textItem->SetThickness( mapDim( aData.thickness == 0 ? m_defaultThickness / m_DXF2mm
: aData.thickness ) );
textItem->SetText( text );
// Initialize text justifications:
+23 -8
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 CERN
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2017 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
@@ -288,28 +288,43 @@ void FP_CACHE::Load()
if( dir.GetFirst( &fpFileName, wildcard, wxDIR_FILES ) )
{
wxString cacheError;
do
{
// prepend the libpath into fullPath
wxFileName fullPath( m_lib_path.GetPath(), fpFileName );
FILE_LINE_READER reader( fullPath.GetFullPath() );
// Queue I/O errors so only files that fail to parse don't get loaded.
try
{
FILE_LINE_READER reader( fullPath.GetFullPath() );
m_owner->m_parser->SetLineReader( &reader );
m_owner->m_parser->SetLineReader( &reader );
std::string name = TO_UTF8( fullPath.GetName() );
MODULE* footprint = (MODULE*) m_owner->m_parser->Parse();
std::string name = TO_UTF8( fullPath.GetName() );
MODULE* footprint = (MODULE*) m_owner->m_parser->Parse();
// The footprint name is the file name without the extension.
footprint->SetFPID( FPID( fullPath.GetName() ) );
m_modules.insert( name, new FP_CACHE_ITEM( footprint, fullPath ) );
// The footprint name is the file name without the extension.
footprint->SetFPID( FPID( fullPath.GetName() ) );
m_modules.insert( name, new FP_CACHE_ITEM( footprint, fullPath ) );
}
catch( const IO_ERROR& ioe )
{
if( !cacheError.IsEmpty() )
cacheError += "\n\n";
cacheError += ioe.errorText;
}
} while( dir.GetNext( &fpFileName ) );
// Remember the file modification time of library file when the
// cache snapshot was made, so that in a networked environment we will
// reload the cache as needed.
m_mod_time = GetLibModificationTime();
if( !cacheError.IsEmpty() )
THROW_IO_ERROR( cacheError );
}
}
+3 -2
View File
@@ -993,12 +993,13 @@ void FOOTPRINT_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer )
{
PCB_BASE_FRAME::SetActiveLayer( aLayer );
GetGalCanvas()->SetHighContrastLayer( aLayer );
m_Layers->SelectLayer( GetActiveLayer() );
m_Layers->OnLayerSelected();
if( IsGalCanvasActive() )
{
GetGalCanvas()->SetHighContrastLayer( aLayer );
GetGalCanvas()->Refresh();
}
}
+6 -1
View File
@@ -233,7 +233,11 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
// (it depends on the actual board)
// So we do not show the default clearance, by setting it to 0
// The footprint or pad specific clearance will be shown
GetBoard()->GetDesignSettings().GetDefault()->SetClearance(0);
GetBoard()->GetDesignSettings().GetDefault()->SetClearance( 0 );
// Don't show the default board solder mask clearance in the footprint editor. Only the
// footprint or pad clearance setting should be shown if it is not 0.
GetBoard()->GetDesignSettings().m_SolderMaskMargin = 0;
// restore the last footprint from the project, if any
restoreLastFootprint();
@@ -551,6 +555,7 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent )
aEvent.Check( GetToolId() == aEvent.GetId() );
}
void FOOTPRINT_EDIT_FRAME::OnUpdateOptionsToolbar( wxUpdateUIEvent& aEvent )
{
int id = aEvent.GetId();
+6 -3
View File
@@ -3,7 +3,7 @@
*
* Copyright (C) 2007, 2008 Lubo Racko <developer@lura.sk>
* Copyright (C) 2007, 2008, 2012-2013 Alexander Lunev <al.lunev@yahoo.com>
* Copyright (C) 2012 KiCad Developers, see CHANGELOG.TXT for contributors.
* Copyright (C) 2017 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
@@ -94,8 +94,11 @@ void PCB_POLYGON::SetOutline( VERTICES_ARRAY* aOutline )
for( i = 0; i < (int) aOutline->GetCount(); i++ )
m_outline.Add( new wxRealPoint( (*aOutline)[i]->x, (*aOutline)[i]->y ) );
m_positionX = m_outline[0]->x;
m_positionY = m_outline[0]->y;
if( m_outline.Count() > 0 )
{
m_positionX = m_outline[0]->x;
m_positionY = m_outline[0]->y;
}
}
void PCB_POLYGON::FormPolygon( XNODE* aNode, VERTICES_ARRAY* aPolygon,
+27 -12
View File
@@ -248,10 +248,8 @@ void PCB_PARSER::parseEDA_TEXT( EDA_TEXT* aText ) throw( PARSE_ERROR, IO_ERROR )
for( token = NextTok(); token != T_RIGHT; token = NextTok() )
{
if( token != T_LEFT )
Expecting( T_LEFT );
token = NextTok();
if( token == T_LEFT )
token = NextTok();
switch( token )
{
@@ -264,14 +262,14 @@ void PCB_PARSER::parseEDA_TEXT( EDA_TEXT* aText ) throw( PARSE_ERROR, IO_ERROR )
switch( token )
{
case T_size:
{
wxSize sz;
sz.SetHeight( parseBoardUnits( "text height" ) );
sz.SetWidth( parseBoardUnits( "text width" ) );
aText->SetSize( sz );
NeedRIGHT();
{
wxSize sz;
sz.SetHeight( parseBoardUnits( "text height" ) );
sz.SetWidth( parseBoardUnits( "text width" ) );
aText->SetSize( sz );
NeedRIGHT();
}
break;
}
case T_thickness:
aText->SetThickness( parseBoardUnits( "text thickness" ) );
@@ -792,7 +790,7 @@ void PCB_PARSER::parseLayer( LAYER* aLayer ) throw( IO_ERROR, PARSE_ERROR )
// this layer_num is not used, we DO depend on LAYER_T however.
LAYER_NUM layer_num = parseInt( "layer index" );
NeedSYMBOL();
NeedSYMBOLorNUMBER();
name = CurText();
NeedSYMBOL();
@@ -2058,6 +2056,23 @@ TEXTE_MODULE* PCB_PARSER::parseTEXTE_MODULE() throw( IO_ERROR, PARSE_ERROR )
case T_effects:
parseEDA_TEXT( (EDA_TEXT*) text.get() );
// Due to a double definition (a bug) of SetVisible (one in EDA_TEXT and
// one in TEXTE_MODULE), verify if the EDA_TEXT is set to invisible
// This allows compatibility with files which could be created
// by pcbnew version janv 25, 2017, which fix a old bug (this one)
// This compatibility is especially important for footprint files.
if( !text->EDA_TEXT::IsVisible() )
{
// Only if the EDA_TEXT visibility is false, set the
// TEXTE_MODULE visibility to false.
// in files created by 4.05 version and older, the EDA_TEXT
// visibility is always true (the default), due to this bug
text->SetVisible( false );
// If we want a full compatibiliy with previous stable version,
// this ugly workaround avoids writing "hide" token
// in "effects" section, when the file comes from some recent pcbnew version
text->EDA_TEXT::SetVisible( true );
}
break;
default:
+17 -16
View File
@@ -2,7 +2,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2015 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 1992-2017 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
@@ -90,6 +90,7 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() :
m_plotFrameRef = false;
m_plotViaOnMaskLayer = false;
m_plotMode = FILLED;
m_DXFplotPolygonMode = true;
m_useAuxOrigin = false;
m_HPGLPenNum = 1;
m_HPGLPenSpeed = 20; // this param is always in cm/s
@@ -113,8 +114,6 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() :
m_widthAdjust = 0.;
m_outputDirectory.clear();
m_color = BLACK;
m_referenceColor = BLACK;
m_valueColor = BLACK;
m_textMode = PLOTTEXTMODE_DEFAULT;
// This parameter controls if the NPTH pads will be plotted or not
@@ -219,7 +218,7 @@ void PCB_PLOT_PARAMS::Parse( PCB_PLOT_PARAMS_PARSER* aParser )
}
bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
bool PCB_PLOT_PARAMS::IsSameAs( const PCB_PLOT_PARAMS &aPcbPlotParams, bool aCompareOnlySavedPrms ) const
{
if( m_layerSelection != aPcbPlotParams.m_layerSelection )
return false;
@@ -239,6 +238,13 @@ bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
return false;
if( m_plotMode != aPcbPlotParams.m_plotMode )
return false;
if( !aCompareOnlySavedPrms )
{
if( m_DXFplotPolygonMode != aPcbPlotParams.m_DXFplotPolygonMode )
return false;
}
if( m_useAuxOrigin != aPcbPlotParams.m_useAuxOrigin )
return false;
if( m_HPGLPenNum != aPcbPlotParams.m_HPGLPenNum )
@@ -281,12 +287,13 @@ bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
return false;
if( m_widthAdjust != aPcbPlotParams.m_widthAdjust )
return false;
if( m_color != aPcbPlotParams.m_color )
return false;
if( m_referenceColor != aPcbPlotParams.m_referenceColor )
return false;
if( m_valueColor != aPcbPlotParams.m_valueColor )
return false;
if( !aCompareOnlySavedPrms )
{
if( m_color != aPcbPlotParams.m_color )
return false;
}
if( m_textMode != aPcbPlotParams.m_textMode )
return false;
if( !m_outputDirectory.IsSameAs( aPcbPlotParams.m_outputDirectory ) )
@@ -295,12 +302,6 @@ bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
}
bool PCB_PLOT_PARAMS::operator!=( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
{
return !( *this == aPcbPlotParams );
}
bool PCB_PLOT_PARAMS::SetHPGLPenDiameter( int aValue )
{
return setInt( &m_HPGLPenDiam, aValue, HPGL_PEN_DIAMETER_MIN, HPGL_PEN_DIAMETER_MAX );
+25 -16
View File
@@ -54,6 +54,12 @@ private:
*/
EDA_DRAW_MODE_T m_plotMode;
/** DXF format: Plot items in outline (polygon) mode
* In polygon mode, each item to plot is converted to a polygon, and all
* polygons are merged.
*/
bool m_DXFplotPolygonMode;
/// Plot format type (chooses the driver to be used)
PlotFormat m_format;
@@ -63,7 +69,7 @@ private:
/// Choose how represent text with PS, PDF and DXF drivers
PlotTextMode m_textMode;
/// The default line width (used for the frame and in LINE mode)
/// The default line width (used to draw items having no defined width)
int m_lineWidth;
/// When true set the scale to fit the board in the page
@@ -90,8 +96,10 @@ private:
/// Set of layers to plot
LSET m_layerSelection;
/** When plotting gerbers use a conventional set of Protel extensions
* instead of appending a suffix to the board name */
/** When plotting gerber files, use a conventional set of Protel extensions
* instead of .gbr, that is now the offical gerber file extension
* this is a deprecated feature
*/
bool m_useGerberProtelExtensions;
/// Include attributes from the Gerber X2 format (chapter 5 in revision J2)
@@ -103,7 +111,7 @@ private:
/// 5 is the minimal value for professional boards.
int m_gerberPrecision;
/// Plot gerbers using auxiliary (drill) origin instead of page coordinates
/// Plot gerbers using auxiliary (drill) origin instead of absolute coordinates
bool m_useAuxOrigin;
/// On gerbers 'scrape' away the solder mask from silkscreen (trim silks)
@@ -136,8 +144,8 @@ private:
* near 1.0; only X and Y dimensions are adjusted: circles are plotted as
* circles, even if X and Y fine scale differ; because of this it is mostly
* useful for printers: postscript plots would be best adjusted using
* the prologue (that would change the whole output matrix */
* the prologue (that would change the whole output matrix
*/
double m_fineScaleAdjustX; ///< fine scale adjust X axis
double m_fineScaleAdjustY; ///< fine scale adjust Y axis
@@ -151,8 +159,6 @@ private:
int m_HPGLPenDiam; ///< HPGL only: pen diameter in MILS, useful to fill areas
int m_HPGLPenOvr; ///< HPGL only: pen overlay in MILS, useful only to fill areas
EDA_COLOR_T m_color; ///< Color for plotting the current layer
EDA_COLOR_T m_referenceColor; ///< Color for plotting references
EDA_COLOR_T m_valueColor; ///< Color for plotting values
public:
PCB_PLOT_PARAMS();
@@ -164,24 +170,27 @@ public:
const throw( IO_ERROR );
void Parse( PCB_PLOT_PARAMS_PARSER* aParser ) throw( PARSE_ERROR, IO_ERROR );
bool operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const;
bool operator!=( const PCB_PLOT_PARAMS &aPcbPlotParams ) const;
/**
* Compare current settings to aPcbPlotParams, including not saved parameters in brd file
* @param aPcbPlotParams = the PCB_PLOT_PARAMS to compare
* @param aCompareOnlySavedPrms = true to compare only saved in file parameters,
* and false to compare the full set of parameters.
* @return true is parameters are same, false if one (or more) parameter does not match
*/
bool IsSameAs( const PCB_PLOT_PARAMS &aPcbPlotParams, bool aCompareOnlySavedPrms ) const;
void SetColor( EDA_COLOR_T aVal ) { m_color = aVal; }
EDA_COLOR_T GetColor() const { return m_color; }
void SetReferenceColor( EDA_COLOR_T aVal ) { m_referenceColor = aVal; }
EDA_COLOR_T GetReferenceColor() const { return m_referenceColor; }
void SetValueColor( EDA_COLOR_T aVal ) { m_valueColor = aVal; }
EDA_COLOR_T GetValueColor() const { return m_valueColor; }
void SetTextMode( PlotTextMode aVal ) { m_textMode = aVal; }
PlotTextMode GetTextMode() const { return m_textMode; }
void SetPlotMode( EDA_DRAW_MODE_T aPlotMode ) { m_plotMode = aPlotMode; }
EDA_DRAW_MODE_T GetPlotMode() const { return m_plotMode; }
void SetDXFPlotPolygonMode( bool aFlag ) { m_DXFplotPolygonMode = aFlag; }
bool GetDXFPlotPolygonMode() const { return m_DXFplotPolygonMode; }
void SetDrillMarksType( DrillMarksType aVal ) { m_drillMarks = aVal; }
DrillMarksType GetDrillMarksType() const { return m_drillMarks; }
+10 -7
View File
@@ -845,14 +845,13 @@ void PCB_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer )
{
PCB_BASE_FRAME::SetActiveLayer( aLayer );
GetGalCanvas()->SetHighContrastLayer( aLayer );
syncLayerWidgetLayer();
if( IsGalCanvasActive() )
{
m_toolManager->RunAction( COMMON_ACTIONS::layerChanged ); // notify other tools
GetGalCanvas()->SetFocus(); // otherwise hotkeys are stuck somewhere
GetGalCanvas()->SetHighContrastLayer( aLayer );
GetGalCanvas()->Refresh();
}
}
@@ -963,16 +962,20 @@ void PCB_EDIT_FRAME::OnModify( )
void PCB_EDIT_FRAME::SVG_Print( wxCommandEvent& event )
{
PCB_PLOT_PARAMS tmp = GetPlotSettings();
PCB_PLOT_PARAMS plot_prms = GetPlotSettings();
// we don't want dialogs knowing about complex wxFrame functions so
// pass everything the dialog needs without reference to *this frame's class.
if( InvokeSVGPrint( this, GetBoard(), &tmp ) )
if( InvokeSVGPrint( this, GetBoard(), &plot_prms ) )
{
if( tmp != GetPlotSettings() )
if( !plot_prms.IsSameAs( GetPlotSettings(), false ) )
{
SetPlotSettings( tmp );
OnModify();
// First, mark board as modified only for parameters saved in file
if( !plot_prms.IsSameAs( GetPlotSettings(), true ) )
OnModify();
// Now, save any change, for the session
SetPlotSettings( plot_prms );
}
}
}
+5 -2
View File
@@ -345,13 +345,16 @@ bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits )
}
catch( const IO_ERROR& ioe )
{
// if we are here, a incorrect global footprint library table was found.
// Incorrect global footprint library table is not a fatal error:
// the user just has to edit the (partially) loaded table.
wxString msg = wxString::Format( _(
"An error occurred attempting to load the global footprint library "
"table:\n\n%s" ),
"table:\n\n%s\n\n"
"Please edit this global footprint library table in Preferences menu" ),
GetChars( ioe.errorText )
);
DisplayError( NULL, msg );
return false;
}
#if defined(KICAD_SCRIPTING)
+9 -3
View File
@@ -214,7 +214,9 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_ID aLayer,
case F_SilkS:
case B_SilkS:
if( plotOpt.GetFormat() == PLOT_FORMAT_DXF )
if( plotOpt.GetFormat() == PLOT_FORMAT_DXF && plotOpt.GetDXFPlotPolygonMode() )
// PlotLayerOutlines() is designed only for DXF plotters.
// and must not be used for other plot formats
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );
else
PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt );
@@ -255,7 +257,9 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_ID aLayer,
plotOpt.SetSkipPlotNPTH_Pads( false );
plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE );
if( plotOpt.GetFormat() == PLOT_FORMAT_DXF )
if ( plotOpt.GetFormat() == PLOT_FORMAT_DXF && plotOpt.GetDXFPlotPolygonMode() )
// PlotLayerOutlines() is designed only for DXF plotters.
// and must not be used for other plot formats
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );
else
PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt );
@@ -265,7 +269,9 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_ID aLayer,
plotOpt.SetSkipPlotNPTH_Pads( false );
plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE );
if( plotOpt.GetFormat() == PLOT_FORMAT_DXF )
if ( plotOpt.GetFormat() == PLOT_FORMAT_DXF && plotOpt.GetDXFPlotPolygonMode() )
// PlotLayerOutlines() is designed only for DXF plotters.
// and must not be used for other plot formats
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );
else
PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt );
+8 -13
View File
@@ -133,18 +133,12 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule )
// Plot text fields, if allowed
if( trace_ref )
{
if( GetReferenceColor() == UNSPECIFIED_COLOR )
PlotTextModule( &aModule->Reference(), getColor( textLayer ) );
else
PlotTextModule( &aModule->Reference(), GetReferenceColor() );
PlotTextModule( &aModule->Reference(), getColor( textLayer ) );
}
if( trace_val )
{
if( GetValueColor() == UNSPECIFIED_COLOR )
PlotTextModule( &aModule->Value(), getColor( textLayer ) );
else
PlotTextModule( &aModule->Value(), GetValueColor() );
PlotTextModule( &aModule->Value(), getColor( textLayer ) );
}
for( BOARD_ITEM *item = aModule->GraphicalItems().GetFirst(); item; item = item->Next() )
@@ -249,11 +243,11 @@ void BRDITEMS_PLOTTER::PlotDimension( DIMENSION* aDim )
draw.SetWidth( aDim->GetWidth() );
draw.SetLayer( aDim->GetLayer() );
EDA_COLOR_T color = aDim->GetBoard()->GetLayerColor( aDim->GetLayer() );
EDA_COLOR_T color = getColor( aDim->GetLayer() );
// Set plot color (change WHITE to LIGHTGRAY because
// the white items are not seen on a white paper or screen
m_plotter->SetColor( color != WHITE ? color : LIGHTGRAY);
m_plotter->SetColor( color );
PlotTextePcb( &aDim->Text() );
@@ -447,7 +441,8 @@ void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte )
if( !m_layerMask[pt_texte->GetLayer()] )
return;
m_plotter->SetColor( getColor( pt_texte->GetLayer() ) );
EDA_COLOR_T color = getColor( pt_texte->GetLayer() );
m_plotter->SetColor( color );
size = pt_texte->GetSize();
pos = pt_texte->GetTextPosition();
@@ -475,14 +470,14 @@ void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte )
for( unsigned ii = 0; ii < strings_list.Count(); ii++ )
{
wxString& txt = strings_list.Item( ii );
m_plotter->Text( positions[ii], UNSPECIFIED_COLOR, txt, orient, size,
m_plotter->Text( positions[ii], color, txt, orient, size,
pt_texte->GetHorizJustify(), pt_texte->GetVertJustify(),
thickness, pt_texte->IsItalic(), allow_bold );
}
}
else
{
m_plotter->Text( pos, UNSPECIFIED_COLOR, shownText, orient, size,
m_plotter->Text( pos, color, shownText, orient, size,
pt_texte->GetHorizJustify(), pt_texte->GetVertJustify(),
thickness, pt_texte->IsItalic(), allow_bold );
}
-2
View File
@@ -795,8 +795,6 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
PCB_EDIT_FRAME* frame = getEditFrame<PCB_EDIT_FRAME>();
VIEW_CONTROLS* ctls = getViewControls();
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
Activate();
m_router->SyncWorld();
+2
View File
@@ -124,6 +124,8 @@ bool EDIT_TOOL::invokeInlineRouter()
if( !theRouter->PNSSettings().InlineDragEnabled() )
return false;
TOOL_EVENT dummy;
m_selectionTool->ClearSelection( dummy );
m_toolMgr->RunAction( COMMON_ACTIONS::routerInlineDrag, true, track ? track : via );
return true;
}
+5 -5
View File
@@ -830,6 +830,11 @@ int PCBNEW_CONTROL::AppendBoard( const TOOL_EVENT& aEvent )
return 0;
}
// rebuild nets and ratsnest before any use of nets
board->BuildListOfNets();
board->GetRatsnest()->Recalculate();
board->SynchronizeNetsAndNetClasses();
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
// Process the new items
@@ -900,11 +905,6 @@ int PCBNEW_CONTROL::AppendBoard( const TOOL_EVENT& aEvent )
editFrame->ReFillLayerWidget();
static_cast<PCB_DRAW_PANEL_GAL*>( editFrame->GetGalCanvas() )->SyncLayersVisibility( board );
// Ratsnest
board->BuildListOfNets();
board->SynchronizeNetsAndNetClasses();
board->GetRatsnest()->Recalculate();
// Start dragging the appended board
VECTOR2D v( static_cast<BOARD_ITEM*>( undoListPicker.GetPickedItem( 0 ) )->GetPosition() );
getViewControls()->WarpCursor( v, true, true );
-140
View File
@@ -1,140 +0,0 @@
#
# Example python script to generate a BOM from a KiCad generic netlist
#
# Example: Sorted and Grouped HTML BOM with more advanced grouping
#
"""
@package
Generate a HTML BOM list.
Components are sorted and grouped by ref
Fields are (if exist)
Ref, Quantity, Value, Symbol, footprint, Description, Vendor
"""
from __future__ import print_function
# Import the KiCad python helper module and the csv formatter
import kicad_netlist_reader
import sys
# Start with a basic html template
html = """
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>KiCad BOM grouped by value and footprint </title>
</head>
<body>
<h1><!--SOURCE--></h1>
<p><!--DATE--></p>
<p><!--TOOL--></p>
<p><!--COMPCOUNT--></p>
<table>
<!--TABLEROW-->
</table>
</body>
</html>
"""
def myEqu(self, other):
"""myEqu is a more advanced equivalence function for components which is
used by component grouping. Normal operation is to group components based
on their Value, Library source, and Library part.
In this example of a more advanced equivalency operator we also compare the
custom fields Voltage, Tolerance and Manufacturer as well as the assigned
footprint. If these fields are not used in some parts they will simply be
ignored (they will match as both will be empty strings).
"""
result = True
if self.getValue() != other.getValue():
result = False
elif self.getLibName() != other.getLibName():
result = False
elif self.getPartName() != other.getPartName():
result = False
elif self.getFootprint() != other.getFootprint():
result = False
# elif self.getField("Tolerance") != other.getField("Tolerance"):
# result = False
# elif self.getField("Manufacturer") != other.getField("Manufacturer"):
# result = False
# elif self.getField("Voltage") != other.getField("Voltage"):
# result = False
return result
# Override the component equivalence operator - it is important to do this
# before loading the netlist, otherwise all components will have the original
# equivalency operator.
kicad_netlist_reader.comp.__equ__ = myEqu
# Generate an instance of a generic netlist, and load the netlist tree from
# video.xml. If the file doesn't exist, execution will stop
net = kicad_netlist_reader.netlist(sys.argv[1])
# Open a file to write too, if the file cannot be opened output to stdout
# instead
try:
f = open(sys.argv[2], 'w')
except IOError:
e = "Can't open output file for writing: " + sys.argv[2]
print( __file__, ":", e, sys.stderr )
f = sys.stdout
components = net.getInterestingComponents()
# Output a set of rows for a header providing general information
html = html.replace('<!--SOURCE-->', net.getSource())
html = html.replace('<!--DATE-->', net.getDate())
html = html.replace('<!--TOOL-->', net.getTool())
html = html.replace('<!--COMPCOUNT-->', "<b>Component Count:</b>" + \
str(len(components)))
row = "<tr><th style='width:640px'>Ref</th>" + "<th>Qnty</th>"
row += "<th>Value</th>"
row += "<th>Symbol</th>"
row += "<th>Footprint</th>"
row += "<th>Description</th>"
row += "<th>PartNumber</th>"
row += "<th>Vendor</th></tr>"
html = html.replace('<!--TABLEROW-->', row + "<!--TABLEROW-->")
# Get all of the components in groups of matching parts + values
# (see kicad_netlist_reader.py)
grouped = net.groupComponents(components)
# Output all of the component information
for group in grouped:
refs = ""
# Add the reference of every component in the group and keep a reference
# to the component so that the other data can be filled in once per group
for component in group:
if len(refs) > 0:
refs += ", "
refs += component.getRef()
c = component
row = "<tr>"
row += "<td>" + refs +"</td>"
row += "<td align=center>" + str(len(group)) + "</td>"
row += "<td align=center>" + c.getValue() + "</td>"
# row += "<td align=center>" + c.getLibName() + ":" + c.getPartName() + "</td>"
row += "<td align=center>" + c.getPartName() + "</td>"
row += "<td align=center>" + c.getFootprint() + "</td>"
row += "<td align=center>" + c.getDescription() + "</td>"
row += "<td align=center>" + c.getField("PartNumber") + "</td>"
row += "<td align=center>" + c.getField("Vendor") + "</td>"
row += "</tr>"
html = html.replace('<!--TABLEROW-->', row + "<!--TABLEROW-->")
# Print the formatted html to output file
print(html, file=f)
+68 -66
View File
@@ -1,5 +1,5 @@
( page_layout
(setup(textsize 2.5 2.5)(linewidth 0.3)(textlinewidth 0.3)
(page_layout
(setup (textsize 2.5 2.5)(linewidth 0.3)(textlinewidth 0.25)
(left_margin 8)(right_margin 5)(top_margin 5)(bottom_margin 5))
(line (name segm1:Line) (start 0 60 lbcorner) (end 12 60 lbcorner) (linewidth 0.6) (repeat 3) (incry 25))
(line (name segm2:Line) (start 96 0 ltcorner) (end 96 14 ltcorner) (option page1only) (linewidth 0.6) (repeat 2) (incrx 53))
@@ -17,69 +17,71 @@
(line (name segm14:Line) (start 185 40) (end 120 40) (option page1only) (repeat 3) (incry 5))
(line (name segm15:Line) (start 185 30) (end 120 30) (option page1only) (linewidth 0.6) (repeat 2) (incry 5))
(line (name segm16:Line) (start 185 5) (end 120 5) (option page1only) (repeat 5) (incry 5))
(line (name segm17:Line) (start 185 55) (end 0 55) (option page1only) (linewidth 0.6))
(line (name segm18:Line) (start 0 145 lbcorner) (end 0 0 lbcorner) (linewidth 0.6) (repeat 2) (incrx 5))
(line (name segm19:Line) (start 45 35) (end 45 20) (option page1only) (repeat 2) (incrx -5))
(line (name segm20:Line) (start 35 40) (end 35 20) (option page1only) (linewidth 0.6) (repeat 2) (incrx -17))
(line (name segm21:Line) (start 50 20) (end 0 20) (option page1only) (linewidth 0.6) (repeat 2) (incry 15))
(line (name segm22:Line) (start 50 40) (end 50 0) (option page1only) (linewidth 0.6))
(line (name segm23:Line) (start 120 15) (end 0 15) (option page1only) (linewidth 0.6))
(line (name segm24:Line) (start 120 40) (end 0 40) (option page1only) (linewidth 0.6))
(line (name segm25:Line) (start 185 0) (end 185 55) (option page1only) (linewidth 0.6))
(line (name segm17:Line) (start 120 63) (end 0 63) (option page1only) (linewidth 0.6))
(line (name segm18:Line) (start 120 55) (end 120 63) (option page1only) (linewidth 0.6))
(line (name segm19:Line) (start 185 55) (end 0 55) (option page1only) (linewidth 0.6))
(line (name segm20:Line) (start 0 145 lbcorner) (end 0 0 lbcorner) (linewidth 0.6) (repeat 2) (incrx 5))
(line (name segm21:Line) (start 45 35) (end 45 20) (option page1only) (repeat 2) (incrx -5))
(line (name segm22:Line) (start 35 40) (end 35 20) (option page1only) (linewidth 0.6) (repeat 2) (incrx -17))
(line (name segm23:Line) (start 50 20) (end 0 20) (option page1only) (linewidth 0.6) (repeat 2) (incry 15))
(line (name segm24:Line) (start 50 40) (end 50 0) (option page1only) (linewidth 0.6))
(line (name segm25:Line) (start 120 15) (end 0 15) (option page1only) (linewidth 0.6))
(line (name segm26:Line) (start 120 40) (end 0 40) (option page1only) (linewidth 0.6))
(line (name segm27:Line) (start 185 0) (end 185 55) (option page1only) (linewidth 0.6))
(rect (name rect1:Rect) (start 12 0 lbcorner) (end 0 0 rtcorner) (linewidth 0.6))
(tbtext Лист (name text1:Text) (pos 173 32.5) (option page1only) (justify center))
(tbtext %C2 (name text2:Text) (pos 167.5 22.5) (option page1only) (maxlen 22))
(tbtext Пров. (name text3:Text) (pos 184.5 22.5) (option page1only))
(tbtext Утв. (name text4:Text) (pos 184.5 2.5) (option page1only))
(tbtext Н.контр. (name text5:Text) (pos 184.5 7.5) (option page1only))
(tbtext Лит. (name text6:Text) (pos 42 37.5) (option page1only) (justify center))
(tbtext %C0 (name text7:Text) (pos 60 47.5) (option page1only) (font (size 5 5)) (justify center) (maxlen 119))
(tbtext %N (name text8:Text) (pos 8 17.5) (option page1only) (justify center))
(line (name segm26:Line) (start 185 15) (end 185 0) (option notonpage1) (linewidth 0.6))
(line (name segm27:Line) (start 185 15) (end 0 15) (option notonpage1) (linewidth 0.6))
(tbtext %Y (name text9:Text) (pos 25 7) (option page1only) (justify center) (maxlen 49) (maxheight 14))
(tbtext %T (name text10:Text) (pos 85 27.5) (option page1only) (justify center) (maxlen 69) (maxheight 24))
(tbtext Листов (name text11:Text) (pos 29 17.5) (option page1only))
(tbtext %C0 (name text12:Text) (pos 47 7 ltcorner) (rotate 180) (font (size 3.5 3.5)) (justify center) (maxlen 69))
(tbtext %S (name text13:Text) (pos 35 17.5) (option page1only) (justify center))
(tbtext Лист (name text14:Text) (pos 49 17.5) (option page1only))
(line (name segm28:Line) (start 30 20) (end 30 15) (option page1only) (linewidth 0.6))
(tbtext Масштаб (name text15:Text) (pos 9 37.5) (option page1only) (justify center))
(tbtext Масса (name text16:Text) (pos 26.5 37.5) (option page1only) (justify center))
(tbtext %C3 (name text17:Text) (pos 167.5 2.5) (option page1only) (maxlen 22))
(tbtext %C1 (name text18:Text) (pos 167.5 27.5) (option page1only) (maxlen 22))
(tbtext Разраб. (name text19:Text) (pos 184.5 27.5) (option page1only))
(tbtext Дата (name text20:Text) (pos 125 32.5) (option page1only) (justify center))
(tbtext Подп. (name text21:Text) (pos 137 32.5) (option page1only) (justify center))
(tbtext "N докум." (name text22:Text) (pos 156.5 32.5) (option page1only) (justify center))
(tbtext Изм. (name text23:Text) (pos 181.5 32.5) (option page1only) (justify center) (maxlen 6.5))
(line (name segm29:Line) (start 0 287 lbcorner) (end 12 287 lbcorner) (option page1only) (linewidth 0.6) (repeat 3) (incry -60))
(tbtext Взам.инв.N (name text24:Text) (pos 2.5 72.5 lbcorner) (rotate 90) (justify center))
(tbtext Т.контр. (name text25:Text) (pos 184.5 17.5) (option page1only))
(tbtext "Подп. и дата" (name text26:Text) (pos 2.5 42.5 lbcorner) (rotate 90) (justify center))
(tbtext "Инв.N дубл." (name text27:Text) (pos 2.5 97.5 lbcorner) (rotate 90) (justify center))
(tbtext "Инв.N подл." (name text28:Text) (pos 2.5 12.5 lbcorner) (rotate 90) (justify center))
(line (name segm30:Line) (start 0 287 lbcorner) (end 0 167 lbcorner) (option page1only) (linewidth 0.6) (repeat 2) (incrx 5))
(tbtext "Подп. и дата" (name text29:Text) (pos 2.5 127.5 lbcorner) (rotate 90) (justify center))
(tbtext "Перв. примен." (name text30:Text) (pos 2.5 257 lbcorner) (option page1only) (rotate 90) (justify center))
(tbtext "Справ. N" (name text31:Text) (pos 2.5 197 lbcorner) (option page1only) (rotate 90) (justify center))
(tbtext %S (name text32:Text) (pos 5 4) (option notonpage1) (justify center))
(tbtext Лист (name text33:Text) (pos 5 11.5) (option notonpage1) (justify center))
(tbtext Копировал (name text34:Text) (pos 110 -2.5))
(tbtext "Формат %Z" (name text35:Text) (pos 40 -2.5))
(tbtext %C0 (name text36:Text) (pos 65 7.5) (option notonpage1) (font (size 5 5)) (justify center) (maxlen 109) (maxheight 14))
(tbtext Дата (name text37:Text) (pos 125 2.5) (option notonpage1) (justify center))
(tbtext Подп. (name text38:Text) (pos 137.5 2.5) (option notonpage1) (justify center))
(tbtext "N докум." (name text39:Text) (pos 156.5 2.5) (option notonpage1) (justify center))
(tbtext Лист (name text40:Text) (pos 173 2.5) (option notonpage1) (justify center))
(tbtext Изм. (name text41:Text) (pos 181.5 2.5) (option notonpage1) (justify center) (maxlen 6.5))
(line (name segm31:Line) (start 10 8) (end 0 8) (option notonpage1) (linewidth 0.6))
(line (name segm32:Line) (start 10 15) (end 10 0) (option notonpage1) (linewidth 0.6))
(line (name segm33:Line) (start 185 10) (end 120 10) (option notonpage1))
(line (name segm34:Line) (start 185 5) (end 120 5) (option notonpage1) (linewidth 0.6))
(line (name segm35:Line) (start 120 15) (end 120 0) (option notonpage1) (linewidth 0.6))
(line (name segm36:Line) (start 130 15) (end 130 0) (option notonpage1) (linewidth 0.6))
(line (name segm37:Line) (start 145 15) (end 145 0) (option notonpage1) (linewidth 0.6))
(line (name segm38:Line) (start 168 15) (end 168 0) (option notonpage1) (linewidth 0.6))
(line (name segm39:Line) (start 178 15) (end 178 0) (option notonpage1) (linewidth 0.6))
(tbtext Лист (name text1:Text) (pos 173 32.5) (option page1only) (font italic) (justify center))
(tbtext %C2 (name text2:Text) (pos 167.5 22.5) (option page1only) (font italic) (maxlen 21.5))
(tbtext Пров. (name text3:Text) (pos 184.5 22.5) (option page1only) (font italic))
(tbtext Утв. (name text4:Text) (pos 184.5 2.5) (option page1only) (font italic))
(tbtext Н.контр. (name text5:Text) (pos 184.5 7.5) (option page1only) (font italic))
(tbtext Лит. (name text6:Text) (pos 42 37.5) (option page1only) (font italic) (justify center))
(tbtext %C0 (name text7:Text) (pos 60 47.5) (option page1only) (font (linewidth 0.5) (size 5 5) italic) (justify center) (maxlen 119))
(tbtext %N (name text8:Text) (pos 8 17.5) (option page1only) (font italic) (justify center))
(line (name segm28:Line) (start 185 15) (end 185 0) (option notonpage1) (linewidth 0.6))
(line (name segm29:Line) (start 185 15) (end 0 15) (option notonpage1) (linewidth 0.6))
(tbtext %Y (name text9:Text) (pos 25 7) (option page1only) (font (linewidth 0.35) (size 3.5 3.5) italic) (justify center) (maxlen 48) (maxheight 14))
(tbtext %T (name text10:Text) (pos 85 27.5) (option page1only) (font (linewidth 0.35) (size 3.5 3.5) italic) (justify center) (maxlen 67) (maxheight 22))
(tbtext Листов (name text11:Text) (pos 29 17.5) (option page1only) (font italic))
(tbtext %C0 (name text12:Text) (pos 47 7 ltcorner) (rotate 180) (font (linewidth 0.35) (size 3.5 3.5) italic) (justify center) (maxlen 69))
(tbtext %S (name text13:Text) (pos 35 17.5) (option page1only) (font italic) (justify center))
(tbtext Лист (name text14:Text) (pos 49 17.5) (option page1only) (font italic))
(line (name segm30:Line) (start 30 20) (end 30 15) (option page1only) (linewidth 0.6))
(tbtext Масштаб (name text15:Text) (pos 9 37.5) (option page1only) (font italic) (justify center))
(tbtext Масса (name text16:Text) (pos 26.5 37.5) (option page1only) (font italic) (justify center))
(tbtext %C3 (name text17:Text) (pos 167.5 2.5) (option page1only) (font italic) (maxlen 21.5))
(tbtext %C1 (name text18:Text) (pos 167.5 27.5) (option page1only) (font italic) (maxlen 21.5))
(tbtext Разраб. (name text19:Text) (pos 184.5 27.5) (option page1only) (font italic))
(tbtext Дата (name text20:Text) (pos 125 32.5) (option page1only) (font italic) (justify center))
(tbtext Подп. (name text21:Text) (pos 137 32.5) (option page1only) (font italic) (justify center))
(tbtext докум. (name text22:Text) (pos 156.5 32.5) (option page1only) (font italic) (justify center))
(tbtext Изм. (name text23:Text) (pos 181.5 32.5) (option page1only) (font italic) (justify center) (maxlen 6.5))
(line (name segm31:Line) (start 0 287 lbcorner) (end 12 287 lbcorner) (option page1only) (linewidth 0.6) (repeat 3) (incry -60))
(tbtext Взам.инв.N° (name text24:Text) (pos 2.5 72.5 lbcorner) (rotate 90) (font italic) (justify center))
(tbtext Т.контр. (name text25:Text) (pos 184.5 17.5) (option page1only) (font italic))
(tbtext "Подп. и дата" (name text26:Text) (pos 2.5 42.5 lbcorner) (rotate 90) (font italic) (justify center))
(tbtext Инв.N°дубл. (name text27:Text) (pos 2.5 97.5 lbcorner) (rotate 90) (font italic) (justify center))
(tbtext Инв.N°подл. (name text28:Text) (pos 2.5 12.5 lbcorner) (rotate 90) (font italic) (justify center))
(line (name segm32:Line) (start 0 287 lbcorner) (end 0 167 lbcorner) (option page1only) (linewidth 0.6) (repeat 2) (incrx 5))
(tbtext "Подп. и дата" (name text29:Text) (pos 2.5 127.5 lbcorner) (rotate 90) (font italic) (justify center))
(tbtext "Перв. примен." (name text30:Text) (pos 2.5 257 lbcorner) (option page1only) (rotate 90) (font italic) (justify center))
(tbtext "Справ. N°" (name text31:Text) (pos 2.5 197 lbcorner) (option page1only) (rotate 90) (font italic) (justify center))
(tbtext %S (name text32:Text) (pos 5 4) (option notonpage1) (font italic) (justify center))
(tbtext Лист (name text33:Text) (pos 5 11.5) (option notonpage1) (font italic) (justify center))
(tbtext Копировал (name text34:Text) (pos 110 -2.5) (font italic))
(tbtext "Формат %Z" (name text35:Text) (pos 40 -2.5) (font italic))
(tbtext %C0 (name text36:Text) (pos 65 7.5) (option notonpage1) (font (linewidth 0.5) (size 5 5) italic) (justify center) (maxlen 109) (maxheight 14))
(tbtext Дата (name text37:Text) (pos 125 2.5) (option notonpage1) (font italic) (justify center))
(tbtext Подп. (name text38:Text) (pos 137.5 2.5) (option notonpage1) (font italic) (justify center))
(tbtext докум. (name text39:Text) (pos 156.5 2.5) (option notonpage1) (font italic) (justify center))
(tbtext Лист (name text40:Text) (pos 173 2.5) (option notonpage1) (font italic) (justify center))
(tbtext Изм. (name text41:Text) (pos 181.5 2.5) (option notonpage1) (font italic) (justify center) (maxlen 6.5))
(line (name segm33:Line) (start 10 8) (end 0 8) (option notonpage1) (linewidth 0.6))
(line (name segm34:Line) (start 10 15) (end 10 0) (option notonpage1) (linewidth 0.6))
(line (name segm35:Line) (start 185 10) (end 120 10) (option notonpage1))
(line (name segm36:Line) (start 185 5) (end 120 5) (option notonpage1) (linewidth 0.6))
(line (name segm37:Line) (start 120 15) (end 120 0) (option notonpage1) (linewidth 0.6))
(line (name segm38:Line) (start 130 15) (end 130 0) (option notonpage1) (linewidth 0.6))
(line (name segm39:Line) (start 145 15) (end 145 0) (option notonpage1) (linewidth 0.6))
(line (name segm40:Line) (start 168 15) (end 168 0) (option notonpage1) (linewidth 0.6))
(line (name segm41:Line) (start 178 15) (end 178 0) (option notonpage1) (linewidth 0.6))
)
+68 -66
View File
@@ -1,5 +1,5 @@
( page_layout
(setup(textsize 2.5 2.5)(linewidth 0.3)(textlinewidth 0.3)
(page_layout
(setup (textsize 2.5 2.5)(linewidth 0.3)(textlinewidth 0.25)
(left_margin 8)(right_margin 5)(top_margin 5)(bottom_margin 5))
(line (name segm1:Line) (start 0 60 lbcorner) (end 12 60 lbcorner) (linewidth 0.6) (repeat 3) (incry 25))
(line (name segm2:Line) (start 14 84 rtcorner) (end 0 84 rtcorner) (option page1only) (linewidth 0.6) (repeat 2) (incry 53))
@@ -17,69 +17,71 @@
(line (name segm14:Line) (start 185 40) (end 120 40) (option page1only) (repeat 3) (incry 5))
(line (name segm15:Line) (start 185 30) (end 120 30) (option page1only) (linewidth 0.6) (repeat 2) (incry 5))
(line (name segm16:Line) (start 185 5) (end 120 5) (option page1only) (repeat 5) (incry 5))
(line (name segm17:Line) (start 185 55) (end 0 55) (option page1only) (linewidth 0.6))
(line (name segm18:Line) (start 0 145 lbcorner) (end 0 0 lbcorner) (linewidth 0.6) (repeat 2) (incrx 5))
(line (name segm19:Line) (start 45 35) (end 45 20) (option page1only) (repeat 2) (incrx -5))
(line (name segm20:Line) (start 35 40) (end 35 20) (option page1only) (linewidth 0.6) (repeat 2) (incrx -17))
(line (name segm21:Line) (start 50 20) (end 0 20) (option page1only) (linewidth 0.6) (repeat 2) (incry 15))
(line (name segm22:Line) (start 50 40) (end 50 0) (option page1only) (linewidth 0.6))
(line (name segm23:Line) (start 120 15) (end 0 15) (option page1only) (linewidth 0.6))
(line (name segm24:Line) (start 120 40) (end 0 40) (option page1only) (linewidth 0.6))
(line (name segm25:Line) (start 185 0) (end 185 55) (option page1only) (linewidth 0.6))
(line (name segm17:Line) (start 120 63) (end 0 63) (option page1only) (linewidth 0.6))
(line (name segm18:Line) (start 120 55) (end 120 63) (option page1only) (linewidth 0.6))
(line (name segm19:Line) (start 185 55) (end 0 55) (option page1only) (linewidth 0.6))
(line (name segm20:Line) (start 0 145 lbcorner) (end 0 0 lbcorner) (linewidth 0.6) (repeat 2) (incrx 5))
(line (name segm21:Line) (start 45 35) (end 45 20) (option page1only) (repeat 2) (incrx -5))
(line (name segm22:Line) (start 35 40) (end 35 20) (option page1only) (linewidth 0.6) (repeat 2) (incrx -17))
(line (name segm23:Line) (start 50 20) (end 0 20) (option page1only) (linewidth 0.6) (repeat 2) (incry 15))
(line (name segm24:Line) (start 50 40) (end 50 0) (option page1only) (linewidth 0.6))
(line (name segm25:Line) (start 120 15) (end 0 15) (option page1only) (linewidth 0.6))
(line (name segm26:Line) (start 120 40) (end 0 40) (option page1only) (linewidth 0.6))
(line (name segm27:Line) (start 185 0) (end 185 55) (option page1only) (linewidth 0.6))
(rect (name rect1:Rect) (start 12 0 lbcorner) (end 0 0 rtcorner) (linewidth 0.6))
(tbtext Лист (name text1:Text) (pos 173 32.5) (option page1only) (justify center))
(tbtext %C2 (name text2:Text) (pos 167.5 22.5) (option page1only) (maxlen 22))
(tbtext Пров. (name text3:Text) (pos 184.5 22.5) (option page1only))
(tbtext Утв. (name text4:Text) (pos 184.5 2.5) (option page1only))
(tbtext Н.контр. (name text5:Text) (pos 184.5 7.5) (option page1only))
(tbtext Лит. (name text6:Text) (pos 42 37.5) (option page1only) (justify center))
(tbtext %C0 (name text7:Text) (pos 60 47.5) (option page1only) (font (size 5 5)) (justify center) (maxlen 119))
(tbtext %N (name text8:Text) (pos 8 17.5) (option page1only) (justify center))
(line (name segm26:Line) (start 185 15) (end 185 0) (option notonpage1) (linewidth 0.6))
(line (name segm27:Line) (start 185 15) (end 0 15) (option notonpage1) (linewidth 0.6))
(tbtext %Y (name text9:Text) (pos 25 7) (option page1only) (justify center) (maxlen 49) (maxheight 14))
(tbtext %T (name text10:Text) (pos 85 27.5) (option page1only) (justify center) (maxlen 69) (maxheight 24))
(tbtext Листов (name text11:Text) (pos 29 17.5) (option page1only))
(tbtext %C0 (name text12:Text) (pos 7 35 rtcorner) (rotate 270) (font (size 3.5 3.5)) (justify center) (maxlen 69))
(tbtext %S (name text13:Text) (pos 35 17.5) (option page1only) (justify center))
(tbtext Лист (name text14:Text) (pos 49 17.5) (option page1only))
(line (name segm28:Line) (start 30 20) (end 30 15) (option page1only) (linewidth 0.6))
(tbtext Масштаб (name text15:Text) (pos 9 37.5) (option page1only) (justify center))
(tbtext Масса (name text16:Text) (pos 26.5 37.5) (option page1only) (justify center))
(tbtext %C3 (name text17:Text) (pos 167.5 2.5) (option page1only) (maxlen 22))
(tbtext %C1 (name text18:Text) (pos 167.5 27.5) (option page1only) (maxlen 22))
(tbtext Разраб. (name text19:Text) (pos 184.5 27.5) (option page1only))
(tbtext Дата (name text20:Text) (pos 125 32.5) (option page1only) (justify center))
(tbtext Подп. (name text21:Text) (pos 137 32.5) (option page1only) (justify center))
(tbtext "N докум." (name text22:Text) (pos 156.5 32.5) (option page1only) (justify center))
(tbtext Изм. (name text23:Text) (pos 181.5 32.5) (option page1only) (justify center) (maxlen 6.5))
(line (name segm29:Line) (start 0 287 lbcorner) (end 12 287 lbcorner) (option page1only) (linewidth 0.6) (repeat 3) (incry -60))
(tbtext Взам.инв.N (name text24:Text) (pos 2.5 72.5 lbcorner) (rotate 90) (justify center))
(tbtext Т.контр. (name text25:Text) (pos 184.5 17.5) (option page1only))
(tbtext "Подп. и дата" (name text26:Text) (pos 2.5 42.5 lbcorner) (rotate 90) (justify center))
(tbtext "Инв.N дубл." (name text27:Text) (pos 2.5 97.5 lbcorner) (rotate 90) (justify center))
(tbtext "Инв.N подл." (name text28:Text) (pos 2.5 12.5 lbcorner) (rotate 90) (justify center))
(line (name segm30:Line) (start 0 287 lbcorner) (end 0 167 lbcorner) (option page1only) (linewidth 0.6) (repeat 2) (incrx 5))
(tbtext "Подп. и дата" (name text29:Text) (pos 2.5 127.5 lbcorner) (rotate 90) (justify center))
(tbtext "Перв. примен." (name text30:Text) (pos 2.5 257 lbcorner) (option page1only) (rotate 90) (justify center))
(tbtext "Справ. N" (name text31:Text) (pos 2.5 197 lbcorner) (option page1only) (rotate 90) (justify center))
(tbtext %S (name text32:Text) (pos 5 4) (option notonpage1) (justify center))
(tbtext Лист (name text33:Text) (pos 5 11.5) (option notonpage1) (justify center))
(tbtext Копировал (name text34:Text) (pos 110 -2.5))
(tbtext "Формат %Z" (name text35:Text) (pos 40 -2.5))
(tbtext %C0 (name text36:Text) (pos 65 7.5) (option notonpage1) (font (size 5 5)) (justify center) (maxlen 109) (maxheight 14))
(tbtext Дата (name text37:Text) (pos 125 2.5) (option notonpage1) (justify center))
(tbtext Подп. (name text38:Text) (pos 137.5 2.5) (option notonpage1) (justify center))
(tbtext "N докум." (name text39:Text) (pos 156.5 2.5) (option notonpage1) (justify center))
(tbtext Лист (name text40:Text) (pos 173 2.5) (option notonpage1) (justify center))
(tbtext Изм. (name text41:Text) (pos 181.5 2.5) (option notonpage1) (justify center) (maxlen 6.5))
(line (name segm31:Line) (start 10 8) (end 0 8) (option notonpage1) (linewidth 0.6))
(line (name segm32:Line) (start 10 15) (end 10 0) (option notonpage1) (linewidth 0.6))
(line (name segm33:Line) (start 185 10) (end 120 10) (option notonpage1))
(line (name segm34:Line) (start 185 5) (end 120 5) (option notonpage1) (linewidth 0.6))
(line (name segm35:Line) (start 120 15) (end 120 0) (option notonpage1) (linewidth 0.6))
(line (name segm36:Line) (start 130 15) (end 130 0) (option notonpage1) (linewidth 0.6))
(line (name segm37:Line) (start 145 15) (end 145 0) (option notonpage1) (linewidth 0.6))
(line (name segm38:Line) (start 168 15) (end 168 0) (option notonpage1) (linewidth 0.6))
(line (name segm39:Line) (start 178 15) (end 178 0) (option notonpage1) (linewidth 0.6))
(tbtext Лист (name text1:Text) (pos 173 32.5) (option page1only) (font italic) (justify center))
(tbtext %C2 (name text2:Text) (pos 167.5 22.5) (option page1only) (font italic) (maxlen 21.5))
(tbtext Пров. (name text3:Text) (pos 184.5 22.5) (option page1only) (font italic))
(tbtext Утв. (name text4:Text) (pos 184.5 2.5) (option page1only) (font italic))
(tbtext Н.контр. (name text5:Text) (pos 184.5 7.5) (option page1only) (font italic))
(tbtext Лит. (name text6:Text) (pos 42 37.5) (option page1only) (font italic) (justify center))
(tbtext %C0 (name text7:Text) (pos 60 47.5) (option page1only) (font (linewidth 0.5) (size 5 5) italic) (justify center) (maxlen 119))
(tbtext %N (name text8:Text) (pos 8 17.5) (option page1only) (font italic) (justify center))
(line (name segm28:Line) (start 185 15) (end 185 0) (option notonpage1) (linewidth 0.6))
(line (name segm29:Line) (start 185 15) (end 0 15) (option notonpage1) (linewidth 0.6))
(tbtext %Y (name text9:Text) (pos 25 7) (option page1only) (font (linewidth 0.35) (size 3.5 3.5) italic) (justify center) (maxlen 48) (maxheight 14))
(tbtext %T (name text10:Text) (pos 85 27.5) (option page1only) (font (linewidth 0.35) (size 3.5 3.5) italic) (justify center) (maxlen 67) (maxheight 22))
(tbtext Листов (name text11:Text) (pos 29 17.5) (option page1only) (font italic))
(tbtext %C0 (name text12:Text) (pos 7 35 rtcorner) (rotate 90) (font (linewidth 0.35) (size 3.5 3.5) italic) (justify center) (maxlen 69))
(tbtext %S (name text13:Text) (pos 35 17.5) (option page1only) (font italic) (justify center))
(tbtext Лист (name text14:Text) (pos 49 17.5) (option page1only) (font italic))
(line (name segm30:Line) (start 30 20) (end 30 15) (option page1only) (linewidth 0.6))
(tbtext Масштаб (name text15:Text) (pos 9 37.5) (option page1only) (font italic) (justify center))
(tbtext Масса (name text16:Text) (pos 26.5 37.5) (option page1only) (font italic) (justify center))
(tbtext %C3 (name text17:Text) (pos 167.5 2.5) (option page1only) (font italic) (maxlen 21.5))
(tbtext %C1 (name text18:Text) (pos 167.5 27.5) (option page1only) (font italic) (maxlen 21.5))
(tbtext Разраб. (name text19:Text) (pos 184.5 27.5) (option page1only) (font italic))
(tbtext Дата (name text20:Text) (pos 125 32.5) (option page1only) (font italic) (justify center))
(tbtext Подп. (name text21:Text) (pos 137 32.5) (option page1only) (font italic) (justify center))
(tbtext докум. (name text22:Text) (pos 156.5 32.5) (option page1only) (font italic) (justify center))
(tbtext Изм. (name text23:Text) (pos 181.5 32.5) (option page1only) (font italic) (justify center) (maxlen 6.5))
(line (name segm31:Line) (start 0 287 lbcorner) (end 12 287 lbcorner) (option page1only) (linewidth 0.6) (repeat 3) (incry -60))
(tbtext Взам.инв.N° (name text24:Text) (pos 2.5 72.5 lbcorner) (rotate 90) (font italic) (justify center))
(tbtext Т.контр. (name text25:Text) (pos 184.5 17.5) (option page1only) (font italic))
(tbtext "Подп. и дата" (name text26:Text) (pos 2.5 42.5 lbcorner) (rotate 90) (font italic) (justify center))
(tbtext Инв.N°дубл. (name text27:Text) (pos 2.5 97.5 lbcorner) (rotate 90) (font italic) (justify center))
(tbtext Инв.N°подл. (name text28:Text) (pos 2.5 12.5 lbcorner) (rotate 90) (font italic) (justify center))
(line (name segm32:Line) (start 0 287 lbcorner) (end 0 167 lbcorner) (option page1only) (linewidth 0.6) (repeat 2) (incrx 5))
(tbtext "Подп. и дата" (name text29:Text) (pos 2.5 127.5 lbcorner) (rotate 90) (font italic) (justify center))
(tbtext "Перв. примен." (name text30:Text) (pos 2.5 257 lbcorner) (option page1only) (rotate 90) (font italic) (justify center))
(tbtext "Справ. N°" (name text31:Text) (pos 2.5 197 lbcorner) (option page1only) (rotate 90) (font italic) (justify center))
(tbtext %S (name text32:Text) (pos 5 4) (option notonpage1) (font italic) (justify center))
(tbtext Лист (name text33:Text) (pos 5 11.5) (option notonpage1) (font italic) (justify center))
(tbtext Копировал (name text34:Text) (pos 110 -2.5) (font italic))
(tbtext "Формат %Z" (name text35:Text) (pos 40 -2.5) (font italic))
(tbtext %C0 (name text36:Text) (pos 65 7.5) (option notonpage1) (font (linewidth 0.5) (size 5 5) italic) (justify center) (maxlen 109) (maxheight 14))
(tbtext Дата (name text37:Text) (pos 125 2.5) (option notonpage1) (font italic) (justify center))
(tbtext Подп. (name text38:Text) (pos 137.5 2.5) (option notonpage1) (font italic) (justify center))
(tbtext докум. (name text39:Text) (pos 156.5 2.5) (option notonpage1) (font italic) (justify center))
(tbtext Лист (name text40:Text) (pos 173 2.5) (option notonpage1) (font italic) (justify center))
(tbtext Изм. (name text41:Text) (pos 181.5 2.5) (option notonpage1) (font italic) (justify center) (maxlen 6.5))
(line (name segm33:Line) (start 10 8) (end 0 8) (option notonpage1) (linewidth 0.6))
(line (name segm34:Line) (start 10 15) (end 10 0) (option notonpage1) (linewidth 0.6))
(line (name segm35:Line) (start 185 10) (end 120 10) (option notonpage1))
(line (name segm36:Line) (start 185 5) (end 120 5) (option notonpage1) (linewidth 0.6))
(line (name segm37:Line) (start 120 15) (end 120 0) (option notonpage1) (linewidth 0.6))
(line (name segm38:Line) (start 130 15) (end 130 0) (option notonpage1) (linewidth 0.6))
(line (name segm39:Line) (start 145 15) (end 145 0) (option notonpage1) (linewidth 0.6))
(line (name segm40:Line) (start 168 15) (end 168 0) (option notonpage1) (linewidth 0.6))
(line (name segm41:Line) (start 178 15) (end 178 0) (option notonpage1) (linewidth 0.6))
)
+31 -28
View File
@@ -1,4 +1,4 @@
update=22/05/2015 07:44:53
update=Mon 31 Jul 2017 10:04:56 AM MDT
version=1
last_client=kicad
[general]
@@ -33,30 +33,33 @@ LibDir=
[eeschema/libraries]
LibName1=power
LibName2=device
LibName3=transistors
LibName4=conn
LibName5=linear
LibName6=regul
LibName7=74xx
LibName8=cmos4000
LibName9=adc-dac
LibName10=memory
LibName11=xilinx
LibName12=microcontrollers
LibName13=dsp
LibName14=microchip
LibName15=analog_switches
LibName16=motorola
LibName17=texas
LibName18=intel
LibName19=audio
LibName20=interface
LibName21=digital-audio
LibName22=philips
LibName23=display
LibName24=cypress
LibName25=siliconi
LibName26=opto
LibName27=atmel
LibName28=contrib
LibName29=valves
LibName3=switches
LibName4=relays
LibName5=motors
LibName6=transistors
LibName7=conn
LibName8=linear
LibName9=regul
LibName10=74xx
LibName11=cmos4000
LibName12=adc-dac
LibName13=memory
LibName14=xilinx
LibName15=microcontrollers
LibName16=dsp
LibName17=microchip
LibName18=analog_switches
LibName19=motorola
LibName20=texas
LibName21=intel
LibName22=audio
LibName23=interface
LibName24=digital-audio
LibName25=philips
LibName26=display
LibName27=cypress
LibName28=siliconi
LibName29=opto
LibName30=atmel
LibName31=contrib
LibName32=valves