Sync with main r6555
This commit is contained in:
commit
a4861a0d64
|
@ -572,7 +572,10 @@ void EDA_3D_CANVAS::buildTechLayers3DView( REPORTER* aErrorMessages, REPORTER* a
|
|||
|
||||
// bufferPolys contains polygons to merge. Many overlaps .
|
||||
// Calculate merged polygons and remove pads and vias holes
|
||||
if( bufferPolys.IsEmpty() )
|
||||
if( layer != B_Mask && layer != F_Mask && bufferPolys.IsEmpty() )
|
||||
// if a layer has no item to draw, skip it
|
||||
// However solder mask layers are negative layers, so no item
|
||||
// means only a full layer mask
|
||||
continue;
|
||||
|
||||
// Solder mask layers are "negative" layers.
|
||||
|
|
|
@ -419,7 +419,7 @@ void EDA_3D_CANVAS::draw3DViaHole( const VIA* aVia )
|
|||
{
|
||||
LAYER_ID top_layer, bottom_layer;
|
||||
int thickness = GetPrm3DVisu().GetCopperThicknessBIU();
|
||||
int inner_radius = (int)((float)aVia->GetDrillValue() * 1.01f) / 2.0f; // This add a bit more in order to correct a draw artifact while using tickness
|
||||
int inner_radius = (int)((float)aVia->GetDrillValue() * 1.01f) / 2.0f; // This add a bit more in order to correct a draw artifact while using thickness
|
||||
|
||||
aVia->LayerPair( &top_layer, &bottom_layer );
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ Provide an object introspection system using properties.
|
|||
- Add definable properties to base objects.
|
||||
- Create introspection framework for manipulating object properties.
|
||||
- Serialization of properties to and from files and/or other I/O structures.
|
||||
- Create tool to edit property name/type/value table.
|
||||
- Create tool to edit property namespace/object name/name/type/value table.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
@ -380,6 +380,21 @@ against new schematic shared object.
|
|||
**Progress:**
|
||||
- No progress.
|
||||
|
||||
## ERC Improvements ## {#v5_sch_erc_improvements}
|
||||
**Goal:**
|
||||
Improve the coverage and useability of the electrical rules checker (ERC).
|
||||
|
||||
**Task:**
|
||||
- Add warning when multiple labels are defined for a single net. The user should
|
||||
be able to disable this warning.
|
||||
- Save electrical rules settings to project file between sessions.
|
||||
|
||||
**Dependencies:**
|
||||
- None
|
||||
|
||||
**Status:**
|
||||
- No progress.
|
||||
|
||||
# CvPcb: Footprint Association Tool # {#v5_cvpcb}
|
||||
This section covers the source code of the footprint assignment tool CvPcb.
|
||||
|
||||
|
|
|
@ -324,6 +324,7 @@ set( BMAPS_MID
|
|||
lang_pl
|
||||
lang_pt
|
||||
lang_ru
|
||||
lang_sk
|
||||
lang_sl
|
||||
language
|
||||
layers_manager
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
|
||||
/* Do not modify this file, it was automatically generated by the
|
||||
* PNG2cpp CMake script, using a *.png file as input.
|
||||
*/
|
||||
|
||||
#include <bitmaps.h>
|
||||
|
||||
static const unsigned char png[] = {
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
|
||||
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
|
||||
0xce, 0x00, 0x00, 0x01, 0x97, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0xf8, 0xff, 0xff, 0x3f,
|
||||
0x03, 0x3d, 0x30, 0x03, 0xdd, 0x2c, 0xda, 0xb9, 0xf1, 0xd4, 0x53, 0x5a, 0xe3, 0xed, 0x6b, 0x8e,
|
||||
0xde, 0x07, 0xd9, 0x46, 0x73, 0xf0, 0xf1, 0xcb, 0xcf, 0xff, 0xa3, 0x16, 0x51, 0xd7, 0xa2, 0xbf,
|
||||
0x4f, 0x9e, 0xfe, 0xff, 0xd6, 0xd6, 0x0d, 0xc6, 0xdf, 0xfb, 0x26, 0xfd, 0xff, 0x3e, 0x69, 0x3a,
|
||||
0x9c, 0xff, 0xfb, 0xd4, 0x19, 0xea, 0x59, 0xf4, 0xfb, 0xf8, 0xc9, 0xff, 0xef, 0x64, 0x54, 0xc1,
|
||||
0xf8, 0x73, 0x5c, 0xca, 0xff, 0xef, 0x53, 0x66, 0xc0, 0xf9, 0xdf, 0xa7, 0xce, 0x24, 0xcf, 0x22,
|
||||
0xad, 0x94, 0x75, 0xff, 0xd1, 0xf1, 0xae, 0x49, 0xab, 0xc0, 0x86, 0x7e, 0xeb, 0x9d, 0xf4, 0xff,
|
||||
0xf7, 0xc9, 0xd3, 0xff, 0xff, 0x5c, 0xbb, 0xf1, 0xff, 0xd7, 0xb6, 0x9d, 0x60, 0xb1, 0xc7, 0x0d,
|
||||
0x3d, 0xff, 0xb1, 0xe9, 0xc1, 0x87, 0x8d, 0x13, 0x56, 0xfc, 0x63, 0xe0, 0xf6, 0x5b, 0xf4, 0x1f,
|
||||
0x1d, 0xef, 0xe8, 0x5a, 0x02, 0x36, 0xf4, 0xa3, 0x87, 0xff, 0xff, 0xcf, 0xa9, 0xd9, 0xff, 0xbf,
|
||||
0xf5, 0x4c, 0xfc, 0xff, 0x29, 0x30, 0xfc, 0xff, 0x3b, 0x39, 0xf5, 0xff, 0x8f, 0xab, 0xdb, 0xfe,
|
||||
0x63, 0xd3, 0x83, 0x0f, 0x4b, 0x78, 0xcf, 0xc1, 0x6e, 0xd1, 0xfe, 0xae, 0x85, 0x60, 0x8b, 0xfe,
|
||||
0x7d, 0xff, 0xfe, 0xff, 0xef, 0xfd, 0x07, 0xff, 0xff, 0x3e, 0x7e, 0xf2, 0xff, 0xdf, 0xb7, 0x6f,
|
||||
0xff, 0x3f, 0xf9, 0x85, 0xfe, 0x7f, 0x5e, 0xd1, 0x44, 0x3d, 0x8b, 0xd6, 0x74, 0xaf, 0x04, 0x5b,
|
||||
0xf4, 0x5e, 0xcb, 0xf8, 0xff, 0x47, 0x77, 0xbf, 0xff, 0x5f, 0x2b, 0xeb, 0xfe, 0xbf, 0x57, 0xd5,
|
||||
0xfb, 0xff, 0x4e, 0x51, 0xeb, 0xff, 0xed, 0xfa, 0x1e, 0xea, 0x59, 0x54, 0xd1, 0xb9, 0x03, 0x1e,
|
||||
0xf9, 0x27, 0xac, 0x03, 0xfe, 0xaf, 0x0b, 0x29, 0x84, 0xf3, 0x77, 0x76, 0x2d, 0xa6, 0x9e, 0x45,
|
||||
0xa0, 0x08, 0x5c, 0x13, 0x54, 0xf0, 0xdf, 0xc3, 0xa1, 0xe1, 0xbf, 0x9c, 0xd7, 0x8c, 0xff, 0x3c,
|
||||
0x40, 0xb1, 0x10, 0xbb, 0xaa, 0xff, 0xf5, 0x76, 0xd9, 0xff, 0x93, 0x9a, 0x76, 0x90, 0x67, 0x91,
|
||||
0xa9, 0x6b, 0xf7, 0x7f, 0x6c, 0x78, 0x66, 0xeb, 0xca, 0xff, 0x12, 0x3e, 0x73, 0xe0, 0x8a, 0x41,
|
||||
0x96, 0xcd, 0xaa, 0x9e, 0xff, 0x1f, 0x97, 0x7a, 0x7c, 0xd8, 0xce, 0xb9, 0xed, 0x37, 0x03, 0x2c,
|
||||
0x48, 0x30, 0xb0, 0xbc, 0xc6, 0xff, 0xed, 0xe5, 0x13, 0xff, 0x4b, 0xfb, 0xcc, 0xfe, 0xcf, 0xef,
|
||||
0xbb, 0xe0, 0xff, 0x84, 0xe2, 0x59, 0xff, 0xdf, 0xeb, 0x99, 0xfd, 0xc7, 0xa9, 0x1e, 0x3f, 0xfe,
|
||||
0xc0, 0x40, 0x48, 0xd1, 0x9d, 0xec, 0x8a, 0xff, 0xc7, 0x6a, 0x26, 0xfe, 0x7f, 0xa7, 0xa0, 0x49,
|
||||
0xae, 0x25, 0xc4, 0x59, 0x44, 0x25, 0x3c, 0x6a, 0x11, 0x45, 0x16, 0xa9, 0x54, 0xd0, 0x1a, 0xbf,
|
||||
0x97, 0x56, 0x29, 0x60, 0x18, 0x7e, 0xcd, 0x2d, 0x7a, 0x59, 0x04, 0x00, 0x52, 0x8a, 0x41, 0x42,
|
||||
0x9b, 0x64, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
};
|
||||
|
||||
const BITMAP_OPAQUE lang_sk_xpm[1] = {{ png, sizeof( png ), "lang_sk_xpm" }};
|
||||
|
||||
//EOF
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg:svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="48"
|
||||
height="48"
|
||||
viewBox="0 0 0.48 0.48"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="lang_sk.svg">
|
||||
<svg:metadata
|
||||
id="metadata26">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<format>image/svg+xml</format>
|
||||
<type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<title>Flag of Slovakia</title>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by/3.0/" />
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Flag of Slovakia</dc:title>
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by/3.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</svg:metadata>
|
||||
<svg:defs
|
||||
id="defs24" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1629"
|
||||
inkscape:window-height="851"
|
||||
id="namedview22"
|
||||
showgrid="false"
|
||||
inkscape:zoom="7.3627084"
|
||||
inkscape:cx="-55.238252"
|
||||
inkscape:cy="35.245181"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg2" />
|
||||
<svg:title
|
||||
id="title4">Flag of Slovakia</svg:title>
|
||||
<svg:g
|
||||
id="g3003"
|
||||
transform="matrix(0.05321015,0,0,0.06157154,0,0.38525227)">
|
||||
<svg:rect
|
||||
style="fill:#ee1c25"
|
||||
y="-5.52"
|
||||
x="0"
|
||||
id="rect6"
|
||||
height="6"
|
||||
width="9" />
|
||||
<svg:rect
|
||||
style="fill:#0b4ea2"
|
||||
y="-5.52"
|
||||
x="0"
|
||||
id="rect8"
|
||||
height="4"
|
||||
width="9" />
|
||||
<svg:rect
|
||||
style="fill:#ffffff"
|
||||
y="-5.52"
|
||||
x="0"
|
||||
id="rect10"
|
||||
height="2"
|
||||
width="9" />
|
||||
<svg:g
|
||||
transform="translate(0,-5.52)"
|
||||
id="g12">
|
||||
<svg:path
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path14"
|
||||
d="M 3.16255,4.635 C 2.62474,4.37595 1.85545,3.86177 1.85545,2.84467 1.85545,1.82756 1.90408,1.365 1.90408,1.365 h 1.25847 1.2585 c 0,0 0.04864,0.46256 0.04864,1.47967 0,1.0171 -0.76929,1.53128 -1.30714,1.79033 z" />
|
||||
<svg:path
|
||||
style="fill:#ee1c25"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path16"
|
||||
d="M 3.16255,4.5 C 2.66915,4.26234 1.96338,3.79062 1.96338,2.85749 1.96338,1.924362 2.007992,1.5 2.007992,1.5 h 1.15456 1.15459 c 0,0 0.044626,0.424365 0.044626,1.35749 0,0.933128 -0.705776,1.40485 -1.19921,1.64251 z" />
|
||||
<svg:path
|
||||
style="fill:#ffffff"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path18"
|
||||
d="M 3.26808,2.61284 C 3.401679,2.615 3.662335,2.62023 3.894432,2.542567 c 0,0 -0.00613,0.083055 -0.00613,0.179805 0,0.096773 0.00613,0.179822 0.00613,0.179822 -0.21289,-0.07125 -0.4758,-0.07273 -0.62635,-0.07082 V 3.346765 H 3.057049 V 2.831374 c -0.150545,-0.00191 -0.41345,-4.252e-4 -0.626352,0.070815 0,0 0.00613,-0.083049 0.00613,-0.179822 0,-0.09675 -0.00613,-0.179805 -0.00613,-0.179805 0.2321,0.077665 0.492753,0.072432 0.626352,0.070273 V 2.289159 c -0.121766,-0.00108 -0.297234,0.00473 -0.49563,0.071126 0,0 0.00613,-0.083055 0.00613,-0.179822 0,-0.096756 -0.00613,-0.179811 -0.00613,-0.179811 0.198103,0.066283 0.373356,0.072192 0.495088,0.071137 -0.00626,-0.20498 -0.06597,-0.46332 -0.06597,-0.46332 0,0 0.12289,0.00959 0.172016,0.00959 0.049178,0 0.172031,-0.00959 0.172031,-0.00959 0,0 -0.059695,0.258346 -0.065964,0.463301 0.121741,0.00106 0.296989,-0.00485 0.495086,-0.071137 0,0 -0.00613,0.083055 -0.00613,0.179811 0,0.096767 0.00613,0.179822 0.00613,0.179822 C 3.565318,2.293874 3.389843,2.288059 3.268079,2.28914 v 0.323676 z" />
|
||||
<svg:path
|
||||
style="fill:#0b4ea2"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path20"
|
||||
d="m 3.1625,3.29094 c -0.24847,0 -0.381562,0.344688 -0.381562,0.344688 0,0 -0.073834,-0.163438 -0.276562,-0.163438 -0.137161,0 -0.238243,0.12201 -0.3025,0.235 0.24954,0.39705 0.64768,0.64207 0.96062,0.79281 0.31299,-0.15075 0.71139,-0.39571 0.96094,-0.79281 -0.064256,-0.11299 -0.165339,-0.235 -0.3025,-0.235 -0.202734,0 -0.276875,0.163438 -0.276875,0.163438 0,0 -0.133073,-0.344688 -0.381562,-0.344688 z" />
|
||||
</svg:g>
|
||||
</svg:g>
|
||||
</svg:svg>
|
After Width: | Height: | Size: 5.2 KiB |
|
@ -5,7 +5,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
* Copyright (C) 2016 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
|
||||
|
@ -617,6 +617,43 @@ void DXF_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& padsize,
|
|||
FinishTo( wxPoint( ox, oy ) );
|
||||
}
|
||||
|
||||
void DXF_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
int aCornerRadius, double aOrient,
|
||||
EDA_DRAW_MODE_T aTraceMode )
|
||||
{
|
||||
SHAPE_POLY_SET outline;
|
||||
const int segmentToCircleCount = 64;
|
||||
TransformRoundRectToPolygon( outline, aPadPos, aSize, aOrient,
|
||||
aCornerRadius, segmentToCircleCount );
|
||||
|
||||
// TransformRoundRectToPolygon creates only one convex polygon
|
||||
SHAPE_LINE_CHAIN& poly = outline.Outline( 0 );
|
||||
|
||||
MoveTo( wxPoint( poly.Point( 0 ).x, poly.Point( 0 ).y ) );
|
||||
|
||||
for( int ii = 1; ii < poly.PointCount(); ++ii )
|
||||
LineTo( wxPoint( poly.Point( ii ).x, poly.Point( ii ).y ) );
|
||||
|
||||
FinishTo( wxPoint( poly.Point( 0 ).x, poly.Point( 0 ).y ) );
|
||||
}
|
||||
|
||||
void DXF_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
SHAPE_POLY_SET* aPolygons,
|
||||
EDA_DRAW_MODE_T aTraceMode )
|
||||
{
|
||||
for( int cnt = 0; cnt < aPolygons->OutlineCount(); ++cnt )
|
||||
{
|
||||
SHAPE_LINE_CHAIN& poly = aPolygons->Outline( cnt );
|
||||
|
||||
MoveTo( wxPoint( poly.Point( 0 ).x, poly.Point( 0 ).y ) );
|
||||
|
||||
for( int ii = 1; ii < poly.PointCount(); ++ii )
|
||||
LineTo( wxPoint( poly.Point( ii ).x, poly.Point( ii ).y ) );
|
||||
|
||||
FinishTo(wxPoint( poly.Point( 0 ).x, poly.Point( 0 ).y ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* DXF trapezoidal pad: only sketch mode is supported
|
||||
|
|
|
@ -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) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2016 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
|
||||
|
@ -36,6 +36,7 @@
|
|||
#include <plot_common.h>
|
||||
#include <macros.h>
|
||||
#include <kicad_string.h>
|
||||
#include <convert_basic_shapes_to_polygon.h>
|
||||
|
||||
#include <build_version.h>
|
||||
|
||||
|
@ -479,8 +480,9 @@ void GERBER_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, doub
|
|||
|
||||
if( trace_mode == FILLED )
|
||||
{
|
||||
/* XXX to do: use an aperture macro to declare the rotated pad */
|
||||
/* The pad is reduced to an oval with dy > dx */
|
||||
// TODO: use an aperture macro to declare the rotated pad
|
||||
//
|
||||
// The pad is reduced to an segment with dy > dx
|
||||
delta = size.y - size.x;
|
||||
x0 = 0;
|
||||
y0 = -delta / 2;
|
||||
|
@ -559,12 +561,71 @@ void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize,
|
|||
}
|
||||
}
|
||||
|
||||
void GERBER_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
int aCornerRadius, double aOrient,
|
||||
EDA_DRAW_MODE_T aTraceMode )
|
||||
|
||||
{
|
||||
// Currently, a Pad RoundRect is plotted as polygon.
|
||||
// TODO: use Aperture macro and flash it
|
||||
SHAPE_POLY_SET outline;
|
||||
const int segmentToCircleCount = 64;
|
||||
TransformRoundRectToPolygon( outline, aPadPos, aSize, aOrient,
|
||||
aCornerRadius, segmentToCircleCount );
|
||||
|
||||
std::vector< wxPoint > cornerList;
|
||||
cornerList.reserve( segmentToCircleCount + 5 );
|
||||
// TransformRoundRectToPolygon creates only one convex polygon
|
||||
SHAPE_LINE_CHAIN& poly = outline.Outline( 0 );
|
||||
|
||||
for( int ii = 0; ii < poly.PointCount(); ++ii )
|
||||
cornerList.push_back( wxPoint( poly.Point( ii ).x, poly.Point( ii ).y ) );
|
||||
|
||||
// Close polygon
|
||||
cornerList.push_back( cornerList[0] );
|
||||
|
||||
PlotPoly( cornerList, ( aTraceMode == FILLED ) ? FILLED_SHAPE : NO_FILL );
|
||||
}
|
||||
|
||||
void GERBER_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
SHAPE_POLY_SET* aPolygons,
|
||||
EDA_DRAW_MODE_T aTraceMode )
|
||||
|
||||
{
|
||||
// A Pad custom is plotted as polygon.
|
||||
#if 1
|
||||
// A flashed circle @aPadPos is added (anchor pad)
|
||||
// However, because the anchor pad can be circle or rect, we use only
|
||||
// a circle not bigger tahn the rect.
|
||||
// the main purpose is to show a flashed DCode as pad anchor
|
||||
FlashPadCircle( aPadPos, std::min( aSize.x, aSize.x ), aTraceMode );
|
||||
#endif
|
||||
|
||||
std::vector< wxPoint > cornerList;
|
||||
|
||||
for( int cnt = 0; cnt < aPolygons->OutlineCount(); ++cnt )
|
||||
{
|
||||
SHAPE_LINE_CHAIN& poly = aPolygons->Outline( cnt );
|
||||
cornerList.clear();
|
||||
|
||||
for( int ii = 0; ii < poly.PointCount(); ++ii )
|
||||
cornerList.push_back( wxPoint( poly.Point( ii ).x, poly.Point( ii ).y ) );
|
||||
|
||||
// Close polygon
|
||||
cornerList.push_back( cornerList[0] );
|
||||
|
||||
PlotPoly( cornerList, ( aTraceMode == FILLED ) ? FILLED_SHAPE : NO_FILL );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GERBER_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint* aCorners,
|
||||
double aPadOrient, EDA_DRAW_MODE_T aTrace_Mode )
|
||||
|
||||
{
|
||||
// XXX to do: use an aperture macro to declare the pad
|
||||
// Currently, a Pad Trapezoid is plotted as polygon.
|
||||
// TODO: use Aperture macro and flash it
|
||||
|
||||
// polygon corners list
|
||||
std::vector< wxPoint > cornerList;
|
||||
|
||||
|
|
|
@ -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) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2016 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
|
||||
|
@ -25,7 +25,6 @@
|
|||
/**
|
||||
* @file common_plotHPGL_functions.cpp
|
||||
* @brief KiCad: Common plot HPGL Routines
|
||||
* Filled primitive are not supported, but some could be using HPGL/2
|
||||
* Since this plot engine is mostly intended for import in external programs,
|
||||
* sadly HPGL/2 isn't supported a lot... some of the primitives use overlapped
|
||||
* strokes to fill the shape
|
||||
|
@ -113,6 +112,12 @@
|
|||
* but the outputs and feedrates are affected.
|
||||
* PD {x, y};
|
||||
*
|
||||
* PM Polygon mode
|
||||
* associated commands:
|
||||
* PM2 End polygon mode
|
||||
* FP Fill polygon
|
||||
* EP Draw polygon outline
|
||||
*
|
||||
* PR (Plot Relative): Moves to the relative position specified and sets relative mode
|
||||
* for future PU and PD commands.
|
||||
* If no arguments follow the command, only relative mode is set.
|
||||
|
@ -121,7 +126,7 @@
|
|||
* PS (Paper Size):
|
||||
* PS {n};
|
||||
*
|
||||
* PT (Pen Thickness):
|
||||
* PT (Pen Thickness): in mm
|
||||
* PT {l};
|
||||
*
|
||||
* PU (Pen Up): Executes <current pen> pen then moves to the requested position
|
||||
|
@ -178,8 +183,8 @@
|
|||
*
|
||||
* VS (Velocity Select):
|
||||
* VS {v {, n}};
|
||||
* v [1 .. 40]
|
||||
* n [1 .. 8, je nach Ausstattung]
|
||||
* v [1 .. 40] in cm/s
|
||||
* n [1 .. 8]
|
||||
*
|
||||
* XT (X Tick):
|
||||
* XT;
|
||||
|
@ -197,6 +202,13 @@
|
|||
#include <plot_common.h>
|
||||
#include <macros.h>
|
||||
#include <kicad_string.h>
|
||||
#include <convert_basic_shapes_to_polygon.h>
|
||||
|
||||
// The hpgl command to close a polygon def, fill it and plot outline:
|
||||
// PM 2; ends the polygon definition and closes it if not closed
|
||||
// FP; fills the polygon
|
||||
// EP; draws the polygon outline. It usually gives a better look to the filled polygon
|
||||
static const char hpgl_end_polygon_cmd[] = "PM 2; FP; EP;\n";
|
||||
|
||||
// HPGL scale factor (1 PLU = 1/40mm = 25 micrometers)
|
||||
static const double PLUsPERDECIMIL = 0.102041;
|
||||
|
@ -206,7 +218,6 @@ HPGL_PLOTTER::HPGL_PLOTTER()
|
|||
SetPenSpeed( 40 ); // Default pen speed = 40 cm/s; Pen speed is *always* in cm
|
||||
SetPenNumber( 1 ); // Default pen num = 1
|
||||
SetPenDiameter( 0.0 );
|
||||
SetPenOverlap( 0.0 );
|
||||
}
|
||||
|
||||
void HPGL_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
|
||||
|
@ -223,8 +234,6 @@ void HPGL_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
|
|||
paperSize.y *= 10.0 * aIusPerDecimil;
|
||||
SetDefaultLineWidth( 0 ); // HPGL has pen sizes instead
|
||||
m_plotMirror = aMirror;
|
||||
penOverlap = 0;
|
||||
penDiameter = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -235,6 +244,11 @@ bool HPGL_PLOTTER::StartPlot()
|
|||
{
|
||||
wxASSERT( outputFile );
|
||||
fprintf( outputFile, "IN;VS%d;PU;PA;SP%d;\n", penSpeed, penNumber );
|
||||
|
||||
// Set HPGL Pen Thickness (in mm) (usefull in polygon fill command)
|
||||
double penThicknessMM = userToDeviceSize( penDiameter )/40;
|
||||
fprintf( outputFile, "PT %.1f;\n", penThicknessMM );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -252,6 +266,11 @@ bool HPGL_PLOTTER::EndPlot()
|
|||
}
|
||||
|
||||
|
||||
void HPGL_PLOTTER::SetPenDiameter( double diameter )
|
||||
{
|
||||
penDiameter = diameter;
|
||||
}
|
||||
|
||||
/**
|
||||
* HPGL rectangle: fill not supported
|
||||
*/
|
||||
|
@ -265,14 +284,22 @@ void HPGL_PLOTTER::Rect( const wxPoint& p1, const wxPoint& p2, FILL_T fill, int
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* HPGL circle: fill not supported
|
||||
*/
|
||||
// HPGL circle
|
||||
void HPGL_PLOTTER::Circle( const wxPoint& centre, int diameter, FILL_T fill,
|
||||
int width )
|
||||
{
|
||||
wxASSERT( outputFile );
|
||||
double radius = userToDeviceSize( diameter / 2 );
|
||||
SetCurrentLineWidth( width );
|
||||
|
||||
if( fill == FILLED_SHAPE )
|
||||
{
|
||||
// Draw the filled area
|
||||
MoveTo( centre );
|
||||
fprintf( outputFile, "PM 0; CI %g;\n", radius );
|
||||
fprintf( outputFile, hpgl_end_polygon_cmd ); // Close, fill polygon and draw outlines
|
||||
PenFinish();
|
||||
}
|
||||
|
||||
if( radius > 0 )
|
||||
{
|
||||
|
@ -284,8 +311,9 @@ void HPGL_PLOTTER::Circle( const wxPoint& centre, int diameter, FILL_T fill,
|
|||
|
||||
|
||||
/**
|
||||
* HPGL polygon: fill not supported (but closed, at least)
|
||||
* HPGL polygon:
|
||||
*/
|
||||
|
||||
void HPGL_PLOTTER::PlotPoly( const std::vector<wxPoint>& aCornerList,
|
||||
FILL_T aFill, int aWidth )
|
||||
{
|
||||
|
@ -293,13 +321,31 @@ void HPGL_PLOTTER::PlotPoly( const std::vector<wxPoint>& aCornerList,
|
|||
return;
|
||||
|
||||
SetCurrentLineWidth( aWidth );
|
||||
|
||||
MoveTo( aCornerList[0] );
|
||||
|
||||
if( aFill == FILLED_SHAPE )
|
||||
{
|
||||
// Draw the filled area
|
||||
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH );
|
||||
fprintf( outputFile, "PM 0;\n" ); // Start polygon
|
||||
|
||||
for( unsigned ii = 1; ii < aCornerList.size(); ++ii )
|
||||
LineTo( aCornerList[ii] );
|
||||
|
||||
int ii = aCornerList.size() - 1;
|
||||
|
||||
if( aCornerList[ii] != aCornerList[0] )
|
||||
LineTo( aCornerList[0] );
|
||||
|
||||
fprintf( outputFile, hpgl_end_polygon_cmd ); // Close, fill polygon and draw outlines
|
||||
}
|
||||
else
|
||||
{
|
||||
// Plot only the polygon outline.
|
||||
for( unsigned ii = 1; ii < aCornerList.size(); ii++ )
|
||||
LineTo( aCornerList[ii] );
|
||||
|
||||
// Close polygon if filled.
|
||||
// Always close polygon if filled.
|
||||
if( aFill )
|
||||
{
|
||||
int ii = aCornerList.size() - 1;
|
||||
|
@ -307,6 +353,7 @@ void HPGL_PLOTTER::PlotPoly( const std::vector<wxPoint>& aCornerList,
|
|||
if( aCornerList[ii] != aCornerList[0] )
|
||||
LineTo( aCornerList[0] );
|
||||
}
|
||||
}
|
||||
|
||||
PenFinish();
|
||||
}
|
||||
|
@ -455,7 +502,7 @@ void HPGL_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, double
|
|||
int deltaxy, cx, cy;
|
||||
wxSize size( aSize );
|
||||
|
||||
/* The pad is reduced to an oval with size.y > size.x
|
||||
/* The pad will be drawn as an oblong shape with size.y > size.x
|
||||
* (Oval vertical orientation 0)
|
||||
*/
|
||||
if( size.x > size.y )
|
||||
|
@ -477,7 +524,7 @@ void HPGL_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, double
|
|||
RotatePoint( &cx, &cy, orient );
|
||||
FlashPadCircle( wxPoint( cx + pos.x, cy + pos.y ), size.x, trace_mode );
|
||||
}
|
||||
else // Plot in SKETCH mode.
|
||||
else // Plot in outline mode.
|
||||
{
|
||||
sketchOval( pos, size, orient, KiROUND( penDiameter ) );
|
||||
}
|
||||
|
@ -492,29 +539,35 @@ void HPGL_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre,
|
|||
wxASSERT( outputFile );
|
||||
DPOINT pos_dev = userToDeviceCoordinates( pos );
|
||||
|
||||
int delta = KiROUND( penDiameter - penOverlap );
|
||||
int radius = ( diametre - KiROUND( penDiameter ) ) / 2;
|
||||
int radius = diametre / 2;
|
||||
|
||||
if( trace_mode == FILLED )
|
||||
{
|
||||
// if filled mode, the pen diameter is removed from diameter
|
||||
// to keep the pad size
|
||||
radius -= KiROUND( penDiameter ) / 2;
|
||||
}
|
||||
|
||||
if( radius < 0 )
|
||||
radius = 0;
|
||||
|
||||
double rsize = userToDeviceSize( radius );
|
||||
|
||||
fprintf( outputFile, "PA %.0f,%.0f;CI %.0f;\n",
|
||||
pos_dev.x, pos_dev.y, rsize );
|
||||
|
||||
if( trace_mode == FILLED ) // Plot in filled mode.
|
||||
{
|
||||
if( delta > 0 )
|
||||
// A filled polygon uses always the current point to start the polygon.
|
||||
// Gives a correct current starting point for the circle
|
||||
MoveTo( wxPoint( pos.x+radius, pos.y ) );
|
||||
// Plot filled area and its outline
|
||||
fprintf( outputFile, "PM 0; PA %.0f,%.0f;CI %.0f;%s",
|
||||
pos_dev.x, pos_dev.y, rsize, hpgl_end_polygon_cmd );
|
||||
}
|
||||
else
|
||||
{
|
||||
while( (radius -= delta ) >= 0 )
|
||||
{
|
||||
rsize = userToDeviceSize( radius );
|
||||
// Draw outline only:
|
||||
fprintf( outputFile, "PA %.0f,%.0f;CI %.0f;\n",
|
||||
pos_dev.x, pos_dev.y, rsize );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PenFinish();
|
||||
}
|
||||
|
@ -523,113 +576,92 @@ void HPGL_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre,
|
|||
void HPGL_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& padsize,
|
||||
double orient, EDA_DRAW_MODE_T trace_mode )
|
||||
{
|
||||
wxASSERT( outputFile );
|
||||
wxSize size;
|
||||
int delta;
|
||||
int ox, oy, fx, fy;
|
||||
// Build rect polygon:
|
||||
std::vector<wxPoint> corners;
|
||||
|
||||
size.x = padsize.x / 2;
|
||||
size.y = padsize.y / 2;
|
||||
|
||||
size.x = (padsize.x - (int) penDiameter) / 2;
|
||||
size.y = (padsize.y - (int) penDiameter) / 2;
|
||||
|
||||
if( size.x < 0 )
|
||||
size.x = 0;
|
||||
|
||||
if( size.y < 0 )
|
||||
size.y = 0;
|
||||
|
||||
// If a dimension is zero, the trace is reduced to 1 line.
|
||||
if( size.x == 0 )
|
||||
{
|
||||
ox = pos.x;
|
||||
oy = pos.y - size.y;
|
||||
RotatePoint( &ox, &oy, pos.x, pos.y, orient );
|
||||
fx = pos.x;
|
||||
fy = pos.y + size.y;
|
||||
RotatePoint( &fx, &fy, pos.x, pos.y, orient );
|
||||
MoveTo( wxPoint( ox, oy ) );
|
||||
FinishTo( wxPoint( fx, fy ) );
|
||||
return;
|
||||
}
|
||||
|
||||
if( size.y == 0 )
|
||||
{
|
||||
ox = pos.x - size.x;
|
||||
oy = pos.y;
|
||||
RotatePoint( &ox, &oy, pos.x, pos.y, orient );
|
||||
fx = pos.x + size.x;
|
||||
fy = pos.y;
|
||||
RotatePoint( &fx, &fy, pos.x, pos.y, orient );
|
||||
MoveTo( wxPoint( ox, oy ) );
|
||||
FinishTo( wxPoint( fx, fy ) );
|
||||
return;
|
||||
}
|
||||
|
||||
ox = pos.x - size.x;
|
||||
oy = pos.y - size.y;
|
||||
RotatePoint( &ox, &oy, pos.x, pos.y, orient );
|
||||
MoveTo( wxPoint( ox, oy ) );
|
||||
|
||||
fx = pos.x - size.x;
|
||||
fy = pos.y + size.y;
|
||||
RotatePoint( &fx, &fy, pos.x, pos.y, orient );
|
||||
LineTo( wxPoint( fx, fy ) );
|
||||
|
||||
fx = pos.x + size.x;
|
||||
fy = pos.y + size.y;
|
||||
RotatePoint( &fx, &fy, pos.x, pos.y, orient );
|
||||
LineTo( wxPoint( fx, fy ) );
|
||||
|
||||
fx = pos.x + size.x;
|
||||
fy = pos.y - size.y;
|
||||
RotatePoint( &fx, &fy, pos.x, pos.y, orient );
|
||||
LineTo( wxPoint( fx, fy ) );
|
||||
|
||||
FinishTo( wxPoint( ox, oy ) );
|
||||
int dx = padsize.x / 2;
|
||||
int dy = padsize.y / 2;
|
||||
|
||||
if( trace_mode == FILLED )
|
||||
{
|
||||
// Plot in filled mode.
|
||||
delta = (int) (penDiameter - penOverlap);
|
||||
|
||||
if( delta > 0 )
|
||||
while( (size.x > 0) && (size.y > 0) )
|
||||
{
|
||||
size.x -= delta;
|
||||
size.y -= delta;
|
||||
|
||||
if( size.x < 0 )
|
||||
size.x = 0;
|
||||
|
||||
if( size.y < 0 )
|
||||
size.y = 0;
|
||||
|
||||
ox = pos.x - size.x;
|
||||
oy = pos.y - size.y;
|
||||
RotatePoint( &ox, &oy, pos.x, pos.y, orient );
|
||||
MoveTo( wxPoint( ox, oy ) );
|
||||
|
||||
fx = pos.x - size.x;
|
||||
fy = pos.y + size.y;
|
||||
RotatePoint( &fx, &fy, pos.x, pos.y, orient );
|
||||
LineTo( wxPoint( fx, fy ) );
|
||||
|
||||
fx = pos.x + size.x;
|
||||
fy = pos.y + size.y;
|
||||
RotatePoint( &fx, &fy, pos.x, pos.y, orient );
|
||||
LineTo( wxPoint( fx, fy ) );
|
||||
|
||||
fx = pos.x + size.x;
|
||||
fy = pos.y - size.y;
|
||||
RotatePoint( &fx, &fy, pos.x, pos.y, orient );
|
||||
LineTo( wxPoint( fx, fy ) );
|
||||
|
||||
FinishTo( wxPoint( ox, oy ) );
|
||||
// in filled mode, the pen diameter is removed from size
|
||||
// to compensate the extra size due to this pen size
|
||||
dx -= KiROUND( penDiameter ) / 2;
|
||||
dx = std::max( dx, 0);
|
||||
dy -= KiROUND( penDiameter ) / 2;
|
||||
dy = std::max( dy, 0);
|
||||
}
|
||||
|
||||
|
||||
corners.push_back( wxPoint( - dx, - dy ) );
|
||||
corners.push_back( wxPoint( - dx, + dy ) );
|
||||
corners.push_back( wxPoint( + dx, + dy ) );
|
||||
corners.push_back( wxPoint( + dx, - dy ) );
|
||||
|
||||
|
||||
for( unsigned ii = 0; ii < corners.size(); ii++ )
|
||||
{
|
||||
RotatePoint( &corners[ii], orient );
|
||||
corners[ii] += pos;
|
||||
}
|
||||
|
||||
PlotPoly( corners, trace_mode == FILLED ? FILLED_SHAPE : NO_FILL );
|
||||
}
|
||||
|
||||
|
||||
void HPGL_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
int aCornerRadius, double aOrient,
|
||||
EDA_DRAW_MODE_T aTraceMode )
|
||||
{
|
||||
SHAPE_POLY_SET outline;
|
||||
const int segmentToCircleCount = 32;
|
||||
|
||||
wxSize size = aSize;
|
||||
|
||||
if( aTraceMode == FILLED )
|
||||
{
|
||||
// in filled mode, the pen diameter is removed from size
|
||||
// to keep the pad size
|
||||
size.x -= KiROUND( penDiameter ) / 2;
|
||||
size.x = std::max( size.x, 0);
|
||||
size.y -= KiROUND( penDiameter ) / 2;
|
||||
size.y = std::max( size.y, 0);
|
||||
|
||||
// keep aCornerRadius to a value < min size x,y < 2:
|
||||
aCornerRadius = std::min( aCornerRadius, std::min( size.x, size.y ) /2 );
|
||||
}
|
||||
|
||||
TransformRoundRectToPolygon( outline, aPadPos, size, aOrient,
|
||||
aCornerRadius, segmentToCircleCount );
|
||||
|
||||
// TransformRoundRectToPolygon creates only one convex polygon
|
||||
std::vector< wxPoint > cornerList;
|
||||
cornerList.reserve( segmentToCircleCount + 4 );
|
||||
SHAPE_LINE_CHAIN& poly = outline.Outline( 0 );
|
||||
|
||||
for( int ii = 0; ii < poly.PointCount(); ++ii )
|
||||
cornerList.push_back( wxPoint( poly.Point( ii ).x, poly.Point( ii ).y ) );
|
||||
|
||||
PlotPoly( cornerList, aTraceMode == FILLED ? FILLED_SHAPE : NO_FILL );
|
||||
}
|
||||
|
||||
void HPGL_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
SHAPE_POLY_SET* aPolygons,
|
||||
EDA_DRAW_MODE_T aTraceMode )
|
||||
{
|
||||
std::vector< wxPoint > cornerList;
|
||||
|
||||
for( int cnt = 0; cnt < aPolygons->OutlineCount(); ++cnt )
|
||||
{
|
||||
SHAPE_LINE_CHAIN& poly = aPolygons->Outline( cnt );
|
||||
|
||||
cornerList.clear();
|
||||
cornerList.reserve( poly.PointCount() );
|
||||
|
||||
for( int ii = 1; ii < poly.PointCount(); ++ii )
|
||||
cornerList.push_back( wxPoint( poly.Point( ii ).x, poly.Point( ii ).y ) );
|
||||
|
||||
PlotPoly( cornerList, aTraceMode == FILLED ? FILLED_SHAPE : NO_FILL );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -637,105 +669,16 @@ 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;
|
||||
|
||||
move = KiROUND( penDiameter );
|
||||
|
||||
for( int ii = 0; ii < 4; ii++ )
|
||||
polygone[ii] = aCorners[ii];
|
||||
|
||||
// polygone[0] is assumed the lower left
|
||||
// polygone[1] is assumed the upper left
|
||||
// polygone[2] is assumed the upper right
|
||||
// polygone[3] is assumed the lower right
|
||||
|
||||
// Plot the outline:
|
||||
for( int ii = 0; ii < 4; ii++ )
|
||||
{
|
||||
coord[ii] = polygone[ii];
|
||||
RotatePoint( &coord[ii], aPadOrient );
|
||||
coord[ii] += aPadPos;
|
||||
}
|
||||
|
||||
MoveTo( coord[0] );
|
||||
LineTo( coord[1] );
|
||||
LineTo( coord[2] );
|
||||
LineTo( coord[3] );
|
||||
FinishTo( coord[0] );
|
||||
|
||||
// Fill shape:
|
||||
if( aTrace_Mode == FILLED )
|
||||
{
|
||||
// TODO: replace this par the HPGL plot polygon.
|
||||
int jj;
|
||||
// Fill the shape
|
||||
move = KiROUND( penDiameter - penOverlap );
|
||||
// Calculate fill height.
|
||||
|
||||
if( polygone[0].y == polygone[3].y ) // Horizontal
|
||||
{
|
||||
jj = polygone[3].y - (int) ( penDiameter + ( 2 * penOverlap ) );
|
||||
}
|
||||
else // vertical
|
||||
{
|
||||
jj = polygone[3].x - (int) ( penDiameter + ( 2 * penOverlap ) );
|
||||
}
|
||||
|
||||
// Calculation of dd = number of segments was traced to fill.
|
||||
jj = jj / (int) ( penDiameter - penOverlap );
|
||||
|
||||
// Trace the outline.
|
||||
for( ; jj > 0; jj-- )
|
||||
{
|
||||
polygone[0].x += move;
|
||||
polygone[0].y -= move;
|
||||
polygone[1].x += move;
|
||||
polygone[1].y += move;
|
||||
polygone[2].x -= move;
|
||||
polygone[2].y += move;
|
||||
polygone[3].x -= move;
|
||||
polygone[3].y -= move;
|
||||
|
||||
// Test for crossed vertexes.
|
||||
if( polygone[0].x > polygone[3].x ) /* X axis intersection on
|
||||
* vertexes 0 and 3 */
|
||||
{
|
||||
polygone[0].x = polygone[3].x = 0;
|
||||
}
|
||||
|
||||
if( polygone[1].x > polygone[2].x ) /* X axis intersection on
|
||||
* vertexes 1 and 2 */
|
||||
{
|
||||
polygone[1].x = polygone[2].x = 0;
|
||||
}
|
||||
|
||||
if( polygone[1].y > polygone[0].y ) /* Y axis intersection on
|
||||
* vertexes 0 and 1 */
|
||||
{
|
||||
polygone[0].y = polygone[1].y = 0;
|
||||
}
|
||||
|
||||
if( polygone[2].y > polygone[3].y ) /* Y axis intersection on
|
||||
* vertexes 2 and 3 */
|
||||
{
|
||||
polygone[2].y = polygone[3].y = 0;
|
||||
}
|
||||
std::vector< wxPoint > cornerList;
|
||||
cornerList.reserve( 4 );
|
||||
|
||||
for( int ii = 0; ii < 4; ii++ )
|
||||
{
|
||||
coord[ii] = polygone[ii];
|
||||
RotatePoint( &coord[ii], aPadOrient );
|
||||
coord[ii] += aPadPos;
|
||||
wxPoint coord( aCorners[ii] );
|
||||
RotatePoint( &coord, aPadOrient );
|
||||
coord += aPadPos;
|
||||
cornerList.push_back( coord );
|
||||
}
|
||||
|
||||
MoveTo( coord[0] );
|
||||
LineTo( coord[1] );
|
||||
LineTo( coord[2] );
|
||||
LineTo( coord[3] );
|
||||
FinishTo( coord[0] );
|
||||
}
|
||||
}
|
||||
PlotPoly( cornerList, aTrace_Mode == FILLED ? FILLED_SHAPE : NO_FILL );
|
||||
}
|
||||
|
|
|
@ -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) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2016 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
|
||||
|
@ -35,6 +35,7 @@
|
|||
#include <plot_common.h>
|
||||
#include <macros.h>
|
||||
#include <kicad_string.h>
|
||||
#include <convert_basic_shapes_to_polygon.h>
|
||||
|
||||
/* Forward declaration of the font width metrics
|
||||
(yes extern! this is the way to forward declare variables */
|
||||
|
@ -188,6 +189,76 @@ void PSLIKE_PLOTTER::FlashPadRect( const wxPoint& aPadPos, const wxSize& aSize,
|
|||
GetCurrentLineWidth() );
|
||||
}
|
||||
|
||||
void PSLIKE_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
int aCornerRadius, double aOrient,
|
||||
EDA_DRAW_MODE_T aTraceMode )
|
||||
{
|
||||
wxSize size( aSize );
|
||||
|
||||
if( aTraceMode == FILLED )
|
||||
SetCurrentLineWidth( 0 );
|
||||
else
|
||||
{
|
||||
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH );
|
||||
size.x -= GetCurrentLineWidth();
|
||||
size.y -= GetCurrentLineWidth();
|
||||
aCornerRadius -= GetCurrentLineWidth()/2;
|
||||
}
|
||||
|
||||
|
||||
SHAPE_POLY_SET outline;
|
||||
const int segmentToCircleCount = 64;
|
||||
TransformRoundRectToPolygon( outline, aPadPos, size, aOrient,
|
||||
aCornerRadius, segmentToCircleCount );
|
||||
|
||||
std::vector< wxPoint > cornerList;
|
||||
cornerList.reserve( segmentToCircleCount + 5 );
|
||||
// TransformRoundRectToPolygon creates only one convex polygon
|
||||
SHAPE_LINE_CHAIN& poly = outline.Outline( 0 );
|
||||
|
||||
for( int ii = 0; ii < poly.PointCount(); ++ii )
|
||||
cornerList.push_back( wxPoint( poly.Point( ii ).x, poly.Point( ii ).y ) );
|
||||
|
||||
// Close polygon
|
||||
cornerList.push_back( cornerList[0] );
|
||||
|
||||
PlotPoly( cornerList, ( aTraceMode == FILLED ) ? FILLED_SHAPE : NO_FILL,
|
||||
GetCurrentLineWidth() );
|
||||
}
|
||||
|
||||
void PSLIKE_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
SHAPE_POLY_SET* aPolygons,
|
||||
EDA_DRAW_MODE_T aTraceMode )
|
||||
{
|
||||
wxSize size( aSize );
|
||||
|
||||
if( aTraceMode == FILLED )
|
||||
SetCurrentLineWidth( 0 );
|
||||
else
|
||||
{
|
||||
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH );
|
||||
size.x -= GetCurrentLineWidth();
|
||||
size.y -= GetCurrentLineWidth();
|
||||
}
|
||||
|
||||
|
||||
std::vector< wxPoint > cornerList;
|
||||
|
||||
for( int cnt = 0; cnt < aPolygons->OutlineCount(); ++cnt )
|
||||
{
|
||||
SHAPE_LINE_CHAIN& poly = aPolygons->Outline( cnt );
|
||||
cornerList.clear();
|
||||
|
||||
for( int ii = 0; ii < poly.PointCount(); ++ii )
|
||||
cornerList.push_back( wxPoint( poly.Point( ii ).x, poly.Point( ii ).y ) );
|
||||
|
||||
// Close polygon
|
||||
cornerList.push_back( cornerList[0] );
|
||||
|
||||
PlotPoly( cornerList, ( aTraceMode == FILLED ) ? FILLED_SHAPE : NO_FILL,
|
||||
GetCurrentLineWidth() );
|
||||
}
|
||||
}
|
||||
|
||||
void PSLIKE_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCorners,
|
||||
double aPadOrient, EDA_DRAW_MODE_T aTraceMode )
|
||||
|
|
|
@ -64,6 +64,71 @@ void TransformCircleToPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
|||
}
|
||||
}
|
||||
|
||||
/* Returns the centers of the rounded corners of a rect.
|
||||
*/
|
||||
void GetRoundRectCornerCenters( wxPoint aCenters[4], int aRadius,
|
||||
const wxPoint& aPosition, const wxSize& aSize, double aRotation )
|
||||
{
|
||||
wxSize size( aSize/2 );
|
||||
|
||||
size.x -= aRadius;
|
||||
size.y -= aRadius;
|
||||
|
||||
aCenters[0].x = -size.x;
|
||||
aCenters[0].y = size.y;
|
||||
|
||||
aCenters[1].x = size.x;
|
||||
aCenters[1].y = size.y;
|
||||
|
||||
aCenters[2].x = size.x;
|
||||
aCenters[2].y = -size.y;
|
||||
|
||||
aCenters[3].x = -size.x;
|
||||
aCenters[3].y = -size.y;
|
||||
|
||||
// Rotate the polygon
|
||||
if( aRotation )
|
||||
{
|
||||
for( int ii = 0; ii < 4; ii++ )
|
||||
RotatePoint( &aCenters[ii], aRotation );
|
||||
}
|
||||
|
||||
// move the polygon to the position
|
||||
for( int ii = 0; ii < 4; ii++ )
|
||||
aCenters[ii] += aPosition;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function TransformRoundRectToPolygon
|
||||
* convert a rectangle with rounded corners to a polygon
|
||||
* Convert arcs to multiple straight lines
|
||||
* @param aCornerBuffer = a buffer to store the polygon
|
||||
* @param aPosition = the coordinate of the center of the rectangle
|
||||
* @param aSize = the size of the rectangle
|
||||
* @param aRadius = radius of rounded corners
|
||||
* @param aRotation = rotation in 0.1 degrees of the rectangle
|
||||
* @param aCircleToSegmentsCount = the number of segments to approximate a circle
|
||||
*/
|
||||
void TransformRoundRectToPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
||||
const wxPoint& aPosition, const wxSize& aSize,
|
||||
double aRotation, int aCornerRadius,
|
||||
int aCircleToSegmentsCount )
|
||||
{
|
||||
wxPoint corners[4];
|
||||
GetRoundRectCornerCenters( corners, aCornerRadius, aPosition, aSize, aRotation );
|
||||
|
||||
SHAPE_POLY_SET outline;
|
||||
outline.NewOutline();
|
||||
|
||||
for( int ii = 0; ii < 4; ++ii )
|
||||
outline.Append( corners[ii].x, corners[ii].y );
|
||||
|
||||
outline.Inflate( aCornerRadius, aCircleToSegmentsCount );
|
||||
|
||||
// Add the outline:
|
||||
aCornerBuffer.Append( outline );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function TransformRoundedEndsSegmentToPolygon
|
||||
|
|
|
@ -181,6 +181,14 @@ static LANGUAGE_DESCR s_Languages[] =
|
|||
_( "Slovenian" )
|
||||
},
|
||||
|
||||
// Slovenian language
|
||||
{
|
||||
wxLANGUAGE_SLOVAK,
|
||||
ID_LANGUAGE_SLOVAK,
|
||||
lang_sk_xpm,
|
||||
_( "Slovak" )
|
||||
},
|
||||
|
||||
// Hungarian language
|
||||
{
|
||||
wxLANGUAGE_HUNGARIAN,
|
||||
|
|
|
@ -205,6 +205,8 @@ void WORKSHEET_VIEWITEM::drawBorder( GAL* aGal ) const
|
|||
m_pageInfo->GetHeightMils() * 25400 );
|
||||
|
||||
aGal->SetIsStroke( true );
|
||||
// Use a gray color for the border color
|
||||
aGal->SetStrokeColor( COLOR4D( 0.4, 0.4, 0.4, 1.0 ) );
|
||||
aGal->SetIsFill( false );
|
||||
aGal->DrawRectangle( origin, end );
|
||||
}
|
||||
|
|
|
@ -66,7 +66,9 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
|
|||
|
||||
// Save the footprints back into eeschema
|
||||
AddMenuItem( filesMenu, wxID_SAVE,
|
||||
_( "&Save Edits\tCtrl+S" ), SAVE_HLP_MSG, KiBitmap( save_xpm ) );
|
||||
_( "&Save Edits\tCtrl+S" ),
|
||||
_( "Save footprint association in schematic component footprint fields" ),
|
||||
KiBitmap( save_xpm ) );
|
||||
|
||||
// Separator
|
||||
filesMenu->AppendSeparator();
|
||||
|
@ -110,9 +112,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
|
|||
// Separator
|
||||
preferencesMenu->AppendSeparator();
|
||||
AddMenuItem( preferencesMenu, ID_SAVE_PROJECT,
|
||||
_( "&Save Project File" ),
|
||||
_( "Save changes to the project configuration file" ),
|
||||
KiBitmap( save_setup_xpm ) );
|
||||
_( "&Save Project File" ), SAVE_HLP_MSG, KiBitmap( save_setup_xpm ) );
|
||||
|
||||
// Menu Help:
|
||||
wxMenu* helpMenu = new wxMenu;
|
||||
|
@ -138,7 +138,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
|
|||
KiBitmap( info_xpm ) );
|
||||
|
||||
// Create the menubar and append all submenus
|
||||
menuBar->Append( filesMenu, _( "&File" ) );
|
||||
menuBar->Append( filesMenu, _( "&Save" ) );
|
||||
menuBar->Append( preferencesMenu, _( "&Preferences" ) );
|
||||
menuBar->Append( helpMenu, _( "&Help" ) );
|
||||
|
||||
|
|
|
@ -327,7 +327,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
|
||||
Zoom_Automatique( false );
|
||||
SetSheetNumberAndCount();
|
||||
|
||||
g_RootSheet->SetPageNumbers();
|
||||
m_canvas->Refresh( true );
|
||||
|
||||
return true;
|
||||
|
|
|
@ -240,7 +240,6 @@ bool DIALOG_PLOT_SCHEMATIC::Plot_1_Page_HPGL( const wxString& aFileName,
|
|||
// Pen num and pen speed are not initialized here.
|
||||
// Default HPGL driver values are used
|
||||
plotter->SetPenDiameter( m_HPGLPenSize );
|
||||
plotter->SetPenOverlap( m_HPGLPenSize / 4 );
|
||||
plotter->StartPlot();
|
||||
|
||||
plotter->SetColor( BLACK );
|
||||
|
|
|
@ -56,6 +56,7 @@ SCH_SHEET::SCH_SHEET( const wxPoint& pos ) :
|
|||
m_screen = NULL;
|
||||
m_name.Printf( wxT( "Sheet%8.8lX" ), (long) m_TimeStamp );
|
||||
m_fileName.Printf( wxT( "file%8.8lX.sch" ), (long) m_TimeStamp );
|
||||
m_number = 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -72,6 +73,7 @@ SCH_SHEET::SCH_SHEET( const SCH_SHEET& aSheet ) :
|
|||
m_name = aSheet.m_name;
|
||||
m_fileName = aSheet.m_fileName;
|
||||
m_pins = aSheet.m_pins;
|
||||
m_number = aSheet.m_number;
|
||||
|
||||
for( size_t i = 0; i < m_pins.size(); i++ )
|
||||
m_pins[i].SetParent( this );
|
||||
|
@ -182,11 +184,6 @@ bool SCH_SHEET::Load( LINE_READER& aLine, wxString& aErrorMsg )
|
|||
SCH_SHEET_PIN* sheetPin;
|
||||
char* ptcar;
|
||||
|
||||
if( IsRootSheet() )
|
||||
m_number = 1;
|
||||
else
|
||||
m_number = GetRootSheet()->CountSheets();
|
||||
|
||||
SetTimeStamp( GetNewTimeStamp() );
|
||||
|
||||
// sheets are added to the GetDrawItems() like other schematic components.
|
||||
|
@ -1166,7 +1163,39 @@ void SCH_SHEET::Plot( PLOTTER* aPlotter )
|
|||
}
|
||||
|
||||
|
||||
unsigned SCH_SHEET::GetSheets( std::vector<const SCH_SHEET*>& aSheetList ) const
|
||||
void SCH_SHEET::SetPageNumbers()
|
||||
{
|
||||
int pageNumber = 1;
|
||||
std::vector< const SCH_SHEET* > sheets;
|
||||
|
||||
GetRootSheet()->GetSheets( sheets );
|
||||
|
||||
for( unsigned i = 0; i < sheets.size(); i++ )
|
||||
{
|
||||
const_cast< SCH_SHEET* >( sheets[i] )->m_number = pageNumber;
|
||||
pageNumber += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SCH_SHEET* SCH_SHEET::FindSheetByName( const wxString& aSheetName )
|
||||
{
|
||||
std::vector< const SCH_SHEET* > sheets;
|
||||
|
||||
GetSheets( sheets );
|
||||
|
||||
for( unsigned i = 0; i < sheets.size(); i++ )
|
||||
{
|
||||
if( sheets[i]->GetName().CmpNoCase( aSheetName ) == 0 )
|
||||
return const_cast< SCH_SHEET* >( sheets[i] );
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
unsigned SCH_SHEET::GetSheets( std::vector< const SCH_SHEET* >& aSheetList,
|
||||
bool aSortByPath ) const
|
||||
{
|
||||
// Sheet pointers must be unique.
|
||||
wxASSERT( find( aSheetList.begin(), aSheetList.end(), this ) == aSheetList.end() );
|
||||
|
@ -1183,6 +1212,9 @@ unsigned SCH_SHEET::GetSheets( std::vector<const SCH_SHEET*>& aSheetList ) const
|
|||
item = item->Next();
|
||||
}
|
||||
|
||||
if( aSortByPath )
|
||||
std::sort( aSheetList.begin(), aSheetList.end(), SortByPath() );
|
||||
|
||||
return aSheetList.size();
|
||||
}
|
||||
|
||||
|
@ -1225,7 +1257,7 @@ const SCH_SHEET* SCH_SHEET::GetRootSheet() const
|
|||
}
|
||||
|
||||
|
||||
void SCH_SHEET::GetPath( SCH_CONST_SHEETS& aSheetPath ) const
|
||||
void SCH_SHEET::GetPath( std::vector< const SCH_SHEET* >& aSheetPath ) const
|
||||
{
|
||||
aSheetPath.insert( aSheetPath.begin(), const_cast<SCH_SHEET*>( this ) );
|
||||
|
||||
|
@ -1579,7 +1611,7 @@ int SCH_SHEET::operator-( const SCH_SHEET& aRhs ) const
|
|||
if( this == &aRhs )
|
||||
return 0;
|
||||
|
||||
SCH_CONST_SHEETS lhsPath, rhsPath;
|
||||
std::vector< const SCH_SHEET* > lhsPath, rhsPath;
|
||||
|
||||
GetPath( lhsPath );
|
||||
aRhs.GetPath( rhsPath );
|
||||
|
|
|
@ -577,6 +577,25 @@ public:
|
|||
*/
|
||||
bool operator<( const SCH_SHEET& aRhs ) const;
|
||||
|
||||
/**
|
||||
* Structure SortByPath
|
||||
*
|
||||
* tests if \a aLhs is less than \a aRhs.
|
||||
*
|
||||
* @param aLhs is the left hand side reference to a #SCH_SHEET for comparison.
|
||||
* @param aRhs is the right hand side reference to a #SCH_SHEET for comparison.
|
||||
* @return true if \a aLhs is less than \a aRhs otherwise false.
|
||||
*/
|
||||
struct SortByPath
|
||||
{
|
||||
bool operator()( const SCH_SHEET* aLhs, const SCH_SHEET* aRhs )
|
||||
{
|
||||
wxCHECK( aLhs != NULL && aRhs != NULL, false );
|
||||
|
||||
return *aLhs < *aRhs;
|
||||
}
|
||||
};
|
||||
|
||||
int operator-( const SCH_SHEET& aRhs ) const;
|
||||
|
||||
wxPoint GetPosition() const { return m_pos; }
|
||||
|
@ -591,15 +610,45 @@ public:
|
|||
|
||||
EDA_ITEM* Clone() const;
|
||||
|
||||
/**
|
||||
* Function SetPageNumbers
|
||||
*
|
||||
* sets the page numbers for each sheet by load order.
|
||||
*
|
||||
* The root sheet is always used to set the page numbers no matter which sheet this
|
||||
* function is called. This function will only have meaning when loading legacy
|
||||
* schematics. The upcoming s-expression schematic file format will allow for user
|
||||
* defined page numbers.
|
||||
*/
|
||||
void SetPageNumbers();
|
||||
|
||||
/**
|
||||
* Function FindSheetByName
|
||||
*
|
||||
* searches this #SCH_SHEET and all of it's sub-sheets for a sheet named \a aSheetName.
|
||||
*
|
||||
* @param aSheetName is the name of the sheet to find.
|
||||
* @return a pointer to the sheet named \a aSheetName if found or NULL if not found.
|
||||
*/
|
||||
SCH_SHEET* FindSheetByName( const wxString& aSheetName );
|
||||
|
||||
/**
|
||||
* Function GetSheets
|
||||
*
|
||||
* add the point to #SCH_SHEET and all of it's sub-sheets to \a aSheetList.
|
||||
* add the pointers to the #SCH_SHEET and all of it's sub-sheets to \a aSheetList.
|
||||
*
|
||||
* By default no sorting is performed and the #SCH_SHEET pointers are add to the list
|
||||
* in the order they were loaded when the schematic was parse. When \a aSortByPath is
|
||||
* true, the list is sorted using the < operator which sort by path length then path
|
||||
* time stamps. This has the same sorting effect as the old SCH_SHEET_PATH::Cmp()
|
||||
* function.
|
||||
*
|
||||
* @param aSheetList is a reference to a set containing the #SCH_SHEET pointers.
|
||||
* @param aSortByPath true to sort by path. False for load order.
|
||||
* @return the number of #SCH_SHEET object pointers in \a aSheetList.
|
||||
*/
|
||||
unsigned GetSheets( std::vector<const SCH_SHEET*>& aSheetList ) const;
|
||||
unsigned GetSheets( std::vector< const SCH_SHEET* >& aSheetList,
|
||||
bool aSortByPath = false ) const;
|
||||
|
||||
/**
|
||||
* Function GetSheetPaths
|
||||
|
@ -647,7 +696,7 @@ public:
|
|||
* recurses up the parent branch up to the root sheet adding a pointer for each
|
||||
* parent sheet to \a aSheetPath.
|
||||
*
|
||||
* @param aSheetPath is a refernce to an #SCH_SHEETS object to populate.
|
||||
* @param aSheetPath is a refernce to an #SCH_SHEET object to populate.
|
||||
*/
|
||||
void GetPath( std::vector< const SCH_SHEET* >& aSheetPath ) const;
|
||||
|
||||
|
@ -797,9 +846,4 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
typedef std::vector< SCH_SHEET* > SCH_SHEETS;
|
||||
typedef std::vector< const SCH_SHEET* > SCH_CONST_SHEETS;
|
||||
typedef SCH_SHEETS::iterator SCH_SHEETS_ITER;
|
||||
typedef SCH_SHEETS::const_iterator SCH_SHEETS_CITER;
|
||||
|
||||
#endif /* SCH_SHEEET_H */
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2011-2015 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2015 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
|
||||
|
@ -294,30 +294,6 @@ bool SCH_SHEET_PATH::operator==( const SCH_SHEET_PATH& d1 ) const
|
|||
}
|
||||
|
||||
|
||||
int SCH_SHEET_PATH::FindSheet( const wxString& aFileName ) const
|
||||
{
|
||||
for( unsigned i = 0; i < m_numSheets; i++ )
|
||||
{
|
||||
if( m_sheets[i]->GetFileName().CmpNoCase( aFileName ) == 0 )
|
||||
return (int)i;
|
||||
}
|
||||
|
||||
return SHEET_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
SCH_SHEET* SCH_SHEET_PATH::FindSheetByName( const wxString& aSheetName )
|
||||
{
|
||||
for( unsigned i = 0; i < m_numSheets; i++ )
|
||||
{
|
||||
if( m_sheets[i]->GetName().CmpNoCase( aSheetName ) == 0 )
|
||||
return m_sheets[i];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************/
|
||||
/* Class SCH_SHEET_LIST to handle the list of Sheets in a hierarchy */
|
||||
/********************************************************************/
|
||||
|
@ -535,17 +511,3 @@ SCH_ITEM* SCH_SHEET_LIST::FindPreviousItem( KICAD_T aType, SCH_SHEET_PATH** aShe
|
|||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SCH_SHEET* SCH_SHEET_LIST::FindSheetByName( const wxString& aSheetName )
|
||||
{
|
||||
for( int i = 0; i < m_count; i++ )
|
||||
{
|
||||
SCH_SHEET* sheet = m_list[i].FindSheetByName( aSheetName );
|
||||
|
||||
if( sheet )
|
||||
return sheet;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -220,18 +220,6 @@ public:
|
|||
*/
|
||||
SCH_ITEM* FindPreviousItem( KICAD_T aType, SCH_ITEM* aLastItem = NULL, bool aWrap = false ) const;
|
||||
|
||||
int FindSheet( const wxString& aFileName ) const;
|
||||
|
||||
/**
|
||||
* Function FindSheetByName
|
||||
*
|
||||
* searches the #SCH_SHEET_PATH for a sheet named \a aSheetName.
|
||||
*
|
||||
* @param aSheetName is the name of the sheet to find.
|
||||
* @return a pointer to the sheet named \a aSheetName if found or NULL if not found.
|
||||
*/
|
||||
SCH_SHEET* FindSheetByName( const wxString& aSheetName );
|
||||
|
||||
SCH_SHEET_PATH& operator=( const SCH_SHEET_PATH& d1 );
|
||||
|
||||
bool operator==( const SCH_SHEET_PATH& d1 ) const;
|
||||
|
@ -375,16 +363,6 @@ public:
|
|||
SCH_ITEM* FindPreviousItem( KICAD_T aType, SCH_SHEET_PATH** aSheetFound = NULL,
|
||||
SCH_ITEM* aLastItem = NULL, bool aWrap = true );
|
||||
|
||||
/**
|
||||
* Function FindSheetByName
|
||||
*
|
||||
* searches the entire #SCH_SHEET_LIST for a sheet named \a aSheetName.
|
||||
*
|
||||
* @param aSheetName is the name of the sheet to find.
|
||||
* @return a pointer to the sheet named \a aSheetName if found or NULL if not found.
|
||||
*/
|
||||
SCH_SHEET* FindSheetByName( const wxString& aSheetName );
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
|
|
@ -86,7 +86,7 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, SCH_SHEET* aHierarchy )
|
|||
}
|
||||
|
||||
// Duplicate sheet names are not valid.
|
||||
const SCH_SHEET* sheet = hierarchy.FindSheetByName( dlg.GetSheetName() );
|
||||
const SCH_SHEET* sheet = g_RootSheet->FindSheetByName( dlg.GetSheetName() );
|
||||
|
||||
if( sheet && (sheet != aSheet) )
|
||||
{
|
||||
|
|
|
@ -291,6 +291,7 @@ EXTERN_BITMAP( lang_nl_xpm )
|
|||
EXTERN_BITMAP( lang_pl_xpm )
|
||||
EXTERN_BITMAP( lang_pt_xpm )
|
||||
EXTERN_BITMAP( lang_ru_xpm )
|
||||
EXTERN_BITMAP( lang_sk_xpm )
|
||||
EXTERN_BITMAP( lang_sl_xpm )
|
||||
EXTERN_BITMAP( language_xpm )
|
||||
EXTERN_BITMAP( layers_manager_xpm )
|
||||
|
|
|
@ -50,6 +50,34 @@ void TransformCircleToPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
|||
wxPoint aCenter, int aRadius,
|
||||
int aCircleToSegmentsCount );
|
||||
|
||||
/**
|
||||
* Helper function GetRoundRectCornerCenters
|
||||
* Has meaning only for rounded rect
|
||||
* Returns the centers of the rounded corners.
|
||||
* @param aPosition = position of the round rect
|
||||
* @param aSize = size of the of the round rect.
|
||||
* @param aRotation = rotation of the of the round rect
|
||||
* @param aCenters a buffer to store the 4 coordinates.
|
||||
*/
|
||||
void GetRoundRectCornerCenters( wxPoint aCenters[4], int aRadius,
|
||||
const wxPoint& aPosition, const wxSize& aSize, double aRotation );
|
||||
|
||||
/**
|
||||
* Function TransformRoundRectToPolygon
|
||||
* convert a rectangle with rounded corners to a polygon
|
||||
* Convert arcs to multiple straight lines
|
||||
* @param aCornerBuffer = a buffer to store the polygon
|
||||
* @param aPosition = the coordinate of the center of the rectangle
|
||||
* @param aSize = the size of the rectangle
|
||||
* @param aCornerRadius = radius of rounded corners
|
||||
* @param aRotation = rotation in 0.1 degrees of the rectangle
|
||||
* @param aCircleToSegmentsCount = the number of segments to approximate a circle
|
||||
*/
|
||||
void TransformRoundRectToPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
||||
const wxPoint& aPosition, const wxSize& aSize,
|
||||
double aRotation, int aCornerRadius,
|
||||
int aCircleToSegmentsCount );
|
||||
|
||||
/**
|
||||
* Function TransformRoundedEndsSegmentToPolygon
|
||||
* convert a segment with rounded ends to a polygon
|
||||
|
|
|
@ -138,6 +138,7 @@ enum main_id
|
|||
ID_LANGUAGE_PORTUGUESE,
|
||||
ID_LANGUAGE_ITALIAN,
|
||||
ID_LANGUAGE_SLOVENIAN,
|
||||
ID_LANGUAGE_SLOVAK,
|
||||
ID_LANGUAGE_HUNGARIAN,
|
||||
ID_LANGUAGE_POLISH,
|
||||
ID_LANGUAGE_CZECH,
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
#include <class_page_info.h>
|
||||
#include <eda_text.h> // FILL_T
|
||||
|
||||
class SHAPE_POLY_SET;
|
||||
|
||||
/**
|
||||
* Enum PlotFormat
|
||||
* is the set of supported output plot formats. They should be kept in order
|
||||
|
@ -280,6 +282,29 @@ public:
|
|||
virtual void FlashPadRect( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
double aPadOrient, EDA_DRAW_MODE_T aTraceMode ) = 0;
|
||||
|
||||
/**
|
||||
* virtual function FlashPadRoundRect
|
||||
* @param aPadPos Position of the shape (center of the rectangle
|
||||
* @param aSize = size of rounded rect
|
||||
* @param cornerRadius Radius of the rounded corners
|
||||
* @param aOrient The rotation of the shape
|
||||
* @param aTraceMode FILLED or SKETCH
|
||||
*/
|
||||
virtual void FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
int aCornerRadius, double aOrient,
|
||||
EDA_DRAW_MODE_T aTraceMode ) = 0;
|
||||
|
||||
/**
|
||||
* virtual function FlashPadCustom
|
||||
* @param aPadPos Position of the shape (center of the rectangle
|
||||
* @param aSize = size of round reference pad
|
||||
* @param aPolygons the shape as polygon set
|
||||
* @param aTraceMode FILLED or SKETCH
|
||||
*/
|
||||
virtual void FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
SHAPE_POLY_SET* aPolygons,
|
||||
EDA_DRAW_MODE_T aTraceMode ) = 0;
|
||||
|
||||
/** virtual function FlashPadTrapez
|
||||
* flash a trapezoidal pad
|
||||
* @param aPadPos = the position of the shape
|
||||
|
@ -504,15 +529,7 @@ public:
|
|||
penNumber = number;
|
||||
}
|
||||
|
||||
virtual void SetPenDiameter( double diameter )
|
||||
{
|
||||
penDiameter = diameter;
|
||||
}
|
||||
|
||||
virtual void SetPenOverlap( double overlap )
|
||||
{
|
||||
penOverlap = overlap;
|
||||
}
|
||||
virtual void SetPenDiameter( double diameter );
|
||||
|
||||
virtual void SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
|
||||
double aScale, bool aMirror );
|
||||
|
@ -534,6 +551,12 @@ public:
|
|||
EDA_DRAW_MODE_T trace_mode );
|
||||
virtual void FlashPadRect( const wxPoint& pos, const wxSize& size,
|
||||
double orient, EDA_DRAW_MODE_T trace_mode );
|
||||
virtual void FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
int aCornerRadius, double aOrient,
|
||||
EDA_DRAW_MODE_T aTraceMode );
|
||||
virtual void FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
SHAPE_POLY_SET* aPolygons,
|
||||
EDA_DRAW_MODE_T aTraceMode );
|
||||
virtual void FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCorners,
|
||||
double aPadOrient, EDA_DRAW_MODE_T aTrace_Mode );
|
||||
|
||||
|
@ -543,7 +566,6 @@ protected:
|
|||
int penSpeed;
|
||||
int penNumber;
|
||||
double penDiameter;
|
||||
double penOverlap;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -586,6 +608,12 @@ public:
|
|||
EDA_DRAW_MODE_T trace_mode );
|
||||
virtual void FlashPadRect( const wxPoint& pos, const wxSize& size,
|
||||
double orient, EDA_DRAW_MODE_T trace_mode );
|
||||
virtual void FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
int aCornerRadius, double aOrient,
|
||||
EDA_DRAW_MODE_T aTraceMode );
|
||||
virtual void FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
SHAPE_POLY_SET* aPolygons,
|
||||
EDA_DRAW_MODE_T aTraceMode );
|
||||
virtual void FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCorners,
|
||||
double aPadOrient, EDA_DRAW_MODE_T aTrace_Mode );
|
||||
|
||||
|
@ -942,14 +970,28 @@ public:
|
|||
EDA_DRAW_MODE_T trace_mode );
|
||||
|
||||
/**
|
||||
* Filled rect flashes are handled as aperture in the 90 degree positions only
|
||||
* Filled rect flashes are handled as aperture in the 0 90 180 or 270 degree orientation only
|
||||
* and as polygon for other orientations
|
||||
* TODO: always use flashed shapes (aperture macros)
|
||||
*/
|
||||
virtual void FlashPadRect( const wxPoint& pos, const wxSize& size,
|
||||
double orient, EDA_DRAW_MODE_T trace_mode );
|
||||
|
||||
/**
|
||||
* Roundrect pad at the moment are not handled as aperture, since
|
||||
* they require aperture macros
|
||||
* TODO: always use flashed shapes (aperture macros)
|
||||
*/
|
||||
virtual void FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
int aCornerRadius, double aOrient,
|
||||
EDA_DRAW_MODE_T aTraceMode );
|
||||
virtual void FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
SHAPE_POLY_SET* aPolygons,
|
||||
EDA_DRAW_MODE_T aTraceMode );
|
||||
/**
|
||||
* Trapezoidal pad at the moment are *never* handled as aperture, since
|
||||
* they require aperture macros
|
||||
* TODO: always use flashed shapes (aperture macros)
|
||||
*/
|
||||
virtual void FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCorners,
|
||||
double aPadOrient, EDA_DRAW_MODE_T aTrace_Mode );
|
||||
|
@ -1069,6 +1111,12 @@ public:
|
|||
EDA_DRAW_MODE_T trace_mode );
|
||||
virtual void FlashPadRect( const wxPoint& pos, const wxSize& size,
|
||||
double orient, EDA_DRAW_MODE_T trace_mode );
|
||||
virtual void FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
int aCornerRadius, double aOrient,
|
||||
EDA_DRAW_MODE_T aTraceMode );
|
||||
virtual void FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize,
|
||||
SHAPE_POLY_SET* aPolygons,
|
||||
EDA_DRAW_MODE_T aTraceMode );
|
||||
virtual void FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCorners,
|
||||
double aPadOrient, EDA_DRAW_MODE_T aTrace_Mode );
|
||||
|
||||
|
|
Binary file not shown.
|
@ -136,8 +136,6 @@ public:
|
|||
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
|
||||
#endif
|
||||
|
||||
//protected: @todo: is it just me?
|
||||
|
||||
wxPoint m_Start0; // Start point or center, relative to module origin, orient 0.
|
||||
wxPoint m_End0; // End point, relative to module origin, orient 0.
|
||||
};
|
||||
|
|
|
@ -56,7 +56,7 @@ TEXTE_MODULE::TEXTE_MODULE( MODULE* parent, TEXT_TYPE text_type ) :
|
|||
|
||||
m_Type = text_type;
|
||||
m_NoShow = false;
|
||||
// Set text tickness to a default value
|
||||
// Set text thickness to a default value
|
||||
m_Thickness = Millimeter2iu( 0.15 );
|
||||
SetLayer( F_SilkS );
|
||||
|
||||
|
|
|
@ -201,19 +201,6 @@ void DIALOG_COPPER_ZONE::initDialog()
|
|||
break;
|
||||
}
|
||||
|
||||
// Antipad and spokes are significant only for thermals
|
||||
if( m_settings.GetPadConnection() != PAD_ZONE_CONN_THERMAL &&
|
||||
m_settings.GetPadConnection() != PAD_ZONE_CONN_THT_THERMAL )
|
||||
{
|
||||
m_AntipadSizeValue->Enable( false );
|
||||
m_CopperWidthValue->Enable( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_AntipadSizeValue->Enable( true );
|
||||
m_CopperWidthValue->Enable( true );
|
||||
}
|
||||
|
||||
m_PriorityLevelCtrl->SetValue( m_settings.m_ZonePriority );
|
||||
|
||||
AddUnitSymbol( *m_AntipadSizeText, g_UserUnit );
|
||||
|
@ -578,19 +565,11 @@ void DIALOG_COPPER_ZONE::ExportSetupToOtherCopperZones( wxCommandEvent& event )
|
|||
|
||||
void DIALOG_COPPER_ZONE::OnPadsInZoneClick( wxCommandEvent& event )
|
||||
{
|
||||
switch( m_PadInZoneOpt->GetSelection() )
|
||||
{
|
||||
default:
|
||||
m_AntipadSizeValue->Enable( false );
|
||||
m_CopperWidthValue->Enable( false );
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 1:
|
||||
m_AntipadSizeValue->Enable( true );
|
||||
m_CopperWidthValue->Enable( true );
|
||||
break;
|
||||
}
|
||||
// Antipad and spokes are significant only for thermals
|
||||
// However, even if thermals are disabled, these parameters must be set
|
||||
// for pads which have local settings with thermal enabled
|
||||
// Previously, wxTextCtrl widgets related to thermal settings were disabled,
|
||||
// but this is not a good idea. We leave them always enabled.
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 17 2015)
|
||||
// C++ code generated with wxFormBuilder (version Jan 1 2016)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -75,7 +75,6 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
|||
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 );
|
||||
|
@ -85,7 +84,6 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
|||
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 );
|
||||
|
@ -110,7 +108,6 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
|||
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 );
|
||||
|
@ -120,7 +117,6 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
|||
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 );
|
||||
|
@ -138,7 +134,6 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
|||
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 );
|
||||
|
||||
|
||||
|
@ -147,8 +142,10 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
|||
wxBoxSizer* bSizerPadsConnection;
|
||||
bSizerPadsConnection = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticText13 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText13 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Default pad connection:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText13->Wrap( -1 );
|
||||
m_staticText13->SetToolTip( _("Default pad connection type to zone.\nThis setting can be overridden by local pad settings") );
|
||||
|
||||
bSizerPadsConnection->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("THT thermal"), _("None") };
|
||||
|
@ -165,7 +162,6 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
|||
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 );
|
||||
|
@ -175,7 +171,6 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
|||
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 );
|
||||
|
@ -189,7 +184,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
|||
wxBoxSizer* m_MiddleBox;
|
||||
m_MiddleBox = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticText171 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Priority level:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText171 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Zone 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.") );
|
||||
|
||||
|
|
|
@ -493,6 +493,7 @@
|
|||
<property name="minimum_size"></property>
|
||||
<property name="name">m_NetSortOptSizer</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">
|
||||
|
@ -1116,6 +1117,7 @@
|
|||
<property name="minimum_size"></property>
|
||||
<property name="name">m_ExportableSetupSizer</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
|
@ -1863,7 +1865,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Pad connection:</property>
|
||||
<property name="label">Default pad connection:</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -1884,7 +1886,7 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="tooltip">Default pad connection type to zone.
This setting can be overridden by local pad settings</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -2012,6 +2014,7 @@
|
|||
<property name="minimum_size"></property>
|
||||
<property name="name">m_ThermalShapesParamsSizer</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">
|
||||
|
@ -2407,7 +2410,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Priority level:</property>
|
||||
<property name="label">Zone priority level:</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 17 2015)
|
||||
// C++ code generated with wxFormBuilder (version Jan 1 2016)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
|
|
@ -83,17 +83,17 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con
|
|||
sbOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Drill File Options:") ), wxVERTICAL );
|
||||
|
||||
m_Check_Mirror = new wxCheckBox( sbOptSizer->GetStaticBox(), wxID_ANY, _("Mirror y axis"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_Check_Mirror->SetToolTip( _("Not recommanded.\nUsed mostly by users who make themselves the boards.") );
|
||||
m_Check_Mirror->SetToolTip( _("Not recommended.\nUsed mostly by users who make the boards themselves.") );
|
||||
|
||||
sbOptSizer->Add( m_Check_Mirror, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_Check_Minimal = new wxCheckBox( sbOptSizer->GetStaticBox(), wxID_ANY, _("Minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_Check_Minimal->SetToolTip( _("Not recommanded.\nUse it only for board houses which do not accept fully featured headers.") );
|
||||
m_Check_Minimal->SetToolTip( _("Not recommended.\nOnly use for board houses which do not accept fully featured headers.") );
|
||||
|
||||
sbOptSizer->Add( m_Check_Minimal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_Check_Merge_PTH_NPTH = new wxCheckBox( sbOptSizer->GetStaticBox(), wxID_ANY, _("Merge PTH and NPTH holes into one file"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_Check_Merge_PTH_NPTH->SetToolTip( _("Not recommanded.\nUse it only for board houses which ask for merged PTH and NPTH into onlu one file") );
|
||||
m_Check_Merge_PTH_NPTH->SetToolTip( _("Not recommended.\nOnly use for board houses which ask for merged PTH and NPTH into a single file.") );
|
||||
|
||||
sbOptSizer->Add( m_Check_Merge_PTH_NPTH, 0, wxALL, 5 );
|
||||
|
||||
|
|
|
@ -759,7 +759,7 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Not recommanded.
Used mostly by users who make themselves the boards.</property>
|
||||
<property name="tooltip">Not recommended.
Used mostly by users who make the boards themselves.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
|
@ -847,7 +847,7 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Not recommanded.
Use it only for board houses which do not accept fully featured headers.</property>
|
||||
<property name="tooltip">Not recommended.
Only use it for board houses which do not accept fully featured headers.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
|
@ -935,7 +935,7 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Not recommanded.
Use it only for board houses which ask for merged PTH and NPTH into onlu one file</property>
|
||||
<property name="tooltip">Not recommended.
Only use for board houses which ask for merged PTH and NTPH into a single file.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
|
|
|
@ -95,12 +95,12 @@ void DIALOG_GLOBAL_MODULES_FIELDS_EDITION::initDialog()
|
|||
m_ModuleFilter->SetValue(m_filterString);
|
||||
m_SizeXunit->SetLabel( GetAbbreviatedUnitsLabel() );
|
||||
m_SizeYunit->SetLabel( GetAbbreviatedUnitsLabel() );
|
||||
m_Ticknessunit->SetLabel( GetAbbreviatedUnitsLabel() );
|
||||
m_ThicknessUnit->SetLabel( GetAbbreviatedUnitsLabel() );
|
||||
m_SizeX_Value->SetValue(
|
||||
StringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.x ) );
|
||||
m_SizeY_Value->SetValue(
|
||||
StringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.y ) );
|
||||
m_TicknessValue->SetValue(
|
||||
m_ThicknessValue->SetValue(
|
||||
StringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextWidth) );
|
||||
|
||||
Layout();
|
||||
|
@ -118,7 +118,7 @@ void DIALOG_GLOBAL_MODULES_FIELDS_EDITION::OnOKClick( wxCommandEvent& event )
|
|||
|
||||
m_brdSettings->m_ModuleTextSize.x = ValueFromTextCtrl( *m_SizeX_Value );
|
||||
m_brdSettings->m_ModuleTextSize.y = ValueFromTextCtrl( *m_SizeY_Value );
|
||||
m_brdSettings->m_ModuleTextWidth = ValueFromTextCtrl( *m_TicknessValue );
|
||||
m_brdSettings->m_ModuleTextWidth = ValueFromTextCtrl( *m_ThicknessValue );
|
||||
|
||||
// clip m_ModuleTextWidth to the 1/4 of min size, to keep it always readable
|
||||
int minsize = std::min( m_brdSettings->m_ModuleTextSize.x,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Mar 9 2015)
|
||||
// C++ code generated with wxFormBuilder (version Jan 1 2016)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -25,13 +25,13 @@ DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::DIALOG_GLOBAL_MODULES_FIELDS_EDITION_
|
|||
wxStaticBoxSizer* sbSizer1;
|
||||
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprint Fields") ), wxVERTICAL );
|
||||
|
||||
m_ReferenceOpt = new wxCheckBox( this, wxID_ANY, _("Reference designator"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_ReferenceOpt = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Reference designator"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizer1->Add( m_ReferenceOpt, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_ValueOpt = new wxCheckBox( this, wxID_ANY, _("Value"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_ValueOpt = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Value"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizer1->Add( m_ValueOpt, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_OtherFields = new wxCheckBox( this, wxID_ANY, _("User defined"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_OtherFields = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("User defined"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizer1->Add( m_OtherFields, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
@ -44,7 +44,6 @@ DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::DIALOG_GLOBAL_MODULES_FIELDS_EDITION_
|
|||
bLeftSizer->Add( m_staticTextFilter, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_ModuleFilter = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_ModuleFilter->SetMaxLength( 0 );
|
||||
bLeftSizer->Add( m_ModuleFilter, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
|
||||
|
@ -62,41 +61,38 @@ DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::DIALOG_GLOBAL_MODULES_FIELDS_EDITION_
|
|||
fgSizerCurrSettings->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerCurrSettings->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticText3 = new wxStaticText( this, wxID_ANY, _("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText3 = new wxStaticText( sbSizerSettings->GetStaticBox(), wxID_ANY, _("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText3->Wrap( -1 );
|
||||
fgSizerCurrSettings->Add( m_staticText3, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
||||
|
||||
m_SizeX_Value = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_SizeX_Value->SetMaxLength( 0 );
|
||||
m_SizeX_Value = new wxTextCtrl( sbSizerSettings->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerCurrSettings->Add( m_SizeX_Value, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_SizeXunit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_SizeXunit = new wxStaticText( sbSizerSettings->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_SizeXunit->Wrap( -1 );
|
||||
fgSizerCurrSettings->Add( m_SizeXunit, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_staticText6 = new wxStaticText( this, wxID_ANY, _("Height:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText6 = new wxStaticText( sbSizerSettings->GetStaticBox(), wxID_ANY, _("Height:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText6->Wrap( -1 );
|
||||
fgSizerCurrSettings->Add( m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT|wxALIGN_RIGHT, 5 );
|
||||
|
||||
m_SizeY_Value = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_SizeY_Value->SetMaxLength( 0 );
|
||||
m_SizeY_Value = new wxTextCtrl( sbSizerSettings->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerCurrSettings->Add( m_SizeY_Value, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
m_SizeYunit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_SizeYunit = new wxStaticText( sbSizerSettings->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_SizeYunit->Wrap( -1 );
|
||||
fgSizerCurrSettings->Add( m_SizeYunit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticText9 = new wxStaticText( this, wxID_ANY, _("Thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText9 = new wxStaticText( sbSizerSettings->GetStaticBox(), wxID_ANY, _("Thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText9->Wrap( -1 );
|
||||
fgSizerCurrSettings->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||
|
||||
m_TicknessValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TicknessValue->SetMaxLength( 0 );
|
||||
fgSizerCurrSettings->Add( m_TicknessValue, 0, wxALL|wxEXPAND, 5 );
|
||||
m_ThicknessValue = new wxTextCtrl( sbSizerSettings->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerCurrSettings->Add( m_ThicknessValue, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_Ticknessunit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_Ticknessunit->Wrap( -1 );
|
||||
fgSizerCurrSettings->Add( m_Ticknessunit, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
m_ThicknessUnit = new wxStaticText( sbSizerSettings->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_ThicknessUnit->Wrap( -1 );
|
||||
fgSizerCurrSettings->Add( m_ThicknessUnit, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
|
||||
sbSizerSettings->Add( fgSizerCurrSettings, 1, wxEXPAND, 5 );
|
||||
|
|
|
@ -1239,7 +1239,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_TicknessValue</property>
|
||||
<property name="name">m_ThicknessValue</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -1330,7 +1330,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_Ticknessunit</property>
|
||||
<property name="name">m_ThicknessUnit</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Mar 9 2015)
|
||||
// C++ code generated with wxFormBuilder (version Jan 1 2016)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -51,8 +51,8 @@ class DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE : public DIALOG_SHIM
|
|||
wxTextCtrl* m_SizeY_Value;
|
||||
wxStaticText* m_SizeYunit;
|
||||
wxStaticText* m_staticText9;
|
||||
wxTextCtrl* m_TicknessValue;
|
||||
wxStaticText* m_Ticknessunit;
|
||||
wxTextCtrl* m_ThicknessValue;
|
||||
wxStaticText* m_ThicknessUnit;
|
||||
wxStaticLine* m_staticline1;
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 8 2012)
|
||||
// C++ code generated with wxFormBuilder (version Jan 1 2016)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -198,7 +198,7 @@ DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
|
|||
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
||||
m_sdbSizer->Realize();
|
||||
|
||||
bSizerMain->Add( m_sdbSizer, 0, wxEXPAND, 5 );
|
||||
bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="11" />
|
||||
<FileVersion major="1" minor="13" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
|
@ -20,8 +20,10 @@
|
|||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
<property name="relative_path">1</property>
|
||||
<property name="skip_lua_events">1</property>
|
||||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
|
@ -1025,7 +1027,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStdDialogButtonSizer" expanded="1">
|
||||
<property name="Apply">0</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 8 2012)
|
||||
// C++ code generated with wxFormBuilder (version Jan 1 2016)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
|
||||
#include <origin_viewitem.h>
|
||||
|
||||
#include <dialog_pad_properties_base.h>
|
||||
#include <html_messagebox.h>
|
||||
|
||||
|
@ -94,10 +96,12 @@ public:
|
|||
~DIALOG_PAD_PROPERTIES()
|
||||
{
|
||||
delete m_dummyPad;
|
||||
delete m_axisOrigin;
|
||||
}
|
||||
|
||||
private:
|
||||
PCB_BASE_FRAME* m_parent;
|
||||
KIGFX::ORIGIN_VIEWITEM* m_axisOrigin;
|
||||
D_PAD* m_currentPad; // pad currently being edited
|
||||
D_PAD* m_dummyPad; // a working copy used to show changes
|
||||
D_PAD* m_padMaster; // The pad used to create new pads in board or
|
||||
|
@ -178,6 +182,13 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
|
|||
else // We are editing a "master" pad, i.e. a pad used to create new pads
|
||||
m_dummyPad->Copy( m_padMaster );
|
||||
|
||||
m_axisOrigin = new KIGFX::ORIGIN_VIEWITEM( KIGFX::COLOR4D(0.0, 0.0, 0.8, 1.0),
|
||||
KIGFX::ORIGIN_VIEWITEM::CROSS,
|
||||
20000,
|
||||
VECTOR2D( m_dummyPad->GetPosition().x,
|
||||
m_dummyPad->GetPosition().y ) );
|
||||
m_axisOrigin->SetDrawAtZero( true );
|
||||
|
||||
if( m_parent->IsGalCanvasActive() )
|
||||
{
|
||||
m_panelShowPadGal->UseColorScheme( m_board->GetColorsSettings() );
|
||||
|
@ -185,6 +196,7 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
|
|||
m_panelShowPadGal->Show();
|
||||
m_panelShowPad->Hide();
|
||||
m_panelShowPadGal->GetView()->Add( m_dummyPad );
|
||||
m_panelShowPadGal->GetView()->Add( m_axisOrigin );
|
||||
m_panelShowPadGal->StartDrawing();
|
||||
|
||||
Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_PROPERTIES::OnResize ) );
|
||||
|
|
|
@ -110,12 +110,6 @@ void DIALOG_PLOT::Init_Dialog()
|
|||
m_plotOpts.GetHPGLPenDiameter() * IU_PER_MILS );
|
||||
m_HPGLPenSizeOpt->AppendText( msg );
|
||||
|
||||
// Set units and value for HPGL pen overlay (this param in in mils).
|
||||
AddUnitSymbol( *m_textPenOvr, g_UserUnit );
|
||||
msg = StringFromValue( g_UserUnit,
|
||||
m_plotOpts.GetHPGLPenOverlay() * IU_PER_MILS );
|
||||
m_HPGLPenOverlayOpt->AppendText( msg );
|
||||
|
||||
AddUnitSymbol( *m_textDefaultPenSize, g_UserUnit );
|
||||
msg = StringFromValue( g_UserUnit, m_plotOpts.GetLineWidth() );
|
||||
m_linesWidth->AppendText( msg );
|
||||
|
@ -367,7 +361,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_useAuxOriginCheckBox->SetValue( false );
|
||||
m_linesWidth->Enable( true );
|
||||
m_HPGLPenSizeOpt->Enable( false );
|
||||
m_HPGLPenOverlayOpt->Enable( false );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_subtractMaskFromSilk->Enable( false );
|
||||
m_subtractMaskFromSilk->SetValue( false );
|
||||
|
@ -397,7 +390,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_useAuxOriginCheckBox->SetValue( false );
|
||||
m_linesWidth->Enable( true );
|
||||
m_HPGLPenSizeOpt->Enable( false );
|
||||
m_HPGLPenOverlayOpt->Enable( false );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_subtractMaskFromSilk->Enable( false );
|
||||
m_subtractMaskFromSilk->SetValue( false );
|
||||
|
@ -427,7 +419,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_useAuxOriginCheckBox->Enable( true );
|
||||
m_linesWidth->Enable( true );
|
||||
m_HPGLPenSizeOpt->Enable( false );
|
||||
m_HPGLPenOverlayOpt->Enable( false );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_subtractMaskFromSilk->Enable( true );
|
||||
m_useGerberExtensions->Enable( true );
|
||||
|
@ -455,7 +446,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_useAuxOriginCheckBox->SetValue( false );
|
||||
m_linesWidth->Enable( false );
|
||||
m_HPGLPenSizeOpt->Enable( true );
|
||||
m_HPGLPenOverlayOpt->Enable( true );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_subtractMaskFromSilk->Enable( false );
|
||||
m_subtractMaskFromSilk->SetValue( false );
|
||||
|
@ -484,7 +474,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
|
|||
m_useAuxOriginCheckBox->Enable( true );
|
||||
m_linesWidth->Enable( false );
|
||||
m_HPGLPenSizeOpt->Enable( false );
|
||||
m_HPGLPenOverlayOpt->Enable( false );
|
||||
m_excludeEdgeLayerOpt->Enable( true );
|
||||
m_subtractMaskFromSilk->Enable( false );
|
||||
m_subtractMaskFromSilk->SetValue( false );
|
||||
|
@ -595,19 +584,6 @@ void DIALOG_PLOT::applyPlotSettings()
|
|||
reporter.Report( msg, REPORTER::RPT_INFO );
|
||||
}
|
||||
|
||||
// Read HPGL pen overlay (this param is stored in mils)
|
||||
msg = m_HPGLPenOverlayOpt->GetValue();
|
||||
tmp = ValueFromString( g_UserUnit, msg ) / IU_PER_MILS;
|
||||
|
||||
if( !tempOptions.SetHPGLPenOverlay( tmp ) )
|
||||
{
|
||||
msg = StringFromValue( g_UserUnit,
|
||||
tempOptions.GetHPGLPenOverlay() * IU_PER_MILS );
|
||||
m_HPGLPenOverlayOpt->SetValue( msg );
|
||||
msg.Printf( _( "HPGL pen overlay constrained." ) );
|
||||
reporter.Report( msg, REPORTER::RPT_INFO );
|
||||
}
|
||||
|
||||
// Default linewidth
|
||||
msg = m_linesWidth->GetValue();
|
||||
tmp = ValueFromString( g_UserUnit, msg );
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 17 2015)
|
||||
// C++ code generated with wxFormBuilder (version Jan 1 2016)
|
||||
// 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 );
|
||||
|
@ -256,37 +254,14 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
|
|||
m_HPGLOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("HPGL Options") ), wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizer22;
|
||||
bSizer22 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* bSizer20;
|
||||
bSizer20 = new wxBoxSizer( wxVERTICAL );
|
||||
bSizer22 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_textPenSize = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("Pen size"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_textPenSize->Wrap( -1 );
|
||||
bSizer20->Add( m_textPenSize, 0, wxRIGHT|wxLEFT, 5 );
|
||||
bSizer22->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 );
|
||||
|
||||
|
||||
bSizer22->Add( bSizer20, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer21;
|
||||
bSizer21 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_textPenOvr = new wxStaticText( m_HPGLOptionsSizer->GetStaticBox(), wxID_ANY, _("Pen overlay"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_textPenOvr->Wrap( -1 );
|
||||
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 );
|
||||
|
||||
|
||||
bSizer22->Add( bSizer21, 1, wxEXPAND, 5 );
|
||||
bSizer22->Add( m_HPGLPenSizeOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_HPGLOptionsSizer->Add( bSizer22, 1, wxEXPAND, 5 );
|
||||
|
@ -307,7 +282,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 +297,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 +312,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 );
|
||||
|
|
|
@ -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">566,618</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||
<property name="title">Plot</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">
|
||||
|
@ -3048,34 +3052,26 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="0">
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">HPGL Options</property>
|
||||
<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">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer22</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer20</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
|
@ -3163,7 +3159,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -3254,193 +3250,6 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer21</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" 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="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">Pen overlay</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_textPenOvr</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"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></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">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" 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="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="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength">0</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_HPGLPenOverlayOpt</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">Set plot overlay for filling</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="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></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="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
|
@ -3453,6 +3262,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">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 17 2015)
|
||||
// C++ code generated with wxFormBuilder (version Jan 1 2016)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -98,8 +98,6 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
|
|||
wxStaticBoxSizer* m_HPGLOptionsSizer;
|
||||
wxStaticText* m_textPenSize;
|
||||
wxTextCtrl* m_HPGLPenSizeOpt;
|
||||
wxStaticText* m_textPenOvr;
|
||||
wxTextCtrl* m_HPGLPenOverlayOpt;
|
||||
wxStaticBoxSizer* m_PSOptionsSizer;
|
||||
wxStaticText* m_staticText7;
|
||||
wxTextCtrl* m_fineAdjustXscaleOpt;
|
||||
|
@ -129,7 +127,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( 566,618 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_PLOT_BASE();
|
||||
|
||||
void DIALOG_PLOT_BASEOnContextMenu( wxMouseEvent &event )
|
||||
|
|
|
@ -89,7 +89,6 @@ bool EXCELLON_WRITER::GenDrillMapFile( const wxString& aFullFileName,
|
|||
plotter = hpgl_plotter;
|
||||
hpgl_plotter->SetPenNumber( plot_opts.GetHPGLPenNum() );
|
||||
hpgl_plotter->SetPenSpeed( plot_opts.GetHPGLPenSpeed() );
|
||||
hpgl_plotter->SetPenOverlap( 0 );
|
||||
plotter->SetPageSettings( page_info );
|
||||
plotter->SetViewport( offset, IU_PER_DECIMILS, scale, false );
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include <kicad_string.h>
|
||||
#include <gestfich.h>
|
||||
#include <wxPcbStruct.h>
|
||||
#include <trigo.h>
|
||||
#include <pgm_base.h>
|
||||
#include <build_version.h>
|
||||
#include <macros.h>
|
||||
|
@ -42,12 +41,8 @@
|
|||
|
||||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <class_drawsegment.h>
|
||||
#include <legacy_plugin.h>
|
||||
|
||||
#include <pcbnew.h>
|
||||
#include <pcbplot.h>
|
||||
#include <pcb_plot_params.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <kiface_i.h>
|
||||
#include <wx_html_report_panel.h>
|
||||
|
@ -77,6 +72,10 @@
|
|||
#define PLACEFILE_OPT_KEY wxT( "PlaceFileOpts" )
|
||||
|
||||
|
||||
#define PCB_BACK_SIDE 0
|
||||
#define PCB_FRONT_SIDE 1
|
||||
#define PCB_BOTH_SIDES 2
|
||||
|
||||
class LIST_MOD // An helper class used to build a list of useful footprints.
|
||||
{
|
||||
public:
|
||||
|
@ -228,7 +227,7 @@ bool DIALOG_GEN_MODULE_POSITION::CreateFiles()
|
|||
|
||||
// Count the footprints to place, do not yet create a file
|
||||
int fpcount = m_parent->DoGenFootprintsPositionFile( wxEmptyString, UnitsMM(),
|
||||
ForceAllSmd(), 2 );
|
||||
ForceAllSmd(), PCB_BOTH_SIDES );
|
||||
if( fpcount == 0)
|
||||
{
|
||||
wxMessageBox( _( "No footprint for automated placement." ) );
|
||||
|
@ -255,11 +254,11 @@ bool DIALOG_GEN_MODULE_POSITION::CreateFiles()
|
|||
|
||||
// Create the the Front or Top side placement file,
|
||||
// or the single file
|
||||
int side = 1;
|
||||
int side = PCB_FRONT_SIDE;
|
||||
|
||||
if( singleFile )
|
||||
{
|
||||
side = 2;
|
||||
side = PCB_BOTH_SIDES;
|
||||
fn.SetName( fn.GetName() + wxT( "-" ) + wxT("all") );
|
||||
}
|
||||
else
|
||||
|
@ -295,7 +294,7 @@ bool DIALOG_GEN_MODULE_POSITION::CreateFiles()
|
|||
|
||||
// Create the Back or Bottom side placement file
|
||||
fullcount = fpcount;
|
||||
side = 0;
|
||||
side = PCB_BACK_SIDE;
|
||||
fn = brd->GetFileName();
|
||||
fn.SetPath( outputDir.GetPath() );
|
||||
fn.SetName( fn.GetName() + wxT( "-" ) + backSideName );
|
||||
|
@ -344,9 +343,6 @@ static const char unit_text_mm[] = "## Unit = mm, Angle = deg.\n";
|
|||
|
||||
static wxPoint File_Place_Offset; // Offset coordinates for generated file.
|
||||
|
||||
static void WriteDrawSegmentPcb( DRAWSEGMENT* PtDrawSegment, FILE* rptfile,
|
||||
double aConvUnit );
|
||||
|
||||
|
||||
// Sort function use by GenereModulesPosition()
|
||||
// sort is made by side (layer) top layer first
|
||||
|
@ -396,93 +392,85 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName,
|
|||
bool aUnitsMM,
|
||||
bool aForceSmdItems, int aSide )
|
||||
{
|
||||
MODULE* module;
|
||||
char line[1024];
|
||||
MODULE* footprint;
|
||||
|
||||
// Minimal text lenghts:
|
||||
int lenRefText = 8;
|
||||
int lenValText = 8;
|
||||
int lenPkgText = 16;
|
||||
|
||||
File_Place_Offset = GetAuxOrigin();
|
||||
|
||||
// Calculating the number of useful modules (CMS attribute, not VIRTUAL)
|
||||
int moduleCount = 0;
|
||||
|
||||
for( module = GetBoard()->m_Modules; module; module = module->Next() )
|
||||
{
|
||||
if( aSide < 2 )
|
||||
{
|
||||
if( module->GetLayer() == B_Cu && aSide == 1)
|
||||
continue;
|
||||
if( module->GetLayer() == F_Cu && aSide == 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
if( module->GetAttributes() & MOD_VIRTUAL )
|
||||
{
|
||||
DBG( printf( "skipping module %s because it's virtual\n",
|
||||
TO_UTF8( module->GetReference() ) );)
|
||||
continue;
|
||||
}
|
||||
|
||||
if( ( module->GetAttributes() & MOD_CMS ) == 0 )
|
||||
{
|
||||
if( aForceSmdItems ) // true to fix a bunch of mis-labeled modules:
|
||||
{
|
||||
if( !HasNonSMDPins( module ) )
|
||||
{
|
||||
// all module's pins are SMD, mark the part for pick and place
|
||||
module->SetAttributes( module->GetAttributes() | MOD_CMS );
|
||||
OnModify();
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG(printf( "skipping %s because its attribute is not CMS and it has non SMD pins\n",
|
||||
TO_UTF8(module->GetReference()) ) );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
moduleCount++;
|
||||
}
|
||||
|
||||
if( aFullFileName.IsEmpty() )
|
||||
return moduleCount;
|
||||
|
||||
FILE * file = wxFopen( aFullFileName, wxT( "wt" ) );
|
||||
if( file == NULL )
|
||||
return -1;
|
||||
// Calculating the number of useful footprints (CMS attribute, not VIRTUAL)
|
||||
int footprintCount = 0;
|
||||
|
||||
// Select units:
|
||||
double conv_unit = aUnitsMM ? conv_unit_mm : conv_unit_inch;
|
||||
const char *unit_text = aUnitsMM ? unit_text_mm : unit_text_inch;
|
||||
|
||||
// Build and sort the list of modules alphabetically
|
||||
// Build and sort the list of footprints alphabetically
|
||||
std::vector<LIST_MOD> list;
|
||||
list.reserve(moduleCount);
|
||||
for( module = GetBoard()->m_Modules; module; module = module->Next() )
|
||||
list.reserve( footprintCount );
|
||||
|
||||
for( footprint = GetBoard()->m_Modules; footprint; footprint = footprint->Next() )
|
||||
{
|
||||
if( aSide < 2 )
|
||||
if( aSide != PCB_BOTH_SIDES )
|
||||
{
|
||||
if( module->GetLayer() == B_Cu && aSide == 1)
|
||||
if( footprint->GetLayer() == B_Cu && aSide == PCB_FRONT_SIDE)
|
||||
continue;
|
||||
if( module->GetLayer() == F_Cu && aSide == 0)
|
||||
if( footprint->GetLayer() == F_Cu && aSide == PCB_BACK_SIDE)
|
||||
continue;
|
||||
}
|
||||
|
||||
if( module->GetAttributes() & MOD_VIRTUAL )
|
||||
if( footprint->GetAttributes() & MOD_VIRTUAL )
|
||||
{
|
||||
DBG( printf( "skipping footprint %s because it's virtual\n",
|
||||
TO_UTF8( footprint->GetReference() ) );)
|
||||
continue;
|
||||
}
|
||||
|
||||
if( (module->GetAttributes() & MOD_CMS) == 0 )
|
||||
if( ( footprint->GetAttributes() & MOD_CMS ) == 0 )
|
||||
{
|
||||
if( aForceSmdItems ) // true to fix a bunch of mis-labeled footprints:
|
||||
{
|
||||
if( !HasNonSMDPins( footprint ) )
|
||||
{
|
||||
// all footprint's pins are SMD, mark the part for pick and place
|
||||
footprint->SetAttributes( footprint->GetAttributes() | MOD_CMS );
|
||||
OnModify();
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG(printf( "skipping %s because its attribute is not CMS and it has non SMD pins\n",
|
||||
TO_UTF8(footprint->GetReference()) ) );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
footprintCount++;
|
||||
|
||||
LIST_MOD item;
|
||||
item.m_Module = module;
|
||||
item.m_Reference = module->GetReference();
|
||||
item.m_Value = module->GetValue();
|
||||
item.m_Layer = module->GetLayer();
|
||||
item.m_Module = footprint;
|
||||
item.m_Reference = footprint->GetReference();
|
||||
item.m_Value = footprint->GetValue();
|
||||
item.m_Layer = footprint->GetLayer();
|
||||
list.push_back( item );
|
||||
|
||||
lenRefText = std::max( lenRefText, int(item.m_Reference.length()) );
|
||||
lenValText = std::max( lenValText, int(item.m_Value.length()) );
|
||||
lenPkgText = std::max( lenPkgText, int(item.m_Module->GetFPID().GetFootprintName().length()) );
|
||||
}
|
||||
|
||||
if( aFullFileName.IsEmpty() )
|
||||
return footprintCount;
|
||||
|
||||
FILE * file = wxFopen( aFullFileName, wxT( "wt" ) );
|
||||
if( file == NULL )
|
||||
return -1;
|
||||
|
||||
if( list.size() > 1 )
|
||||
sort( list.begin(), list.end(), sortFPlist );
|
||||
|
||||
|
@ -490,70 +478,60 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName,
|
|||
LOCALE_IO toggle;
|
||||
|
||||
// Write file header
|
||||
sprintf( line, "### Module positions - created on %s ###\n", TO_UTF8( DateAndTime() ) );
|
||||
fputs( line, file );
|
||||
fprintf( file, "### Module positions - created on %s ###\n", TO_UTF8( DateAndTime() ) );
|
||||
|
||||
wxString Title = Pgm().App().GetAppName() + wxT( " " ) + GetBuildVersion();
|
||||
sprintf( line, "### Printed by Pcbnew version %s\n", TO_UTF8( Title ) );
|
||||
fputs( line, file );
|
||||
fprintf( file, "### Printed by Pcbnew version %s\n", TO_UTF8( Title ) );
|
||||
|
||||
fputs( unit_text, file );
|
||||
|
||||
fputs( "## Side : ", file );
|
||||
|
||||
if( aSide == 0 )
|
||||
if( aSide == PCB_BACK_SIDE )
|
||||
fputs( TO_UTF8( backSideName ), file );
|
||||
else if( aSide == 1 )
|
||||
else if( aSide == PCB_FRONT_SIDE )
|
||||
fputs( TO_UTF8( frontSideName ), file );
|
||||
else
|
||||
fputs( "All", file );
|
||||
|
||||
fputs( "\n", file );
|
||||
|
||||
fputs( "# Ref Val Package PosX PosY Rot Side\n",
|
||||
file );
|
||||
fprintf(file, "%-*s %-*s %-*s %9.9s %9.9s %8.8s %s\n",
|
||||
int(lenRefText), "# Ref",
|
||||
int(lenValText), "Val",
|
||||
int(lenPkgText), "Package",
|
||||
"PosX", "PosY", "Rot", "Side" );
|
||||
|
||||
for( int ii = 0; ii < moduleCount; ii++ )
|
||||
for( int ii = 0; ii < footprintCount; ii++ )
|
||||
{
|
||||
wxPoint module_pos;
|
||||
wxPoint footprint_pos;
|
||||
footprint_pos = list[ii].m_Module->GetPosition();
|
||||
footprint_pos -= File_Place_Offset;
|
||||
|
||||
LAYER_NUM layer = list[ii].m_Module->GetLayer();
|
||||
wxASSERT( layer==F_Cu || layer==B_Cu );
|
||||
|
||||
const wxString& ref = list[ii].m_Reference;
|
||||
const wxString& val = list[ii].m_Value;
|
||||
const wxString& pkg = list[ii].m_Module->GetFPID().GetFootprintName();
|
||||
|
||||
sprintf( line, "%-8.8s %-16.16s %-16.16s",
|
||||
TO_UTF8( ref ), TO_UTF8( val ), TO_UTF8( pkg ) );
|
||||
|
||||
module_pos = list[ii].m_Module->GetPosition();
|
||||
module_pos -= File_Place_Offset;
|
||||
|
||||
char* text = line + strlen( line );
|
||||
/* Keep the coordinates in the first quadrant, like the gerbers
|
||||
* (i.e. change sign to y) */
|
||||
sprintf( text, " %9.4f %9.4f %8.1f ",
|
||||
module_pos.x * conv_unit,
|
||||
-module_pos.y * conv_unit,
|
||||
list[ii].m_Module->GetOrientation() / 10.0 );
|
||||
|
||||
LAYER_NUM layer = list[ii].m_Module->GetLayer();
|
||||
|
||||
fputs( line, file );
|
||||
|
||||
wxASSERT( layer==F_Cu || layer==B_Cu );
|
||||
|
||||
if( layer == F_Cu )
|
||||
fputs( TO_UTF8( frontSideName ), file );
|
||||
else if( layer == B_Cu )
|
||||
fputs( TO_UTF8( backSideName ), file );
|
||||
|
||||
fputs( "\n", file );
|
||||
fprintf(file, "%-*s %-*s %-*s %9.4f %9.4f %8.4f %s\n",
|
||||
lenRefText, TO_UTF8( ref ),
|
||||
lenValText, TO_UTF8( val ),
|
||||
lenPkgText, TO_UTF8( pkg ),
|
||||
footprint_pos.x * conv_unit,
|
||||
// Keep the coordinates in the first quadrant,
|
||||
// (i.e. change y sign
|
||||
-footprint_pos.y * conv_unit,
|
||||
list[ii].m_Module->GetOrientation() / 10.0,
|
||||
(layer == F_Cu ) ? TO_UTF8( frontSideName ) : TO_UTF8( backSideName ));
|
||||
}
|
||||
|
||||
// Write EOF
|
||||
fputs( "## End\n", file );
|
||||
|
||||
fclose( file );
|
||||
return moduleCount;
|
||||
return footprintCount;
|
||||
}
|
||||
|
||||
|
||||
|
@ -571,7 +549,8 @@ void PCB_EDIT_FRAME::GenFootprintsReport( wxCommandEvent& event )
|
|||
fn.SetPath( dirDialog.GetPath() );
|
||||
fn.SetExt( wxT( "rpt" ) );
|
||||
|
||||
bool success = DoGenFootprintsReport( fn.GetFullPath(), false );
|
||||
bool unitMM = g_UserUnit != INCHES;
|
||||
bool success = DoGenFootprintsReport( fn.GetFullPath(), unitMM );
|
||||
|
||||
wxString msg;
|
||||
if( success )
|
||||
|
@ -592,8 +571,6 @@ void PCB_EDIT_FRAME::GenFootprintsReport( wxCommandEvent& event )
|
|||
*/
|
||||
bool PCB_EDIT_FRAME::DoGenFootprintsReport( const wxString& aFullFilename, bool aUnitsMM )
|
||||
{
|
||||
D_PAD* pad;
|
||||
char line[1024];
|
||||
wxString msg;
|
||||
FILE* rptfile;
|
||||
wxPoint module_pos;
|
||||
|
@ -612,55 +589,36 @@ bool PCB_EDIT_FRAME::DoGenFootprintsReport( const wxString& aFullFilename, bool
|
|||
LOCALE_IO toggle;
|
||||
|
||||
// Generate header file comments.)
|
||||
sprintf( line, "## Module report - date %s\n", TO_UTF8( DateAndTime() ) );
|
||||
fputs( line, rptfile );
|
||||
fprintf( rptfile, "## Footprint report - date %s\n", TO_UTF8( DateAndTime() ) );
|
||||
|
||||
wxString Title = Pgm().App().GetAppName() + wxT( " " ) + GetBuildVersion();
|
||||
sprintf( line, "## Created by Pcbnew version %s\n", TO_UTF8( Title ) );
|
||||
fputs( line, rptfile );
|
||||
fprintf( rptfile, "## Created by Pcbnew version %s\n", TO_UTF8( Title ) );
|
||||
fputs( unit_text, rptfile );
|
||||
|
||||
fputs( "##\n", rptfile );
|
||||
fputs( "\n$BeginDESCRIPTION\n", rptfile );
|
||||
|
||||
EDA_RECT bbbox = GetBoard()->ComputeBoundingBox();
|
||||
|
||||
fputs( "\n$BOARD\n", rptfile );
|
||||
fputs( "unit INCH\n", rptfile );
|
||||
|
||||
sprintf( line, "upper_left_corner %9.6f %9.6f\n",
|
||||
fprintf( rptfile, "upper_left_corner %9.6f %9.6f\n",
|
||||
bbbox.GetX() * conv_unit,
|
||||
bbbox.GetY() * conv_unit );
|
||||
|
||||
fputs( line, rptfile );
|
||||
|
||||
sprintf( line, "lower_right_corner %9.6f %9.6f\n",
|
||||
fprintf( rptfile, "lower_right_corner %9.6f %9.6f\n",
|
||||
bbbox.GetRight() * conv_unit,
|
||||
bbbox.GetBottom() * conv_unit );
|
||||
fputs( line, rptfile );
|
||||
|
||||
fputs( "$EndBOARD\n\n", rptfile );
|
||||
|
||||
try
|
||||
{
|
||||
PLUGIN::RELEASER pi( IO_MGR::PluginFind( IO_MGR::LEGACY ) );
|
||||
|
||||
LEGACY_PLUGIN* legacy = (LEGACY_PLUGIN*) (PLUGIN*) pi;
|
||||
|
||||
legacy->SetFilePtr( rptfile );
|
||||
|
||||
for( MODULE* Module = GetBoard()->m_Modules; Module; Module = Module->Next() )
|
||||
{
|
||||
sprintf( line, "$MODULE %s\n", EscapedUTF8( Module->GetReference() ).c_str() );
|
||||
fputs( line, rptfile );
|
||||
fprintf( rptfile, "$MODULE %s\n", EscapedUTF8( Module->GetReference() ).c_str() );
|
||||
|
||||
sprintf( line, "reference %s\n", EscapedUTF8( Module->GetReference() ).c_str() );
|
||||
fputs( line, rptfile );
|
||||
sprintf( line, "value %s\n", EscapedUTF8( Module->GetValue() ).c_str() );
|
||||
fputs( line, rptfile );
|
||||
sprintf( line, "footprint %s\n",
|
||||
fprintf( rptfile, "reference %s\n", EscapedUTF8( Module->GetReference() ).c_str() );
|
||||
fprintf( rptfile, "value %s\n", EscapedUTF8( Module->GetValue() ).c_str() );
|
||||
fprintf( rptfile, "footprint %s\n",
|
||||
EscapedUTF8( FROM_UTF8( Module->GetFPID().Format().c_str() ) ).c_str() );
|
||||
fputs( line, rptfile );
|
||||
|
||||
msg = wxT( "attribut" );
|
||||
|
||||
|
@ -680,54 +638,21 @@ bool PCB_EDIT_FRAME::DoGenFootprintsReport( const wxString& aFullFilename, bool
|
|||
module_pos.x -= File_Place_Offset.x;
|
||||
module_pos.y -= File_Place_Offset.y;
|
||||
|
||||
sprintf( line, "position %9.6f %9.6f\n",
|
||||
fprintf( rptfile, "position %9.6f %9.6f orientation %.2f\n",
|
||||
module_pos.x * conv_unit,
|
||||
module_pos.y * conv_unit );
|
||||
fputs( line, rptfile );
|
||||
|
||||
sprintf( line, "orientation %.2f\n", Module->GetOrientation() / 10.0 );
|
||||
module_pos.y * conv_unit,
|
||||
Module->GetOrientation() / 10.0 );
|
||||
|
||||
if( Module->GetLayer() == F_Cu )
|
||||
strcat( line, "layer component\n" );
|
||||
fputs( "layer front\n", rptfile );
|
||||
else if( Module->GetLayer() == B_Cu )
|
||||
strcat( line, "layer copper\n" );
|
||||
fputs( "layer back\n", rptfile );
|
||||
else
|
||||
strcat( line, "layer other\n" );
|
||||
fputs( "layer other\n", rptfile );
|
||||
|
||||
fputs( line, rptfile );
|
||||
|
||||
legacy->SaveModule3D( Module );
|
||||
|
||||
for( pad = Module->Pads(); pad != NULL; pad = pad->Next() )
|
||||
for( D_PAD* pad = Module->Pads(); pad != NULL; pad = pad->Next() )
|
||||
{
|
||||
fprintf( rptfile, "$PAD \"%s\"\n", TO_UTF8( pad->GetPadName() ) );
|
||||
sprintf( line, "position %9.6f %9.6f\n",
|
||||
pad->GetPos0().x * conv_unit,
|
||||
pad->GetPos0().y * conv_unit );
|
||||
fputs( line, rptfile );
|
||||
|
||||
sprintf( line, "size %9.6f %9.6f\n",
|
||||
pad->GetSize().x * conv_unit,
|
||||
pad->GetSize().y * conv_unit );
|
||||
fputs( line, rptfile );
|
||||
|
||||
sprintf( line, "drill %9.6f\n", pad->GetDrillSize().x * conv_unit );
|
||||
fputs( line, rptfile );
|
||||
|
||||
sprintf( line, "shape_offset %9.6f %9.6f\n",
|
||||
pad->GetOffset().x * conv_unit,
|
||||
pad->GetOffset().y * conv_unit );
|
||||
fputs( line, rptfile );
|
||||
|
||||
sprintf( line, "orientation %.2f\n",
|
||||
(pad->GetOrientation() - Module->GetOrientation()) / 10.0 );
|
||||
fputs( line, rptfile );
|
||||
|
||||
static const char* shape_name[6] = { "???", "Circ", "Rect", "Oval", "Trap", "Spec" };
|
||||
|
||||
sprintf( line, "Shape %s\n", shape_name[pad->GetShape()] );
|
||||
fputs( line, rptfile );
|
||||
|
||||
int layer = 0;
|
||||
|
||||
if( pad->GetLayerSet()[B_Cu] )
|
||||
|
@ -736,34 +661,25 @@ bool PCB_EDIT_FRAME::DoGenFootprintsReport( const wxString& aFullFilename, bool
|
|||
if( pad->GetLayerSet()[F_Cu] )
|
||||
layer |= 2;
|
||||
|
||||
static const char* layer_name[4] = { "none", "back", "front", "both" };
|
||||
static const char* layer_name[4] = { "nocopper", "back", "front", "both" };
|
||||
fprintf( rptfile, "Shape %s Layer %s\n", TO_UTF8( pad->ShowPadShape() ), layer_name[layer] );
|
||||
|
||||
fprintf( rptfile, "position %9.6f %9.6f size %9.6f %9.6f orientation %.2f\n",
|
||||
pad->GetPos0().x * conv_unit, pad->GetPos0().y * conv_unit,
|
||||
pad->GetSize().x * conv_unit, pad->GetSize().y * conv_unit,
|
||||
(pad->GetOrientation() - Module->GetOrientation()) / 10.0 );
|
||||
|
||||
fprintf( rptfile, "drill %9.6f\n", pad->GetDrillSize().x * conv_unit );
|
||||
|
||||
fprintf( rptfile, "shape_offset %9.6f %9.6f\n",
|
||||
pad->GetOffset().x * conv_unit,
|
||||
pad->GetOffset().y * conv_unit );
|
||||
|
||||
sprintf( line, "Layer %s\n", layer_name[layer] );
|
||||
fputs( line, rptfile );
|
||||
fprintf( rptfile, "$EndPAD\n" );
|
||||
}
|
||||
|
||||
fprintf( rptfile, "$EndMODULE %s\n\n", TO_UTF8 (Module->GetReference() ) );
|
||||
}
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
DisplayError( NULL, ioe.errorText );
|
||||
}
|
||||
|
||||
// Write board Edges
|
||||
EDA_ITEM* PtStruct;
|
||||
|
||||
for( PtStruct = GetBoard()->m_Drawings; PtStruct != NULL; PtStruct = PtStruct->Next() )
|
||||
{
|
||||
if( PtStruct->Type() != PCB_LINE_T )
|
||||
continue;
|
||||
|
||||
if( ( (DRAWSEGMENT*) PtStruct )->GetLayer() != Edge_Cuts )
|
||||
continue;
|
||||
|
||||
WriteDrawSegmentPcb( (DRAWSEGMENT*) PtStruct, rptfile, conv_unit );
|
||||
}
|
||||
|
||||
// Generate EOF.
|
||||
fputs( "$EndDESCRIPTION\n", rptfile );
|
||||
|
@ -772,67 +688,3 @@ bool PCB_EDIT_FRAME::DoGenFootprintsReport( const wxString& aFullFilename, bool
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
/* Output to rpt file a segment type from the PCB drawing.
|
||||
* The contours are of different types:
|
||||
* Segment
|
||||
* Circle
|
||||
* Arc
|
||||
*/
|
||||
void WriteDrawSegmentPcb( DRAWSEGMENT* PtDrawSegment, FILE* rptfile, double aConvUnit )
|
||||
{
|
||||
double ux0, uy0, dx, dy;
|
||||
double radius, width;
|
||||
char line[1024];
|
||||
|
||||
ux0 = PtDrawSegment->GetStart().x * aConvUnit;
|
||||
uy0 = PtDrawSegment->GetStart().y * aConvUnit;
|
||||
|
||||
dx = PtDrawSegment->GetEnd().x * aConvUnit;
|
||||
dy = PtDrawSegment->GetEnd().y * aConvUnit;
|
||||
|
||||
width = PtDrawSegment->GetWidth() * aConvUnit;
|
||||
|
||||
switch( PtDrawSegment->GetShape() )
|
||||
{
|
||||
case S_CIRCLE:
|
||||
radius = Distance( ux0, uy0, dx, dy );
|
||||
fprintf( rptfile, "$CIRCLE \n" );
|
||||
fprintf( rptfile, "centre %.6lf %.6lf\n", ux0, uy0 );
|
||||
fprintf( rptfile, "radius %.6lf\n", radius );
|
||||
fprintf( rptfile, "width %.6lf\n", width );
|
||||
fprintf( rptfile, "$EndCIRCLE \n" );
|
||||
break;
|
||||
|
||||
case S_ARC:
|
||||
{
|
||||
int endx = PtDrawSegment->GetEnd().x;
|
||||
int endy = PtDrawSegment->GetEnd().y;
|
||||
|
||||
RotatePoint( &endx,
|
||||
&endy,
|
||||
PtDrawSegment->GetStart().x,
|
||||
PtDrawSegment->GetStart().y,
|
||||
PtDrawSegment->GetAngle() );
|
||||
|
||||
fprintf( rptfile, "$ARC \n" );
|
||||
fprintf( rptfile, "centre %.6lf %.6lf\n", ux0, uy0 );
|
||||
fprintf( rptfile, "start %.6lf %.6lf\n",
|
||||
endx * aConvUnit, endy * aConvUnit );
|
||||
fprintf( rptfile, "end %.6lf %.6lf\n", dx, dy );
|
||||
fprintf( rptfile, "width %.6lf\n", width );
|
||||
fprintf( rptfile, "$EndARC \n" );
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
sprintf( line, "$LINE \n" );
|
||||
fputs( line, rptfile );
|
||||
|
||||
fprintf( rptfile, "start %.6lf %.6lf\n", ux0, uy0 );
|
||||
fprintf( rptfile, "end %.6lf %.6lf\n", dx, dy );
|
||||
fprintf( rptfile, "width %.6lf\n", width );
|
||||
fprintf( rptfile, "$EndLINE \n" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -194,6 +194,7 @@ MODULE* GITHUB_PLUGIN::FootprintLoad( const wxString& aLibraryPath,
|
|||
|
||||
if( it != m_gh_cache->end() ) // fp_name is present
|
||||
{
|
||||
//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.
|
||||
|
|
|
@ -40,8 +40,6 @@
|
|||
#define HPGL_PEN_SPEED_MAX 99 // this param is always in cm/s
|
||||
#define HPGL_PEN_NUMBER_MIN 1
|
||||
#define HPGL_PEN_NUMBER_MAX 16
|
||||
#define HPGL_PEN_OVERLAP_MIN 0
|
||||
#define HPGL_PEN_OVERLAP_MAX 50 // Unit = mil
|
||||
|
||||
|
||||
/**
|
||||
|
@ -93,7 +91,6 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
|
|||
m_HPGLPenNum = 1;
|
||||
m_HPGLPenSpeed = 20; // this param is always in cm/s
|
||||
m_HPGLPenDiam = 15; // in mils
|
||||
m_HPGLPenOvr = 2; // in mils
|
||||
m_negative = false;
|
||||
m_A4Output = false;
|
||||
m_plotReference = true;
|
||||
|
@ -182,8 +179,6 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter,
|
|||
m_HPGLPenSpeed );
|
||||
aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpendiameter ),
|
||||
m_HPGLPenDiam );
|
||||
aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpenoverlay ),
|
||||
m_HPGLPenOvr );
|
||||
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_psnegative ),
|
||||
m_negative ? trueStr : falseStr );
|
||||
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_psa4output ),
|
||||
|
@ -247,8 +242,6 @@ bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
|
|||
return false;
|
||||
if( m_HPGLPenDiam != aPcbPlotParams.m_HPGLPenDiam )
|
||||
return false;
|
||||
if( m_HPGLPenOvr != aPcbPlotParams.m_HPGLPenOvr )
|
||||
return false;
|
||||
if( m_negative != aPcbPlotParams.m_negative )
|
||||
return false;
|
||||
if( m_A4Output != aPcbPlotParams.m_A4Output )
|
||||
|
@ -313,12 +306,6 @@ bool PCB_PLOT_PARAMS::SetHPGLPenSpeed( int aValue )
|
|||
}
|
||||
|
||||
|
||||
bool PCB_PLOT_PARAMS::SetHPGLPenOverlay( int aValue )
|
||||
{
|
||||
return setInt( &m_HPGLPenOvr, aValue, HPGL_PEN_OVERLAP_MIN, HPGL_PEN_OVERLAP_MAX );
|
||||
}
|
||||
|
||||
|
||||
bool PCB_PLOT_PARAMS::SetLineWidth( int aValue )
|
||||
{
|
||||
return setInt( &m_lineWidth, aValue, PLOT_LINEWIDTH_MIN, PLOT_LINEWIDTH_MAX );
|
||||
|
@ -450,8 +437,8 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams )
|
|||
HPGL_PEN_DIAMETER_MAX );
|
||||
break;
|
||||
case T_hpglpenoverlay:
|
||||
aPcbPlotParams->m_HPGLPenOvr = parseInt( HPGL_PEN_OVERLAP_MIN,
|
||||
HPGL_PEN_OVERLAP_MAX );
|
||||
// No more used. juste here for compatibility with old versions
|
||||
parseInt( 0, HPGL_PEN_DIAMETER_MAX );
|
||||
break;
|
||||
case T_pscolor:
|
||||
NeedSYMBOL(); // This actually was never used...
|
||||
|
|
|
@ -149,7 +149,6 @@ private:
|
|||
int m_HPGLPenNum; ///< HPGL only: pen number selection(1 to 9)
|
||||
int m_HPGLPenSpeed; ///< HPGL only: pen speed, always in cm/s (1 to 99 cm/s)
|
||||
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
|
||||
|
@ -263,8 +262,6 @@ public:
|
|||
bool SetHPGLPenDiameter( int aValue );
|
||||
int GetHPGLPenSpeed() const { return m_HPGLPenSpeed; };
|
||||
bool SetHPGLPenSpeed( int aValue );
|
||||
int GetHPGLPenOverlay() const { return m_HPGLPenOvr; };
|
||||
bool SetHPGLPenOverlay( int aValue );
|
||||
void SetHPGLPenNum( int aVal ) { m_HPGLPenNum = aVal; }
|
||||
int GetHPGLPenNum() const { return m_HPGLPenNum; }
|
||||
|
||||
|
|
|
@ -903,20 +903,9 @@ static void ConfigureHPGLPenSizes( HPGL_PLOTTER *aPlotter,
|
|||
int pen_diam = KiROUND( aPlotOpts->GetHPGLPenDiameter() * IU_PER_MILS /
|
||||
aPlotOpts->GetScale() );
|
||||
|
||||
// compute pen_overlay (value comes in mils) in pcb units with plot scale
|
||||
if( aPlotOpts->GetHPGLPenOverlay() < 0 )
|
||||
aPlotOpts->SetHPGLPenOverlay( 0 );
|
||||
|
||||
if( aPlotOpts->GetHPGLPenOverlay() >= aPlotOpts->GetHPGLPenDiameter() )
|
||||
aPlotOpts->SetHPGLPenOverlay( aPlotOpts->GetHPGLPenDiameter() - 1 );
|
||||
|
||||
int pen_overlay = KiROUND( aPlotOpts->GetHPGLPenOverlay() * IU_PER_MILS /
|
||||
aPlotOpts->GetScale() );
|
||||
|
||||
// Set HPGL-specific options and start
|
||||
aPlotter->SetPenSpeed( aPlotOpts->GetHPGLPenSpeed() );
|
||||
aPlotter->SetPenNumber( aPlotOpts->GetHPGLPenNum() );
|
||||
aPlotter->SetPenOverlap( pen_overlay );
|
||||
aPlotter->SetPenDiameter( pen_diam );
|
||||
}
|
||||
|
||||
|
|
|
@ -602,7 +602,9 @@ void ROUTER_TOOL::performRouting()
|
|||
}
|
||||
else if( evt->IsAction( &ACT_EndTrack ) )
|
||||
{
|
||||
if( m_router->FixRoute( m_endSnapPoint, m_endItem ) )
|
||||
bool still_routing = true;
|
||||
while( still_routing )
|
||||
still_routing = m_router->FixRoute( m_endSnapPoint, m_endItem );
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ class FPC_FootprintWizard(HFPW.HelpfulFootprintWizardPlugin):
|
|||
self.module.Add(pad_s1)
|
||||
|
||||
# add footprint outline
|
||||
linewidth = self.draw.GetLineTickness()
|
||||
linewidth = self.draw.GetLineThickness()
|
||||
margin = linewidth
|
||||
|
||||
# upper line
|
||||
|
|
|
@ -26,7 +26,7 @@ class FootprintWizardDrawingAids:
|
|||
footprint wizards
|
||||
|
||||
A "drawing context" is provided which can be used to set and retain
|
||||
settings such as line tickness and layer
|
||||
settings such as line thickness and layer
|
||||
"""
|
||||
|
||||
# directions (in degrees, compass-like)
|
||||
|
@ -240,16 +240,25 @@ class FootprintWizardDrawingAids:
|
|||
return pcbnew.wxPoint(x * mat[0] + y * mat[1] + mat[2],
|
||||
x * mat[3] + y * mat[4] + mat[5])
|
||||
|
||||
def SetLineTickness(self, lineThickness):
|
||||
def SetLineThickness(self, lineThickness):
|
||||
"""
|
||||
Set the current pen lineThickness used for subsequent drawing
|
||||
operations
|
||||
"""
|
||||
self.dc['lineThickness'] = lineThickness
|
||||
|
||||
def GetLineTickness(self):
|
||||
def SetLineTickness(self, lineThickness):
|
||||
"""
|
||||
Get the current drawing context line tickness
|
||||
Old version of SetLineThickness.
|
||||
Does the same thing, but is is only here for compatibility with old scripts
|
||||
Set the current pen lineThickness used for subsequent drawing
|
||||
operations
|
||||
"""
|
||||
self.dc['lineThickness'] = lineThickness
|
||||
|
||||
def GetLineThickness(self):
|
||||
"""
|
||||
Get the current drawing context line thickness
|
||||
"""
|
||||
return self.dc['lineThickness']
|
||||
|
||||
|
@ -271,7 +280,7 @@ class FootprintWizardDrawingAids:
|
|||
Draw a line from (x1, y1) to (x2, y2)
|
||||
"""
|
||||
outline = pcbnew.EDGE_MODULE(self.module)
|
||||
outline.SetWidth(self.GetLineTickness())
|
||||
outline.SetWidth(self.GetLineThickness())
|
||||
outline.SetLayer(self.GetLayer())
|
||||
outline.SetShape(pcbnew.S_SEGMENT)
|
||||
start = self.TransformPoint(x1, y1)
|
||||
|
|
|
@ -82,11 +82,15 @@ class BGAWizard(HFPW.HelpfulFootprintWizardPlugin):
|
|||
pads["outline x margin"])
|
||||
|
||||
# Courtyard
|
||||
cmargin = self.draw.GetLineTickness()
|
||||
cmargin = self.draw.GetLineThickness()
|
||||
self.draw.SetLayer(pcbnew.F_CrtYd)
|
||||
sizex = (ssx + cmargin) * 2
|
||||
sizey = (ssy + cmargin) * 2
|
||||
# set courtyard line thickness to the one defined in KLC
|
||||
self.draw.SetLineThickness(pcbnew.FromMM(0.05))
|
||||
self.draw.Box(0, 0, sizex, sizey)
|
||||
# restore line thickness to previous value
|
||||
self.draw.SetLineThickness(pcbnew.FromMM(cmargin))
|
||||
|
||||
#reference and value
|
||||
text_size = self.GetTextSize() # IPC nominal
|
||||
|
|
|
@ -69,12 +69,12 @@ class circular_pad_array_wizard(HFPW.HelpfulFootprintWizardPlugin):
|
|||
|
||||
array.AddPadsToModule(self.draw)
|
||||
|
||||
body_radius = (prm['circle diameter'] + prm['pad width'])/2 + self.draw.GetLineTickness()
|
||||
body_radius = (prm['circle diameter'] + prm['pad width'])/2 + self.draw.GetLineThickness()
|
||||
self.draw.Circle(0, 0, body_radius)
|
||||
|
||||
text_size = self.GetTextSize() # IPC nominal
|
||||
thickness = self.GetTextThickness()
|
||||
textposy = body_radius + self.draw.GetLineTickness()/2 + self.GetTextSize()/2 + thickness
|
||||
textposy = body_radius + self.draw.GetLineThickness()/2 + self.GetTextSize()/2 + thickness
|
||||
self.draw.Value( 0, textposy, text_size )
|
||||
self.draw.Reference( 0, -textposy, text_size )
|
||||
|
||||
|
|
|
@ -113,7 +113,12 @@ class QFPWizard(HelpfulFootprintWizardPlugin.HelpfulFootprintWizardPlugin):
|
|||
self.draw.SetLayer(pcbnew.F_CrtYd)
|
||||
sizex = (lim_x + cmargin) * 2 + pad_length
|
||||
sizey = (lim_y + cmargin) * 2 + pad_length
|
||||
# set courtyard line thickness to the one defined in KLC
|
||||
thick = self.draw.GetLineThickness()
|
||||
self.draw.SetLineThickness(pcbnew.FromMM(0.05))
|
||||
self.draw.Box(0, 0, sizex, sizey)
|
||||
# restore line thickness to previous value
|
||||
self.draw.SetLineThickness(pcbnew.FromMM(thick))
|
||||
|
||||
#reference and value
|
||||
text_size = self.GetTextSize() # IPC nominal
|
||||
|
|
|
@ -104,6 +104,17 @@ class RowedFootprint(HFPW.HelpfulFootprintWizardPlugin):
|
|||
|
||||
self.DrawBox(ssx, ssy)
|
||||
|
||||
# Courtyard
|
||||
cmargin = self.draw.GetLineThickness()
|
||||
self.draw.SetLayer(pcbnew.F_CrtYd)
|
||||
sizex = (ssx + cmargin) * 2
|
||||
sizey = (ssy + cmargin) * 2
|
||||
# set courtyard line thickness to the one defined in KLC
|
||||
self.draw.SetLineThickness(pcbnew.FromMM(0.05))
|
||||
self.draw.Box(0, 0, sizex, sizey)
|
||||
# restore line thickness to previous value
|
||||
self.draw.SetLineThickness(pcbnew.FromMM(cmargin))
|
||||
|
||||
#reference and value
|
||||
text_size = self.GetTextSize() # IPC nominal
|
||||
|
||||
|
@ -176,7 +187,7 @@ class SDIPWizard(RowedFootprint):
|
|||
|
||||
# draw the notch
|
||||
notchWidth = ssy/1.5
|
||||
notchHeight = self.draw.GetLineTickness()*3
|
||||
notchHeight = self.draw.GetLineThickness()*3
|
||||
|
||||
# NotchedBox draws the notch on top. Rotate the box 90 degrees
|
||||
# to have it on the left
|
||||
|
|
|
@ -187,7 +187,7 @@ class TouchSliderWizard(HFPW.HelpfulFootprintWizardPlugin):
|
|||
step_length = float(touch_length) / float(steps)
|
||||
|
||||
t_size = self.GetTextSize()
|
||||
w_text = self.draw.GetLineTickness()
|
||||
w_text = self.draw.GetLineThickness()
|
||||
ypos = touch_width/(bands*2) + t_size/2 + w_text
|
||||
self.draw.Value(0, -ypos, t_size)
|
||||
ypos += t_size + w_text*2
|
||||
|
|
|
@ -97,7 +97,7 @@ class Uss39Wizard(HelpfulFootprintWizardPlugin.HelpfulFootprintWizardPlugin):
|
|||
|
||||
def __drawSpace__(self, bit, x):
|
||||
self.draw.SetLayer(B.F_SilkS)
|
||||
self.draw.SetLineTickness(self.X)
|
||||
self.draw.SetLineThickness(self.X)
|
||||
self.draw.Line(x, 0, x, self.H)
|
||||
if (bit == 1):
|
||||
self.draw.Line(x + self.X, 0, x + self.X, self.H)
|
||||
|
@ -122,7 +122,7 @@ class Uss39Wizard(HelpfulFootprintWizardPlugin.HelpfulFootprintWizardPlugin):
|
|||
|
||||
def drawQuietZone(self, x0, y0, width, height):
|
||||
self.draw.SetLayer(B.F_SilkS)
|
||||
self.draw.SetLineTickness(self.X)
|
||||
self.draw.SetLineThickness(self.X)
|
||||
|
||||
for offset in range(0, int(self.Q), int(self.X/2)):
|
||||
xoffset = offset + self.X
|
||||
|
@ -139,7 +139,7 @@ class Uss39Wizard(HelpfulFootprintWizardPlugin.HelpfulFootprintWizardPlugin):
|
|||
self.drawQuietZone(0, 0, x, self.H)
|
||||
# Draw courtyard origin
|
||||
self.draw.SetLayer(B.F_CrtYd)
|
||||
self.draw.SetLineTickness(self.CourtyardLineWidth)
|
||||
self.draw.SetLineThickness(self.CourtyardLineWidth)
|
||||
ch_lim = B.FromMM(0.35)
|
||||
self.draw.Line(-ch_lim, 0, ch_lim, 0)
|
||||
self.draw.Line(0, -ch_lim, 0, ch_lim)
|
||||
|
|
|
@ -90,7 +90,7 @@ class RowedFootprint(HFPW.HelpfulFootprintWizardPlugin):
|
|||
|
||||
# body inside pads is possible only for 2 rows.
|
||||
# for other values, there is no room
|
||||
linew = self.draw.GetLineTickness()
|
||||
linew = self.draw.GetLineThickness()
|
||||
if body['*'+self.silkscreen_inside_key] and line_count == 2:
|
||||
cornery = pin1posY - ssy_offset
|
||||
if cornery < linew:
|
||||
|
@ -102,9 +102,14 @@ class RowedFootprint(HFPW.HelpfulFootprintWizardPlugin):
|
|||
cmarginx = body[self.courtyard_x_margin_key]
|
||||
cmarginy = body[self.courtyard_y_margin_key]
|
||||
self.draw.SetLayer(pcbnew.F_CrtYd)
|
||||
sizex = (pin1posX + cmarginx) * 2 + pad_Hsize
|
||||
sizey = (pin1posY + cmarginy) * 2 + pad_Vsize
|
||||
# set courtyard line thickness to the one defined in KLC
|
||||
thick = self.draw.GetLineThickness()
|
||||
sizex = (pin1posX + cmarginx) * 2 + pad_Hsize + thick
|
||||
sizey = (pin1posY + cmarginy) * 2 + pad_Vsize + thick
|
||||
self.draw.SetLineThickness(pcbnew.FromMM(0.05))
|
||||
self.draw.Box(0, 0, sizex, sizey)
|
||||
# restore line thickness to previous value
|
||||
self.draw.SetLineThickness(pcbnew.FromMM(thick))
|
||||
|
||||
#reference and value
|
||||
text_size = self.GetTextSize() # IPC nominal
|
||||
|
|
|
@ -313,10 +313,15 @@ const SELECTION& SELECTION_TOOL::GetSelection()
|
|||
BOARD_ITEM* item = m_selection.Item<BOARD_ITEM>( i );
|
||||
|
||||
if( !modifiable( item ) )
|
||||
{
|
||||
m_selection.items.RemovePicker( i );
|
||||
m_selection.group->Remove( item );
|
||||
}
|
||||
else
|
||||
{
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
return m_selection;
|
||||
}
|
||||
|
@ -746,6 +751,9 @@ int SELECTION_TOOL::findMove( const TOOL_EVENT& aEvent )
|
|||
|
||||
void SELECTION_TOOL::clearSelection()
|
||||
{
|
||||
if( m_selection.Empty() )
|
||||
return;
|
||||
|
||||
KIGFX::VIEW_GROUP::const_iter it, it_end;
|
||||
|
||||
// Restore the initial properties
|
||||
|
|
Loading…
Reference in New Issue