kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #23069
Custom shaped pads work. First test.
Attached, a first patch to test rounded rect and custom shaped pads.
(against rev bzr 6552)
Although most of features are working (DRC, plot, ...), this is still a
work in progress, and all features and options are not fixed.
custom shaped pads can be created only by a very basic and crude editor
in pad properties dialog.
There is not a graphic editor (the graphic pad editor is to be defined),
just a dialog to add/remove/duplicate and edit basic shapes (line, arc
circle and polygon)
The pad shape is a set of basic shapes + the pad anchor (a usual circle
or rect pad, which is the pad position reference)
In pns router and zones the pad shape clearance area is the convex hull
of the actual shape.
Currently there is no verification of the validity of the shape.
The full shape is expected to be only one copper area.
I attached a sample.
I need volunteers to start testing these new pads.
--
Jean-Pierre CHARRAS
(kicad_pcb (version 4) (host pcbnew "(2016-02-12 BZR 6552)-product")
(general
(links 2)
(no_connects 0)
(area -11.000001 -1.000001 179.075001 138.075001)
(thickness 1.6)
(drawings 10)
(tracks 11)
(zones 0)
(modules 5)
(nets 3)
)
(page A4)
(layers
(0 F.Cu signal)
(31 B.Cu signal)
(32 B.Adhes user)
(33 F.Adhes user)
(34 B.Paste user)
(35 F.Paste user)
(36 B.SilkS user)
(37 F.SilkS user)
(38 B.Mask user)
(39 F.Mask user)
(40 Dwgs.User user)
(41 Cmts.User user)
(42 Eco1.User user)
(43 Eco2.User user)
(44 Edge.Cuts user)
(45 Margin user)
(46 B.CrtYd user)
(47 F.CrtYd user)
(48 B.Fab user)
(49 F.Fab user)
)
(setup
(last_trace_width 0.5)
(trace_clearance 0.4)
(zone_clearance 0.6)
(zone_45_only no)
(trace_min 0.2)
(segment_width 2)
(edge_width 0.15)
(via_size 0.6)
(via_drill 0.4)
(via_min_size 0.4)
(via_min_drill 0.3)
(uvia_size 0.3)
(uvia_drill 0.1)
(uvias_allowed no)
(uvia_min_size 0.2)
(uvia_min_drill 0.1)
(pcb_text_width 0.3)
(pcb_text_size 1.5 1.5)
(mod_edge_width 0.15)
(mod_text_size 1 1)
(mod_text_width 0.15)
(pad_size 3 2)
(pad_drill 0)
(pad_to_mask_clearance 0.2)
(aux_axis_origin 0 0)
(visible_elements 7FFFFFFF)
(pcbplotparams
(layerselection 0x00000_7fffffff)
(usegerberextensions false)
(excludeedgelayer true)
(linewidth 0.150000)
(plotframeref false)
(viasonmask false)
(mode 1)
(useauxorigin false)
(hpglpennumber 1)
(hpglpenspeed 20)
(hpglpendiameter 15)
(psnegative false)
(psa4output false)
(plotreference true)
(plotvalue true)
(plotinvisibletext false)
(padsonsilk false)
(subtractmaskfromsilk false)
(outputformat 2)
(mirror false)
(drillshape 0)
(scaleselection 1)
(outputdirectory plots))
)
(net 0 "")
(net 1 /PAD2)
(net 2 /PAD1)
(net_class Default "Ceci est la Netclass par défaut"
(clearance 0.4)
(trace_width 0.5)
(via_dia 0.6)
(via_drill 0.4)
(uvia_dia 0.3)
(uvia_drill 0.1)
(add_net /PAD1)
(add_net /PAD2)
)
(module Dip_sockets:DIP-14__300_ELL (layer F.Cu) (tedit 56BB369D) (tstamp 56AE982A)
(at 132.334 117.348)
(descr "14 pins DIL package, elliptical pads")
(tags DIL)
(fp_text reference U*** (at -5.08 -1.27) (layer F.SilkS)
(effects (font (size 1.524 1.143) (thickness 0.3048)))
)
(fp_text value DIP-14_300_ELL (at 1.27 1.27) (layer F.SilkS)
(effects (font (size 1.524 1.143) (thickness 0.3048)))
)
(fp_line (start -10.16 -2.54) (end 10.16 -2.54) (layer F.SilkS) (width 0.381))
(fp_line (start 10.16 2.54) (end -10.16 2.54) (layer F.SilkS) (width 0.381))
(fp_line (start -10.16 2.54) (end -10.16 -2.54) (layer F.SilkS) (width 0.381))
(fp_line (start -10.16 -1.27) (end -8.89 -1.27) (layer F.SilkS) (width 0.381))
(fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.381))
(fp_line (start -8.89 1.27) (end -10.16 1.27) (layer F.SilkS) (width 0.381))
(fp_line (start 10.16 -2.54) (end 10.16 2.54) (layer F.SilkS) (width 0.381))
(pad 1 thru_hole rect (at -7.62 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
(pad 2 thru_hole oval (at -5.08 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
(pad 3 thru_hole oval (at -2.54 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
(pad 4 thru_hole oval (at 0 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
(pad 5 thru_hole oval (at 2.54 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
(pad 6 thru_hole oval (at 5.08 3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
(pad 7 thru_hole custom (at 7.62 3.81) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask F.SilkS)
(basic_shapes
(anchor_pad_shape circle)
))
(pad 8 smd custom (at 22.5 9.5) (size 1 1) (layers F.Cu F.Mask)
(basic_shapes
(anchor_pad_shape circle)
(gr_circle (center 0 -10) (end 2.5 -10) (width 1))
(gr_circle (center 0 -10) (end 5 -10) (width 1))
(gr_circle (center 0 -10) (end 7.5 -10) (width 1))
(gr_circle (center 0 -10) (end 10 -10) (width 1))
(gr_line (start 0 0) (end 0 -7.5) (width 1))
))
(pad 9 thru_hole oval (at 5.08 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
(pad 10 thru_hole oval (at 2.54 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
(pad 11 thru_hole oval (at 0 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
(pad 12 thru_hole oval (at -2.54 -3.81) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
(pad 13 thru_hole oval (at -5.08 -3.81 30) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
(pad 14 thru_hole trapezoid (at -7.62 -3.81) (size 1.5748 2.286) (rect_delta 0 1 ) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
(model dil/dil_14.wrl
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)
(module Connect:1pin (layer F.Cu) (tedit 56BE0964) (tstamp 56AA30DC)
(at 159.3 74.7)
(descr "module 1 pin (ou trou mecanique de percage)")
(tags DEV)
(fp_text reference REF_A2 (at -11.4 3) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value ANTENNA_pad_polyline (at 0 2.794) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -20 -10) (end 1.5 -10) (layer F.SilkS) (width 0.15))
(fp_line (start 1.5 -10) (end 1.5 1) (layer F.SilkS) (width 0.15))
(fp_line (start 1.5 1) (end -20 1) (layer F.SilkS) (width 0.15))
(fp_line (start -20 1) (end -20 -10) (layer F.SilkS) (width 0.15))
(pad 1 smd custom (at 0 0) (size 1 1) (layers F.Cu F.Paste F.Mask)
(basic_shapes
(anchor_pad_shape circle)
(gr_line (start -0.4928 -8.5) (end -0.4928 0.5) (width 0.1))
(gr_line (start -6.4928 -8.5) (end -0.4928 -8.5) (width 0.1))
(gr_line (start -6.4928 0.5) (end -6.4928 -8.5) (width 0.1))
(gr_line (start -7.4928 0.5) (end -6.4928 0.5) (width 0.1))
(gr_line (start -7.4928 -8.5) (end -7.4928 0.5) (width 0.1))
(gr_line (start -9.4928 -8.5) (end -7.4928 -8.5) (width 0.1))
(gr_line (start -9.4928 -4.5) (end -9.4928 -8.5) (width 0.1))
(gr_line (start -12.4928 -4.5) (end -9.4928 -4.5) (width 0.1))
(gr_line (start -12.4928 -8.5) (end -12.4928 -4.5) (width 0.1))
(gr_line (start -13.4928 -8.5) (end -12.4928 -8.5) (width 0.1))
(gr_line (start -13.4928 -4.5) (end -13.4928 -8.5) (width 0.1))
(gr_line (start -16.4928 -4.5) (end -13.4928 -4.5) (width 0.1))
(gr_line (start -16.4928 -8.5) (end -16.4928 -4.5) (width 0.1))
(gr_line (start -17.4928 -8.5) (end -16.4928 -8.5) (width 0.1))
(gr_line (start -17.4928 -4.5) (end -17.4928 -8.5) (width 0.1))
(gr_line (start -19.4928 -4.5) (end -17.4928 -4.5) (width 0.1))
(gr_line (start -19.4928 -9.5) (end -19.4928 -4.5) (width 0.1))
(gr_line (start -15.4928 -9.5) (end -19.4928 -9.5) (width 0.1))
(gr_line (start -15.4928 -5.5) (end -15.4928 -9.5) (width 0.1))
(gr_line (start -14.4928 -5.5) (end -15.4928 -5.5) (width 0.1))
(gr_line (start -14.4928 -9.5) (end -14.4928 -5.5) (width 0.1))
(gr_line (start -11.4928 -9.5) (end -14.4928 -9.5) (width 0.1))
(gr_line (start -11.4928 -5.5) (end -11.4928 -9.5) (width 0.1))
(gr_line (start -10.4928 -5.5) (end -11.4928 -5.5) (width 0.1))
(gr_line (start -10.4928 -9.5) (end -10.4928 -5.5) (width 0.1))
(gr_line (start 0.5072 -9.5) (end -10.4928 -9.5) (width 0.1))
(gr_line (start 0.5072 0.5) (end 0.5072 -9.5) (width 0.1))
(gr_line (start -0.4928 0.5) (end 0.5072 0.5) (width 0.1))
))
)
(module Connect:1pin (layer F.Cu) (tedit 56BE096F) (tstamp 56AA42FE)
(at 127.4 74.6)
(descr "module 1 pin (ou trou mecanique de percage)")
(tags DEV)
(fp_text reference REF_A1 (at 0 -3.048) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value ANTENNA_pad_olygon (at -2.2 2.7) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -20 -10) (end 1.5 -10) (layer F.SilkS) (width 0.15))
(fp_line (start 1.5 -10) (end 1.5 1) (layer F.SilkS) (width 0.15))
(fp_line (start 1.5 1) (end -20 1) (layer F.SilkS) (width 0.15))
(fp_line (start -20 1) (end -20 -10) (layer F.SilkS) (width 0.15))
(pad 1 smd custom (at 0 0) (size 1 1) (layers F.Cu F.Paste F.Mask)
(basic_shapes
(anchor_pad_shape circle)
(gr_poly (pts
(xy 0.5 0.4) (xy 0.5 -9.6) (xy -10.5 -9.6) (xy -10.5 -5.6) (xy -11.5 -5.6)
(xy -11.5 -9.6) (xy -14.5 -9.6) (xy -14.5 -5.6) (xy -15.5 -5.6) (xy -15.5 -9.6)
(xy -19.5 -9.6) (xy -19.5 -4.6) (xy -17.5 -4.6) (xy -17.5 -8.6) (xy -16.5 -8.6)
(xy -16.5 -4.6) (xy -13.5 -4.6) (xy -13.5 -8.6) (xy -12.5 -8.6) (xy -12.5 -4.6)
(xy -9.5 -4.6) (xy -9.5 -8.6) (xy -7.5 -8.6) (xy -7.5 0.4) (xy -6.5 0.4)
(xy -6.5 -8.6) (xy -0.5 -8.6) (xy -0.5 0.4)) (width 0.2))
))
)
(module Discret:C2 (layer F.Cu) (tedit 56BE08DA) (tstamp 56A6452D)
(at 104.299 99.72)
(descr "Condensateur = 2 pas")
(tags C)
(path /56A7CE3B)
(fp_text reference R1 (at -11.5 -15.1) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.2)))
)
(fp_text value R (at -13.4 14) (layer F.SilkS) hide
(effects (font (size 1.016 1.016) (thickness 0.2032)))
)
(fp_circle (center 0 0) (end 11.3 -11.3) (layer F.SilkS) (width 0.15))
(pad 1 smd custom (at -10.5 0 90) (size 1.397 1.397) (layers F.Cu F.Paste F.Mask)
(net 2 /PAD1)
(basic_shapes
(anchor_pad_shape circle)
(gr_line (start 6 1.9) (end 6 13.9) (width 2))
(gr_line (start -6 1.9) (end -6 13.9) (width 2))
(gr_line (start 0 -0.1) (end 0 18) (width 2))
(gr_arc (start 0 9.9) (end -9.9 7.9) (angle 156.7) (width 2))
))
(pad 2 smd custom (at 10.509 -0.025 270) (size 3 2) (layers F.Cu F.Paste F.Mask)
(net 1 /PAD2)
(basic_shapes
(anchor_pad_shape rect)
(gr_line (start 3 0.5) (end 3 17) (width 2))
(gr_line (start -3 0.5) (end -3 17) (width 2))
(gr_arc (start 0 9.9) (end -9.9 7.9) (angle 156.7) (width 2))
))
(model discret/capa_2pas_5x5mm.wrl
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)
(module Diodes_SMD:DO-214AB (layer F.Cu) (tedit 56A7CECF) (tstamp 56A72D3C)
(at 137.4 106.1)
(descr "Jedec DO-214AB diode package. Designed according to Fairchild SS32 datasheet.")
(tags "DO-214AB diode")
(path /56A7CEC8)
(attr smd)
(fp_text reference R2 (at 0 -4.2) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value R (at 0 4.6) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -5.15 -3.45) (end 5.15 -3.45) (layer F.CrtYd) (width 0.05))
(fp_line (start 5.15 -3.45) (end 5.15 3.45) (layer F.CrtYd) (width 0.05))
(fp_line (start 5.15 3.45) (end -5.15 3.45) (layer F.CrtYd) (width 0.05))
(fp_line (start -5.15 3.45) (end -5.15 -3.45) (layer F.CrtYd) (width 0.05))
(fp_line (start 3.5 3.2) (end -4.8 3.2) (layer F.SilkS) (width 0.15))
(fp_line (start -4.8 -3.2) (end 3.5 -3.2) (layer F.SilkS) (width 0.15))
(pad 2 smd roundrect (at 3.6 0) (size 2.6 3.2) (layers F.Cu F.Paste F.Mask)(roundrect_rratio 0.25)
(net 1 /PAD2))
(pad 1 smd roundrect (at -3.6 0) (size 2.6 3.2) (layers F.Cu F.Paste F.Mask)(roundrect_rratio 0.25)
(net 2 /PAD1))
(model Diodes_SMD.3dshapes/DO-214AB.wrl
(at (xyz 0 0 0))
(scale (xyz 0.39 0.39 0.39))
(rotate (xyz 0 0 180))
)
)
(gr_line (start 61 138) (end 61 48) (angle 90) (layer Edge.Cuts) (width 0.15))
(gr_line (start 179 138) (end 61 138) (angle 90) (layer Edge.Cuts) (width 0.15))
(gr_line (start 179 48) (end 179 138) (angle 90) (layer Edge.Cuts) (width 0.15))
(gr_line (start 61 48) (end 179 48) (angle 90) (layer Edge.Cuts) (width 0.15))
(gr_line (start 2.9 0.7) (end 2.9 16.5) (layer Eco1.User) (width 2))
(gr_line (start -3.1 0.8) (end -3.1 16.6) (layer Eco1.User) (width 2))
(gr_line (start 5.9 2.1) (end 5.9 14.1) (layer Cmts.User) (width 2))
(gr_line (start -6.1 2.1) (end -6.1 14.1) (layer Cmts.User) (width 2))
(gr_line (start -0.1 0.1) (end -0.1 17.1) (layer Cmts.User) (width 2))
(gr_arc (start -0.1 10.1) (end -10 8.1) (angle 156.7190291) (layer Cmts.User) (width 2))
(segment (start 141 102.7) (end 139.7 101.4) (width 0.5) (layer F.Cu) (net 1))
(segment (start 133.531 101.4) (end 139.7 101.4) (width 0.5) (layer F.Cu) (net 1))
(segment (start 131.826 99.695) (end 133.531 101.4) (width 0.5) (layer F.Cu) (net 1))
(segment (start 114.808 99.695) (end 131.826 99.695) (width 0.5) (layer F.Cu) (net 1))
(segment (start 141 106.1) (end 141 102.7) (width 0.5) (layer F.Cu) (net 1))
(segment (start 89.535 100.711) (end 90.526 99.72) (width 0.5) (layer F.Cu) (net 2))
(segment (start 90.526 99.72) (end 93.799 99.72) (width 0.5) (layer F.Cu) (net 2))
(segment (start 89.535 105.918) (end 89.535 100.711) (width 0.5) (layer F.Cu) (net 2))
(segment (start 94.841235 111.224235) (end 89.535 105.918) (width 0.5) (layer F.Cu) (net 2))
(segment (start 133.8 106.1) (end 128.675765 111.224235) (width 0.5) (layer F.Cu) (net 2))
(segment (start 128.675765 111.224235) (end 94.841235 111.224235) (width 0.5) (layer F.Cu) (net 2))
(zone (net 2) (net_name /PAD1) (layer F.Cu) (tstamp 56A8B810) (hatch edge 0.508)
(connect_pads (clearance 0.6))
(min_thickness 0.254)
(fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508))
(polygon
(pts
(xy 67.691 57.15) (xy 166.624 58.166) (xy 171.45 131.318) (xy 64.9 134.9)
)
)
(filled_polygon
(pts
(xy 166.505022 58.291785) (xy 171.31464 131.195479) (xy 65.031802 134.768498) (xy 65.561409 120.015) (xy 123.185358 120.015)
(xy 123.185358 122.301) (xy 123.241782 122.584661) (xy 123.402463 122.825137) (xy 123.642939 122.985818) (xy 123.9266 123.042242)
(xy 125.5014 123.042242) (xy 125.785061 122.985818) (xy 126.025537 122.825137) (xy 126.172521 122.60516) (xy 126.183157 122.621078)
(xy 126.674464 122.949358) (xy 127.254 123.064635) (xy 127.833536 122.949358) (xy 128.324843 122.621078) (xy 128.524 122.323018)
(xy 128.723157 122.621078) (xy 129.214464 122.949358) (xy 129.794 123.064635) (xy 130.373536 122.949358) (xy 130.864843 122.621078)
(xy 131.064 122.323018) (xy 131.263157 122.621078) (xy 131.754464 122.949358) (xy 132.334 123.064635) (xy 132.913536 122.949358)
(xy 133.404843 122.621078) (xy 133.604 122.323018) (xy 133.803157 122.621078) (xy 134.294464 122.949358) (xy 134.874 123.064635)
(xy 135.453536 122.949358) (xy 135.944843 122.621078) (xy 136.144 122.323018) (xy 136.343157 122.621078) (xy 136.834464 122.949358)
(xy 137.414 123.064635) (xy 137.993536 122.949358) (xy 138.484843 122.621078) (xy 138.789779 122.164707) (xy 138.793838 122.169828)
(xy 138.902297 122.282141) (xy 139.012466 122.375902) (xy 139.140674 122.465009) (xy 139.266958 122.535586) (xy 139.410032 122.598093)
(xy 139.547616 122.642797) (xy 139.700107 122.676324) (xy 139.843753 122.693452) (xy 139.999851 122.696722) (xy 140.14409 122.685624)
(xy 140.297851 122.658512) (xy 140.437186 122.619609) (xy 140.582752 122.563148) (xy 140.71188 122.497921) (xy 140.843707 122.414261)
(xy 140.957707 122.325195) (xy 141.070774 122.217522) (xy 141.165299 122.108013) (xy 141.255299 121.98043) (xy 141.326755 121.854645)
(xy 141.39026 121.712011) (xy 141.435923 121.574741) (xy 141.470514 121.422489) (xy 141.488863 121.268616) (xy 141.491353 121.090283)
(xy 141.477308 120.935961) (xy 141.446982 120.782802) (xy 141.405169 120.644308) (xy 141.345671 120.499956) (xy 141.277756 120.372227)
(xy 141.191354 120.242181) (xy 141.099921 120.130072) (xy 140.989904 120.019284) (xy 140.878436 119.92707) (xy 140.748996 119.839762)
(xy 140.621743 119.770957) (xy 140.47781 119.710453) (xy 140.339615 119.667674) (xy 140.186672 119.636279) (xy 140.042798 119.621157)
(xy 139.886669 119.620067) (xy 139.742596 119.633179) (xy 139.589229 119.662436) (xy 139.450454 119.70328) (xy 139.30569 119.761768)
(xy 139.177483 119.828793) (xy 139.046837 119.914286) (xy 138.934098 120.00493) (xy 138.822545 120.11417) (xy 138.790496 120.152365)
(xy 138.484843 119.694922) (xy 137.993536 119.366642) (xy 137.414 119.251365) (xy 136.834464 119.366642) (xy 136.343157 119.694922)
(xy 136.144 119.992982) (xy 135.944843 119.694922) (xy 135.453536 119.366642) (xy 134.874 119.251365) (xy 134.294464 119.366642)
(xy 133.803157 119.694922) (xy 133.604 119.992982) (xy 133.404843 119.694922) (xy 132.913536 119.366642) (xy 132.334 119.251365)
(xy 131.754464 119.366642) (xy 131.263157 119.694922) (xy 131.064 119.992982) (xy 130.864843 119.694922) (xy 130.373536 119.366642)
(xy 129.794 119.251365) (xy 129.214464 119.366642) (xy 128.723157 119.694922) (xy 128.524 119.992982) (xy 128.324843 119.694922)
(xy 127.833536 119.366642) (xy 127.254 119.251365) (xy 126.674464 119.366642) (xy 126.183157 119.694922) (xy 126.172521 119.71084)
(xy 126.025537 119.490863) (xy 125.785061 119.330182) (xy 125.5014 119.273758) (xy 123.9266 119.273758) (xy 123.642939 119.330182)
(xy 123.402463 119.490863) (xy 123.241782 119.731339) (xy 123.185358 120.015) (xy 65.561409 120.015) (xy 65.672058 116.932579)
(xy 143.596379 116.932579) (xy 143.598399 117.077229) (xy 143.826826 119.113699) (xy 143.856904 119.255203) (xy 144.476533 121.20852)
(xy 144.533523 121.341486) (xy 145.520752 123.13725) (xy 145.602483 123.256616) (xy 146.91971 124.826425) (xy 147.023069 124.927642)
(xy 148.62012 126.211704) (xy 148.741171 126.290917) (xy 150.557216 127.240322) (xy 150.691347 127.294515) (xy 152.657212 127.873101)
(xy 152.799315 127.900208) (xy 154.753034 128.085171) (xy 154.759274 128.085563) (xy 154.835878 128.087168) (xy 154.85684 128.087607)
(xy 154.984784 128.084926) (xy 157.022799 127.870722) (xy 157.164509 127.841633) (xy 159.122105 127.235656) (xy 159.255467 127.179596)
(xy 161.058078 126.204928) (xy 161.178011 126.124033) (xy 162.756979 124.817797) (xy 162.858915 124.715146) (xy 164.154095 123.127098)
(xy 164.234152 123.006603) (xy 165.196212 121.197231) (xy 165.251339 121.063482) (xy 165.843635 119.101704) (xy 165.871734 118.959794)
(xy 166.071705 116.920333) (xy 166.075171 116.83765) (xy 166.071077 116.544473) (xy 166.065304 116.461921) (xy 165.808466 114.428839)
(xy 165.776416 114.287768) (xy 165.129575 112.343292) (xy 165.070734 112.211134) (xy 164.058528 110.42933) (xy 163.975138 110.311118)
(xy 162.636122 108.759852) (xy 162.53136 108.660087) (xy 160.916536 107.398449) (xy 160.794391 107.320934) (xy 158.965268 106.396977)
(xy 158.830393 106.344662) (xy 156.856641 105.793581) (xy 156.714174 105.768461) (xy 154.670973 105.611245) (xy 154.526339 105.614274)
(xy 152.491513 105.856912) (xy 152.350222 105.887977) (xy 150.401278 106.521227) (xy 150.268712 106.579144) (xy 148.479885 107.578886)
(xy 148.361094 107.661448) (xy 146.800518 108.989602) (xy 146.700025 109.093666) (xy 145.427144 110.699643) (xy 145.348777 110.821243)
(xy 144.412073 112.643871) (xy 144.358818 112.778378) (xy 143.793971 114.748235) (xy 143.767857 114.890523) (xy 143.619827 116.653335)
(xy 143.596379 116.932579) (xy 65.672058 116.932579) (xy 65.752884 114.681) (xy 122.685358 114.681) (xy 122.741782 114.964661)
(xy 122.902463 115.205137) (xy 123.142939 115.365818) (xy 123.4266 115.422242) (xy 126.0014 115.422242) (xy 126.298473 115.360108)
(xy 126.535743 115.194729) (xy 126.590172 115.109696) (xy 127.058161 115.340484) (xy 127.647785 115.379129) (xy 128.207317 115.189195)
(xy 128.611822 114.834453) (xy 128.723157 115.001078) (xy 129.214464 115.329358) (xy 129.794 115.444635) (xy 130.373536 115.329358)
(xy 130.864843 115.001078) (xy 131.064 114.703018) (xy 131.263157 115.001078) (xy 131.754464 115.329358) (xy 132.334 115.444635)
(xy 132.913536 115.329358) (xy 133.404843 115.001078) (xy 133.604 114.703018) (xy 133.803157 115.001078) (xy 134.294464 115.329358)
(xy 134.874 115.444635) (xy 135.453536 115.329358) (xy 135.944843 115.001078) (xy 136.144 114.703018) (xy 136.343157 115.001078)
(xy 136.834464 115.329358) (xy 137.414 115.444635) (xy 137.993536 115.329358) (xy 138.484843 115.001078) (xy 138.813123 114.509771)
(xy 138.9284 113.930235) (xy 138.9284 113.145765) (xy 138.813123 112.566229) (xy 138.484843 112.074922) (xy 137.993536 111.746642)
(xy 137.414 111.631365) (xy 136.834464 111.746642) (xy 136.343157 112.074922) (xy 136.144 112.372982) (xy 135.944843 112.074922)
(xy 135.453536 111.746642) (xy 134.874 111.631365) (xy 134.294464 111.746642) (xy 133.803157 112.074922) (xy 133.604 112.372982)
(xy 133.404843 112.074922) (xy 132.913536 111.746642) (xy 132.334 111.631365) (xy 131.754464 111.746642) (xy 131.263157 112.074922)
(xy 131.064 112.372982) (xy 130.864843 112.074922) (xy 130.373536 111.746642) (xy 129.794 111.631365) (xy 129.214464 111.746642)
(xy 128.723157 112.074922) (xy 128.419956 112.528696) (xy 128.369392 112.441116) (xy 127.979792 111.996861) (xy 127.449839 111.735516)
(xy 126.860215 111.696871) (xy 126.300684 111.886806) (xy 125.856429 112.276406) (xy 125.804578 112.38155) (xy 125.680508 112.097927)
(xy 125.525537 111.870863) (xy 125.285061 111.710182) (xy 125.0014 111.653758) (xy 124.4266 111.653758) (xy 124.15646 111.704736)
(xy 123.912871 111.860657) (xy 123.747492 112.097927) (xy 122.747492 114.383927) (xy 122.685358 114.681) (xy 65.752884 114.681)
(xy 66.285983 99.83027) (xy 91.861623 99.83027) (xy 91.864844 99.9078) (xy 91.866153 99.921701) (xy 91.866655 99.926844)
(xy 92.06513 101.888002) (xy 92.075933 101.959614) (xy 92.108482 102.127393) (xy 92.126699 102.202818) (xy 92.130683 102.2162)
(xy 92.132177 102.221152) (xy 92.707795 104.106409) (xy 92.732301 104.174557) (xy 92.79682 104.332826) (xy 92.829357 104.403305)
(xy 92.835865 104.415658) (xy 92.838275 104.420194) (xy 93.769113 106.157741) (xy 93.806388 106.219829) (xy 93.900422 106.362555)
(xy 93.946009 106.425347) (xy 93.954792 106.436201) (xy 93.958055 106.440205) (xy 95.208656 107.96386) (xy 95.257283 108.017528)
(xy 95.377242 108.139265) (xy 95.434172 108.19202) (xy 95.444896 108.200961) (xy 95.448863 108.204245) (xy 96.971594 109.455973)
(xy 97.029718 109.499173) (xy 97.171043 109.595295) (xy 97.237136 109.635987) (xy 97.249393 109.642675) (xy 97.253919 109.645125)
(xy 98.990778 110.577247) (xy 99.056187 110.608335) (xy 99.213489 110.675174) (xy 99.286213 110.70225) (xy 99.299535 110.70643)
(xy 99.304464 110.707958) (xy 101.189293 111.284971) (xy 101.259496 111.302762) (xy 101.450797 111.341408) (xy 101.594711 111.35608)
(xy 101.789876 111.356834) (xy 101.933908 111.343273) (xy 102.125502 111.306104) (xy 102.26415 111.264827) (xy 102.444875 111.191153)
(xy 102.57287 111.12373) (xy 104.488601 109.878999) (xy 105.940622 110.967928) (xy 106.102855 111.076417) (xy 106.230391 111.144718)
(xy 106.410608 111.219628) (xy 106.54897 111.261854) (xy 106.740305 111.300334) (xy 106.884234 111.314881) (xy 107.079399 111.315465)
(xy 107.223419 111.301778) (xy 107.414981 111.264442) (xy 107.490261 111.245632) (xy 107.503611 111.241543) (xy 107.508547 111.240012)
(xy 109.372484 110.65486) (xy 109.440437 110.629819) (xy 109.596823 110.56471) (xy 109.667013 110.531714) (xy 109.679321 110.525121)
(xy 109.683901 110.522648) (xy 111.414907 109.579702) (xy 111.476737 109.541992) (xy 111.618795 109.446968) (xy 111.681296 109.400921)
(xy 111.692088 109.392062) (xy 111.696044 109.388792) (xy 113.210931 108.127585) (xy 113.264257 108.078586) (xy 113.385156 107.957777)
(xy 113.437507 107.900488) (xy 113.446373 107.889702) (xy 113.449634 107.885705) (xy 114.665192 106.38575) (xy 131.865 106.38575)
(xy 131.865 107.82631) (xy 131.961673 108.059699) (xy 132.140302 108.238327) (xy 132.373691 108.335) (xy 133.51425 108.335)
(xy 133.673 108.17625) (xy 133.673 106.227) (xy 133.927 106.227) (xy 133.927 108.17625) (xy 134.08575 108.335)
(xy 135.226309 108.335) (xy 135.459698 108.238327) (xy 135.638327 108.059699) (xy 135.735 107.82631) (xy 135.735 106.38575)
(xy 135.57625 106.227) (xy 133.927 106.227) (xy 133.673 106.227) (xy 132.02375 106.227) (xy 131.865 106.38575)
(xy 114.665192 106.38575) (xy 114.690701 106.354273) (xy 114.733494 106.295851) (xy 114.828629 106.153853) (xy 114.868846 106.0875)
(xy 114.875448 106.075198) (xy 114.877877 106.070635) (xy 115.773376 104.37369) (xy 131.865 104.37369) (xy 131.865 105.81425)
(xy 132.02375 105.973) (xy 133.673 105.973) (xy 133.673 104.02375) (xy 133.927 104.02375) (xy 133.927 105.973)
(xy 135.57625 105.973) (xy 135.735 105.81425) (xy 135.735 104.37369) (xy 135.638327 104.140301) (xy 135.459698 103.961673)
(xy 135.226309 103.865) (xy 134.08575 103.865) (xy 133.927 104.02375) (xy 133.673 104.02375) (xy 133.51425 103.865)
(xy 132.373691 103.865) (xy 132.140302 103.961673) (xy 131.961673 104.140301) (xy 131.865 104.37369) (xy 115.773376 104.37369)
(xy 115.797851 104.327312) (xy 115.82848 104.26169) (xy 115.894221 104.103925) (xy 115.920788 104.031014) (xy 115.924875 104.017663)
(xy 115.92637 104.01272) (xy 116.49021 102.123907) (xy 116.507511 102.053581) (xy 116.541354 101.886055) (xy 116.553253 101.80938)
(xy 116.554669 101.79549) (xy 116.555175 101.790344) (xy 116.661307 100.672) (xy 131.421314 100.672) (xy 132.840157 102.090843)
(xy 133.157118 102.30263) (xy 133.531 102.377) (xy 139.295314 102.377) (xy 140.023 103.104687) (xy 140.023 103.758758)
(xy 139.95 103.758758) (xy 139.570668 103.834212) (xy 139.249086 104.049086) (xy 139.034212 104.370668) (xy 138.958758 104.75)
(xy 138.958758 107.45) (xy 139.034212 107.829332) (xy 139.249086 108.150914) (xy 139.570668 108.365788) (xy 139.95 108.441242)
(xy 142.05 108.441242) (xy 142.429332 108.365788) (xy 142.750914 108.150914) (xy 142.965788 107.829332) (xy 143.041242 107.45)
(xy 143.041242 104.75) (xy 142.965788 104.370668) (xy 142.750914 104.049086) (xy 142.429332 103.834212) (xy 142.05 103.758758)
(xy 141.977 103.758758) (xy 141.977 102.7) (xy 141.902631 102.326119) (xy 141.690844 102.009157) (xy 140.390843 100.709157)
(xy 140.223931 100.59763) (xy 140.073882 100.49737) (xy 139.7 100.423) (xy 133.935686 100.423) (xy 132.516843 99.004157)
(xy 132.254732 98.82902) (xy 132.199882 98.79237) (xy 131.826 98.718) (xy 116.662403 98.718) (xy 116.54187 97.526998)
(xy 116.531067 97.455386) (xy 116.498518 97.287607) (xy 116.480301 97.212182) (xy 116.476317 97.1988) (xy 116.474823 97.193848)
(xy 115.899205 95.308591) (xy 115.874699 95.240443) (xy 115.81018 95.082174) (xy 115.777643 95.011695) (xy 115.771135 94.999342)
(xy 115.768725 94.994806) (xy 114.837887 93.257259) (xy 114.800612 93.195171) (xy 114.706578 93.052445) (xy 114.660991 92.989653)
(xy 114.652208 92.978799) (xy 114.648945 92.974795) (xy 113.398344 91.45114) (xy 113.349717 91.397472) (xy 113.229758 91.275735)
(xy 113.172828 91.22298) (xy 113.162104 91.214039) (xy 113.158137 91.210755) (xy 111.635406 89.959027) (xy 111.577282 89.915827)
(xy 111.435957 89.819705) (xy 111.369864 89.779013) (xy 111.357607 89.772325) (xy 111.353081 89.769875) (xy 109.616222 88.837753)
(xy 109.550813 88.806665) (xy 109.393511 88.739826) (xy 109.320787 88.71275) (xy 109.307465 88.70857) (xy 109.302536 88.707042)
(xy 107.417707 88.130029) (xy 107.347504 88.112238) (xy 107.156203 88.073592) (xy 107.012289 88.05892) (xy 106.817124 88.058166)
(xy 106.673092 88.071727) (xy 106.481498 88.108896) (xy 106.34285 88.150173) (xy 106.162125 88.223847) (xy 106.03413 88.29127)
(xy 105.871156 88.398645) (xy 104.37478 89.533319) (xy 102.504145 88.338583) (xy 102.376609 88.270282) (xy 102.196392 88.195372)
(xy 102.05803 88.153146) (xy 101.866695 88.114666) (xy 101.722766 88.100119) (xy 101.527601 88.099535) (xy 101.383581 88.113222)
(xy 101.192019 88.150558) (xy 101.116739 88.169368) (xy 101.103389 88.173457) (xy 101.098453 88.174988) (xy 99.234516 88.76014)
(xy 99.166563 88.785181) (xy 99.010177 88.85029) (xy 98.939987 88.883286) (xy 98.927679 88.889879) (xy 98.923099 88.892352)
(xy 97.192093 89.835298) (xy 97.130263 89.873008) (xy 96.988205 89.968032) (xy 96.925704 90.014079) (xy 96.914912 90.022938)
(xy 96.910956 90.026208) (xy 95.396069 91.287415) (xy 95.342743 91.336414) (xy 95.221844 91.457223) (xy 95.169493 91.514512)
(xy 95.160627 91.525298) (xy 95.157366 91.529295) (xy 93.916299 93.060727) (xy 93.873506 93.119149) (xy 93.778371 93.261147)
(xy 93.738154 93.3275) (xy 93.731552 93.339802) (xy 93.729123 93.344365) (xy 92.809149 95.087688) (xy 92.77852 95.15331)
(xy 92.712779 95.311075) (xy 92.686212 95.383986) (xy 92.682125 95.397337) (xy 92.68063 95.40228) (xy 92.11679 97.291093)
(xy 92.099489 97.361419) (xy 92.065646 97.528945) (xy 92.053747 97.60562) (xy 92.052331 97.61951) (xy 92.051825 97.624656)
(xy 91.865595 99.587014) (xy 91.862283 99.659359) (xy 91.861623 99.83027) (xy 66.285983 99.83027) (xy 67.536289 65)
(xy 107.058757 65) (xy 107.058757 70) (xy 107.062325 70.072637) (xy 107.064246 70.092146) (xy 107.092601 70.234698)
(xy 107.098292 70.253457) (xy 107.153891 70.387683) (xy 107.163132 70.404972) (xy 107.243854 70.525784) (xy 107.25629 70.540938)
(xy 107.359062 70.64371) (xy 107.374216 70.656146) (xy 107.495028 70.736868) (xy 107.512317 70.746109) (xy 119.512317 75.746109)
(xy 119.646543 75.801708) (xy 119.665302 75.807399) (xy 119.807854 75.835754) (xy 119.827363 75.837675) (xy 119.9 75.841243)
(xy 127.9 75.841243) (xy 127.972637 75.837675) (xy 127.992146 75.835754) (xy 128.134698 75.807399) (xy 128.153457 75.801708)
(xy 128.287683 75.746109) (xy 128.304972 75.736868) (xy 128.425784 75.656146) (xy 128.440938 75.64371) (xy 128.54371 75.540938)
(xy 128.556146 75.525784) (xy 128.636868 75.404972) (xy 128.646109 75.387683) (xy 128.701708 75.253457) (xy 128.707399 75.234698)
(xy 128.735754 75.092146) (xy 128.737675 75.072637) (xy 128.741243 75) (xy 128.741243 65.2) (xy 139.015957 65.2)
(xy 139.015957 70.2) (xy 139.019491 70.2723) (xy 139.019899 70.276607) (xy 139.020267 70.280184) (xy 139.047514 70.420387)
(xy 139.048557 70.423991) (xy 139.049754 70.428005) (xy 139.051339 70.433204) (xy 139.103893 70.562038) (xy 139.106487 70.567032)
(xy 139.108468 70.57079) (xy 139.110249 70.574105) (xy 139.188638 70.693029) (xy 139.191123 70.696146) (xy 139.193769 70.699414)
(xy 139.196177 70.70234) (xy 139.296523 70.804071) (xy 139.29923 70.806366) (xy 139.302512 70.809099) (xy 139.30789 70.813528)
(xy 139.308026 70.81364) (xy 139.420423 70.890023) (xy 139.420575 70.890107) (xy 139.426737 70.893512) (xy 139.430375 70.895496)
(xy 139.434371 70.897639) (xy 139.564493 70.952857) (xy 151.564493 75.952857) (xy 151.568644 75.95419) (xy 151.57267 75.955451)
(xy 151.576526 75.956629) (xy 151.708871 75.984738) (xy 151.715418 75.985668) (xy 151.719622 75.986157) (xy 151.723909 75.986622)
(xy 151.724367 75.986656) (xy 151.802063 75.991225) (xy 151.802427 75.991228) (xy 151.802761 75.99123) (xy 151.8072 75.991243)
(xy 159.8072 75.991243) (xy 159.8795 75.987709) (xy 159.883807 75.987301) (xy 159.887384 75.986933) (xy 160.027587 75.959686)
(xy 160.031191 75.958643) (xy 160.035205 75.957446) (xy 160.040404 75.955861) (xy 160.169238 75.903307) (xy 160.174232 75.900713)
(xy 160.17799 75.898732) (xy 160.181305 75.896951) (xy 160.300229 75.818562) (xy 160.303346 75.816077) (xy 160.306614 75.813431)
(xy 160.30954 75.811023) (xy 160.411271 75.710677) (xy 160.413566 75.70797) (xy 160.416299 75.704688) (xy 160.420728 75.69931)
(xy 160.42084 75.699174) (xy 160.497223 75.586777) (xy 160.497307 75.586625) (xy 160.500712 75.580463) (xy 160.502696 75.576825)
(xy 160.504839 75.572829) (xy 160.560057 75.442707) (xy 160.56139 75.438556) (xy 160.562651 75.43453) (xy 160.563829 75.430674)
(xy 160.591938 75.298329) (xy 160.592868 75.291782) (xy 160.593357 75.287578) (xy 160.593822 75.283291) (xy 160.593856 75.282833)
(xy 160.598425 75.205137) (xy 160.598428 75.204773) (xy 160.59843 75.204439) (xy 160.598443 75.2) (xy 160.598443 65.2)
(xy 160.594909 65.1277) (xy 160.594501 65.123393) (xy 160.594133 65.119816) (xy 160.566886 64.979613) (xy 160.565843 64.976009)
(xy 160.564646 64.971995) (xy 160.563061 64.966796) (xy 160.510507 64.837962) (xy 160.507913 64.832968) (xy 160.505932 64.82921)
(xy 160.504151 64.825895) (xy 160.425762 64.706971) (xy 160.423277 64.703854) (xy 160.420631 64.700586) (xy 160.418223 64.69766)
(xy 160.317877 64.595929) (xy 160.31517 64.593634) (xy 160.311888 64.590901) (xy 160.30651 64.586472) (xy 160.306374 64.58636)
(xy 160.193977 64.509977) (xy 160.193825 64.509893) (xy 160.187663 64.506488) (xy 160.184025 64.504504) (xy 160.180029 64.502361)
(xy 160.049907 64.447143) (xy 160.045756 64.44581) (xy 160.04173 64.444549) (xy 160.037874 64.443371) (xy 159.905529 64.415262)
(xy 159.898982 64.414332) (xy 159.894778 64.413843) (xy 159.890491 64.413378) (xy 159.890033 64.413344) (xy 159.812337 64.408775)
(xy 159.811973 64.408772) (xy 159.811639 64.40877) (xy 159.8072 64.408757) (xy 139.8072 64.408757) (xy 139.7349 64.412291)
(xy 139.730593 64.412699) (xy 139.727016 64.413067) (xy 139.586813 64.440314) (xy 139.583209 64.441357) (xy 139.579195 64.442554)
(xy 139.573996 64.444139) (xy 139.445162 64.496693) (xy 139.440168 64.499287) (xy 139.43641 64.501268) (xy 139.433095 64.503049)
(xy 139.314171 64.581438) (xy 139.311054 64.583923) (xy 139.307786 64.586569) (xy 139.30486 64.588977) (xy 139.203129 64.689323)
(xy 139.200834 64.69203) (xy 139.198101 64.695312) (xy 139.193672 64.70069) (xy 139.19356 64.700826) (xy 139.117177 64.813223)
(xy 139.117093 64.813375) (xy 139.113688 64.819537) (xy 139.111704 64.823175) (xy 139.109561 64.827171) (xy 139.054343 64.957293)
(xy 139.05301 64.961444) (xy 139.051749 64.96547) (xy 139.050571 64.969326) (xy 139.022462 65.101671) (xy 139.021532 65.108218)
(xy 139.021043 65.112422) (xy 139.020578 65.116709) (xy 139.020544 65.117167) (xy 139.015975 65.194863) (xy 139.015972 65.195227)
(xy 139.01597 65.195561) (xy 139.015957 65.2) (xy 128.741243 65.2) (xy 128.741243 65) (xy 128.737675 64.927363)
(xy 128.735754 64.907854) (xy 128.707399 64.765302) (xy 128.701708 64.746543) (xy 128.646109 64.612317) (xy 128.636868 64.595028)
(xy 128.556146 64.474216) (xy 128.54371 64.459062) (xy 128.440938 64.35629) (xy 128.425784 64.343854) (xy 128.304972 64.263132)
(xy 128.287683 64.253891) (xy 128.153457 64.198292) (xy 128.134698 64.192601) (xy 127.992146 64.164246) (xy 127.972637 64.162325)
(xy 127.9 64.158757) (xy 107.9 64.158757) (xy 107.827363 64.162325) (xy 107.807854 64.164246) (xy 107.665302 64.192601)
(xy 107.646543 64.198292) (xy 107.512317 64.253891) (xy 107.495028 64.263132) (xy 107.374216 64.343854) (xy 107.359062 64.35629)
(xy 107.25629 64.459062) (xy 107.243854 64.474216) (xy 107.163132 64.595028) (xy 107.153891 64.612317) (xy 107.098292 64.746543)
(xy 107.092601 64.765302) (xy 107.064246 64.907854) (xy 107.062325 64.927363) (xy 107.058757 65) (xy 67.536289 65)
(xy 67.813477 57.278264)
)
)
)
)
Attachment:
pad_model-brd.svg
Description: image/svg
=== modified file 'common/CMakeLists.txt'
--- common/CMakeLists.txt 2016-01-16 01:56:57 +0000
+++ common/CMakeLists.txt 2016-02-01 07:05:36 +0000
@@ -295,6 +295,7 @@
geometry/shape_poly_set.cpp
geometry/shape_collisions.cpp
geometry/shape_file_io.cpp
+ geometry/convex_hull.cpp
)
add_library( common STATIC ${COMMON_SRCS} )
add_dependencies( common lib-dependencies )
@@ -329,6 +330,7 @@
../pcbnew/class_mire.cpp
../pcbnew/class_module.cpp
../pcbnew/class_pad.cpp
+ ../pcbnew/class_pad_custom_shape_functions.cpp
../pcbnew/class_pad_draw_functions.cpp
../pcbnew/class_pcb_text.cpp
../pcbnew/class_text_mod.cpp
=== added file 'common/geometry/convex_hull.cpp'
--- common/geometry/convex_hull.cpp 1970-01-01 00:00:00 +0000
+++ common/geometry/convex_hull.cpp 2016-02-05 18:59:29 +0000
@@ -0,0 +1,167 @@
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you may find one here:
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ * or you may search the http://www.gnu.org website for the version 2 license,
+ * or you may write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+
+/*
+ * Implementation of Andrew's monotone chain 2D convex hull algorithm.
+ * Asymptotic complexity: O(n log n).
+ * See http://www.algorithmist.com/index.php/Monotone_Chain_Convex_Hull
+ * (Licence GNU Free Documentation License 1.2)
+ *
+ * Pseudo-code:
+ *
+ * Input: a list P of points in the plane.
+ *
+ * Sort the points of P by x-coordinate (in case of a tie, sort by y-coordinate).
+ *
+ * Initialize U and L as empty lists.
+ * The lists will hold the vertices of upper and lower hulls respectively.
+ *
+ * for i = 1, 2, ..., n:
+ * while L contains at least two points and the sequence of last two points
+ * of L and the point P[i] does not make a counter-clockwise turn:
+ * remove the last point from L
+ * append P[i] to L
+ *
+ * for i = n, n-1, ..., 1:
+ * while U contains at least two points and the sequence of last two points
+ * of U and the point P[i] does not make a counter-clockwise turn:
+ * remove the last point from U
+ * append P[i] to U
+ *
+ * Remove the last point of each list (it's the same as the first point of the other list).
+ * Concatenate L and U to obtain the convex hull of P.
+ * Points in the result will be listed in counter-clockwise order.
+ */
+
+#include <geometry/shape_poly_set.h>
+#include <geometry/convex_hull.h>
+
+#include <algorithm>
+#include <wx/wx.h>
+#include <trigo.h>
+
+
+typedef long long coord2_t; // must be big enough to hold 2*max(|coordinate|)^2
+
+// this function is used to sort points.
+// Andrew's monotone chain 2D convex hull algorithm needs a sorted set of points
+static bool compare_point( const wxPoint& ref, const wxPoint& p )
+{
+ return ref.x < p.x || (ref.x == p.x && ref.y < p.y);
+}
+
+
+// 2D cross product of OA and OB vectors, i.e. z-component of their 3D cross product.
+// Returns a positive value, if OAB makes a counter-clockwise turn,
+// negative for clockwise turn, and zero if the points are collinear.
+static coord2_t cross_product( const wxPoint& O, const wxPoint& A, const wxPoint& B )
+{
+ return (coord2_t) (A.x - O.x) * (coord2_t) (B.y - O.y)
+ - (coord2_t) (A.y - O.y) * (coord2_t) (B.x - O.x);
+}
+
+
+// Fills aResult with a list of points on the convex hull in counter-clockwise order.
+void BuildConvexHull( std::vector<wxPoint>& aResult, const std::vector<wxPoint>& aPoly )
+{
+ std::vector<wxPoint> poly = aPoly;
+ int point_count = poly.size();
+
+ if( point_count < 2 ) // Should not happen, but who know
+ return;
+
+ // Sort points lexicographically
+ // Andrew's monotone chain 2D convex hull algorithm needs that
+ std::sort( poly.begin(), poly.end(), compare_point );
+
+ int k = 0;
+
+ // Store room (2 * n points) for result:
+ // The actual convex hull use less point. the room will be adjusted later
+ aResult.resize( 2 * point_count );
+
+ // Build lower hull
+ for( int ii = 0; ii < point_count; ++ii )
+ {
+ while( k >= 2 && cross_product( aResult[k - 2], aResult[k - 1], poly[ii] ) <= 0 )
+ k--;
+
+ aResult[k++] = poly[ii];
+ }
+
+ // Build upper hull
+ for( int ii = point_count - 2, t = k + 1; ii >= 0; ii-- )
+ {
+ while( k >= t && cross_product( aResult[k - 2], aResult[k - 1], poly[ii] ) <= 0 )
+ k--;
+
+ aResult[k++] = poly[ii];
+ }
+
+ // The last point in the list is the same as the first one.
+ // This is not needed, and sometimes create issues ( 0 length polygon segment:
+ // remove it:
+
+ if( k > 1 && aResult[0] == aResult[k - 1] )
+ k -= 1;
+
+ aResult.resize( k );
+}
+
+
+void BuildConvexHull( std::vector<wxPoint>& aResult,
+ const SHAPE_POLY_SET& aPolygons )
+{
+ return BuildConvexHull( aResult, aPolygons, wxPoint( 0, 0 ), 0.0 );
+}
+
+
+void BuildConvexHull( std::vector<wxPoint>& aResult,
+ const SHAPE_POLY_SET& aPolygons,
+ wxPoint aPosition, double aRotation )
+{
+ // Build the convex hull of the SHAPE_POLY_SET
+ std::vector<wxPoint> buf;
+
+ for( int cnt = 0; cnt < aPolygons.OutlineCount(); cnt++ )
+ {
+ const SHAPE_LINE_CHAIN& poly = aPolygons.COutline( cnt );
+
+ for( int ii = 0; ii < poly.PointCount(); ++ii )
+ {
+ buf.push_back( wxPoint( poly.CPoint( ii ).x, poly.CPoint( ii ).y ) );
+ }
+ }
+
+ BuildConvexHull(aResult, buf );
+
+ // Move and rotate the points according to aPosition and aRotation
+
+ for( unsigned ii = 0; ii < aResult.size(); ii++ )
+ {
+ RotatePoint( &aResult[ii], aRotation );
+ aResult[ii] += aPosition;
+ }
+}
=== modified file 'common/geometry/shape_line_chain.cpp'
--- common/geometry/shape_line_chain.cpp 2015-08-03 18:29:44 +0000
+++ common/geometry/shape_line_chain.cpp 2016-02-08 08:42:54 +0000
@@ -382,7 +382,11 @@
is.p = s2a;
return is;
}
- else if( CSegment( s1 ).Contains( s2b ) )
+ else if( CSegment( s1 ).Contains( s2b ) &&
+ // for closed polylines, the ending point of the
+ // last segment == starting point of the first segment
+ // this is a normal case, not self intersecting case
+ !( IsClosed() && s1 == 0 && s2 == SegmentCount()-1 ) )
{
INTERSECTION is;
is.our = CSegment( s1 );
=== modified file 'common/pcb.keywords'
--- common/pcb.keywords 2013-09-17 00:52:08 +0000
+++ common/pcb.keywords 2016-02-04 17:30:55 +0000
@@ -25,6 +25,7 @@
add_net
allowed
+anchor_pad_shape
angle
arc
arc_segments
@@ -38,6 +39,7 @@
autoplace_cost90
autoplace_cost180
aux_axis_origin
+basic_shapes
blind
blind_buried_vias_allowed
bold
@@ -52,6 +54,7 @@
connect_pads
copperpour
crossbar
+custom
date
descr
die_length
@@ -142,6 +145,8 @@
reference
right
rotate
+roundrect
+roundrect_rratio
scale
segment
segment_width
=== added file 'include/geometry/convex_hull.h'
--- include/geometry/convex_hull.h 1970-01-01 00:00:00 +0000
+++ include/geometry/convex_hull.h 2016-02-01 07:55:55 +0000
@@ -0,0 +1,59 @@
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you may find one here:
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ * or you may search the http://www.gnu.org website for the version 2 license,
+ * or you may write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __CONVEX_HULL_H
+#define __CONVEX_HULL_H
+
+
+#include <vector>
+class wxPoint; // Defined in wxWidgets
+class SHAPE_POLY_SET;
+
+/**
+ * Calculate the convex hull of a list of points
+ * in counter-clockwise order.
+ * @param aResult = a vector to store the convex polygon.
+ * @param aPoly is the list of points.
+ */
+
+void BuildConvexHull( std::vector<wxPoint>& aResult, const std::vector<wxPoint>& aPoly);
+
+
+/**
+ * Calculate the convex hull of a SHAPE_POLY_SET
+ * @param aResult = a vector to store the convex polygon.
+ * @param aPolygons = the SHAPE_POLY_SET
+ */
+void BuildConvexHull( std::vector<wxPoint>& aResult, const SHAPE_POLY_SET& aPolygons );
+
+/**
+ * Calculate the convex hull (rotated and moved) of a SHAPE_POLY_SET
+ * @param aResult = a vector to store the convex polygon.
+ * @param aPolygons is the set of polygons
+ * @param aPosition = the final position of the convex hull
+ * @param aRotation = the rotation of the convex hull
+ */
+void BuildConvexHull( std::vector<wxPoint>& aResult, const SHAPE_POLY_SET& aPolygons,
+ wxPoint aPosition, double aRotation );
+#endif // __CONVEX_HULL_H
=== modified file 'include/geometry/shape_rect.h'
--- include/geometry/shape_rect.h 2015-08-19 16:07:16 +0000
+++ include/geometry/shape_rect.h 2016-02-05 09:45:52 +0000
@@ -146,9 +146,9 @@
{
SHAPE_LINE_CHAIN rv;
rv.Append( m_p0 );
- rv.Append( m_p0.x, m_p0.y + m_w );
- rv.Append( m_p0.x + m_h, m_p0.y + m_w );
- rv.Append( m_p0.x + m_h, m_p0.y );
+ rv.Append( m_p0.x, m_p0.y + m_h );
+ rv.Append( m_p0.x + m_w, m_p0.y + m_h );
+ rv.Append( m_p0.x + m_w, m_p0.y );
rv.Append( m_p0 );
rv.SetClosed( true );
return rv;
=== modified file 'include/pad_shapes.h'
--- include/pad_shapes.h 2016-01-12 16:33:33 +0000
+++ include/pad_shapes.h 2016-01-25 07:22:46 +0000
@@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
- * Copyright (C) 1992-2014 KiCad Developers, see CHANGELOG.TXT for contributors.
+ * Copyright (C) 1992-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
@@ -27,6 +27,7 @@
/**
* Enum PAD_SHAPE_T
* is the set of pad shapes, used with D_PAD::{Set,Get}Shape()
+ * The double name is for copatibility with old Python scripts
*/
enum PAD_SHAPE_T
{
@@ -37,13 +38,14 @@
PAD_SHAPE_OVAL,
PAD_OVAL = PAD_SHAPE_OVAL,
PAD_SHAPE_TRAPEZOID,
- PAD_TRAPEZOID = PAD_SHAPE_TRAPEZOID
+ PAD_TRAPEZOID = PAD_SHAPE_TRAPEZOID,
+ PAD_SHAPE_ROUNDRECT,
+ PAD_SHAPE_CUSTOM // A shape defined by user
};
/**
* Enum PAD_DRILL_SHAPE_T
* is the set of pad drill shapes, used with D_PAD::{Set,Get}DrillShape()
- * The double name is for convenience of Python devs
*/
enum PAD_DRILL_SHAPE_T
{
=== modified file 'pcbnew/CMakeLists.txt'
--- pcbnew/CMakeLists.txt 2016-01-29 10:24:39 +0000
+++ pcbnew/CMakeLists.txt 2016-02-02 11:16:28 +0000
@@ -124,6 +124,7 @@
dialogs/dialog_non_copper_zones_properties_base.cpp
dialogs/dialog_pad_properties.cpp
dialogs/dialog_pad_properties_base.cpp
+ dialogs/dialog_pad_basicshapes_properties.cpp
dialogs/dialog_plot_base.cpp
dialogs/dialog_plot.cpp
dialogs/dialog_print_for_modedit.cpp
=== modified file 'pcbnew/board_items_to_polygon_shape_transform.cpp'
--- pcbnew/board_items_to_polygon_shape_transform.cpp 2015-12-15 20:21:25 +0000
+++ pcbnew/board_items_to_polygon_shape_transform.cpp 2016-01-27 13:42:21 +0000
@@ -1,8 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
- * Copyright (C) 2009-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
- * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 2009-2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 1992-2016 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
@@ -552,7 +552,7 @@
* clearance when the circle is approximated by segment bigger or equal
* to the real clearance value (usually near from 1.0)
*/
-void D_PAD:: TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
+void D_PAD::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
int aClearanceValue,
int aCircleToSegmentsCount,
double aCorrectionFactor ) const
@@ -561,14 +561,14 @@
int dx = (m_Size.x / 2) + aClearanceValue;
int dy = (m_Size.y / 2) + aClearanceValue;
- wxPoint PadShapePos = ShapePos(); /* Note: for pad having a shape offset,
+ wxPoint padShapePos = ShapePos(); /* Note: for pad having a shape offset,
* the pad position is NOT the shape position */
switch( GetShape() )
{
case PAD_SHAPE_CIRCLE:
dx = KiROUND( dx * aCorrectionFactor );
- TransformCircleToPolygon( aCornerBuffer, PadShapePos, dx,
+ TransformCircleToPolygon( aCornerBuffer, padShapePos, dx,
aCircleToSegmentsCount );
break;
@@ -591,8 +591,8 @@
}
RotatePoint( &shape_offset, angle );
- wxPoint start = PadShapePos - shape_offset;
- wxPoint end = PadShapePos + shape_offset;
+ wxPoint start = padShapePos - shape_offset;
+ wxPoint end = padShapePos + shape_offset;
TransformRoundedEndsSegmentToPolygon( aCornerBuffer, start, end,
aCircleToSegmentsCount, width );
}
@@ -605,25 +605,56 @@
BuildPadPolygon( corners, wxSize( 0, 0 ), angle );
SHAPE_POLY_SET outline;
-
outline.NewOutline();
for( int ii = 0; ii < 4; ii++ )
{
- corners[ii] += PadShapePos;
+ corners[ii] += padShapePos;
outline.Append( corners[ii].x, corners[ii].y );
}
- double rounding_radius = aClearanceValue * aCorrectionFactor;
-
- outline.Inflate( (int) rounding_radius, aCircleToSegmentsCount );
-
+ int rounding_radius = int( aClearanceValue * aCorrectionFactor );
+ outline.Inflate( rounding_radius, aCircleToSegmentsCount );
+
+ aCornerBuffer.Append( outline );
+ }
+ break;
+
+ case PAD_SHAPE_ROUNDRECT:
+ {
+ SHAPE_POLY_SET outline;
+ int pad_radius = GetRoundRectCornerRadius();
+ int clearance = int( aClearanceValue * aCorrectionFactor );
+ int rounding_radius = pad_radius + clearance;
+ wxSize shapesize( m_Size );
+ shapesize.x += clearance*2;
+ shapesize.y += clearance*2;
+
+ TransformRoundRectToPolygon( outline, padShapePos, shapesize, angle,
+ rounding_radius, aCircleToSegmentsCount );
+
+ aCornerBuffer.Append( outline );
+ }
+ break;
+
+ case PAD_SHAPE_CUSTOM:
+ {
+ int clearance = KiROUND( aClearanceValue * aCorrectionFactor );
+
+ SHAPE_POLY_SET outline; // Will contain the corners in board coordinates
+ outline.Append( m_customShapeAsPolygon );
+ BasicShapesAsPolygonToBoardPosition( &outline, GetPosition(), GetOrientation() );
+ outline.Inflate( clearance, aCircleToSegmentsCount );
aCornerBuffer.Append( outline );
}
break;
}
}
+
+
+
+
/*
* Function BuildPadShapePolygon
* Build the Corner list of the polygonal shape,
@@ -636,12 +667,14 @@
double aCorrectionFactor ) const
{
wxPoint corners[4];
- wxPoint PadShapePos = ShapePos(); /* Note: for pad having a shape offset,
- * the pad position is NOT the shape position */
+ wxPoint padShapePos = ShapePos(); /* Note: for pad having a shape offset,
+ * the pad position is NOT the shape position */
switch( GetShape() )
{
case PAD_SHAPE_CIRCLE:
case PAD_SHAPE_OVAL:
+ case PAD_SHAPE_ROUNDRECT:
+ case PAD_SHAPE_CUSTOM:
TransformShapeWithClearanceToPolygon( aCornerBuffer, aInflateValue.x,
aSegmentsPerCircle, aCorrectionFactor );
break;
@@ -653,7 +686,7 @@
BuildPadPolygon( corners, aInflateValue, m_Orient );
for( int ii = 0; ii < 4; ii++ )
{
- corners[ii] += PadShapePos; // Shift origin to position
+ corners[ii] += padShapePos; // Shift origin to position
aCornerBuffer.Append( corners[ii].x, corners[ii].y );
}
@@ -734,7 +767,7 @@
double aThermalRot )
{
wxPoint corner, corner_end;
- wxPoint PadShapePos = aPad.ShapePos(); // Note: for pad having a shape offset,
+ wxPoint padShapePos = aPad.ShapePos(); // Note: for pad having a shape offset,
// the pad position is NOT the shape position
wxSize copper_thickness;
@@ -836,7 +869,7 @@
{
corner = corners_buffer[ii];
RotatePoint( &corner, th_angle + angle_pad ); // Rotate by segment angle and pad orientation
- corner += PadShapePos;
+ corner += padShapePos;
aCornerBuffer.Append( corner.x, corner.y );
}
@@ -940,7 +973,7 @@
{
wxPoint cpos = corners_buffer[ic];
RotatePoint( &cpos, angle );
- cpos += PadShapePos;
+ cpos += padShapePos;
aCornerBuffer.Append( cpos.x, cpos.y );
}
@@ -966,7 +999,7 @@
{
wxPoint cpos = corners_buffer[ic];
RotatePoint( &cpos, angle );
- cpos += PadShapePos;
+ cpos += padShapePos;
aCornerBuffer.Append( cpos.x, cpos.y );
}
@@ -975,7 +1008,8 @@
}
break;
- case PAD_SHAPE_RECT: // draw 4 Holes
+ case PAD_SHAPE_ROUNDRECT: // thermal shape is the same for round rect and rect.
+ case PAD_SHAPE_RECT:
{
/* we create 4 copper holes and put them in position 1, 2, 3 and 4
* here is the area of the rectangular pad + its thermal gap
@@ -1039,7 +1073,7 @@
{
wxPoint cpos = corners_buffer[ic];
RotatePoint( &cpos, angle ); // Rotate according to module orientation
- cpos += PadShapePos; // Shift origin to position
+ cpos += padShapePos; // Shift origin to position
aCornerBuffer.Append( cpos.x, cpos.y );
}
@@ -1063,7 +1097,7 @@
{
wxPoint cpos = corners_buffer[ic];
RotatePoint( &cpos, angle );
- cpos += PadShapePos;
+ cpos += padShapePos;
aCornerBuffer.Append( cpos.x, cpos.y );
}
@@ -1110,7 +1144,7 @@
{
wxPoint cpos = stubBuffer[ii];
RotatePoint( &cpos, aPad.GetOrientation() );
- cpos += PadShapePos;
+ cpos += padShapePos;
stub.Append( cpos.x, cpos.y );
}
@@ -1132,7 +1166,7 @@
{
wxPoint cpos = stubBuffer[ii];
RotatePoint( &cpos, aPad.GetOrientation() );
- cpos += PadShapePos;
+ cpos += padShapePos;
stub.Append( cpos.x, cpos.y );
}
=== modified file 'pcbnew/class_pad.cpp'
--- pcbnew/class_pad.cpp 2015-12-27 15:51:13 +0000
+++ pcbnew/class_pad.cpp 2016-02-05 08:08:28 +0000
@@ -1,9 +1,9 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
- * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@xxxxxxxxxxxxxxx
+ * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
- * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2016 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
@@ -30,24 +30,20 @@
#include <fctsys.h>
#include <PolyLine.h>
-#include <common.h>
-#include <confirm.h>
-#include <kicad_string.h>
#include <trigo.h>
-#include <richio.h>
#include <wxstruct.h>
#include <macros.h>
#include <msgpanel.h>
#include <base_units.h>
#include <pcbnew.h>
-#include <pcbnew_id.h> // ID_TRACK_BUTT
#include <class_board.h>
#include <class_module.h>
#include <polygon_test_point_inside.h>
#include <convert_from_iu.h>
#include <boost/foreach.hpp>
+#include <convert_basic_shapes_to_polygon.h>
int D_PAD::m_PadSketchModePenSize = 0; // Pen size used to draw pads in sketch mode
@@ -68,12 +64,18 @@
}
SetShape( PAD_SHAPE_CIRCLE ); // Default pad shape is PAD_CIRCLE.
+ SetAnchorPadShape( PAD_SHAPE_CIRCLE ); // Default shape for custom shaped pads
+ // is PAD_CIRCLE.
SetDrillShape( PAD_DRILL_SHAPE_CIRCLE ); // Default pad drill shape is a circle.
m_Attribute = PAD_ATTRIB_STANDARD; // Default pad type is NORMAL (thru hole)
m_LocalClearance = 0;
m_LocalSolderMaskMargin = 0;
m_LocalSolderPasteMargin = 0;
m_LocalSolderPasteMarginRatio = 0.0;
+ // Parameters for round rect only:
+ m_padRoundRectRadiusScale = 0.25; // from IPC-7351C standard
+ m_padRoundRectRadiusMax = Millimeter2iu( 0.25 ); // from IPC-7351C standard
+
m_ZoneConnection = PAD_ZONE_CONN_INHERITED; // Use parent setting by default
m_ThermalWidth = 0; // Use parent setting by default
m_ThermalGap = 0; // Use parent setting by default
@@ -110,12 +112,16 @@
LSET D_PAD::UnplatedHoleMask()
{
- // was #define PAD_ATTRIB_HOLE_NOT_PLATED_DEFAULT_LAYERS ALL_CU_LAYERS |
- // SILKSCREEN_LAYER_FRONT | SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT
static LSET saved = LSET::AllCuMask() | LSET( 3, F_SilkS, B_Mask, F_Mask );
return saved;
}
+bool D_PAD::IsFlipped()
+{
+ if( GetParent() && GetParent()->GetLayer() == B_Cu )
+ return true;
+ return false;
+}
int D_PAD::boundingRadius() const
{
@@ -142,6 +148,31 @@
radius = 1 + KiROUND( hypot( x, y ) / 2 );
break;
+ case PAD_SHAPE_ROUNDRECT:
+ radius = GetRoundRectCornerRadius();
+ x = m_Size.x >> 1;
+ y = m_Size.y >> 1;
+ radius += 1 + KiROUND( EuclideanNorm( wxSize( x - radius, y - radius )));
+ break;
+
+ case PAD_SHAPE_CUSTOM:
+ {
+ radius = 0;
+
+ for( int cnt = 0; cnt < m_customShapeAsPolygon.OutlineCount(); ++cnt )
+ {
+ const SHAPE_LINE_CHAIN& poly = m_customShapeAsPolygon.COutline( cnt );
+ for( int ii = 0; ii < poly.PointCount(); ++ii )
+ {
+ int dist = KiROUND( poly.CPoint( ii ).EuclideanNorm() );
+ radius = std::max( radius, dist );
+ }
+ }
+
+ radius += 1;
+ }
+ break;
+
default:
radius = 0;
}
@@ -150,6 +181,23 @@
}
+int D_PAD::GetRoundRectCornerRadius( const wxSize& aSize ) const
+{
+ // radius of rounded corners, usually 25% of shorter pad edge for now
+ int r = aSize.x > aSize.y ? aSize.y : aSize.x;
+ r = int( r * m_padRoundRectRadiusScale );
+
+ // but not more than usually 0.25 mm
+
+ if ( r > m_padRoundRectRadiusMax )
+ {
+ r = m_padRoundRectRadiusMax;
+ }
+
+ return r;
+}
+
+
const EDA_RECT D_PAD::GetBoundingBox() const
{
EDA_RECT area;
@@ -164,8 +212,7 @@
break;
case PAD_SHAPE_OVAL:
- //Use the maximal two most distant points and track their rotation
- // (utilise symmetry to avoid four points)
+ // Calculate the position of each rounded ent
quadrant1.x = m_Size.x/2;
quadrant1.y = 0;
quadrant2.x = 0;
@@ -173,15 +220,21 @@
RotatePoint( &quadrant1, m_Orient );
RotatePoint( &quadrant2, m_Orient );
+
+ // Calculate the max position of each end, relative to the pad position
+ // (the min position is symetrical)
dx = std::max( std::abs( quadrant1.x ) , std::abs( quadrant2.x ) );
dy = std::max( std::abs( quadrant1.y ) , std::abs( quadrant2.y ) );
- area.SetOrigin( m_Pos.x-dx, m_Pos.y-dy );
- area.SetSize( 2*dx, 2*dy );
+
+ // Set the bbox
+ area.SetOrigin( m_Pos );
+ area.Inflate( dx, dy );
break;
case PAD_SHAPE_RECT:
- //Use two corners and track their rotation
- // (utilise symmetry to avoid four points)
+ case PAD_SHAPE_ROUNDRECT:
+ // Use two opposite corners and track their rotation
+ // (use symmetry for other points)
quadrant1.x = m_Size.x/2;
quadrant1.y = m_Size.y/2;
quadrant2.x = -m_Size.x/2;
@@ -191,8 +244,10 @@
RotatePoint( &quadrant2, m_Orient );
dx = std::max( std::abs( quadrant1.x ) , std::abs( quadrant2.x ) );
dy = std::max( std::abs( quadrant1.y ) , std::abs( quadrant2.y ) );
- area.SetOrigin( m_Pos.x-dx, m_Pos.y-dy );
- area.SetSize( 2*dx, 2*dy );
+
+ // Set the bbox
+ area.SetOrigin( m_Pos );
+ area.Inflate( dx, dy );
break;
case PAD_SHAPE_TRAPEZOID:
@@ -220,6 +275,32 @@
area.SetSize( dx-x, dy-y );
break;
+ case PAD_SHAPE_CUSTOM:
+ {
+ SHAPE_POLY_SET polySet( m_customShapeAsPolygon );
+ // Move shape to actual position
+ BasicShapesAsPolygonToBoardPosition( &polySet, GetPosition(), GetOrientation() );
+ quadrant1 = m_Pos;
+ quadrant2 = m_Pos;
+
+ for( int cnt = 0; cnt < polySet.OutlineCount(); ++cnt )
+ {
+ const SHAPE_LINE_CHAIN& poly = polySet.COutline( cnt );
+
+ for( int ii = 0; ii < poly.PointCount(); ++ii )
+ {
+ quadrant1.x = std::min( quadrant1.x, poly.CPoint( ii ).x );
+ quadrant1.y = std::min( quadrant1.y, poly.CPoint( ii ).y );
+ quadrant2.x = std::max( quadrant2.x, poly.CPoint( ii ).x );
+ quadrant2.y = std::max( quadrant2.y, poly.CPoint( ii ).y );
+ }
+ }
+
+ area.SetOrigin( quadrant1 );
+ area.SetEnd( quadrant2 );
+ }
+ break;
+
default:
break;
}
@@ -277,17 +358,13 @@
void D_PAD::Flip( const wxPoint& aCentre )
{
- int y = GetPosition().y - aCentre.y;
-
- y = -y; // invert about x axis.
-
- y += aCentre.y;
-
+ int y = GetPosition().y;
+ MIRROR( y, aCentre.y ); // invert about x axis.
SetY( y );
- m_Pos0.y = -m_Pos0.y;
- m_Offset.y = -m_Offset.y;
- m_DeltaSize.y = -m_DeltaSize.y;
+ MIRROR( m_Pos0.y, 0 );
+ MIRROR( m_Offset.y, 0 );
+ MIRROR( m_DeltaSize.y, 0 );
SetOrientation( -GetOrientation() );
@@ -297,10 +374,48 @@
// So the copper layers count is not taken in account
SetLayerSet( FlipLayerMask( m_layerMask ) );
+ // Flip the basic shapes, in custom pads
+ FlipBasicShapes();
+
// m_boundingRadius = -1; the shape has not been changed
}
+// Flip the basic shapes, in custom pads
+void D_PAD::FlipBasicShapes()
+{
+ // Flip custom shapes
+ for( unsigned ii = 0; ii < m_basicShapes.size(); ++ii )
+ {
+ PAD_BC_SHAPE& bshape = m_basicShapes[ii];
+
+ MIRROR( bshape.m_Start.y, 0 );
+ MIRROR( bshape.m_End.y, 0 );
+ bshape.m_ArcAngle = -bshape.m_ArcAngle;
+
+ switch( bshape.m_Type )
+ {
+ case S_POLYGON: // polygon
+ for( unsigned ii = 0; ii < bshape.m_Poly.size(); ii++ )
+ MIRROR( bshape.m_Poly[ii].y, 0 );
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ // Flip local coordinates in merged Polygon
+ for( int cnt = 0; cnt < m_customShapeAsPolygon.OutlineCount(); ++cnt )
+ {
+ SHAPE_LINE_CHAIN& poly = m_customShapeAsPolygon.Outline( cnt );
+
+ for( int ii = 0; ii < poly.PointCount(); ++ii )
+ MIRROR( poly.Point( ii ).y, 0 );
+ }
+}
+
+
void D_PAD::AppendConfigs( PARAM_CFG_ARRAY* aResult )
{
// Parameters stored in config are only significant parameters
@@ -436,6 +551,10 @@
m_ZoneConnection = source->m_ZoneConnection;
m_ThermalWidth = source->m_ThermalWidth;
m_ThermalGap = source->m_ThermalGap;
+ m_basicShapes = source->m_basicShapes;
+ m_customShapeAsPolygon.RemoveAllContours();
+ m_customShapeAsPolygon.Append(source->m_customShapeAsPolygon);
+ m_anchorPadShape = source->m_anchorPadShape;
SetSubRatsnest( 0 );
SetSubNet( 0 );
@@ -768,6 +887,30 @@
return true;
break;
+
+ case PAD_SHAPE_ROUNDRECT:
+ {
+ // Check for hit in polygon
+ SHAPE_POLY_SET outline;
+ const int segmentToCircleCount = 32;
+ TransformRoundRectToPolygon( outline, wxPoint(0,0), GetSize(), m_Orient,
+ GetRoundRectCornerRadius(), segmentToCircleCount );
+
+ const SHAPE_LINE_CHAIN &poly = outline.COutline( 0 );
+ return TestPointInsidePolygon( (const wxPoint*)&poly.CPoint(0), poly.PointCount(), delta );
+ }
+ break;
+
+ case PAD_SHAPE_CUSTOM:
+ // Check for hit in polygon
+ RotatePoint( &delta, -m_Orient );
+
+ if( m_customShapeAsPolygon.OutlineCount() )
+ {
+ const SHAPE_LINE_CHAIN& poly = m_customShapeAsPolygon.COutline( 0 );
+ return TestPointInsidePolygon( (const wxPoint*)&poly.CPoint(0), poly.PointCount(), delta );
+ }
+ break;
}
return false;
@@ -808,6 +951,8 @@
if( ( diff = padref->m_DeltaSize.y - padcmp->m_DeltaSize.y ) != 0 )
return diff;
+// TODO: test custom shapes
+
// Dick: specctra_export needs this
// Lorenzo: gencad also needs it to implement padstacks!
@@ -854,6 +999,12 @@
case PAD_SHAPE_TRAPEZOID:
return _( "Trap" );
+ case PAD_SHAPE_ROUNDRECT:
+ return _( "Roundrect" );
+
+ case PAD_SHAPE_CUSTOM:
+ return _( "CustomShape" );
+
default:
return wxT( "???" );
}
=== modified file 'pcbnew/class_pad.h'
--- pcbnew/class_pad.h 2015-11-13 11:32:42 +0000
+++ pcbnew/class_pad.h 2016-02-05 07:31:07 +0000
@@ -1,8 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
- * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@xxxxxxxxxxxxxxxxxx
- * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 2016 Jean-Pierre Charras, jaen-pierre.charras@xxxxxxxxxxxxxxxxxx
+ * Copyright (C) 1992-2016 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
@@ -72,6 +72,26 @@
PAD_DRAWINFO();
};
+// Helper class to handle a basic custom shape (polygon, segment, circle or arc)
+class PAD_BC_SHAPE
+{
+public:
+ STROKE_T m_Type; // S_SEGMENT, S_ARC, S_CIRCLE, S_POLYGON only
+ int m_Thickness; // thickness of segment or outline
+ // For filled S_CIRCLE shape, thickness = 0.
+ // if thickness is not = 0 S_CIRCLE shape is a ring
+ int m_Radius;
+ int m_ArcAngle;
+ wxPoint m_Start; // is also the center of the circle and arc
+ wxPoint m_End; // is also the start point of the arc
+ std::vector<wxPoint> m_Poly;
+
+ PAD_BC_SHAPE( STROKE_T aType ):
+ m_Type( aType ), m_Thickness( 0 ), m_Radius( 0 ), m_ArcAngle( 0 )
+ {
+ }
+};
+
class D_PAD : public BOARD_CONNECTED_ITEM
{
@@ -106,6 +126,12 @@
MODULE* GetParent() const { return (MODULE*) m_Parent; }
/**
+ * @return true if the pad has a footprint parent flipped
+ * (on the back/bottom layer)
+ */
+ bool IsFlipped();
+
+ /**
* Set the pad name (sometimes called pad number, although
* it can be an array ref like AA12
* the pad name is limited to 4 ASCII chars
@@ -156,6 +182,24 @@
PAD_SHAPE_T GetShape() const { return m_padShape; }
void SetShape( PAD_SHAPE_T aShape ) { m_padShape = aShape; m_boundingRadius = -1; }
+ /**
+ * Function GetAnchorPadShape
+ * @return the shape of the anchor pad shape, for custom shaped pads.
+ */
+ PAD_SHAPE_T GetAnchorPadShape() const { return m_anchorPadShape; }
+
+ /**
+ * Function SetAnchorPadShape
+ * Set the shape of the anchor pad for custm shped pads.
+ * @param the shape of the anchor pad shape( currently, only
+ * PAD_SHAPE_RECT or PAD_SHAPE_CIRCLE.
+ */
+ void SetAnchorPadShape( PAD_SHAPE_T aShape )
+ {
+ m_anchorPadShape = ( aShape == PAD_SHAPE_RECT ) ? PAD_SHAPE_RECT : PAD_SHAPE_CIRCLE;
+ m_boundingRadius = -1;
+ }
+
void SetPosition( const wxPoint& aPos ) { m_Pos = aPos; } // was overload
const wxPoint& GetPosition() const { return m_Pos; } // was overload
@@ -180,9 +224,82 @@
void SetOffset( const wxPoint& aOffset ) { m_Offset = aOffset; }
const wxPoint& GetOffset() const { return m_Offset; }
+ /**
+ * Has meaning only for free shape pads.
+ * add a free shape to the shape list.
+ * the shape can be
+ * a polygon (outline can have a thickness)
+ * a thick segment
+ * a filled circle or ring ( if thickness == 0, this is a filled circle, else a ring)
+ * a arc
+ */
+ void AddBasicShape( std::vector<wxPoint>& aPoly, int aThickness ); ///< add a polygonal basic shape
+ void AddBasicShape( wxPoint aStart, wxPoint aEnd, int aThickness ); ///< segment basic shape
+ void AddBasicShape( wxPoint aCenter, int aRadius, int aThickness ); ///< ring or circle basic shape
+ void AddBasicShape( wxPoint aCenter, wxPoint aStart,
+ int aArcAngle, int aThickness ); ///< arc basic shape
+
+
+ /**
+ * Merge all basic shapes, converted to a polygon in one polygon,
+ * in m_customShapeAsPolygon
+ * @return true if OK, false in there is more than one polygon
+ * in m_customShapeAsPolygon
+ * @param aMergedPolygon = the SHAPE_POLY_SET to fill.
+ * if NULL, m_customShapeAsPolygon is the target
+ * @param aCircleToSegmentsCount = number of segment to approximate a circle
+ * (default = 32)
+ * Note: The corners coordinates are relative to the pad position, orientation 0,
+ */
+ bool MergeBasicShapesAsPolygon( SHAPE_POLY_SET * aMergedPolygon = NULL,
+ int aCircleToSegmentsCount = 32 );
+
+ /**
+ * clear the basic shapes list
+ */
+ void DeleteBasicShapesList();
+
+ /**
+ * When created, the corners coordinates are relative to the pad position, orientation 0,
+ * in m_customShapeAsPolygon
+ * BasicShapesAsPolygonToBoardPosition transform these coordinates to actual
+ * (board) coordinates
+ * @param aMergedPolygon = the corners coordinates, relative to aPosition and
+ * rotated by aRotation
+ * @param aPosition = the position of the shape (usually the pad shape, but
+ * not always, when moving the pad)
+ * @param aRotation = the rotation of the shape (usually the pad rotation, but
+ * not always, in DRC)
+ */
+ void BasicShapesAsPolygonToBoardPosition( SHAPE_POLY_SET * aMergedPolygon,
+ wxPoint aPosition, double aRotation ) const;
+
+ /**
+ * Accessor to the basic shape list
+ */
+ const std::vector<PAD_BC_SHAPE>& GetBasicShapes() { return m_basicShapes; }
+
+ /**
+ * Accessor to the custom shape as one polygon
+ */
+ const SHAPE_POLY_SET GetCustomShapeAsPolygon() const { return m_customShapeAsPolygon; }
+
void Flip( const wxPoint& aCentre ); // Virtual function
/**
+ * Flip the basic shapes, in custom pads
+ */
+ void FlipBasicShapes();
+
+ /**
+ * Import to the basic shape list
+ * @return true if OK, false if issues
+ * (more than one polygon to build the polygon shape list)
+ */
+ bool SetBasicShapes( const std::vector<PAD_BC_SHAPE>& aBasicShapesList );
+
+
+ /**
* Function SetOrientation
* sets the rotation angle of the pad.
* @param aAngle is tenths of degrees, but will soon be degrees. If it is
@@ -324,6 +441,27 @@
void BuildPadPolygon( wxPoint aCoord[4], wxSize aInflateValue, double aRotation ) const;
/**
+ * Function GetRoundRectCornerRadius
+ * Has meaning only for rounded rect pads
+ * @return The radius of the rounded corners for this pad.
+ */
+ int GetRoundRectCornerRadius() const
+ {
+ return GetRoundRectCornerRadius( m_Size );
+ }
+
+ /**
+ * Helper function GetRoundRectCornerRadius
+ * Has meaning only for rounded rect pads
+ * Returns the radius of the rounded corners of a rectangle
+ * size aSize, using others setting of the pad
+ * @param aSize = size of the of the round rect. Usually the pad size
+ * but can be the size of the pad on solder mask or solder paste
+ * @return The radius of the rounded corners for this pad size.
+ */
+ int GetRoundRectCornerRadius( const wxSize& aSize ) const;
+
+ /**
* Function BuildPadShapePolygon
* Build the Corner list of the polygonal shape,
* depending on shape, extra size (clearance ...) pad and orientation
@@ -340,7 +478,7 @@
* @param aSegmentsPerCircle = number of segments to approximate a circle
* (used for round and oblong shapes only (16 to 32 is a good value)
* @param aCorrectionFactor = the correction to apply to circles radius to keep
- * the pad size when the circle is approximated by segments
+ * the pad size/clearance when the arcs are approximated by segments
*/
void BuildPadShapePolygon( SHAPE_POLY_SET& aCornerBuffer,
wxSize aInflateValue, int aSegmentsPerCircle,
@@ -382,6 +520,7 @@
/**
* Function GetBoundingRadius
* returns the radius of a minimum sized circle which fully encloses this pad.
+ * The center is the pad position
*/
int GetBoundingRadius() const
{
@@ -399,6 +538,31 @@
const wxPoint ShapePos() const;
/**
+ * has meaning only for rounded rect pads
+ * @return the scaling factor between the smaller Y or Y size and the radius
+ * of the rounded corners.
+ * Cannot be > 0.5
+ * the normalized value is 0.25
+ */
+ double GetRoundRectRadiusRatio()
+ {
+ return m_padRoundRectRadiusScale;
+ }
+
+ /**
+ * has meaning only for rounded rect pads
+ * Set the scaling factor between the smaller Y or Y size and the radius
+ * of the rounded corners.
+ * Cannot be < 0.5 and obviously must be > 0
+ * the normalized IPC-7351C value is 0.25
+ */
+ void GetRoundRectRadiusRatio( double aRadiusScale )
+ {
+ if( aRadiusScale >= 0 )
+ m_padRoundRectRadiusScale = std::min( aRadiusScale, 0.5 );
+ }
+
+ /**
* Function GetSubRatsnest
* @return int - the netcode
*/
@@ -517,6 +681,8 @@
*/
int boundingRadius() const;
+private: // Private variable members:
+
// Actually computed and cached on demand by the accessor
mutable int m_boundingRadius; ///< radius of the circle containing the pad shape
@@ -531,8 +697,20 @@
wxPoint m_Pos; ///< pad Position on board
- PAD_SHAPE_T m_padShape; ///< Shape: PAD_CIRCLE, PAD_RECT, PAD_OVAL, PAD_TRAPEZOID
-
+ PAD_SHAPE_T m_padShape; ///< Shape: PAD_SHAPE_CIRCLE, PAD_SHAPE_RECT,
+ ///< PAD_SHAPE_OVAL, PAD_SHAPE_TRAPEZOID,
+ ///< PAD_SHAPE_ROUNDRECT, PAD_SHAPE_POLYGON
+
+ /** for free shape pads: a list of basic shapes,
+ * in local coordinates, orient 0, coordinates relative to m_Pos
+ * They are expected to define only one copper area.
+ */
+ std::vector<PAD_BC_SHAPE> m_basicShapes;
+
+ /** for free shape pads: the set of basic shapes, merged as one polygon,
+ * in local coordinates, orient 0, coordinates relative to m_Pos
+ */
+ SHAPE_POLY_SET m_customShapeAsPolygon;
int m_SubRatsnest; ///< variable used in rats nest computations
///< handle subnet (block) number in ratsnest connection
@@ -545,15 +723,21 @@
PAD_DRILL_SHAPE_T m_drillShape; ///< PAD_DRILL_SHAPE_CIRCLE, PAD_DRILL_SHAPE_OBLONG
+ double m_padRoundRectRadiusScale; ///< scaling factor from smallest m_Size coord
+ ///< to corner radius, default 0.25
+ int m_padRoundRectRadiusMax; ///< max corner radius
+
+ PAD_SHAPE_T m_anchorPadShape; ///< for custom shaped pads: shape of pad anchor,
+ ///< PAD_SHAPE_RECT, PAD_SHAPE_CIRCLE
/**
- * m_Offset is useful only for oblong pads (it can be used for other
+ * m_Offset is useful only for oblong and rect pads (it can be used for other
* shapes, but without any interest).
* This is the offset between the pad hole and the pad shape (you must
* understand here pad shape = copper area around the hole)
* Most of cases, the hole is the center of the shape (m_Offset = 0).
- * But some board designers use oblong pads with a hole moved to one of the
- * oblong pad shape ends.
+ * But some board designers use oblong/rect pads with a hole moved to one of the
+ * oblong/rect pad shape ends.
* In all cases the pad position is the pad hole.
* The physical shape position (used to draw it for instance) is pad
* position (m_Pos) + m_Offset.
@@ -582,14 +766,16 @@
/// Usually the local clearance is null
int m_LocalClearance;
- // Local mask margins: when 0, the parent footprint design values are used
+ /// Local mask margins: when 0, the parent footprint design values are used
int m_LocalSolderMaskMargin; ///< Local solder mask margin
int m_LocalSolderPasteMargin; ///< Local solder paste margin absolute value
double m_LocalSolderPasteMarginRatio; ///< Local solder mask margin ratio value of pad size
///< The final margin is the sum of these 2 values
+ /// how the connection to zone is made: no connection, thermal relief ...
ZoneConnection m_ZoneConnection;
+
int m_ThermalWidth;
int m_ThermalGap;
};
=== added file 'pcbnew/class_pad_custom_shape_functions.cpp'
--- pcbnew/class_pad_custom_shape_functions.cpp 1970-01-01 00:00:00 +0000
+++ pcbnew/class_pad_custom_shape_functions.cpp 2016-02-05 17:17:38 +0000
@@ -0,0 +1,246 @@
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you may find one here:
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ * or you may search the http://www.gnu.org website for the version 2 license,
+ * or you may write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/**
+ * @file class_pad_custom_shape_functions.cpp
+ * class D_PAD functions specific to custom shaped pads.
+ */
+
+#include <fctsys.h>
+#include <PolyLine.h>
+#include <trigo.h>
+#include <wxstruct.h>
+
+#include <pcbnew.h>
+
+#include <class_pad.h>
+#include <convert_basic_shapes_to_polygon.h>
+#include <geometry/shape_rect.h>
+#include <geometry/convex_hull.h>
+
+
+/*
+ * Has meaning only for free shape pads.
+ * add a free shape to the shape list.
+ * the shape is a polygon (can be with thick outline), segment, circle or arc
+ */
+void D_PAD::AddBasicShape( std::vector<wxPoint>& aPoly, int aThickness )
+{
+ PAD_BC_SHAPE shape( S_POLYGON );
+ shape.m_Poly = aPoly;
+ shape.m_Thickness = aThickness;
+ m_basicShapes.push_back( shape );
+
+ MergeBasicShapesAsPolygon();
+}
+
+
+void D_PAD::AddBasicShape( wxPoint aStart, wxPoint aEnd, int aThickness )
+{
+ PAD_BC_SHAPE shape( S_SEGMENT );
+ shape.m_Start = aStart;
+ shape.m_End = aEnd;
+ shape.m_Thickness = aThickness;
+ m_basicShapes.push_back( shape );
+
+ MergeBasicShapesAsPolygon();
+}
+
+
+void D_PAD::AddBasicShape( wxPoint aCenter, wxPoint aStart, int aArcAngle, int aThickness )
+{
+ PAD_BC_SHAPE shape( S_ARC );
+ shape.m_Start = aCenter;
+ shape.m_End = aStart;
+ shape.m_ArcAngle = aArcAngle;
+ shape.m_Thickness = aThickness;
+ m_basicShapes.push_back( shape );
+
+ MergeBasicShapesAsPolygon();
+}
+
+
+void D_PAD::AddBasicShape( wxPoint aCenter, int aRadius, int aThickness )
+{
+ PAD_BC_SHAPE shape( S_CIRCLE );
+ shape.m_Start = aCenter;
+ shape.m_Radius = aRadius;
+ shape.m_Thickness = aThickness;
+ m_basicShapes.push_back( shape );
+
+ MergeBasicShapesAsPolygon();
+}
+
+
+bool D_PAD::SetBasicShapes( const std::vector<PAD_BC_SHAPE>& aBasicShapesList )
+{
+ // clear old list
+ m_basicShapes.clear();
+
+ // Import to the basic shape list
+ if( aBasicShapesList.size() )
+ m_basicShapes = aBasicShapesList;
+
+ // Only one polygon is expected (pad area = only one copper area)
+ return MergeBasicShapesAsPolygon();
+}
+
+// clear the basic shapes list and associated data
+void D_PAD::DeleteBasicShapesList()
+{
+ m_basicShapes.clear();
+ m_customShapeAsPolygon.RemoveAllContours();
+}
+
+
+/* Merge all basic shapes, converted to a polygon in one polygon,
+ * return true if OK, false in there is more than one polygon
+ * in aMergedPolygon
+ */
+bool D_PAD::MergeBasicShapesAsPolygon( SHAPE_POLY_SET* aMergedPolygon,
+ int aCircleToSegmentsCount )
+{
+ // if aMergedPolygon == NULL, use m_customShapeAsPolygon as target
+
+ if( !aMergedPolygon )
+ aMergedPolygon = &m_customShapeAsPolygon;
+
+ aMergedPolygon->RemoveAllContours();
+
+ // Add the anchor pad shape in aMergedPolygon, others in aux_polyset:
+ // The anchor pad is always at 0,0
+ switch( GetAnchorPadShape() )
+ {
+ default:
+ case PAD_SHAPE_CIRCLE:
+ TransformCircleToPolygon( *aMergedPolygon, wxPoint( 0,0 ), GetSize().x/2,
+ aCircleToSegmentsCount );
+ break;
+
+ case PAD_SHAPE_RECT:
+ {
+ SHAPE_RECT rect( -GetSize().x/2, -GetSize().y/2, GetSize().x, GetSize().y );
+ aMergedPolygon->AddOutline( rect.Outline() );
+ }
+ break;
+ }
+
+ SHAPE_POLY_SET aux_polyset;
+
+ for( unsigned ii = 0; ii < m_basicShapes.size(); ++ii )
+ {
+ const PAD_BC_SHAPE& bshape = m_basicShapes[ii];
+
+ switch( bshape.m_Type )
+ {
+ case S_SEGMENT: // usual segment : line with rounded ends
+ TransformRoundedEndsSegmentToPolygon( aux_polyset,
+ bshape.m_Start, bshape.m_End, aCircleToSegmentsCount, bshape.m_Thickness );
+ break;
+
+ case S_ARC: // Arc with rounded ends
+ TransformArcToPolygon( aux_polyset,
+ bshape.m_Start, bshape.m_End, bshape.m_ArcAngle,
+ aCircleToSegmentsCount, bshape.m_Thickness );
+ break;
+
+ case S_CIRCLE: // ring or circle
+ if( bshape.m_Thickness ) // ring
+ TransformRingToPolygon( aux_polyset,
+ bshape.m_Start, bshape.m_Radius,
+ aCircleToSegmentsCount, bshape.m_Thickness ) ;
+ else // Filled circle
+ TransformCircleToPolygon( aux_polyset,
+ bshape.m_Start, bshape.m_Radius,
+ aCircleToSegmentsCount ) ;
+ break;
+
+ case S_POLYGON: // polygon
+ if( bshape.m_Poly.size() < 2 )
+ break; // Malformed polygon.
+
+ {
+ // Insert the polygon:
+ const std::vector< wxPoint>& poly = bshape.m_Poly;
+ aux_polyset.NewOutline();
+
+ if( bshape.m_Thickness )
+ {
+ SHAPE_POLY_SET polyset;
+ polyset.NewOutline();
+
+ for( unsigned ii = 0; ii < poly.size(); ii++ )
+ polyset.Append( poly[ii].x, poly[ii].y );
+
+ polyset.Inflate( bshape.m_Thickness/2, 32 );
+
+ aux_polyset.Append( polyset );
+ }
+
+ else
+ for( unsigned ii = 0; ii < poly.size(); ii++ )
+ aux_polyset.Append( poly[ii].x, poly[ii].y );
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ // Merge all polygons:
+ if( aux_polyset.OutlineCount() )
+ {
+ aMergedPolygon->BooleanAdd( aux_polyset, SHAPE_POLY_SET::PM_FAST );
+ aMergedPolygon->Fracture( SHAPE_POLY_SET::PM_FAST );
+ }
+
+ m_boundingRadius = -1; // The current bouding radius is no more valid.
+
+ return aMergedPolygon->OutlineCount() <= 1;
+}
+
+void D_PAD::BasicShapesAsPolygonToBoardPosition( SHAPE_POLY_SET * aMergedPolygon,
+ wxPoint aPosition, double aRotation ) const
+{
+ if( aMergedPolygon->OutlineCount() == 0 )
+ return;
+
+ // Move, rotate, ... coordinates in aMergedPolygon according to the
+ // pad position and orientation
+ for( int cnt = 0; cnt < aMergedPolygon->OutlineCount(); ++cnt )
+ {
+ SHAPE_LINE_CHAIN& poly = aMergedPolygon->Outline( cnt );
+
+ for( int ii = 0; ii < poly.PointCount(); ++ii )
+ {
+ wxPoint corner( poly.Point( ii ).x, poly.Point( ii ).y );
+ RotatePoint( &corner, aRotation );
+ corner += aPosition;
+
+ poly.Point( ii ).x = corner.x;
+ poly.Point( ii ).y = corner.y;
+ }
+ }
+}
=== modified file 'pcbnew/class_pad_draw_functions.cpp'
--- pcbnew/class_pad_draw_functions.cpp 2016-01-17 15:59:24 +0000
+++ pcbnew/class_pad_draw_functions.cpp 2016-02-05 08:42:34 +0000
@@ -1,10 +1,10 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
- * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@xxxxxxxxxxxxxxx
+ * Copyright (C) 2016 Jean-Pierre Charras, jean-pierre.charras@xxxxxxxxxxxxxxx
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@xxxxxxxxxxx>
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@xxxxxxxxxxx>
- * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2016 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
@@ -40,6 +40,8 @@
#include <pcbnew_id.h> // ID_TRACK_BUTT
#include <pcbnew.h>
#include <class_board.h>
+#include <convert_basic_shapes_to_polygon.h>
+
/* uncomment this line to show this pad with its specfic size and color
@@ -315,7 +317,7 @@
void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
{
- wxPoint coord[4];
+ wxPoint coord[12];
double angle = m_Orient;
int seg_width;
@@ -392,14 +394,156 @@
if( aDrawInfo.m_PadClearance )
{
- BuildPadPolygon( coord, wxSize( aDrawInfo.m_PadClearance,
- aDrawInfo.m_PadClearance ), angle );
- for( int ii = 0; ii < 4; ii++ )
- coord[ii] += shape_pos;
-
- GRClosedPoly( aClipBox, aDC, 4, coord, 0, aDrawInfo.m_Color, aDrawInfo.m_Color );
- }
- break;
+ #define SEGCOUNT 32 // number of segments to approximate a circle
+ SHAPE_POLY_SET outline;
+ TransformShapeWithClearanceToPolygon( outline, aDrawInfo.m_PadClearance, SEGCOUNT, 1.0 );
+
+ // Draw the polygon: Inflate creates only one convex polygon
+ SHAPE_LINE_CHAIN& poly = outline.Outline( 0 );
+
+ GRClosedPoly( aClipBox, aDC, poly.PointCount(),
+ (wxPoint*)&poly.Point( 0 ), false, 0,
+ aDrawInfo.m_Color, aDrawInfo.m_Color );
+ }
+ break;
+
+ case PAD_SHAPE_ROUNDRECT:
+ {
+ // Use solder[Paste/Mask]size or pad size to build pad shape to draw
+ wxSize size( GetSize() );
+ size += aDrawInfo.m_Mask_margin * 2;
+ int corner_radius = GetRoundRectCornerRadius( size );
+
+ // Draw the polygon: Inflate creates only one convex polygon
+ SHAPE_POLY_SET outline;
+ bool filled = aDrawInfo.m_ShowPadFilled;
+
+ if( filled )
+ {
+ wxPoint centers[4];
+ GetRoundRectCornerCenters( centers, corner_radius, shape_pos,
+ size, GetOrientation() );
+ GRClosedPoly( aClipBox, aDC, 4, centers, true, corner_radius*2,
+ aDrawInfo.m_Color, aDrawInfo.m_Color );
+ }
+ else
+ {
+ TransformRoundRectToPolygon( outline, shape_pos, size, GetOrientation(),
+ corner_radius, 64 );
+
+ SHAPE_LINE_CHAIN& poly = outline.Outline( 0 );
+
+ GRClosedPoly( aClipBox, aDC, poly.PointCount(),
+ (wxPoint*)&poly.Point( 0 ), aDrawInfo.m_ShowPadFilled, 0,
+ aDrawInfo.m_Color, aDrawInfo.m_Color );
+ }
+ if( aDrawInfo.m_PadClearance )
+ {
+ outline.RemoveAllContours();
+ size = GetSize();
+ size.x += aDrawInfo.m_PadClearance * 2;
+ size.y += aDrawInfo.m_PadClearance * 2;
+ corner_radius = GetRoundRectCornerRadius() + aDrawInfo.m_PadClearance;
+
+ TransformRoundRectToPolygon( outline, shape_pos, size, GetOrientation(),
+ corner_radius, 32 );
+
+ // Draw the polygon: Inflate creates only one convex polygon
+ SHAPE_LINE_CHAIN& clearance_poly = outline.Outline( 0 );
+
+ GRClosedPoly( aClipBox, aDC, clearance_poly.PointCount(),
+ (wxPoint*)&clearance_poly.Point( 0 ), false, 0,
+ aDrawInfo.m_Color, aDrawInfo.m_Color );
+ }
+ }
+ break;
+
+ case PAD_SHAPE_CUSTOM:
+ {
+ // The full shape has 2 items
+ // 1- The anchor pad: a round or rect pad located at pad position
+ // 2- The custom complex shape
+ // Note: The anchor pad shape is containing by the custom complex shape polygon
+ // The anchor pad is shown to help user to see where is the anchor, only in sketch mode
+ // (In filled mode, it is merged with the basic shapes)
+ wxPoint pad_pos = GetPosition() - aDrawInfo.m_Offset;
+
+ // In sketch mode only: Draw the anchor pad: a round or rect pad
+ if( !aDrawInfo.m_ShowPadFilled )
+ {
+ if( GetAnchorPadShape() == PAD_SHAPE_RECT )
+ {
+ wxPoint poly[4];
+ poly[0] = wxPoint( - halfsize.x, - halfsize.y );
+ poly[1] = wxPoint( - halfsize.x, + halfsize.y );
+ poly[2] = wxPoint( + halfsize.x, + halfsize.y );
+ poly[3] = wxPoint( + halfsize.x, - halfsize.y );
+
+ for( int ii = 0; ii < 4; ++ii )
+ {
+ RotatePoint( &poly[ii], m_Orient );
+ poly[ii] += pad_pos;
+ }
+
+ GRClosedPoly( aClipBox, aDC, 4, poly, false, 0,
+ aDrawInfo.m_Color, aDrawInfo.m_Color );
+ }
+ else
+ {
+ GRCircle( aClipBox, aDC, pad_pos.x, pad_pos.y,
+ halfsize.x,
+ m_PadSketchModePenSize, aDrawInfo.m_Color );
+ }
+ }
+
+ SHAPE_POLY_SET outline; // Will contain the corners in board coordinates
+ outline.Append( m_customShapeAsPolygon );
+ BasicShapesAsPolygonToBoardPosition( &outline, pad_pos, GetOrientation() );
+ SHAPE_LINE_CHAIN* poly;
+
+ const int segmentToCircleCount = 32;
+
+ if( aDrawInfo.m_Mask_margin.x )
+ {
+ SHAPE_POLY_SET clearance_outline;
+ clearance_outline.Append( outline );
+ clearance_outline.Inflate( aDrawInfo.m_Mask_margin.x, segmentToCircleCount );
+
+ poly = &clearance_outline.Outline( 0 );
+ }
+ else
+ {
+ // Draw the polygon: only one polygon is expected
+ // However we provide a multi polygon shape drawing
+ // ( for the future or to show a non expected shape )
+ for( int jj = 0; jj < outline.OutlineCount(); ++jj )
+ {
+ poly = &outline.Outline( jj );
+
+ GRClosedPoly( aClipBox, aDC, poly->PointCount(),
+ (wxPoint*)&poly->Point( 0 ), aDrawInfo.m_ShowPadFilled, 0,
+ aDrawInfo.m_Color, aDrawInfo.m_Color );
+ }
+ }
+
+ if( aDrawInfo.m_PadClearance )
+ {
+ SHAPE_POLY_SET clearance_outline;
+ clearance_outline.Append( outline );
+
+ clearance_outline.Inflate( aDrawInfo.m_PadClearance, segmentToCircleCount );
+
+ for( int jj = 0; jj < clearance_outline.OutlineCount(); ++jj )
+ {
+ poly = &clearance_outline.Outline( jj );
+
+ GRClosedPoly( aClipBox, aDC, poly->PointCount(),
+ (wxPoint*)&poly->Point( 0 ), false, 0,
+ aDrawInfo.m_Color, aDrawInfo.m_Color );
+ }
+ }
+ break;
+ }
default:
break;
=== added file 'pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp'
--- pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp 1970-01-01 00:00:00 +0000
+++ pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp 2016-02-08 09:11:29 +0000
@@ -0,0 +1,548 @@
+/**
+ * @file dialog_pad_basicshapes_properties.cpp
+ * @brief basic shapes for pads crude editor.
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you may find one here:
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ * or you may search the http://www.gnu.org website for the version 2 license,
+ * or you may write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <algorithm>
+
+#include <fctsys.h>
+#include <common.h>
+#include <confirm.h>
+#include <pcbnew.h>
+#include <trigo.h>
+#include <macros.h>
+#include <wxBasePcbFrame.h>
+#include <pcbcommon.h>
+#include <base_units.h>
+#include <gr_basic.h>
+
+#include <class_board.h>
+#include <class_module.h>
+
+#include <dialog_pad_properties.h>
+
+DIALOG_PAD_BASICSHAPES_PROPERTIES::DIALOG_PAD_BASICSHAPES_PROPERTIES(
+ wxWindow* aParent, PAD_BC_SHAPE * aShape )
+ : DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE( aParent )
+{
+ m_shape = aShape;
+ TransferDataToWindow();
+
+ m_sdbSizerOK->SetDefault();
+ GetSizer()->SetSizeHints( this );
+}
+
+bool DIALOG_PAD_BASICSHAPES_PROPERTIES::TransferDataToWindow()
+{
+ if( m_shape == NULL )
+ return false;
+
+ PutValueInLocalUnits( *m_textCtrlThickness, m_shape->m_Thickness );
+
+ // Update units and parameters names according to the shape to edit:
+ wxString unit = GetAbbreviatedUnitsLabel();
+ m_staticTextPosUnit->SetLabel( unit );
+ m_staticTextEndUnit->SetLabel( unit );
+ m_staticTextThicknessUnit->SetLabel( unit );
+
+ m_staticTextAngleUnit->SetLabel( wxEmptyString );
+ m_staticTextAngle->SetLabel( wxEmptyString );
+
+ switch( m_shape->m_Type )
+ {
+ case S_SEGMENT: // Segment with rounded ends
+ SetTitle( "Segment" );
+ PutValueInLocalUnits( *m_textCtrPosX, m_shape->m_Start.x );
+ PutValueInLocalUnits( *m_textCtrPosY, m_shape->m_Start.y );
+ PutValueInLocalUnits( *m_textCtrEndX, m_shape->m_End.x );
+ PutValueInLocalUnits( *m_textCtrEndY, m_shape->m_End.y );
+ break;
+
+ case S_ARC: // Arc with rounded ends
+ SetTitle( "Arc" );
+ m_staticTextPosEnd->SetLabel( "Center X,Y");
+ PutValueInLocalUnits( *m_textCtrEndX, m_shape->m_Start.x ); // Start point of arc
+ PutValueInLocalUnits( *m_textCtrEndY, m_shape->m_Start.y );
+ PutValueInLocalUnits( *m_textCtrPosX, m_shape->m_End.x ); // arc center
+ PutValueInLocalUnits( *m_textCtrPosY, m_shape->m_End.y );
+ m_textCtrAngle->SetValue( FMT_ANGLE( m_shape->m_ArcAngle ) );
+ m_staticTextAngle->SetLabel( "Angle" );
+ m_staticTextAngleUnit->SetLabel( "degree" );
+ break;
+
+ case S_CIRCLE: // ring or circle
+ if( m_shape->m_Thickness )
+ SetTitle( "ring" );
+ else
+ SetTitle( "circle" );
+
+ m_staticTextPosEnd->SetLabel( wxEmptyString );
+ m_staticTextPosStart->SetLabel( "Center X,Y");
+ PutValueInLocalUnits( *m_textCtrPosX, m_shape->m_Start.x ); // Circle center
+ PutValueInLocalUnits( *m_textCtrPosY, m_shape->m_Start.y );
+ PutValueInLocalUnits( *m_textCtrAngle, m_shape->m_Radius );
+ m_staticTextAngleUnit->SetLabel( unit );
+ m_staticTextAngle->SetLabel( "Radius" );
+ break;
+
+ case S_POLYGON: // polygon
+ SetTitle( "Polygon" );
+ m_staticTextPosStart->SetLabel( wxEmptyString );
+ m_staticTextPosEnd->SetLabel( wxEmptyString );
+ m_staticTextAngle->SetLabel( "corners count" );
+ m_textCtrAngle->SetValue( wxString::Format( "%d", m_shape->m_Poly.size() ) );
+ break;
+
+ default:
+ SetTitle( "Unknown basic shape" );
+ break;
+ }
+
+ return true;
+}
+
+bool DIALOG_PAD_BASICSHAPES_PROPERTIES::TransferDataFromWindow()
+{
+ // Transfer data out of the GUI.
+ m_shape->m_Thickness = ValueFromString( g_UserUnit, m_textCtrlThickness->GetValue() );
+
+ switch( m_shape->m_Type )
+ {
+ case S_SEGMENT: // Segment with rounded ends
+ m_shape->m_Start.x = ValueFromString( g_UserUnit, m_textCtrPosX->GetValue() );
+ m_shape->m_Start.y = ValueFromString( g_UserUnit, m_textCtrPosY->GetValue() );
+ m_shape->m_End.x = ValueFromString( g_UserUnit, m_textCtrEndX->GetValue() );
+ m_shape->m_End.y = ValueFromString( g_UserUnit, m_textCtrEndY->GetValue() );
+ break;
+
+ case S_ARC: // Arc with rounded ends
+ // Start point of arc
+ m_shape->m_Start.x = ValueFromString( g_UserUnit, m_textCtrEndX->GetValue() );
+ m_shape->m_Start.y = ValueFromString( g_UserUnit, m_textCtrEndY->GetValue() );
+ // arc center
+ m_shape->m_End.x = ValueFromString( g_UserUnit, m_textCtrPosX->GetValue() );
+ m_shape->m_End.y = ValueFromString( g_UserUnit, m_textCtrPosY->GetValue() );
+ m_shape->m_ArcAngle = ValueFromString( DEGREES, m_textCtrAngle->GetValue() );
+ break;
+
+ case S_CIRCLE: // ring or circle
+ m_shape->m_Start.x = ValueFromString( g_UserUnit, m_textCtrPosX->GetValue() );
+ m_shape->m_Start.y = ValueFromString( g_UserUnit, m_textCtrPosY->GetValue() );
+ //radius
+ m_shape->m_Radius = ValueFromString( g_UserUnit, m_textCtrAngle->GetValue() );
+ break;
+
+ case S_POLYGON: // polygon
+ // TODO
+ break;
+
+ default:
+ SetTitle( "Unknown basic shape" );
+ break;
+ }
+
+ return true;
+}
+
+
+DIALOG_PAD_BASIC_SHP_POLY_PROPS::DIALOG_PAD_BASIC_SHP_POLY_PROPS(
+ wxWindow* aParent, PAD_BC_SHAPE * aShape )
+ : DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE( aParent ),
+ m_shape( aShape ), m_currshape( *m_shape )
+{
+ TransferDataToWindow();
+
+ m_sdbSizerOK->SetDefault();
+ GetSizer()->SetSizeHints( this );
+}
+
+bool DIALOG_PAD_BASIC_SHP_POLY_PROPS::TransferDataToWindow()
+{
+ if( m_shape == NULL )
+ return false;
+
+ // Update units and parameters names according to the shape to edit:
+ wxString unit = GetAbbreviatedUnitsLabel();
+ m_staticTextThicknessUnit->SetLabel( unit );
+
+ PutValueInLocalUnits( *m_textCtrlThickness, m_currshape.m_Thickness );
+
+ // Test for acceptable polygon (more than 2 corners, and not self-intersecting)
+ // A warning message is displayed if not OK
+ Validate();
+
+ // Populates the list of corners
+
+ int extra_rows = m_currshape.m_Poly.size() - m_gridCornersList->GetNumberRows();
+
+ if( extra_rows > 0 )
+ {
+ m_gridCornersList->AppendRows( extra_rows );
+ }
+ else if( extra_rows < 0 )
+ {
+ extra_rows = -extra_rows;
+ m_gridCornersList->DeleteRows( 0, extra_rows );
+ }
+
+ // enter others corner coordinates
+ wxString msg;
+ for( unsigned row = 0; row < m_currshape.m_Poly.size(); ++row )
+ {
+ // Row label is "Corner x"
+ msg.Printf( "Corner %d", row+1 );
+ m_gridCornersList->SetRowLabelValue( row, msg );
+
+ msg = StringFromValue( g_UserUnit, m_currshape.m_Poly[row].x );
+ m_gridCornersList->SetCellValue( row, 0, msg );
+
+ msg = StringFromValue( g_UserUnit, m_currshape.m_Poly[row].y );
+ m_gridCornersList->SetCellValue( row, 1, msg );
+ }
+
+ return true;
+}
+
+bool DIALOG_PAD_BASIC_SHP_POLY_PROPS::TransferDataFromWindow()
+{
+ if( !Validate() )
+ return false;
+
+ // Transfer data out of the GUI.
+ m_currshape.m_Thickness = ValueFromString( g_UserUnit, m_textCtrlThickness->GetValue() );
+ *m_shape = m_currshape;
+
+ return true;
+}
+
+
+// test for a valid polygon (a not self intersectiong polygon)
+bool DIALOG_PAD_BASIC_SHP_POLY_PROPS::Validate()
+{
+ if( m_currshape.m_Poly.size() < 3 )
+ {
+ m_staticTextValidate->SetLabel( _(" Incorrect polygon: too few corners" ) );
+ m_staticTextValidate->Show( true );
+ return false;
+ }
+
+ bool valid = true;
+
+ SHAPE_LINE_CHAIN polyline;
+
+ for( unsigned ii = 0; ii < m_currshape.m_Poly.size(); ++ii )
+ polyline.Append( m_currshape.m_Poly[ii].x, m_currshape.m_Poly[ii].y );
+
+ polyline.SetClosed( true );
+
+ // Remove redundant corners:
+ polyline.Simplify();
+
+ if( polyline.PointCount() < 3 )
+ {
+ m_staticTextValidate->SetLabel( _("Incorrect polygon: too few corners after simplification" ) );
+ valid = false;
+ }
+
+ if( valid && polyline.SelfIntersecting() )
+ {
+ m_staticTextValidate->SetLabel( _("Incorrect polygon: self intersecting" ) );
+ valid = false;
+ }
+
+ if( valid )
+ m_staticTextValidate->SetLabel( _("Polygon:" ) );
+
+ if( polyline.PointCount() != (int)m_currshape.m_Poly.size() )
+ { // Happens after simplification
+ m_currshape.m_Poly.clear();
+
+ for( int ii = 0; ii < polyline.PointCount(); ++ii )
+ m_currshape.m_Poly.push_back( wxPoint( polyline.CPoint( ii ).x, polyline.CPoint( ii ).y ) );
+
+ m_staticTextValidate->SetLabel( _("Polygon: redundant corners removed" ) );
+ }
+
+ return valid;
+}
+
+
+void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onButtonAdd( wxCommandEvent& event )
+{
+ // Insert a new corner after the currently selected:
+ int row = 0;
+
+ if( m_gridCornersList->GetNumberRows() )
+ {
+ wxArrayInt selections = m_gridCornersList->GetSelectedRows();
+
+ if( selections.size() == 0 )
+ {
+ wxMessageBox( _( "Select a corner before adding a new corner" ) );
+ return;
+ }
+
+ std::sort( selections.begin(), selections.end() );
+ row = selections[0];
+ }
+
+ m_gridCornersList->SelectRow( row, false );
+
+ if( m_currshape.m_Poly.size() == 0 )
+ m_currshape.m_Poly.push_back( wxPoint(0,0) );
+ else
+ m_currshape.m_Poly.insert( m_currshape.m_Poly.begin() + row + 1, wxPoint(0,0) );
+
+ TransferDataToWindow();
+
+ m_panelPoly->Refresh();
+}
+
+void DIALOG_PAD_BASIC_SHP_POLY_PROPS::OnButtonDelete( wxCommandEvent& event )
+{
+ wxArrayInt selections = m_gridCornersList->GetSelectedRows();
+ std::sort( selections.begin(), selections.end() );
+
+ // remove corners:
+ for( int ii = selections.size()-1; ii >= 0 ; --ii )
+ {
+ m_currshape.m_Poly.erase( m_currshape.m_Poly.begin() + selections[ii] );
+ }
+
+ // Unselect all raws:
+ m_gridCornersList->SelectRow( -1, false );
+
+ TransferDataToWindow();
+
+ m_panelPoly->Refresh();
+}
+
+void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onPaintPolyPanel( wxPaintEvent& event )
+{
+ wxPaintDC dc( m_panelPoly );
+ wxSize dc_size = dc.GetSize();
+ dc.SetDeviceOrigin( dc_size.x / 2, dc_size.y / 2 );
+
+ // Calculate a suitable scale to fit the available draw area
+ wxSize minsize;
+
+ for( unsigned ii = 0; ii < m_currshape.m_Poly.size(); ++ii )
+ {
+ minsize.x = std::max( minsize.x, std::abs( m_currshape.m_Poly[ii].x ) );
+ minsize.y = std::max( minsize.y, std::abs( m_currshape.m_Poly[ii].y ) );
+ }
+
+ // The draw origin is the center of the window.
+ // Therefore the window size is twice the minsize just calculated
+ minsize.x *= 2;
+ minsize.y *= 2;
+ minsize.x += m_currshape.m_Thickness;
+ minsize.y += m_currshape.m_Thickness;
+
+ // Avoid null or too small size:
+ int mindim = Millimeter2iu( 0.5 );
+
+ if( minsize.x < mindim )
+ minsize.x = mindim;
+
+ if( minsize.y < mindim )
+ minsize.y = mindim;
+
+ double scale = std::min( (double) dc_size.x / minsize.x, (double) dc_size.y / minsize.y );
+
+ // Give a margin
+ scale *= 0.9;
+ dc.SetUserScale( scale, scale );
+
+ GRResetPenAndBrush( &dc );
+
+ // Draw polygon.
+ // The selected edge(s) are shown in selectcolor, the others in normalcolor.
+ EDA_COLOR_T normalcolor = WHITE;
+ EDA_COLOR_T selectcolor = RED;
+
+ for( unsigned ii = 0; ii < m_currshape.m_Poly.size(); ++ii )
+ {
+ EDA_COLOR_T color = normalcolor;
+
+ if( m_gridCornersList->IsInSelection (ii, 0) ||
+ m_gridCornersList->IsInSelection (ii, 1) ||
+ m_gridCornersList->GetGridCursorRow() == (int)ii )
+ color = selectcolor;
+
+ unsigned jj = ii + 1;
+
+ if( jj >= m_currshape.m_Poly.size() )
+ jj = 0;
+
+ GRLine( NULL, &dc, m_currshape.m_Poly[ii], m_currshape.m_Poly[jj], m_currshape.m_Thickness, color );
+ }
+
+ // Draw X and Y axis. This is particularly useful to show the
+ // reference position of custom pad shapes
+ GRLine( NULL, &dc, -int( dc_size.x/scale ), 0, int( dc_size.x/scale ), 0, 0, LIGHTBLUE ); // X axis
+ GRLine( NULL, &dc, 0, -int( dc_size.y/scale ), 0, int( dc_size.y/scale ), 0, LIGHTBLUE ); // Y axis
+
+ event.Skip();
+}
+
+void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onPolyPanelResize( wxSizeEvent& event )
+{
+ m_panelPoly->Refresh();
+ event.Skip();
+}
+
+void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onGridSelect( wxGridRangeSelectEvent& event )
+{
+ m_panelPoly->Refresh();
+}
+
+void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onCellChange( wxGridEvent& event )
+{
+
+ int row = event.GetRow();
+ int col = event.GetCol();
+
+ wxString msg = m_gridCornersList->GetCellValue( row, col );
+
+ if( msg.IsEmpty() )
+ return;
+
+ int value = ValueFromString( g_UserUnit, msg );
+
+ if( col == 0 ) // Set the X value
+ m_currshape.m_Poly[row].x = value;
+ else // Set the X value
+ m_currshape.m_Poly[row].y = value;
+
+ m_currshape.m_Thickness = ValueFromString( g_UserUnit, m_textCtrlThickness->GetValue() );
+
+ Validate();
+
+ m_panelPoly->Refresh();
+}
+
+
+// A dialog to apply geometry transforms to a shape or set of shapes
+// (move, rotate around origin, scaling factor, duplication).
+DIALOG_PAD_BASICSHAPES_TRANSFORM::DIALOG_PAD_BASICSHAPES_TRANSFORM(
+ wxWindow* aParent,
+ std::vector<PAD_BC_SHAPE*>& aList, bool aShowDuplicate )
+ :DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE( aParent ), m_list( aList )
+{
+ wxString unit = GetAbbreviatedUnitsLabel();
+ m_staticTextMoveUnit->SetLabel( unit );
+
+ if( !aShowDuplicate ) // means no duplicate transform
+ {
+ m_staticTextDupCnt->Enable( false );
+ m_spinCtrlDuplicateCount->Enable( false );
+ }
+
+ m_sdbSizerOK->SetDefault();
+ GetSizer()->SetSizeHints( this );
+}
+
+// A helper function in geometry transform
+inline void geom_transf( wxPoint& aCoord, wxPoint& aMove, double aScale, double aRotation )
+{
+ aCoord.x = KiROUND( aCoord.x * aScale );
+ aCoord.y = KiROUND( aCoord.y * aScale );
+ aCoord += aMove;
+ RotatePoint( &aCoord, aRotation );
+}
+
+void DIALOG_PAD_BASICSHAPES_TRANSFORM::Transform( std::vector<PAD_BC_SHAPE>* aList, int aDuplicateCount )
+{
+ // Get parameters from dlg:
+ wxPoint moveVect;
+ moveVect.x = ValueFromString( g_UserUnit, m_textCtrMoveX->GetValue() );
+ moveVect.y = ValueFromString( g_UserUnit, m_textCtrMoveY->GetValue() );
+
+ double rotation = DoubleValueFromString( DEGREES, m_textCtrAngle->GetValue() );
+ double scale = DoubleValueFromString( UNSCALED_UNITS, m_textCtrlScalingFactor->GetValue() );
+
+ // Avoid too small /too large scale, which could create issues:
+ if( scale < 0.01 )
+ scale = 0.01;
+
+ if( scale > 100.0 )
+ scale = 100.0;
+
+ // Transform shapes
+ // shapes are scaled, then moved then rotated.
+ // if aList != NULL, the initial shpe will be duplicated, and transform
+ // applied to the duplicated shape
+ do {
+ for( unsigned idx = 0; idx < m_list.size(); ++idx )
+ {
+ PAD_BC_SHAPE* shape;
+
+ if( aList == NULL )
+ shape = m_list[idx];
+ else
+ {
+ PAD_BC_SHAPE new_shape( *m_list[idx] );
+ aList->push_back( new_shape );
+ shape = &aList->back();
+ }
+
+ // Transform parameters common to all shape types (some can be unused)
+ shape->m_Thickness = KiROUND( shape->m_Thickness * scale );
+ geom_transf( shape->m_Start, moveVect, scale, rotation );
+ geom_transf( shape->m_End, moveVect, scale, rotation );
+
+ // specific parameters:
+ switch( shape->m_Type )
+ {
+ case S_SEGMENT: // Segment with rounded ends
+ break;
+
+ case S_ARC: // Arc with rounded ends
+ break;
+
+ case S_CIRCLE: // ring or circle
+ shape->m_Radius = KiROUND( shape->m_Radius * scale );
+ break;
+
+ case S_POLYGON: // polygon
+ for( unsigned ii = 0; ii < shape->m_Poly.size(); ++ii )
+ geom_transf( shape->m_Poly[ii], moveVect, scale, rotation );
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ // Prepare new transform on duplication:
+ // Each new item is rotated (or moved) by the transform from the last duplication
+ rotation += rotation;
+ moveVect += moveVect;
+ } while( aList && --aDuplicateCount > 0 );
+}
+
=== modified file 'pcbnew/dialogs/dialog_pad_properties.cpp'
--- pcbnew/dialogs/dialog_pad_properties.cpp 2015-12-27 15:51:13 +0000
+++ pcbnew/dialogs/dialog_pad_properties.cpp 2016-02-12 16:09:57 +0000
@@ -1,15 +1,15 @@
/**
* @file dialog_pad_properties.cpp
- * @brief Pad editing functions and dialog pad editor.
+ * @brief dialog pad properties editor.
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
- * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2013 Dick Hollenbeck, dick@xxxxxxxxxxx
* Copyright (C) 2008-2013 Wayne Stambaugh <stambaughw@xxxxxxxxxxx>
- * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -46,17 +46,33 @@
#include <class_board.h>
#include <class_module.h>
-#include <dialog_pad_properties_base.h>
+#include <dialog_pad_properties.h>
#include <html_messagebox.h>
-// list of pad shapes.
+// list of pad shapes, ordered like the pad shape wxChoice in dialog.
static PAD_SHAPE_T code_shape[] = {
PAD_SHAPE_CIRCLE,
PAD_SHAPE_OVAL,
PAD_SHAPE_RECT,
- PAD_SHAPE_TRAPEZOID
-};
+ PAD_SHAPE_TRAPEZOID,
+ PAD_SHAPE_ROUNDRECT,
+ PAD_SHAPE_CUSTOM, // choice = CHOICE_SHAPE_CUSTOM_CIRC_ANCHOR
+ PAD_SHAPE_CUSTOM // choice = PAD_SHAPE_CUSTOM_RECT_ANCHOR
+};
+
+// the ordered index of the pad shape wxChoice in dialog.
+// keep it consistent with code_shape[] and dialog strings
+enum CODE_CHOICE {
+ CHOICE_SHAPE_CIRCLE = 0,
+ CHOICE_SHAPE_OVAL,
+ CHOICE_SHAPE_RECT,
+ CHOICE_SHAPE_TRAPEZOID,
+ CHOICE_SHAPE_ROUNDRECT,
+ CHOICE_SHAPE_CUSTOM_CIRC_ANCHOR,
+ CHOICE_SHAPE_CUSTOM_RECT_ANCHOR
+};
+
static PAD_ATTR_T code_type[] = {
@@ -83,79 +99,9 @@
};
-/**
- * class DIALOG_PAD_PROPERTIES, derived from DIALOG_PAD_PROPERTIES_BASE,
- * created by wxFormBuilder
- */
-class DIALOG_PAD_PROPERTIES : public DIALOG_PAD_PROPERTIES_BASE
-{
-public:
- DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad );
- ~DIALOG_PAD_PROPERTIES()
- {
- delete m_dummyPad;
- }
-
-private:
- PCB_BASE_FRAME* m_parent;
- 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
- // footprint editor
- BOARD* m_board; // the main board: this is the board handled by
- // the PCB editor, if running or the dummy
- // board used by the footprint editor
- // (could happen when the Footprint editor will be run
- // alone, outside the board editor
- bool m_isFlipped; // true if the parent footprint (therefore pads) is flipped (mirrored)
- // in this case, some Y coordinates values must be negated
- bool m_canUpdate;
- bool m_canEditNetName; // true only if the called is the board editor
-
-private:
- void initValues();
-
- bool padValuesOK(); ///< test if all values are acceptable for the pad
-
- void redraw();
-
- /**
- * Function setPadLayersList
- * updates the CheckBox states in pad layers list,
- * @param layer_mask = pad layer mask (ORed layers bit mask)
- */
- void setPadLayersList( LSET layer_mask );
-
- /// Copy values from dialog field to aPad's members
- bool transferDataToPad( D_PAD* aPad );
-
- // event handlers:
- void OnResize( wxSizeEvent& event );
-
- void OnPadShapeSelection( wxCommandEvent& event );
- void OnDrillShapeSelected( wxCommandEvent& event );
-
- void PadOrientEvent( wxCommandEvent& event );
- void PadTypeSelected( wxCommandEvent& event );
-
- void OnSetLayers( wxCommandEvent& event );
- void OnCancelButtonClick( wxCommandEvent& event );
- void OnPaintShowPanel( wxPaintEvent& event );
-
- /// Called when a dimension has changed.
- /// Update the graphical pad shown in the panel.
- void OnValuesChanged( wxCommandEvent& event );
-
- /// Updates the different parameters for the component being edited.
- /// Fired from the OK button click.
- void PadPropertiesAccept( wxCommandEvent& event );
-};
-
-
void PCB_BASE_FRAME::InstallPadOptionsFrame( D_PAD* aPad )
{
DIALOG_PAD_PROPERTIES dlg( this, aPad );
-
dlg.ShowModal();
}
@@ -166,7 +112,7 @@
m_canUpdate = false;
m_parent = aParent;
m_currentPad = aPad; // aPad can be NULL, if the dialog is called
- // from the module editor to set default pad characteristics
+ // from the footprint editor to set default pad setup
m_board = m_parent->GetBoard();
@@ -175,9 +121,16 @@
if( aPad )
m_dummyPad->Copy( aPad );
- else // We are editing a "master" pad, i.e. a pad used to create new pads
+ else // We are editing a "master" pad, i.e. a template 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,8 +138,8 @@
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 ) );
}
else
@@ -197,7 +150,7 @@
initValues();
- m_sdbSizer1OK->SetDefault();
+ m_sdbSizerOK->SetDefault();
GetSizer()->SetSizeHints( this );
m_PadNumCtrl->SetFocus();
@@ -243,7 +196,7 @@
dc.SetDeviceOrigin( dc_size.x / 2, dc_size.y / 2 );
// Calculate a suitable scale to fit the available draw area
- int dim = m_dummyPad->GetSize().x + std::abs( m_dummyPad->GetDelta().y );
+ int dim = m_dummyPad->GetBoundingRadius() *2;
// Invalid x size. User could enter zero, or have deleted all text prior to
// entering a new value; this is also treated as zero. If dim is left at
@@ -291,11 +244,13 @@
GRResetPenAndBrush( &dc );
m_dummyPad->DrawShape( NULL, &dc, drawInfo );
- // Draw X and Y axis.
- // this is particularly useful to show the reference position of pads
- // with offset and no hole
- GRLine( NULL, &dc, -dim, 0, dim, 0, 0, BLUE ); // X axis
- GRLine( NULL, &dc, 0, -dim, 0, dim, 0, BLUE ); // Y axis
+ // Draw X and Y axis. Hhis is particularly useful to show the
+ // reference position of pads with offset and no hole, or custom pad shapes
+ const int linethickness = 0;
+ GRLine( NULL, &dc, -int( dc_size.x/scale ), 0, int( dc_size.x/scale ), 0,
+ linethickness, LIGHTBLUE ); // X axis
+ GRLine( NULL, &dc, 0, -int( dc_size.y/scale ), 0, int( dc_size.y/scale ),
+ linethickness, LIGHTBLUE ); // Y axis
event.Skip();
}
@@ -332,16 +287,14 @@
if( m_currentPad )
{
- MODULE* module = m_currentPad->GetParent();
+ MODULE* footprint = m_currentPad->GetParent();
+ m_isFlipped = m_currentPad->IsFlipped();
- if( module->GetLayer() == B_Cu )
- {
- m_isFlipped = true;
+ if( m_isFlipped )
m_staticModuleSideValue->SetLabel( _( "Back side (footprint is mirrored)" ) );
- }
- //Internal angles are in 0.1 degree
- msg.Printf( wxT( "%.1f" ), module->GetOrientation() / 10.0 );
+ // Diplay footprint rotation ( angles are in 0.1 degree )
+ msg.Printf( wxT( "%.1f" ), footprint->GetOrientation() / 10.0 );
m_staticModuleRotValue->SetLabel( msg );
}
@@ -357,31 +310,32 @@
// flip pad's layers
m_dummyPad->SetLayerSet( FlipLayerMask( m_dummyPad->GetLayerSet() ) );
+
+ // flip custom pad shapes
+ m_dummyPad->FlipBasicShapes();
}
+ m_basicShapes = m_dummyPad->GetBasicShapes();
+
m_staticTextWarningPadFlipped->Show(m_isFlipped);
m_PadNumCtrl->SetValue( m_dummyPad->GetPadName() );
m_PadNetNameCtrl->SetValue( m_dummyPad->GetNetname() );
- // Display current unit name in dialog:
- m_PadPosX_Unit->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
- m_PadPosY_Unit->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
- m_PadDrill_X_Unit->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
- m_PadDrill_Y_Unit->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
- m_PadShapeSizeX_Unit->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
- m_PadShapeSizeY_Unit->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
- m_PadShapeOffsetX_Unit->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
- m_PadShapeOffsetY_Unit->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
- m_PadShapeDelta_Unit->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
- m_PadLengthDie_Unit->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
+ // Set the unit name in dialog:
+ wxStaticText* unitTexts[] =
+ {
+ m_PadPosX_Unit, m_PadPosY_Unit,
+ m_PadDrill_X_Unit, m_PadDrill_Y_Unit,
+ m_PadShapeSizeX_Unit, m_PadShapeSizeY_Unit,
+ m_PadShapeOffsetX_Unit,m_PadShapeOffsetY_Unit,
+ m_PadShapeDelta_Unit, m_PadLengthDie_Unit,
+ m_NetClearanceUnits, m_SolderMaskMarginUnits, m_SolderPasteMarginUnits,
+ m_ThermalWidthUnits, m_ThermalGapUnits
+ };
- // Display current pad masks clearances units
- m_NetClearanceUnits->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
- m_SolderMaskMarginUnits->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
- m_SolderPasteMarginUnits->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
- m_ThermalWidthUnits->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
- m_ThermalGapUnits->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
+ for( unsigned ii = 0; ii < DIM( unitTexts ); ++ii )
+ unitTexts[ii]->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
// Display current pad parameters units:
PutValueInLocalUnits( *m_PadPosition_X_Ctrl, m_dummyPad->GetPosition().x );
@@ -450,9 +404,8 @@
if( m_currentPad )
{
- MODULE* module = m_currentPad->GetParent();
-
- angle = m_currentPad->GetOrientation() - module->GetOrientation();
+ MODULE* footprint = m_currentPad->GetParent();
+ angle = m_currentPad->GetOrientation() - footprint->GetOrientation();
if( m_isFlipped )
angle = -angle;
@@ -496,19 +449,30 @@
{
default:
case PAD_SHAPE_CIRCLE:
- m_PadShape->SetSelection( 0 );
+ m_PadShape->SetSelection( CHOICE_SHAPE_CIRCLE );
break;
case PAD_SHAPE_OVAL:
- m_PadShape->SetSelection( 1 );
+ m_PadShape->SetSelection( CHOICE_SHAPE_OVAL );
break;
case PAD_SHAPE_RECT:
- m_PadShape->SetSelection( 2 );
+ m_PadShape->SetSelection( CHOICE_SHAPE_RECT );
break;
case PAD_SHAPE_TRAPEZOID:
- m_PadShape->SetSelection( 3 );
+ m_PadShape->SetSelection( CHOICE_SHAPE_TRAPEZOID );
+ break;
+
+ case PAD_SHAPE_ROUNDRECT:
+ m_PadShape->SetSelection( CHOICE_SHAPE_ROUNDRECT );
+ break;
+
+ case PAD_SHAPE_CUSTOM:
+ if( m_dummyPad->GetAnchorPadShape() == PAD_SHAPE_RECT )
+ m_PadShape->SetSelection( CHOICE_SHAPE_CUSTOM_RECT_ANCHOR );
+ else
+ m_PadShape->SetSelection( CHOICE_SHAPE_CUSTOM_CIRC_ANCHOR );
break;
}
@@ -545,8 +509,96 @@
setPadLayersList( m_dummyPad->GetLayerSet() );
OnDrillShapeSelected( cmd_event );
OnPadShapeSelection( cmd_event );
-}
-
+
+ // Update basic shapes list
+ displayBasicShapesList();
+}
+
+static wxString formatCoord( wxPoint aCoord )
+{
+ return wxString::Format( "X=%s Y=%s",
+ CoordinateToString( aCoord.x, true ),
+ CoordinateToString( aCoord.y, true ) );
+}
+
+void DIALOG_PAD_PROPERTIES::displayBasicShapesList()
+{
+ m_listCtrlShapes->ClearAll();
+
+ wxListItem itemCol;
+ itemCol.SetText(wxT("Shape"));
+ itemCol.SetImage(-1);
+ m_listCtrlShapes->InsertColumn(0, itemCol);
+
+ itemCol.SetText(wxT("Prm1"));
+ m_listCtrlShapes->InsertColumn(1, itemCol);
+
+ itemCol.SetText(wxT("Prm2"));
+ m_listCtrlShapes->InsertColumn(2, itemCol);
+
+ itemCol.SetText(wxT("Prm3"));
+ m_listCtrlShapes->InsertColumn(3, itemCol);
+
+ itemCol.SetText(wxT("Thickness"));
+ m_listCtrlShapes->InsertColumn(4, itemCol);
+
+ wxString bs_info[5];
+
+ for( unsigned ii = 0; ii < m_basicShapes.size(); ++ii )
+ {
+ const PAD_BC_SHAPE& bshape = m_basicShapes[ii];
+
+ for( unsigned jj = 0; jj < 5; ++jj )
+ bs_info[jj].Empty();
+
+ bs_info[4] = wxString::Format( "%s", FMT_IU( bshape.m_Thickness ) );
+
+ switch( bshape.m_Type )
+ {
+ case S_SEGMENT: // usual segment : line with rounded ends
+ bs_info[0] = ( "Segment" );
+ bs_info[1] = formatCoord( bshape.m_Start );
+ bs_info[2] = formatCoord( bshape.m_End );
+ break;
+
+ case S_ARC: // Arc with rounded ends
+ bs_info[0] = "Arc";
+ bs_info[1] = formatCoord( bshape.m_Start ); // Center
+ bs_info[2] = formatCoord( bshape.m_End ); // Start point
+ bs_info[3] = wxString::Format( "angle %s", FMT_ANGLE( bshape.m_ArcAngle ) );
+ break;
+
+ case S_CIRCLE: // ring or circle
+ if( bshape.m_Thickness )
+ bs_info[0] = "ring";
+ else
+ bs_info[0] = "circle";
+
+ bs_info[1] = formatCoord( bshape.m_Start );
+ bs_info[2] = wxString::Format( "radius %s",
+ CoordinateToString( bshape.m_Radius, true ) );
+ break;
+
+ case S_POLYGON: // polygon
+ bs_info[0] = "Polygon";
+ bs_info[1] = wxString::Format( "corners %d", bshape.m_Poly.size() );
+ break;
+
+ default:
+ bs_info[0] = "Unknown basic shape";
+ break;
+ }
+
+ long tmp = m_listCtrlShapes->InsertItem(ii, bs_info[0]);
+ m_listCtrlShapes->SetItemData(tmp, ii);
+
+ for( int jj = 0; jj < 5; ++jj )
+ m_listCtrlShapes->SetItem(tmp, jj, bs_info[jj]);
+ }
+
+ for( unsigned ii = 0; ii < 5; ++ii )
+ m_listCtrlShapes->SetColumnWidth( ii, wxLIST_AUTOSIZE );
+}
void DIALOG_PAD_PROPERTIES::OnResize( wxSizeEvent& event )
{
@@ -559,7 +611,7 @@
{
switch( m_PadShape->GetSelection() )
{
- case 0: // PAD_SHAPE_CIRCLE:
+ case CHOICE_SHAPE_CIRCLE:
m_ShapeDelta_Ctrl->Enable( false );
m_trapDeltaDirChoice->Enable( false );
m_ShapeSize_Y_Ctrl->Enable( false );
@@ -567,29 +619,47 @@
m_ShapeOffset_Y_Ctrl->Enable( false );
break;
- case 1: // PAD_SHAPE_OVAL:
- m_ShapeDelta_Ctrl->Enable( false );
- m_trapDeltaDirChoice->Enable( false );
- m_ShapeSize_Y_Ctrl->Enable( true );
- m_ShapeOffset_X_Ctrl->Enable( true );
- m_ShapeOffset_Y_Ctrl->Enable( true );
- break;
-
- case 2: // PAD_SHAPE_RECT:
- m_ShapeDelta_Ctrl->Enable( false );
- m_trapDeltaDirChoice->Enable( false );
- m_ShapeSize_Y_Ctrl->Enable( true );
- m_ShapeOffset_X_Ctrl->Enable( true );
- m_ShapeOffset_Y_Ctrl->Enable( true );
- break;
-
- case 3: // PAD_SHAPE_TRAPEZOID:
+ case CHOICE_SHAPE_OVAL:
+ m_ShapeDelta_Ctrl->Enable( false );
+ m_trapDeltaDirChoice->Enable( false );
+ m_ShapeSize_Y_Ctrl->Enable( true );
+ m_ShapeOffset_X_Ctrl->Enable( true );
+ m_ShapeOffset_Y_Ctrl->Enable( true );
+ break;
+
+ case CHOICE_SHAPE_RECT:
+ m_ShapeDelta_Ctrl->Enable( false );
+ m_trapDeltaDirChoice->Enable( false );
+ m_ShapeSize_Y_Ctrl->Enable( true );
+ m_ShapeOffset_X_Ctrl->Enable( true );
+ m_ShapeOffset_Y_Ctrl->Enable( true );
+ break;
+
+ case CHOICE_SHAPE_TRAPEZOID:
m_ShapeDelta_Ctrl->Enable( true );
m_trapDeltaDirChoice->Enable( true );
m_ShapeSize_Y_Ctrl->Enable( true );
m_ShapeOffset_X_Ctrl->Enable( true );
m_ShapeOffset_Y_Ctrl->Enable( true );
break;
+
+ case CHOICE_SHAPE_ROUNDRECT:
+ m_ShapeDelta_Ctrl->Enable( false );
+ m_trapDeltaDirChoice->Enable( false );
+ m_ShapeSize_Y_Ctrl->Enable( true );
+ m_ShapeOffset_X_Ctrl->Enable( true );
+ m_ShapeOffset_Y_Ctrl->Enable( true );
+ break;
+
+ case CHOICE_SHAPE_CUSTOM_CIRC_ANCHOR: // PAD_SHAPE_CUSTOM, circular anchor
+ case CHOICE_SHAPE_CUSTOM_RECT_ANCHOR: // PAD_SHAPE_CUSTOM, rect anchor
+ m_ShapeDelta_Ctrl->Enable( false );
+ m_trapDeltaDirChoice->Enable( false );
+ m_ShapeSize_Y_Ctrl->Enable(
+ m_PadShape->GetSelection() == CHOICE_SHAPE_CUSTOM_RECT_ANCHOR );
+ m_ShapeOffset_X_Ctrl->Enable( false );
+ m_ShapeOffset_Y_Ctrl->Enable( false );
+ break;
}
transferDataToPad( m_dummyPad );
@@ -871,10 +941,10 @@
if( m_currentPad ) // Set current Pad parameters
{
wxSize size;
- MODULE* module = m_currentPad->GetParent();
+ MODULE* footprint = m_currentPad->GetParent();
- m_parent->SaveCopyInUndoList( module, UR_CHANGED );
- module->SetLastEditTime();
+ m_parent->SaveCopyInUndoList( footprint, UR_CHANGED );
+ footprint->SetLastEditTime();
// redraw the area where the pad was, without pad (delete pad on screen)
m_currentPad->SetFlags( DO_NOT_DRAW );
@@ -891,15 +961,16 @@
rastnestIsChanged = true;
}
- // compute the pos 0 value, i.e. pad position for module with orientation = 0
- // i.e. relative to module origin (module position)
- wxPoint pt = m_currentPad->GetPosition() - module->GetPosition();
+ // compute the pos 0 value, i.e. pad position for footprint with orientation = 0
+ // i.e. relative to footprint origin (footprint position)
+ wxPoint pt = m_currentPad->GetPosition() - footprint->GetPosition();
- RotatePoint( &pt, -module->GetOrientation() );
+ RotatePoint( &pt, -footprint->GetOrientation() );
m_currentPad->SetPos0( pt );
- m_currentPad->SetOrientation( m_padMaster->GetOrientation() * isign + module->GetOrientation() );
+ m_currentPad->SetOrientation( m_padMaster->GetOrientation() * isign
+ + footprint->GetOrientation() );
m_currentPad->SetSize( m_padMaster->GetSize() );
@@ -922,8 +993,17 @@
m_currentPad->SetLayerSet( m_padMaster->GetLayerSet() );
}
+ if( m_padMaster->GetShape() != PAD_SHAPE_CUSTOM )
+ m_padMaster->DeleteBasicShapesList();
+
+
+ m_currentPad->SetBasicShapes( m_padMaster->GetBasicShapes() );
+
if( m_isFlipped )
+ {
m_currentPad->SetLayerSet( FlipLayerMask( m_currentPad->GetLayerSet() ) );
+ m_currentPad->FlipBasicShapes();
+ }
m_currentPad->SetPadName( m_padMaster->GetPadName() );
@@ -948,6 +1028,7 @@
}
}
+ m_currentPad->SetAnchorPadShape( m_padMaster->GetAnchorPadShape() );
m_currentPad->SetLocalClearance( m_padMaster->GetLocalClearance() );
m_currentPad->SetLocalSolderMaskMargin( m_padMaster->GetLocalSolderMaskMargin() );
m_currentPad->SetLocalSolderPasteMargin( m_padMaster->GetLocalSolderPasteMargin() );
@@ -956,7 +1037,7 @@
m_currentPad->SetThermalWidth( m_padMaster->GetThermalWidth() );
m_currentPad->SetThermalGap( m_padMaster->GetThermalGap() );
- module->CalculateBoundingBox();
+ footprint->CalculateBoundingBox();
m_parent->SetMsgPanel( m_currentPad );
// redraw the area where the pad was
@@ -978,6 +1059,12 @@
aPad->SetAttribute( code_type[m_PadType->GetSelection()] );
aPad->SetShape( code_shape[m_PadShape->GetSelection()] );
+ aPad->SetAnchorPadShape( m_PadShape->GetSelection() == CHOICE_SHAPE_CUSTOM_RECT_ANCHOR ?
+ PAD_SHAPE_RECT : PAD_SHAPE_CIRCLE );
+
+ // To do: import from dialog, when possible
+ if( aPad->GetShape() == PAD_SHAPE_CUSTOM )
+ aPad->SetBasicShapes( m_basicShapes );
// Read pad clearances values:
aPad->SetLocalClearance( ValueFromTextCtrl( *m_NetClearanceValueCtrl ) );
@@ -1043,9 +1130,14 @@
// Read pad shape size:
x = ValueFromTextCtrl( *m_ShapeSize_X_Ctrl );
y = ValueFromTextCtrl( *m_ShapeSize_Y_Ctrl );
+
if( aPad->GetShape() == PAD_SHAPE_CIRCLE )
y = x;
+ // for custom shped pads, the pad size is the anchor pad size:
+ if( aPad->GetShape() == PAD_SHAPE_CUSTOM && aPad->GetAnchorPadShape() == PAD_SHAPE_CIRCLE )
+ y = x;
+
aPad->SetSize( wxSize( x, y ) );
// Read pad length die
@@ -1136,6 +1228,20 @@
case PAD_SHAPE_TRAPEZOID:
break;
+ case PAD_SHAPE_ROUNDRECT:
+ aPad->SetDelta( wxSize( 0, 0 ) );
+ break;
+
+ case PAD_SHAPE_CUSTOM: // The pad custom has an "anchor pad" (round or rect pad)
+ aPad->SetOffset( wxPoint( 0, 0 ) );
+ aPad->SetDelta( wxSize( 0, 0 ) );
+ if( aPad->GetAnchorPadShape() == PAD_SHAPE_CIRCLE )
+ {
+ x = aPad->GetSize().x;
+ aPad->SetSize( wxSize( x, x ) );
+ }
+ break;
+
default:
;
}
@@ -1152,7 +1258,7 @@
// PAD_ATTRIB_CONN has just a default non technical layers that differs from SMD
// and are intended to be used in virtual edge board connectors
// However we can accept a non null offset,
- // mainly to allow complex pads build from a set of from basic pad shapes
+ // mainly to allow complex pads build from a set of basic pad shapes
aPad->SetDrillSize( wxSize( 0, 0 ) );
break;
@@ -1237,8 +1343,218 @@
}
}
-
-void DIALOG_PAD_PROPERTIES::OnCancelButtonClick( wxCommandEvent& event )
-{
- EndModal( wxID_CANCEL );
+void DIALOG_PAD_PROPERTIES::editBasicShape()
+{
+ long select = m_listCtrlShapes->GetFirstSelected();
+
+ if( select < 0 )
+ {
+ wxMessageBox( _( "No shape selected" ) );
+ return;
+ }
+
+ PAD_BC_SHAPE& shape = m_basicShapes[select];
+
+ if( shape.m_Type == S_POLYGON )
+ {
+ DIALOG_PAD_BASIC_SHP_POLY_PROPS dlg( this, &shape );
+
+ if( dlg.ShowModal() != wxID_OK )
+ return;
+
+ dlg.TransferDataFromWindow();
+ }
+
+ else
+ {
+ DIALOG_PAD_BASICSHAPES_PROPERTIES dlg( this, &shape );
+
+ if( dlg.ShowModal() != wxID_OK )
+ return;
+
+ dlg.TransferDataFromWindow();
+ }
+
+ displayBasicShapesList();
+
+ if( m_canUpdate )
+ {
+ transferDataToPad( m_dummyPad );
+ redraw();
+ }
+}
+
+
+/// Called on a double click on the basic shapes list
+void DIALOG_PAD_PROPERTIES::onCustomShapeDClick( wxMouseEvent& event )
+{
+ editBasicShape();
+}
+
+
+// Called on a click on basic shapes list panel button
+void DIALOG_PAD_PROPERTIES::onEditShape( wxCommandEvent& event )
+{
+ editBasicShape();
+}
+
+// Called on a click on basic shapes list panel button
+void DIALOG_PAD_PROPERTIES::onDeleteShape( wxCommandEvent& event )
+{
+ long select = m_listCtrlShapes->GetFirstSelected();
+
+ if( select < 0 )
+ return;
+
+ // Multiple selections are allowed. get them and remove corresponding shapes
+ std::vector<long> indexes;
+ indexes.push_back( select );
+
+ while( ( select = m_listCtrlShapes->GetNextSelected( select ) ) >= 0 )
+ indexes.push_back( select );
+
+ // Erase all select shapes
+ for( unsigned ii = indexes.size(); ii > 0; --ii )
+ m_basicShapes.erase( m_basicShapes.begin() + indexes[ii-1] );
+
+ displayBasicShapesList();
+
+ if( m_canUpdate )
+ {
+ transferDataToPad( m_dummyPad );
+ redraw();
+ }
+}
+
+
+void DIALOG_PAD_PROPERTIES::onAddShape( wxCommandEvent& event )
+{
+ // Ask user for shape type
+ wxString shapelist[] =
+ {
+ _( "Segment" ), _( "Arc" ), _( "ring/circle" ), _( "polygon" )
+ };
+
+ int type = wxGetSingleChoiceIndex( wxEmptyString, _( " Select shape type:" ),
+ DIM( shapelist ), shapelist, 0 );
+
+ STROKE_T listtype[] =
+ {
+ S_SEGMENT, S_ARC, S_CIRCLE, S_POLYGON
+ };
+
+ PAD_BC_SHAPE basicShape( listtype[type] );
+
+ if( listtype[type] == S_POLYGON )
+ {
+ DIALOG_PAD_BASIC_SHP_POLY_PROPS dlg( this, &basicShape );
+
+ if( dlg.ShowModal() != wxID_OK )
+ return;
+ }
+ else
+ {
+ DIALOG_PAD_BASICSHAPES_PROPERTIES dlg( this, &basicShape );
+
+ if( dlg.ShowModal() != wxID_OK )
+ return;
+ }
+
+ m_basicShapes.push_back( basicShape );
+
+ displayBasicShapesList();
+
+ if( m_canUpdate )
+ {
+ transferDataToPad( m_dummyPad );
+ redraw();
+ }
+}
+
+
+void DIALOG_PAD_PROPERTIES::onImportShape( wxCommandEvent& event )
+{
+ wxMessageBox( "Not yet available" );
+}
+
+
+void DIALOG_PAD_PROPERTIES::onGeometryTransform( wxCommandEvent& event )
+{
+ long select = m_listCtrlShapes->GetFirstSelected();
+
+ if( select < 0 )
+ {
+ wxMessageBox( _( "No shape selected" ) );
+ return;
+ }
+
+ // Multiple selections are allowed. Build selected shapes list
+ std::vector<long> indexes;
+ indexes.push_back( select );
+
+ std::vector<PAD_BC_SHAPE*> shapeList;
+ shapeList.push_back( &m_basicShapes[select] );
+
+ while( ( select = m_listCtrlShapes->GetNextSelected( select ) ) >= 0 )
+ {
+ indexes.push_back( select );
+ shapeList.push_back( &m_basicShapes[select] );
+ }
+
+ DIALOG_PAD_BASICSHAPES_TRANSFORM dlg( this, shapeList );
+
+ if( dlg.ShowModal() != wxID_OK )
+ return;
+
+ // Transfert new settings:
+ dlg.Transform();
+
+ displayBasicShapesList();
+
+ if( m_canUpdate )
+ {
+ transferDataToPad( m_dummyPad );
+ redraw();
+ }
+}
+
+
+void DIALOG_PAD_PROPERTIES::onDuplicateShape( wxCommandEvent& event )
+{
+ long select = m_listCtrlShapes->GetFirstSelected();
+
+ if( select < 0 )
+ {
+ wxMessageBox( _( "No shape selected" ) );
+ return;
+ }
+
+ // Multiple selections are allowed. Build selected shapes list
+ std::vector<long> indexes;
+ indexes.push_back( select );
+
+ std::vector<PAD_BC_SHAPE*> shapeList;
+ shapeList.push_back( &m_basicShapes[select] );
+
+ while( ( select = m_listCtrlShapes->GetNextSelected( select ) ) >= 0 )
+ {
+ indexes.push_back( select );
+ shapeList.push_back( &m_basicShapes[select] );
+ }
+
+ DIALOG_PAD_BASICSHAPES_TRANSFORM dlg( this, shapeList, true );
+
+ if( dlg.ShowModal() != wxID_OK )
+ return;
+
+ // Transfert new settings:
+ dlg.Transform( &m_basicShapes, dlg.GetDuplicateCount() );
+
+ displayBasicShapesList();
+
+ if( m_canUpdate )
+ {
+ transferDataToPad( m_dummyPad );
+ redraw();
+ }
}
=== added file 'pcbnew/dialogs/dialog_pad_properties.h'
--- pcbnew/dialogs/dialog_pad_properties.h 1970-01-01 00:00:00 +0000
+++ pcbnew/dialogs/dialog_pad_properties.h 2016-02-12 15:44:05 +0000
@@ -0,0 +1,239 @@
+/**
+ * @file dialog_pad_properties.cpp
+ * @brief dialog pad properties editor.
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 2013 Dick Hollenbeck, dick@xxxxxxxxxxx
+ * Copyright (C) 2008-2013 Wayne Stambaugh <stambaughw@xxxxxxxxxxx>
+ * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you may find one here:
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ * or you may search the http://www.gnu.org website for the version 2 license,
+ * or you may write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef _DIALOG_PAD_PROPERTIES_H_
+#define _DIALOG_PAD_PROPERTIES_H_
+
+#include <fctsys.h>
+#include <common.h>
+#include <class_drawpanel.h>
+#include <pcbnew.h>
+#include <wxBasePcbFrame.h>
+#include <pcbcommon.h>
+#include <base_units.h>
+
+#include <class_board.h>
+#include <class_module.h>
+
+#include <origin_viewitem.h>
+
+#include <dialog_pad_properties_base.h>
+
+
+
+/**
+ * class DIALOG_PAD_PROPERTIES, derived from DIALOG_PAD_PROPERTIES_BASE,
+ * created by wxFormBuilder
+ */
+class DIALOG_PAD_PROPERTIES : public DIALOG_PAD_PROPERTIES_BASE
+{
+public:
+ DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad );
+ ~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
+ // footprint editor
+ BOARD* m_board; // the main board: this is the board handled by
+ // the PCB editor, if running or the dummy
+ // board used by the footprint editor
+ // (could happen when the Footprint editor will be run
+ // alone, outside the board editor
+ bool m_isFlipped; // true if the parent footprint (therefore pads) is flipped (mirrored)
+ // in this case, some Y coordinates values must be negated
+ bool m_canUpdate;
+ bool m_canEditNetName; // true only if the caller is the board editor
+
+ // for free shape pads: the list of basic shapes,
+ // in local coordinates, orient 0, coordinates relative to m_Pos
+ // They are expected to define only one copper area.
+ std::vector<PAD_BC_SHAPE> m_basicShapes;
+
+private:
+ void initValues();
+ void displayBasicShapesList();
+ bool padValuesOK(); ///< test if all values are acceptable for the pad
+ void redraw();
+ void editBasicShape();
+
+ /**
+ * Function setPadLayersList
+ * updates the CheckBox states in pad layers list,
+ * @param layer_mask = pad layer mask (ORed layers bit mask)
+ */
+ void setPadLayersList( LSET layer_mask );
+
+ /// Copy values from dialog field to aPad's members
+ bool transferDataToPad( D_PAD* aPad );
+
+ // event handlers:
+ void OnResize( wxSizeEvent& event );
+
+ void OnPadShapeSelection( wxCommandEvent& event );
+ void OnDrillShapeSelected( wxCommandEvent& event );
+
+ void PadOrientEvent( wxCommandEvent& event );
+ void PadTypeSelected( wxCommandEvent& event );
+
+ void OnSetLayers( wxCommandEvent& event );
+ void OnPaintShowPanel( wxPaintEvent& event );
+
+ /// Called when a dimension has changed.
+ /// Update the graphical pad shown in the panel.
+ void OnValuesChanged( wxCommandEvent& event );
+
+ /// Updates the different parameters for the component being edited.
+ /// Fired from the OK button click.
+ void PadPropertiesAccept( wxCommandEvent& event );
+
+ /// Event handlers of basic shapes list panel
+ void onDeleteShape( wxCommandEvent& event );
+ void onEditShape( wxCommandEvent& event );
+ void onAddShape( wxCommandEvent& event );
+ void onImportShape( wxCommandEvent& event );
+ void onGeometryTransform( wxCommandEvent& event );
+ void onDuplicateShape( wxCommandEvent& event );
+
+ /// Called on a double click on the basic shapes list
+ void onCustomShapeDClick( wxMouseEvent& event );
+};
+
+/**
+ * a dialog to edit basics shapes parameters.
+ * Polygonal shape is not handles by this dialog
+ */
+class DIALOG_PAD_BASICSHAPES_PROPERTIES: public DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE
+{
+public:
+ DIALOG_PAD_BASICSHAPES_PROPERTIES( wxWindow* aParent, PAD_BC_SHAPE * aShape );
+
+ /**
+ * Function TransferDataFromWindow
+ * Transfer data out of the GUI.
+ */
+ bool TransferDataFromWindow();
+
+private:
+ /**
+ * Function TransferDataToWindow
+ * Transfer data into the GUI.
+ */
+ bool TransferDataToWindow();
+
+ // The basic shape currently edited
+ PAD_BC_SHAPE * m_shape;
+};
+
+
+/**
+ * a dialog to edit basic polygonal shape parameters
+ */
+class DIALOG_PAD_BASIC_SHP_POLY_PROPS: public DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE
+{
+ // The basic shape currently edited
+ PAD_BC_SHAPE * m_shape;
+
+ // The working copy of the basic shape currently edited
+ PAD_BC_SHAPE m_currshape;
+
+public:
+ DIALOG_PAD_BASIC_SHP_POLY_PROPS( wxWindow* aParent, PAD_BC_SHAPE * aShape );
+
+ /**
+ * Function TransferDataFromWindow
+ * Transfer data out of the GUI.
+ */
+ bool TransferDataFromWindow();
+
+private:
+ /**
+ * Function TransferDataToWindow
+ * Transfer data into the GUI.
+ */
+ bool TransferDataToWindow();
+
+ /**
+ * test for a valid polygon (a not self intersectiong polygon)
+ */
+ bool Validate();
+
+ // Events handlers:
+ void OnValidateButton( wxCommandEvent& event );
+ void onButtonAdd( wxCommandEvent& event );
+ void OnButtonDelete( wxCommandEvent& event );
+ void onPaintPolyPanel( wxPaintEvent& event );
+ void onPolyPanelResize( wxSizeEvent& event );
+ void onGridSelect( wxGridRangeSelectEvent& event );
+ void onCellChange( wxGridEvent& event );
+ void onCellSelect( wxGridEvent& event ) { event.Skip(); }
+};
+
+
+/** A dialog to apply geometry transforms to a shape or set of shapes
+ * (move, rotate around origin, scaling factor, duplication).
+ * shapes are scaled, then moved then rotated.
+ * aList is a list of shapes to transform or duplicate
+ * if aShowDuplicate == false, the parameter "Duplicate count" is disabled
+ */
+
+class DIALOG_PAD_BASICSHAPES_TRANSFORM : public DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE
+{
+public:
+ DIALOG_PAD_BASICSHAPES_TRANSFORM( wxWindow* aParent,
+ std::vector<PAD_BC_SHAPE*>& aList, bool aShowDuplicate = false );
+
+ /**
+ * Apply geometric transform (rotation, move, scale) defined in dialog
+ * aDuplicate = 1 .. n to duplicate the list of shapes
+ * aDuplicate = 0 to transform the list of shapes
+ * The duplicated items are transformed, but the initial shpes are not modified.
+ * The duplicated items are added to aList
+ */
+ void Transform( std::vector<PAD_BC_SHAPE>* aList = NULL, int aDuplicateCount = 0 );
+
+ /**
+ * @return the number of duplicate, chosen by user
+ */
+ int GetDuplicateCount() { return m_spinCtrlDuplicateCount->GetValue(); }
+
+private:
+ std::vector<PAD_BC_SHAPE*>& m_list;
+};
+
+#endif // #ifndef _DIALOG_PAD_PROPERTIES_H_
=== modified file 'pcbnew/dialogs/dialog_pad_properties_base.cpp'
--- pcbnew/dialogs/dialog_pad_properties_base.cpp 2015-09-11 23:13:54 +0000
+++ pcbnew/dialogs/dialog_pad_properties_base.cpp 2016-02-07 17:26:43 +0000
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jun 5 2014)
+// C++ code generated with wxFormBuilder (version Jan 1 2016)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -40,7 +40,6 @@
fgSizerPadType->Add( m_PadNumText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
m_PadNumCtrl = new wxTextCtrl( m_panelGeneral, wxID_PADNUMCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_PadNumCtrl->SetMaxLength( 0 );
fgSizerPadType->Add( m_PadNumCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
m_PadNameText = new wxStaticText( m_panelGeneral, wxID_ANY, _("Net name:"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -48,7 +47,6 @@
fgSizerPadType->Add( m_PadNameText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
m_PadNetNameCtrl = new wxTextCtrl( m_panelGeneral, wxID_PADNETNAMECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_PadNetNameCtrl->SetMaxLength( 0 );
fgSizerPadType->Add( m_PadNetNameCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
m_staticText44 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Pad type:"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -65,10 +63,10 @@
m_staticText45->Wrap( -1 );
fgSizerPadType->Add( m_staticText45, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
- wxString m_PadShapeChoices[] = { _("Circular"), _("Oval"), _("Rectangular"), _("Trapezoidal") };
+ wxString m_PadShapeChoices[] = { _("Circular"), _("Oval"), _("Rectangular"), _("Trapezoidal"), _("Rounded Rectangle"), _("Custom Shape with Circular Anchor"), _("Custom Shape with Rectangular Anchor") };
int m_PadShapeNChoices = sizeof( m_PadShapeChoices ) / sizeof( wxString );
m_PadShape = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadShapeNChoices, m_PadShapeChoices, 0 );
- m_PadShape->SetSelection( 0 );
+ m_PadShape->SetSelection( 6 );
fgSizerPadType->Add( m_PadShape, 0, wxALL|wxEXPAND, 5 );
@@ -85,7 +83,6 @@
fgSizerShapeType->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
m_PadPosition_X_Ctrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_PadPosition_X_Ctrl->SetMaxLength( 0 );
fgSizerShapeType->Add( m_PadPosition_X_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
m_PadPosX_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -97,7 +94,6 @@
fgSizerShapeType->Add( m_staticText41, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
m_PadPosition_Y_Ctrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_PadPosition_Y_Ctrl->SetMaxLength( 0 );
fgSizerShapeType->Add( m_PadPosition_Y_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
m_PadPosY_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -109,7 +105,6 @@
fgSizerShapeType->Add( m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
m_ShapeSize_X_Ctrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_ShapeSize_X_Ctrl->SetMaxLength( 0 );
fgSizerShapeType->Add( m_ShapeSize_X_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
m_PadShapeSizeX_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -121,7 +116,6 @@
fgSizerShapeType->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
m_ShapeSize_Y_Ctrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_ShapeSize_Y_Ctrl->SetMaxLength( 0 );
fgSizerShapeType->Add( m_ShapeSize_Y_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
m_PadShapeSizeY_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -147,7 +141,6 @@
fgSizerShapeType->Add( m_PadOrientText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
m_PadOrientCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_PadOrientCtrl->SetMaxLength( 0 );
fgSizerShapeType->Add( m_PadOrientCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
m_customOrientUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("0.1 deg"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -159,7 +152,6 @@
fgSizerShapeType->Add( m_staticText17, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
m_ShapeOffset_X_Ctrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_ShapeOffset_X_Ctrl->SetMaxLength( 0 );
fgSizerShapeType->Add( m_ShapeOffset_X_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
m_PadShapeOffsetX_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -171,7 +163,6 @@
fgSizerShapeType->Add( m_staticText19, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
m_ShapeOffset_Y_Ctrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_ShapeOffset_Y_Ctrl->SetMaxLength( 0 );
fgSizerShapeType->Add( m_ShapeOffset_Y_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
m_PadShapeOffsetY_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -185,7 +176,6 @@
fgSizerShapeType->Add( m_staticText38, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
m_LengthPadToDieCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_LengthPadToDieCtrl->SetMaxLength( 0 );
fgSizerShapeType->Add( m_LengthPadToDieCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
m_PadLengthDie_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -197,7 +187,6 @@
fgSizerShapeType->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
m_ShapeDelta_Ctrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_ShapeDelta_Ctrl->SetMaxLength( 0 );
fgSizerShapeType->Add( m_ShapeDelta_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
m_PadShapeDelta_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -230,19 +219,19 @@
fgSizer4->SetFlexibleDirection( wxBOTH );
fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_staticTitleModuleRot = new wxStaticText( m_panelGeneral, wxID_ANY, _("Rotation:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTitleModuleRot = new wxStaticText( sbSizeModuleInfo->GetStaticBox(), wxID_ANY, _("Rotation:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTitleModuleRot->Wrap( -1 );
fgSizer4->Add( m_staticTitleModuleRot, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
- m_staticModuleRotValue = new wxStaticText( m_panelGeneral, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticModuleRotValue = new wxStaticText( sbSizeModuleInfo->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticModuleRotValue->Wrap( -1 );
fgSizer4->Add( m_staticModuleRotValue, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
- m_staticTitleModuleSide = new wxStaticText( m_panelGeneral, wxID_ANY, _("Board side:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTitleModuleSide = new wxStaticText( sbSizeModuleInfo->GetStaticBox(), wxID_ANY, _("Board side:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTitleModuleSide->Wrap( -1 );
fgSizer4->Add( m_staticTitleModuleSide, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
- m_staticModuleSideValue = new wxStaticText( m_panelGeneral, wxID_ANY, _("Front side"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticModuleSideValue = new wxStaticText( sbSizeModuleInfo->GetStaticBox(), wxID_ANY, _("Front side"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticModuleSideValue->Wrap( -1 );
fgSizer4->Add( m_staticModuleSideValue, 0, wxALL|wxEXPAND, 5 );
@@ -267,41 +256,39 @@
fgSizerGeometry->SetFlexibleDirection( wxBOTH );
fgSizerGeometry->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_staticText47 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Shape:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText47 = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Shape:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText47->Wrap( -1 );
fgSizerGeometry->Add( m_staticText47, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
wxString m_DrillShapeCtrlChoices[] = { _("Circular hole"), _("Oval hole") };
int m_DrillShapeCtrlNChoices = sizeof( m_DrillShapeCtrlChoices ) / sizeof( wxString );
- m_DrillShapeCtrl = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_DrillShapeCtrlNChoices, m_DrillShapeCtrlChoices, 0 );
+ m_DrillShapeCtrl = new wxChoice( sbSizer2->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_DrillShapeCtrlNChoices, m_DrillShapeCtrlChoices, 0 );
m_DrillShapeCtrl->SetSelection( 0 );
fgSizerGeometry->Add( m_DrillShapeCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
- m_staticText51 = new wxStaticText( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText51 = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_staticText51->Wrap( -1 );
fgSizerGeometry->Add( m_staticText51, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
- m_textPadDrillX = new wxStaticText( m_panelGeneral, wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_textPadDrillX = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_textPadDrillX->Wrap( -1 );
fgSizerGeometry->Add( m_textPadDrillX, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
- m_PadDrill_X_Ctrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_PadDrill_X_Ctrl->SetMaxLength( 0 );
+ m_PadDrill_X_Ctrl = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerGeometry->Add( m_PadDrill_X_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
- m_PadDrill_X_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_PadDrill_X_Unit = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadDrill_X_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadDrill_X_Unit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
- m_textPadDrillY = new wxStaticText( m_panelGeneral, wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_textPadDrillY = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 );
m_textPadDrillY->Wrap( -1 );
fgSizerGeometry->Add( m_textPadDrillY, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
- m_PadDrill_Y_Ctrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_PadDrill_Y_Ctrl->SetMaxLength( 0 );
+ m_PadDrill_Y_Ctrl = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerGeometry->Add( m_PadDrill_Y_Ctrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
- m_PadDrill_Y_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_PadDrill_Y_Unit = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_PadDrill_Y_Unit->Wrap( -1 );
fgSizerGeometry->Add( m_PadDrill_Y_Unit, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
@@ -317,13 +304,13 @@
wxBoxSizer* bSizer11;
bSizer11 = new wxBoxSizer( wxHORIZONTAL );
- m_staticText511 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Copper:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText511 = new wxStaticText( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Copper:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText511->Wrap( -1 );
bSizer11->Add( m_staticText511, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
wxString m_rbCopperLayersSelChoices[] = { _("Front layer"), _("Back layer"), _("All copper layers"), _("None") };
int m_rbCopperLayersSelNChoices = sizeof( m_rbCopperLayersSelChoices ) / sizeof( wxString );
- m_rbCopperLayersSel = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_rbCopperLayersSelNChoices, m_rbCopperLayersSelChoices, 0 );
+ m_rbCopperLayersSel = new wxChoice( m_LayersSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_rbCopperLayersSelNChoices, m_rbCopperLayersSelChoices, 0 );
m_rbCopperLayersSel->SetSelection( 0 );
bSizer11->Add( m_rbCopperLayersSel, 1, wxALL|wxEXPAND, 5 );
@@ -331,39 +318,39 @@
m_LayersSizer->Add( bSizer11, 0, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerTechlayers;
- sbSizerTechlayers = new wxStaticBoxSizer( new wxStaticBox( m_panelGeneral, wxID_ANY, _("Technical Layers") ), wxVERTICAL );
+ sbSizerTechlayers = new wxStaticBoxSizer( new wxStaticBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Technical Layers") ), wxVERTICAL );
- m_PadLayerAdhCmp = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Front adhesive"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_PadLayerAdhCmp = new wxCheckBox( sbSizerTechlayers->GetStaticBox(), wxID_ANY, _("Front adhesive"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerAdhCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_PadLayerAdhCu = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Back adhesive"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_PadLayerAdhCu = new wxCheckBox( sbSizerTechlayers->GetStaticBox(), wxID_ANY, _("Back adhesive"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerAdhCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_PadLayerPateCmp = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Front solder paste"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_PadLayerPateCmp = new wxCheckBox( sbSizerTechlayers->GetStaticBox(), wxID_ANY, _("Front solder paste"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerPateCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_PadLayerPateCu = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Back solder paste"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_PadLayerPateCu = new wxCheckBox( sbSizerTechlayers->GetStaticBox(), wxID_ANY, _("Back solder paste"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerPateCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_PadLayerSilkCmp = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Front silk screen"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_PadLayerSilkCmp = new wxCheckBox( sbSizerTechlayers->GetStaticBox(), wxID_ANY, _("Front silk screen"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerSilkCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_PadLayerSilkCu = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Back silk screen"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_PadLayerSilkCu = new wxCheckBox( sbSizerTechlayers->GetStaticBox(), wxID_ANY, _("Back silk screen"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerSilkCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_PadLayerMaskCmp = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Front solder mask"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_PadLayerMaskCmp = new wxCheckBox( sbSizerTechlayers->GetStaticBox(), wxID_ANY, _("Front solder mask"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerMaskCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_PadLayerMaskCu = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Back solder mask"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_PadLayerMaskCu = new wxCheckBox( sbSizerTechlayers->GetStaticBox(), wxID_ANY, _("Back solder mask"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerMaskCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_PadLayerDraft = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Drafting notes"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_PadLayerDraft = new wxCheckBox( sbSizerTechlayers->GetStaticBox(), wxID_ANY, _("Drafting notes"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerDraft, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_PadLayerECO1 = new wxCheckBox( m_panelGeneral, wxID_ANY, _("E.C.O.1"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_PadLayerECO1 = new wxCheckBox( sbSizerTechlayers->GetStaticBox(), wxID_ANY, _("E.C.O.1"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerECO1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
- m_PadLayerECO2 = new wxCheckBox( m_panelGeneral, wxID_ANY, _("E.C.O.2"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_PadLayerECO2 = new wxCheckBox( sbSizerTechlayers->GetStaticBox(), wxID_ANY, _("E.C.O.2"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerTechlayers->Add( m_PadLayerECO2, 0, wxALL, 5 );
@@ -396,59 +383,55 @@
fgClearancesGridSizer->SetFlexibleDirection( wxBOTH );
fgClearancesGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_staticTextNetClearance = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Net pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextNetClearance = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Net pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextNetClearance->Wrap( -1 );
m_staticTextNetClearance->SetToolTip( _("This is the local net clearance for pad.\nIf 0, the footprint local value or the Netclass value is used") );
fgClearancesGridSizer->Add( m_staticTextNetClearance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
- m_NetClearanceValueCtrl = new wxTextCtrl( m_localSettingsPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_NetClearanceValueCtrl->SetMaxLength( 0 );
+ m_NetClearanceValueCtrl = new wxTextCtrl( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgClearancesGridSizer->Add( m_NetClearanceValueCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
- m_NetClearanceUnits = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_NetClearanceUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_NetClearanceUnits->Wrap( -1 );
fgClearancesGridSizer->Add( m_NetClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
- m_MaskClearanceTitle = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_MaskClearanceTitle = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_MaskClearanceTitle->Wrap( -1 );
m_MaskClearanceTitle->SetToolTip( _("This is the local clearance between this pad and the solder mask\nIf 0, the footprint local value or the global value is used") );
fgClearancesGridSizer->Add( m_MaskClearanceTitle, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
- m_SolderMaskMarginCtrl = new wxTextCtrl( m_localSettingsPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_SolderMaskMarginCtrl->SetMaxLength( 0 );
+ m_SolderMaskMarginCtrl = new wxTextCtrl( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgClearancesGridSizer->Add( m_SolderMaskMarginCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
- m_SolderMaskMarginUnits = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_SolderMaskMarginUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderMaskMarginUnits->Wrap( -1 );
fgClearancesGridSizer->Add( m_SolderMaskMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
- m_staticTextSolderPaste = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSolderPaste = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSolderPaste->Wrap( -1 );
m_staticTextSolderPaste->SetToolTip( _("This is the local clearance between this pad and the solder paste.\nIf 0 the footprint value or the global value is used..\nThe final clearance value is the sum of this value and the clearance value ratio\nA negative value means a smaller mask size than pad size") );
fgClearancesGridSizer->Add( m_staticTextSolderPaste, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
- m_SolderPasteMarginCtrl = new wxTextCtrl( m_localSettingsPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_SolderPasteMarginCtrl->SetMaxLength( 0 );
+ m_SolderPasteMarginCtrl = new wxTextCtrl( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgClearancesGridSizer->Add( m_SolderPasteMarginCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
- m_SolderPasteMarginUnits = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_SolderPasteMarginUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteMarginUnits->Wrap( -1 );
fgClearancesGridSizer->Add( m_SolderPasteMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
- m_staticTextRatio = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Solder paste ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRatio = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Solder paste ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRatio->Wrap( -1 );
m_staticTextRatio->SetToolTip( _("This is the local clearance ratio in per cent between this pad and the solder paste.\nA value of 10 means the clearance value is 10 per cent of the pad size\nIf 0 the footprint value or the global value is used..\nThe final clearance value is the sum of this value and the clearance value\nA negative value means a smaller mask size than pad size.") );
fgClearancesGridSizer->Add( m_staticTextRatio, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
- m_SolderPasteMarginRatioCtrl = new wxTextCtrl( m_localSettingsPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_SolderPasteMarginRatioCtrl->SetMaxLength( 0 );
+ m_SolderPasteMarginRatioCtrl = new wxTextCtrl( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgClearancesGridSizer->Add( m_SolderPasteMarginRatioCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
- m_SolderPasteRatioMarginUnits = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_SolderPasteRatioMarginUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteRatioMarginUnits->Wrap( -1 );
fgClearancesGridSizer->Add( m_SolderPasteRatioMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
@@ -467,41 +450,39 @@
fgSizer41->SetFlexibleDirection( wxBOTH );
fgSizer41->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- m_staticText40 = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText40 = new wxStaticText( sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText40->Wrap( -1 );
fgSizer41->Add( m_staticText40, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
wxString m_ZoneConnectionChoiceChoices[] = { _("From parent footprint"), _("Solid"), _("Thermal relief"), _("None") };
int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString );
- m_ZoneConnectionChoice = new wxChoice( m_localSettingsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
+ m_ZoneConnectionChoice = new wxChoice( sbSizerZonesSettings->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
m_ZoneConnectionChoice->SetSelection( 0 );
fgSizer41->Add( m_ZoneConnectionChoice, 0, wxLEFT|wxTOP|wxEXPAND, 5 );
- m_staticText53 = new wxStaticText( m_localSettingsPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText53 = new wxStaticText( sbSizerZonesSettings->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_staticText53->Wrap( -1 );
fgSizer41->Add( m_staticText53, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
- m_staticText49 = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Thermal relief width:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText49 = new wxStaticText( sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Thermal relief width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText49->Wrap( -1 );
fgSizer41->Add( m_staticText49, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
- m_ThermalWidthCtrl = new wxTextCtrl( m_localSettingsPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_ThermalWidthCtrl->SetMaxLength( 0 );
+ m_ThermalWidthCtrl = new wxTextCtrl( sbSizerZonesSettings->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer41->Add( m_ThermalWidthCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
- m_ThermalWidthUnits = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ThermalWidthUnits = new wxStaticText( sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_ThermalWidthUnits->Wrap( -1 );
fgSizer41->Add( m_ThermalWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
- m_staticText52 = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Thermal relief gap:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText52 = new wxStaticText( sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Thermal relief gap:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText52->Wrap( -1 );
fgSizer41->Add( m_staticText52, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
- m_ThermalGapCtrl = new wxTextCtrl( m_localSettingsPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_ThermalGapCtrl->SetMaxLength( 0 );
+ m_ThermalGapCtrl = new wxTextCtrl( sbSizerZonesSettings->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer41->Add( m_ThermalGapCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
- m_ThermalGapUnits = new wxStaticText( m_localSettingsPanel, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ThermalGapUnits = new wxStaticText( sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
m_ThermalGapUnits->Wrap( -1 );
fgSizer41->Add( m_ThermalGapUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
@@ -525,8 +506,66 @@
m_localSettingsPanel->Layout();
bSizerPanelClearance->Fit( m_localSettingsPanel );
m_notebook->AddPage( m_localSettingsPanel, _("Local Clearance and Settings"), false );
-
- bSizerUpper->Add( m_notebook, 0, wxALL, 5 );
+ m_panelCustomShape = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizerPanelShapes;
+ bSizerPanelShapes = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextShapesList = new wxStaticText( m_panelCustomShape, wxID_ANY, _("Basic shapes list"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextShapesList->Wrap( -1 );
+ bSizerPanelShapes->Add( m_staticTextShapesList, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_staticTextShapesListWraning = new wxStaticText( m_panelCustomShape, wxID_ANY, _(" Coordinates are relative to anchor pad, orientation 0"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextShapesListWraning->Wrap( -1 );
+ m_staticTextShapesListWraning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizerPanelShapes->Add( m_staticTextShapesListWraning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_listCtrlShapes = new wxListView( m_panelCustomShape, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT );
+ bSizerPanelShapes->Add( m_listCtrlShapes, 1, wxALL|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizerButtons;
+ bSizerButtons = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizerButtonsUpper;
+ bSizerButtonsUpper = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonDel = new wxButton( m_panelCustomShape, wxID_ANY, _("Delete Shape"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerButtonsUpper->Add( m_buttonDel, 0, wxALL, 5 );
+
+ m_buttonEditShape = new wxButton( m_panelCustomShape, wxID_ANY, _("Edit Shape"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerButtonsUpper->Add( m_buttonEditShape, 0, wxALL, 5 );
+
+ m_buttonAddShape = new wxButton( m_panelCustomShape, wxID_ANY, _("Add Shape"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerButtonsUpper->Add( m_buttonAddShape, 0, wxALL, 5 );
+
+ m_buttonDup = new wxButton( m_panelCustomShape, wxID_ANY, _("Duplicate Shape"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerButtonsUpper->Add( m_buttonDup, 0, wxALL, 5 );
+
+
+ bSizerButtons->Add( bSizerButtonsUpper, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ wxBoxSizer* bSizerButtonsLower;
+ bSizerButtonsLower = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonGeometry = new wxButton( m_panelCustomShape, wxID_ANY, _("Geometry Transform"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerButtonsLower->Add( m_buttonGeometry, 0, wxALL, 5 );
+
+ m_buttonImport = new wxButton( m_panelCustomShape, wxID_ANY, _("Import Shapes"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerButtonsLower->Add( m_buttonImport, 0, wxALL, 5 );
+
+
+ bSizerButtons->Add( bSizerButtonsLower, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizerPanelShapes->Add( bSizerButtons, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ m_panelCustomShape->SetSizer( bSizerPanelShapes );
+ m_panelCustomShape->Layout();
+ bSizerPanelShapes->Fit( m_panelCustomShape );
+ m_notebook->AddPage( m_panelCustomShape, _("Custom Shape"), false );
+
+ bSizerUpper->Add( m_notebook, 0, wxALL|wxEXPAND, 5 );
wxBoxSizer* bSizerDisplayPad;
bSizerDisplayPad = new wxBoxSizer( wxVERTICAL );
@@ -552,14 +591,14 @@
m_MainSizer->Add( m_staticTextWarningPadFlipped, 0, wxALL, 5 );
- m_sdbSizer1 = new wxStdDialogButtonSizer();
- m_sdbSizer1OK = new wxButton( this, wxID_OK );
- m_sdbSizer1->AddButton( m_sdbSizer1OK );
- m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
- m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
- m_sdbSizer1->Realize();
+ m_sdbSizer = new wxStdDialogButtonSizer();
+ m_sdbSizerOK = new wxButton( this, wxID_OK );
+ m_sdbSizer->AddButton( m_sdbSizerOK );
+ m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
+ m_sdbSizer->AddButton( m_sdbSizerCancel );
+ m_sdbSizer->Realize();
- m_MainSizer->Add( m_sdbSizer1, 0, wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ m_MainSizer->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
this->SetSizer( m_MainSizer );
@@ -597,9 +636,15 @@
m_PadLayerECO1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_PadLayerECO2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_NetClearanceValueCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
+ m_listCtrlShapes->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCustomShapeDClick ), NULL, this );
+ m_buttonDel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDeleteShape ), NULL, this );
+ m_buttonEditShape->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onEditShape ), NULL, this );
+ m_buttonAddShape->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onAddShape ), NULL, this );
+ m_buttonDup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDuplicateShape ), NULL, this );
+ m_buttonGeometry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onGeometryTransform ), NULL, this );
+ m_buttonImport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onImportShape ), NULL, this );
m_panelShowPad->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this );
- m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this );
- m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadPropertiesAccept ), NULL, this );
+ m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadPropertiesAccept ), NULL, this );
}
DIALOG_PAD_PROPERTIES_BASE::~DIALOG_PAD_PROPERTIES_BASE()
@@ -633,8 +678,349 @@
m_PadLayerECO1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_PadLayerECO2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
m_NetClearanceValueCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
+ m_listCtrlShapes->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCustomShapeDClick ), NULL, this );
+ m_buttonDel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDeleteShape ), NULL, this );
+ m_buttonEditShape->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onEditShape ), NULL, this );
+ m_buttonAddShape->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onAddShape ), NULL, this );
+ m_buttonDup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDuplicateShape ), NULL, this );
+ m_buttonGeometry->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onGeometryTransform ), NULL, this );
+ m_buttonImport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onImportShape ), NULL, this );
m_panelShowPad->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this );
- m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this );
- m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadPropertiesAccept ), NULL, this );
+ m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadPropertiesAccept ), NULL, this );
+
+}
+
+DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE::DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizermain;
+ bSizermain = new wxBoxSizer( wxVERTICAL );
+
+ wxFlexGridSizer* fgSizerShapeProperties;
+ fgSizerShapeProperties = new wxFlexGridSizer( 0, 4, 0, 0 );
+ fgSizerShapeProperties->AddGrowableCol( 1 );
+ fgSizerShapeProperties->AddGrowableCol( 2 );
+ fgSizerShapeProperties->SetFlexibleDirection( wxBOTH );
+ fgSizerShapeProperties->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_staticTextPosStart = new wxStaticText( this, wxID_ANY, _("Pos X,Y"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPosStart->Wrap( -1 );
+ fgSizerShapeProperties->Add( m_staticTextPosStart, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrPosX = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShapeProperties->Add( m_textCtrPosX, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_textCtrPosY = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShapeProperties->Add( m_textCtrPosY, 0, wxALL|wxEXPAND, 5 );
+
+ m_staticTextPosUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPosUnit->Wrap( -1 );
+ fgSizerShapeProperties->Add( m_staticTextPosUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticTextPosEnd = new wxStaticText( this, wxID_ANY, _("End X,Y"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPosEnd->Wrap( -1 );
+ fgSizerShapeProperties->Add( m_staticTextPosEnd, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrEndX = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShapeProperties->Add( m_textCtrEndX, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrEndY = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShapeProperties->Add( m_textCtrEndY, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticTextEndUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextEndUnit->Wrap( -1 );
+ fgSizerShapeProperties->Add( m_staticTextEndUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticTextAngle = new wxStaticText( this, wxID_ANY, _("Angle"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextAngle->Wrap( -1 );
+ fgSizerShapeProperties->Add( m_staticTextAngle, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrAngle = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShapeProperties->Add( m_textCtrAngle, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticTextAngleUnit = new wxStaticText( this, wxID_ANY, _("degree"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextAngleUnit->Wrap( -1 );
+ fgSizerShapeProperties->Add( m_staticTextAngleUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_staticTextThickness = new wxStaticText( this, wxID_ANY, _("Thickness"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextThickness->Wrap( -1 );
+ fgSizerShapeProperties->Add( m_staticTextThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlThickness = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShapeProperties->Add( m_textCtrlThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticTextThicknessUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextThicknessUnit->Wrap( -1 );
+ fgSizerShapeProperties->Add( m_staticTextThicknessUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ bSizermain->Add( fgSizerShapeProperties, 1, wxEXPAND, 5 );
+
+ m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizermain->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
+
+ m_sdbSizer = new wxStdDialogButtonSizer();
+ m_sdbSizerOK = new wxButton( this, wxID_OK );
+ m_sdbSizer->AddButton( m_sdbSizerOK );
+ m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
+ m_sdbSizer->AddButton( m_sdbSizerCancel );
+ m_sdbSizer->Realize();
+
+ bSizermain->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxALL, 5 );
+
+
+ this->SetSizer( bSizermain );
+ this->Layout();
+
+ this->Centre( wxBOTH );
+}
+
+DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE::~DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE()
+{
+}
+
+DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE::DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizermain;
+ bSizermain = new wxBoxSizer( wxVERTICAL );
+
+ wxFlexGridSizer* fgSizerShapeProperties;
+ fgSizerShapeProperties = new wxFlexGridSizer( 0, 4, 0, 0 );
+ fgSizerShapeProperties->AddGrowableCol( 1 );
+ fgSizerShapeProperties->AddGrowableCol( 2 );
+ fgSizerShapeProperties->SetFlexibleDirection( wxBOTH );
+ fgSizerShapeProperties->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_staticTextMove = new wxStaticText( this, wxID_ANY, _("Move vector X,Y"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMove->Wrap( -1 );
+ fgSizerShapeProperties->Add( m_staticTextMove, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrMoveX = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShapeProperties->Add( m_textCtrMoveX, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_textCtrMoveY = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShapeProperties->Add( m_textCtrMoveY, 0, wxALL|wxEXPAND, 5 );
+
+ m_staticTextMoveUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMoveUnit->Wrap( -1 );
+ fgSizerShapeProperties->Add( m_staticTextMoveUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticTextAngle = new wxStaticText( this, wxID_ANY, _("Rotation"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextAngle->Wrap( -1 );
+ fgSizerShapeProperties->Add( m_staticTextAngle, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrAngle = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShapeProperties->Add( m_textCtrAngle, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticTextAngleUnit = new wxStaticText( this, wxID_ANY, _("degree"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextAngleUnit->Wrap( -1 );
+ fgSizerShapeProperties->Add( m_staticTextAngleUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_staticTextSF = new wxStaticText( this, wxID_ANY, _("Scaling factor"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextSF->Wrap( -1 );
+ fgSizerShapeProperties->Add( m_staticTextSF, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlScalingFactor = new wxTextCtrl( this, wxID_ANY, _("1.0"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShapeProperties->Add( m_textCtrlScalingFactor, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+ fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_staticTextDupCnt = new wxStaticText( this, wxID_ANY, _("Duplicate count"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDupCnt->Wrap( -1 );
+ fgSizerShapeProperties->Add( m_staticTextDupCnt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_spinCtrlDuplicateCount = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 100, 1 );
+ fgSizerShapeProperties->Add( m_spinCtrlDuplicateCount, 0, wxALL, 5 );
+
+
+ fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ bSizermain->Add( fgSizerShapeProperties, 1, wxEXPAND, 5 );
+
+ m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizermain->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
+
+ m_sdbSizer = new wxStdDialogButtonSizer();
+ m_sdbSizerOK = new wxButton( this, wxID_OK );
+ m_sdbSizer->AddButton( m_sdbSizerOK );
+ m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
+ m_sdbSizer->AddButton( m_sdbSizerCancel );
+ m_sdbSizer->Realize();
+
+ bSizermain->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxALL, 5 );
+
+
+ this->SetSizer( bSizermain );
+ this->Layout();
+
+ this->Centre( wxBOTH );
+}
+
+DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE::~DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE()
+{
+}
+
+DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizerMain;
+ bSizerMain = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextShapesListWarning = new wxStaticText( this, wxID_ANY, _(" Coordinates are relative to anchor pad, orientation 0"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextShapesListWarning->Wrap( -1 );
+ m_staticTextShapesListWarning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizerMain->Add( m_staticTextShapesListWarning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_staticTextValidate = new wxStaticText( this, wxID_ANY, _("Incorrect polygon"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextValidate->Wrap( -1 );
+ m_staticTextValidate->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 93, 92, false, wxEmptyString ) );
+
+ bSizerMain->Add( m_staticTextValidate, 0, wxALL, 5 );
+
+ wxBoxSizer* bSizerUpper;
+ bSizerUpper = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer23;
+ bSizer23 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizerCornerlist;
+ bSizerCornerlist = new wxBoxSizer( wxVERTICAL );
+
+ m_gridCornersList = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+
+ // Grid
+ m_gridCornersList->CreateGrid( 1, 2 );
+ m_gridCornersList->EnableEditing( true );
+ m_gridCornersList->EnableGridLines( true );
+ m_gridCornersList->EnableDragGridSize( false );
+ m_gridCornersList->SetMargins( 0, 0 );
+
+ // Columns
+ m_gridCornersList->EnableDragColMove( false );
+ m_gridCornersList->EnableDragColSize( true );
+ m_gridCornersList->SetColLabelSize( 30 );
+ m_gridCornersList->SetColLabelValue( 0, _("Pos X") );
+ m_gridCornersList->SetColLabelValue( 1, _("Pos Y") );
+ m_gridCornersList->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+
+ // Rows
+ m_gridCornersList->AutoSizeRows();
+ m_gridCornersList->EnableDragRowSize( false );
+ m_gridCornersList->SetRowLabelSize( 80 );
+ m_gridCornersList->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+
+ // Label Appearance
+
+ // Cell Defaults
+ m_gridCornersList->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
+ bSizerCornerlist->Add( m_gridCornersList, 1, wxALL, 5 );
+
+ wxBoxSizer* bSizerRightButts;
+ bSizerRightButts = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonAdd = new wxButton( this, wxID_ANY, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerRightButts->Add( m_buttonAdd, 0, wxALL, 5 );
+
+ m_buttonDelete = new wxButton( this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerRightButts->Add( m_buttonDelete, 0, wxALL, 5 );
+
+
+ bSizerCornerlist->Add( bSizerRightButts, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ bSizer23->Add( bSizerCornerlist, 0, wxEXPAND, 5 );
+
+ m_panelPoly = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
+ m_panelPoly->SetBackgroundColour( wxColour( 0, 0, 0 ) );
+ m_panelPoly->SetMinSize( wxSize( 300,300 ) );
+
+ bSizer23->Add( m_panelPoly, 1, wxEXPAND | wxALL, 5 );
+
+
+ bSizerUpper->Add( bSizer23, 1, wxEXPAND, 5 );
+
+ wxFlexGridSizer* fgSizerThickness;
+ fgSizerThickness = new wxFlexGridSizer( 0, 3, 0, 0 );
+ fgSizerThickness->AddGrowableCol( 1 );
+ fgSizerThickness->SetFlexibleDirection( wxBOTH );
+ fgSizerThickness->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_staticTextThickness = new wxStaticText( this, wxID_ANY, _("Outline thickness"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextThickness->Wrap( -1 );
+ fgSizerThickness->Add( m_staticTextThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlThickness = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerThickness->Add( m_textCtrlThickness, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_staticTextThicknessUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextThicknessUnit->Wrap( -1 );
+ fgSizerThickness->Add( m_staticTextThicknessUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerUpper->Add( fgSizerThickness, 0, 0, 5 );
+
+
+ bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
+
+ m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerMain->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 );
+
+ m_sdbSizer = new wxStdDialogButtonSizer();
+ m_sdbSizerOK = new wxButton( this, wxID_OK );
+ m_sdbSizer->AddButton( m_sdbSizerOK );
+ m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
+ m_sdbSizer->AddButton( m_sdbSizerCancel );
+ m_sdbSizer->Realize();
+
+ bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
+
+
+ this->SetSizer( bSizerMain );
+ this->Layout();
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ m_gridCornersList->Connect( wxEVT_GRID_CELL_CHANGE, wxGridEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onCellChange ), NULL, this );
+ m_gridCornersList->Connect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onGridSelect ), NULL, this );
+ m_gridCornersList->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onCellSelect ), NULL, this );
+ m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onButtonAdd ), NULL, this );
+ m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::OnButtonDelete ), NULL, this );
+ m_panelPoly->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this );
+ m_panelPoly->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onPolyPanelResize ), NULL, this );
+}
+
+DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::~DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE()
+{
+ // Disconnect Events
+ m_gridCornersList->Disconnect( wxEVT_GRID_CELL_CHANGE, wxGridEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onCellChange ), NULL, this );
+ m_gridCornersList->Disconnect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onGridSelect ), NULL, this );
+ m_gridCornersList->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onCellSelect ), NULL, this );
+ m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onButtonAdd ), NULL, this );
+ m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::OnButtonDelete ), NULL, this );
+ m_panelPoly->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this );
+ m_panelPoly->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onPolyPanelResize ), NULL, this );
}
=== modified file 'pcbnew/dialogs/dialog_pad_properties_base.fbp'
--- pcbnew/dialogs/dialog_pad_properties_base.fbp 2015-09-11 23:13:54 +0000
+++ pcbnew/dialogs/dialog_pad_properties_base.fbp 2016-02-07 17:27:00 +0000
@@ -26,7 +26,7 @@
<property name="ui_table">UI</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
- <object class="Dialog" expanded="1">
+ <object class="Dialog" expanded="0">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg"></property>
@@ -88,25 +88,25 @@
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
- <object class="wxBoxSizer" expanded="1">
+ <object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property>
<property name="name">m_MainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
- <object class="wxBoxSizer" expanded="1">
+ <object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property>
<property name="name">bSizerUpper</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
- <property name="flag">wxALL</property>
+ <property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
- <object class="wxNotebook" expanded="1">
+ <object class="wxNotebook" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -184,11 +184,11 @@
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
- <object class="notebookpage" expanded="1">
+ <object class="notebookpage" expanded="0">
<property name="bitmap"></property>
<property name="label">General</property>
<property name="select">1</property>
- <object class="wxPanel" expanded="1">
+ <object class="wxPanel" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -262,12 +262,12 @@
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
- <object class="wxBoxSizer" expanded="1">
+ <object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property>
<property name="name">bGeneralSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">3</property>
@@ -912,7 +912,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
- <property name="choices">"Circular" "Oval" "Rectangular" "Trapezoidal"</property>
+ <property name="choices">"Circular" "Oval" "Rectangular" "Trapezoidal" "Rounded Rectangle" "Custom Shape with Circular Anchor" "Custom Shape with Rectangular Anchor"</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
@@ -942,7 +942,7 @@
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
- <property name="selection">0</property>
+ <property name="selection">6</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
@@ -3833,6 +3833,7 @@
<property name="minimum_size"></property>
<property name="name">sbSizeModuleInfo</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">
@@ -4189,11 +4190,11 @@
</object>
</object>
</object>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">2</property>
- <object class="wxBoxSizer" expanded="1">
+ <object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property>
<property name="name">bSizer10</property>
<property name="orient">wxVERTICAL</property>
@@ -4208,6 +4209,7 @@
<property name="minimum_size"></property>
<property name="name">sbSizer2</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">
@@ -5008,6 +5010,7 @@
<property name="minimum_size"></property>
<property name="name">m_LayersSizer</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">
@@ -5202,6 +5205,7 @@
<property name="minimum_size"></property>
<property name="name">sbSizerTechlayers</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">
@@ -6181,11 +6185,11 @@
</object>
</object>
</object>
- <object class="notebookpage" expanded="1">
+ <object class="notebookpage" expanded="0">
<property name="bitmap"></property>
<property name="label">Local Clearance and Settings</property>
<property name="select">0</property>
- <object class="wxPanel" expanded="1">
+ <object class="wxPanel" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -6259,37 +6263,38 @@
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
- <object class="wxBoxSizer" expanded="1">
+ <object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property>
<property name="name">bSizerPanelClearance</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
- <object class="wxBoxSizer" expanded="1">
+ <object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property>
<property name="name">bSizerClearance</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
- <object class="wxStaticBoxSizer" expanded="1">
+ <object class="wxStaticBoxSizer" expanded="0">
<property name="id">wxID_ANY</property>
<property name="label">Clearances</property>
<property name="minimum_size"></property>
<property name="name">sbClearancesSizer</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">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
- <object class="wxFlexGridSizer" expanded="1">
+ <object class="wxFlexGridSizer" expanded="0">
<property name="cols">3</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
@@ -7333,23 +7338,24 @@
</object>
</object>
</object>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
- <object class="wxStaticBoxSizer" expanded="1">
+ <object class="wxStaticBoxSizer" expanded="0">
<property name="id">wxID_ANY</property>
<property name="label">Copper Zones</property>
<property name="minimum_size"></property>
<property name="name">sbSizerZonesSettings</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">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
- <object class="wxFlexGridSizer" expanded="1">
+ <object class="wxFlexGridSizer" expanded="0">
<property name="cols">3</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
@@ -8221,13 +8227,931 @@
</object>
</object>
</object>
+ <object class="notebookpage" expanded="0">
+ <property name="bitmap"></property>
+ <property name="label">Custom Shape</property>
+ <property name="select">0</property>
+ <object class="wxPanel" 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="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_panelCustomShape</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="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">wxTAB_TRAVERSAL</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 class="wxBoxSizer" expanded="0">
+ <property name="minimum_size"></property>
+ <property name="name">bSizerPanelShapes</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</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">Basic shapes list</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_staticTextShapesList</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">wxALL|wxALIGN_CENTER_HORIZONTAL</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">,90,92,-1,70,0</property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label"> Coordinates are relative to anchor pad, orientation 0</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_staticTextShapesListWraning</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">wxALL|wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="wxListCtrl" 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="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_listCtrlShapes</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">wxLC_HRULES|wxLC_REPORT</property>
+ <property name="subclass">wxListView; </property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnChar"></event>
+ <event name="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">onCustomShapeDClick</event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnListBeginDrag"></event>
+ <event name="OnListBeginLabelEdit"></event>
+ <event name="OnListBeginRDrag"></event>
+ <event name="OnListCacheHint"></event>
+ <event name="OnListColBeginDrag"></event>
+ <event name="OnListColClick"></event>
+ <event name="OnListColDragging"></event>
+ <event name="OnListColEndDrag"></event>
+ <event name="OnListColRightClick"></event>
+ <event name="OnListDeleteAllItems"></event>
+ <event name="OnListDeleteItem"></event>
+ <event name="OnListEndLabelEdit"></event>
+ <event name="OnListInsertItem"></event>
+ <event name="OnListItemActivated"></event>
+ <event name="OnListItemDeselected"></event>
+ <event name="OnListItemFocused"></event>
+ <event name="OnListItemMiddleClick"></event>
+ <event name="OnListItemRightClick"></event>
+ <event name="OnListItemSelected"></event>
+ <event name="OnListKeyDown"></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">wxALIGN_CENTER_HORIZONTAL</property>
+ <property name="proportion">0</property>
+ <object class="wxBoxSizer" expanded="0">
+ <property name="minimum_size"></property>
+ <property name="name">bSizerButtons</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALIGN_CENTER_HORIZONTAL</property>
+ <property name="proportion">0</property>
+ <object class="wxBoxSizer" expanded="0">
+ <property name="minimum_size"></property>
+ <property name="name">bSizerButtonsUpper</property>
+ <property name="orient">wxHORIZONTAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxButton" 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">0</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">Delete Shape</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_buttonDel</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="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnButtonClick">onDeleteShape</event>
+ <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">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxButton" 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">0</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">Edit Shape</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_buttonEditShape</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="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnButtonClick">onEditShape</event>
+ <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">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxButton" 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">0</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">Add Shape</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_buttonAddShape</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="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnButtonClick">onAddShape</event>
+ <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">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxButton" 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">0</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">Duplicate Shape</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_buttonDup</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="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnButtonClick">onDuplicateShape</event>
+ <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>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALIGN_CENTER_HORIZONTAL</property>
+ <property name="proportion">0</property>
+ <object class="wxBoxSizer" expanded="0">
+ <property name="minimum_size"></property>
+ <property name="name">bSizerButtonsLower</property>
+ <property name="orient">wxHORIZONTAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxButton" 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">0</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">Geometry Transform</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_buttonGeometry</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="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnButtonClick">onGeometryTransform</event>
+ <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">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxButton" 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">0</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">Import Shapes</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_buttonImport</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="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnButtonClick">onImportShape</event>
+ <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>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
</object>
</object>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">1</property>
- <object class="wxBoxSizer" expanded="1">
+ <object class="wxBoxSizer" expanded="0">
<property name="minimum_size">200,-1</property>
<property name="name">bSizerDisplayPad</property>
<property name="orient">wxVERTICAL</property>
@@ -8312,11 +9236,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxTOP</property>
<property name="proportion">4</property>
- <object class="CustomControl" expanded="1">
+ <object class="CustomControl" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -8484,11 +9408,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
- <object class="wxStdDialogButtonSizer" expanded="1">
+ <object class="wxStdDialogButtonSizer" expanded="0">
<property name="Apply">0</property>
<property name="Cancel">1</property>
<property name="ContextHelp">0</property>
@@ -8498,10 +9422,10 @@
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
- <property name="name">m_sdbSizer1</property>
+ <property name="name">m_sdbSizer</property>
<property name="permission">protected</property>
<event name="OnApplyButtonClick"></event>
- <event name="OnCancelButtonClick">OnCancelButtonClick</event>
+ <event name="OnCancelButtonClick"></event>
<event name="OnContextHelpButtonClick"></event>
<event name="OnHelpButtonClick"></event>
<event name="OnNoButtonClick"></event>
@@ -8512,5 +9436,3683 @@
</object>
</object>
</object>
+ <object class="Dialog" expanded="1">
+ <property name="aui_managed">0</property>
+ <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+ <property name="bg"></property>
+ <property name="center">wxBOTH</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="enabled">1</property>
+ <property name="event_handler">impl_virtual</property>
+ <property name="extra_style"></property>
+ <property name="fg"></property>
+ <property name="font"></property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="maximum_size"></property>
+ <property name="minimum_size"></property>
+ <property name="name">DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE</property>
+ <property name="pos"></property>
+ <property name="size">431,201</property>
+ <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+ <property name="subclass">DIALOG_SHIM; </property>
+ <property name="title"></property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnActivate"></event>
+ <event name="OnActivateApp"></event>
+ <event name="OnAuiFindManager"></event>
+ <event name="OnAuiPaneButton"></event>
+ <event name="OnAuiPaneClose"></event>
+ <event name="OnAuiPaneMaximize"></event>
+ <event name="OnAuiPaneRestore"></event>
+ <event name="OnAuiRender"></event>
+ <event name="OnChar"></event>
+ <event name="OnClose"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnHibernate"></event>
+ <event name="OnIconize"></event>
+ <event name="OnIdle"></event>
+ <event name="OnInitDialog"></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 class="wxBoxSizer" expanded="0">
+ <property name="minimum_size"></property>
+ <property name="name">bSizermain</property>
+ <property name="orient">wxVERTICAL</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="wxFlexGridSizer" expanded="0">
+ <property name="cols">4</property>
+ <property name="flexible_direction">wxBOTH</property>
+ <property name="growablecols">1,2</property>
+ <property name="growablerows"></property>
+ <property name="hgap">0</property>
+ <property name="minimum_size"></property>
+ <property name="name">fgSizerShapeProperties</property>
+ <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+ <property name="permission">none</property>
+ <property name="rows">0</property>
+ <property name="vgap">0</property>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</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">Pos X,Y</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_staticTextPosStart</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">wxALL|wxALIGN_CENTER_VERTICAL|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_textCtrPosX</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="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 class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|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_textCtrPosY</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="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 class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</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">unit</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_staticTextPosUnit</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">wxALL|wxALIGN_CENTER_VERTICAL</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">End X,Y</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_staticTextPosEnd</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">wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL</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_textCtrEndX</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="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 class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|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_textCtrEndY</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="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 class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</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">unit</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_staticTextEndUnit</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">wxALL|wxALIGN_CENTER_VERTICAL</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">Angle</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_staticTextAngle</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">wxALL|wxALIGN_CENTER_VERTICAL|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_textCtrAngle</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="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 class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</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">degree</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_staticTextAngleUnit</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">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="spacer" expanded="0">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</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">Thickness</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_staticTextThickness</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">wxALL|wxALIGN_CENTER_VERTICAL|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_textCtrlThickness</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="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 class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</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">unit</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_staticTextThicknessUnit</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">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="spacer" expanded="0">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND | wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticLine" 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="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_staticline1</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">wxLI_HORIZONTAL</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>
+ <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">wxALIGN_RIGHT|wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxStdDialogButtonSizer" expanded="0">
+ <property name="Apply">0</property>
+ <property name="Cancel">1</property>
+ <property name="ContextHelp">0</property>
+ <property name="Help">0</property>
+ <property name="No">0</property>
+ <property name="OK">1</property>
+ <property name="Save">0</property>
+ <property name="Yes">0</property>
+ <property name="minimum_size"></property>
+ <property name="name">m_sdbSizer</property>
+ <property name="permission">protected</property>
+ <event name="OnApplyButtonClick"></event>
+ <event name="OnCancelButtonClick"></event>
+ <event name="OnContextHelpButtonClick"></event>
+ <event name="OnHelpButtonClick"></event>
+ <event name="OnNoButtonClick"></event>
+ <event name="OnOKButtonClick"></event>
+ <event name="OnSaveButtonClick"></event>
+ <event name="OnYesButtonClick"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="Dialog" expanded="0">
+ <property name="aui_managed">0</property>
+ <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+ <property name="bg"></property>
+ <property name="center">wxBOTH</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="enabled">1</property>
+ <property name="event_handler">impl_virtual</property>
+ <property name="extra_style"></property>
+ <property name="fg"></property>
+ <property name="font"></property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="maximum_size"></property>
+ <property name="minimum_size"></property>
+ <property name="name">DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE</property>
+ <property name="pos"></property>
+ <property name="size">398,203</property>
+ <property name="style">wxDEFAULT_DIALOG_STYLE</property>
+ <property name="subclass">DIALOG_SHIM; </property>
+ <property name="title">Pad Custom Shape Geometry Transform</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnActivate"></event>
+ <event name="OnActivateApp"></event>
+ <event name="OnAuiFindManager"></event>
+ <event name="OnAuiPaneButton"></event>
+ <event name="OnAuiPaneClose"></event>
+ <event name="OnAuiPaneMaximize"></event>
+ <event name="OnAuiPaneRestore"></event>
+ <event name="OnAuiRender"></event>
+ <event name="OnChar"></event>
+ <event name="OnClose"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnHibernate"></event>
+ <event name="OnIconize"></event>
+ <event name="OnIdle"></event>
+ <event name="OnInitDialog"></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 class="wxBoxSizer" expanded="0">
+ <property name="minimum_size"></property>
+ <property name="name">bSizermain</property>
+ <property name="orient">wxVERTICAL</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="wxFlexGridSizer" expanded="0">
+ <property name="cols">4</property>
+ <property name="flexible_direction">wxBOTH</property>
+ <property name="growablecols">1,2</property>
+ <property name="growablerows"></property>
+ <property name="hgap">0</property>
+ <property name="minimum_size"></property>
+ <property name="name">fgSizerShapeProperties</property>
+ <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+ <property name="permission">none</property>
+ <property name="rows">0</property>
+ <property name="vgap">0</property>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</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">Move vector X,Y</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_staticTextMove</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">wxALL|wxALIGN_CENTER_VERTICAL|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_textCtrMoveX</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="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">0</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 class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|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_textCtrMoveY</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="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">0</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 class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</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">unit</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_staticTextMoveUnit</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">wxALL|wxALIGN_CENTER_VERTICAL</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">Rotation</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_staticTextAngle</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">wxALL|wxALIGN_CENTER_VERTICAL|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_textCtrAngle</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="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">0</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 class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</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">degree</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_staticTextAngleUnit</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">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="spacer" expanded="0">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</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">Scaling factor</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_staticTextSF</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">wxALL|wxALIGN_CENTER_VERTICAL|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_textCtrlScalingFactor</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="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">1.0</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 class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="spacer" expanded="0">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="spacer" expanded="0">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</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">Duplicate count</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_staticTextDupCnt</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">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxSpinCtrl" 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="initial">1</property>
+ <property name="max">100</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min">1</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_spinCtrlDuplicateCount</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">wxSP_ARROW_KEYS</property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></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="OnSpinCtrl"></event>
+ <event name="OnSpinCtrlText"></event>
+ <event name="OnTextEnter"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="spacer" expanded="0">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="spacer" expanded="0">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND | wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticLine" 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="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_staticline1</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">wxLI_HORIZONTAL</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>
+ <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">wxALIGN_RIGHT|wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxStdDialogButtonSizer" expanded="0">
+ <property name="Apply">0</property>
+ <property name="Cancel">1</property>
+ <property name="ContextHelp">0</property>
+ <property name="Help">0</property>
+ <property name="No">0</property>
+ <property name="OK">1</property>
+ <property name="Save">0</property>
+ <property name="Yes">0</property>
+ <property name="minimum_size"></property>
+ <property name="name">m_sdbSizer</property>
+ <property name="permission">protected</property>
+ <event name="OnApplyButtonClick"></event>
+ <event name="OnCancelButtonClick"></event>
+ <event name="OnContextHelpButtonClick"></event>
+ <event name="OnHelpButtonClick"></event>
+ <event name="OnNoButtonClick"></event>
+ <event name="OnOKButtonClick"></event>
+ <event name="OnSaveButtonClick"></event>
+ <event name="OnYesButtonClick"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="Dialog" expanded="1">
+ <property name="aui_managed">0</property>
+ <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+ <property name="bg"></property>
+ <property name="center">wxBOTH</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="enabled">1</property>
+ <property name="event_handler">impl_virtual</property>
+ <property name="extra_style"></property>
+ <property name="fg"></property>
+ <property name="font"></property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="maximum_size"></property>
+ <property name="minimum_size"></property>
+ <property name="name">DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE</property>
+ <property name="pos"></property>
+ <property name="size">503,396</property>
+ <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+ <property name="subclass">DIALOG_SHIM; </property>
+ <property name="title">Basic Shape Polygon</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnActivate"></event>
+ <event name="OnActivateApp"></event>
+ <event name="OnAuiFindManager"></event>
+ <event name="OnAuiPaneButton"></event>
+ <event name="OnAuiPaneClose"></event>
+ <event name="OnAuiPaneMaximize"></event>
+ <event name="OnAuiPaneRestore"></event>
+ <event name="OnAuiRender"></event>
+ <event name="OnChar"></event>
+ <event name="OnClose"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnHibernate"></event>
+ <event name="OnIconize"></event>
+ <event name="OnIdle"></event>
+ <event name="OnInitDialog"></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 class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizerMain</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" expanded="1">
+ <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">,90,92,-1,70,0</property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label"> Coordinates are relative to anchor pad, orientation 0</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_staticTextShapesListWarning</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="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" expanded="1">
+ <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">,93,92,-1,70,0</property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">Incorrect polygon</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_staticTextValidate</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="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizerUpper</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizer23</property>
+ <property name="orient">wxHORIZONTAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">0</property>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizerCornerlist</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">1</property>
+ <object class="wxGrid" expanded="1">
+ <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="autosize_cols">0</property>
+ <property name="autosize_rows">1</property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="cell_bg"></property>
+ <property name="cell_font"></property>
+ <property name="cell_horiz_alignment">wxALIGN_LEFT</property>
+ <property name="cell_text"></property>
+ <property name="cell_vert_alignment">wxALIGN_TOP</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
+ <property name="col_label_size">30</property>
+ <property name="col_label_values">"Pos X" "Pos Y"</property>
+ <property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
+ <property name="cols">2</property>
+ <property name="column_sizes"></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="drag_col_move">0</property>
+ <property name="drag_col_size">1</property>
+ <property name="drag_grid_size">0</property>
+ <property name="drag_row_size">0</property>
+ <property name="editing">1</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="grid_line_color"></property>
+ <property name="grid_lines">1</property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label_bg"></property>
+ <property name="label_font"></property>
+ <property name="label_text"></property>
+ <property name="margin_height">0</property>
+ <property name="margin_width">0</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_gridCornersList</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="row_label_horiz_alignment">wxALIGN_CENTRE</property>
+ <property name="row_label_size">80</property>
+ <property name="row_label_values"></property>
+ <property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
+ <property name="row_sizes"></property>
+ <property name="rows">1</property>
+ <property name="show">1</property>
+ <property name="size"></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>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnGridCellChange">onCellChange</event>
+ <event name="OnGridCellLeftClick"></event>
+ <event name="OnGridCellLeftDClick"></event>
+ <event name="OnGridCellRightClick"></event>
+ <event name="OnGridCellRightDClick"></event>
+ <event name="OnGridCmdCellChange"></event>
+ <event name="OnGridCmdCellLeftClick"></event>
+ <event name="OnGridCmdCellLeftDClick"></event>
+ <event name="OnGridCmdCellRightClick"></event>
+ <event name="OnGridCmdCellRightDClick"></event>
+ <event name="OnGridCmdColSize"></event>
+ <event name="OnGridCmdEditorCreated"></event>
+ <event name="OnGridCmdEditorHidden"></event>
+ <event name="OnGridCmdEditorShown"></event>
+ <event name="OnGridCmdLabelLeftClick"></event>
+ <event name="OnGridCmdLabelLeftDClick"></event>
+ <event name="OnGridCmdLabelRightClick"></event>
+ <event name="OnGridCmdLabelRightDClick"></event>
+ <event name="OnGridCmdRangeSelect"></event>
+ <event name="OnGridCmdRowSize"></event>
+ <event name="OnGridCmdSelectCell"></event>
+ <event name="OnGridColSize"></event>
+ <event name="OnGridEditorCreated"></event>
+ <event name="OnGridEditorHidden"></event>
+ <event name="OnGridEditorShown"></event>
+ <event name="OnGridLabelLeftClick"></event>
+ <event name="OnGridLabelLeftDClick"></event>
+ <event name="OnGridLabelRightClick"></event>
+ <event name="OnGridLabelRightDClick"></event>
+ <event name="OnGridRangeSelect">onGridSelect</event>
+ <event name="OnGridRowSize"></event>
+ <event name="OnGridSelectCell">onCellSelect</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="1">
+ <property name="border">5</property>
+ <property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL</property>
+ <property name="proportion">0</property>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizerRightButts</property>
+ <property name="orient">wxHORIZONTAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxButton" expanded="1">
+ <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">0</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">Add</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_buttonAdd</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="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnButtonClick">onButtonAdd</event>
+ <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="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxButton" expanded="1">
+ <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">0</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">Delete</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_buttonDelete</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="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnButtonClick">OnButtonDelete</event>
+ <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>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND | wxALL</property>
+ <property name="proportion">1</property>
+ <object class="wxPanel" expanded="1">
+ <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">0,0,0</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="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size">300,300</property>
+ <property name="moveable">1</property>
+ <property name="name">m_panelPoly</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="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">wxSUNKEN_BORDER|wxTAB_TRAVERSAL</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">onPaintPolyPanel</event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize">onPolyPanelResize</event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag"></property>
+ <property name="proportion">0</property>
+ <object class="wxFlexGridSizer" expanded="1">
+ <property name="cols">3</property>
+ <property name="flexible_direction">wxBOTH</property>
+ <property name="growablecols">1</property>
+ <property name="growablerows"></property>
+ <property name="hgap">0</property>
+ <property name="minimum_size"></property>
+ <property name="name">fgSizerThickness</property>
+ <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+ <property name="permission">none</property>
+ <property name="rows">0</property>
+ <property name="vgap">0</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" expanded="1">
+ <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">Outline thickness</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_staticTextThickness</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="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
+ <property name="proportion">0</property>
+ <object class="wxTextCtrl" expanded="1">
+ <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_textCtrlThickness</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="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">0</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 class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" expanded="1">
+ <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">unit</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_staticTextThicknessUnit</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>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND | wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticLine" expanded="1">
+ <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="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_staticline3</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">wxLI_HORIZONTAL</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>
+ <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">wxEXPAND|wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxStdDialogButtonSizer" expanded="0">
+ <property name="Apply">0</property>
+ <property name="Cancel">1</property>
+ <property name="ContextHelp">0</property>
+ <property name="Help">0</property>
+ <property name="No">0</property>
+ <property name="OK">1</property>
+ <property name="Save">0</property>
+ <property name="Yes">0</property>
+ <property name="minimum_size"></property>
+ <property name="name">m_sdbSizer</property>
+ <property name="permission">protected</property>
+ <event name="OnApplyButtonClick"></event>
+ <event name="OnCancelButtonClick"></event>
+ <event name="OnContextHelpButtonClick"></event>
+ <event name="OnHelpButtonClick"></event>
+ <event name="OnNoButtonClick"></event>
+ <event name="OnOKButtonClick"></event>
+ <event name="OnSaveButtonClick"></event>
+ <event name="OnYesButtonClick"></event>
+ </object>
+ </object>
+ </object>
+ </object>
</object>
</wxFormBuilder_Project>
=== modified file 'pcbnew/dialogs/dialog_pad_properties_base.h'
--- pcbnew/dialogs/dialog_pad_properties_base.h 2015-09-11 23:13:54 +0000
+++ pcbnew/dialogs/dialog_pad_properties_base.h 2016-02-07 17:26:43 +0000
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jun 5 2014)
+// C++ code generated with wxFormBuilder (version Jan 1 2016)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -12,6 +12,7 @@
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
+class wxListView;
#include "dialog_shim.h"
#include <wx/string.h>
@@ -29,10 +30,14 @@
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
+#include <wx/listctrl.h>
+#include <wx/button.h>
#include <wx/notebook.h>
#include <pcb_draw_panel_gal.h>
-#include <wx/button.h>
#include <wx/dialog.h>
+#include <wx/statline.h>
+#include <wx/spinctrl.h>
+#include <wx/grid.h>
///////////////////////////////////////////////////////////////////////////
@@ -143,12 +148,22 @@
wxTextCtrl* m_ThermalGapCtrl;
wxStaticText* m_ThermalGapUnits;
wxStaticText* m_staticTextWarning;
+ wxPanel* m_panelCustomShape;
+ wxStaticText* m_staticTextShapesList;
+ wxStaticText* m_staticTextShapesListWraning;
+ wxListView* m_listCtrlShapes;
+ wxButton* m_buttonDel;
+ wxButton* m_buttonEditShape;
+ wxButton* m_buttonAddShape;
+ wxButton* m_buttonDup;
+ wxButton* m_buttonGeometry;
+ wxButton* m_buttonImport;
wxPanel* m_panelShowPad;
PCB_DRAW_PANEL_GAL* m_panelShowPadGal;
wxStaticText* m_staticTextWarningPadFlipped;
- wxStdDialogButtonSizer* m_sdbSizer1;
- wxButton* m_sdbSizer1OK;
- wxButton* m_sdbSizer1Cancel;
+ wxStdDialogButtonSizer* m_sdbSizer;
+ wxButton* m_sdbSizerOK;
+ wxButton* m_sdbSizerCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnValuesChanged( wxCommandEvent& event ) { event.Skip(); }
@@ -157,8 +172,14 @@
virtual void PadOrientEvent( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSetLayers( wxCommandEvent& event ) { event.Skip(); }
virtual void OnDrillShapeSelected( wxCommandEvent& event ) { event.Skip(); }
+ virtual void onCustomShapeDClick( wxMouseEvent& event ) { event.Skip(); }
+ virtual void onDeleteShape( wxCommandEvent& event ) { event.Skip(); }
+ virtual void onEditShape( wxCommandEvent& event ) { event.Skip(); }
+ virtual void onAddShape( wxCommandEvent& event ) { event.Skip(); }
+ virtual void onDuplicateShape( wxCommandEvent& event ) { event.Skip(); }
+ virtual void onGeometryTransform( wxCommandEvent& event ) { event.Skip(); }
+ virtual void onImportShape( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); }
- virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void PadPropertiesAccept( wxCommandEvent& event ) { event.Skip(); }
@@ -169,4 +190,108 @@
};
+///////////////////////////////////////////////////////////////////////////////
+/// Class DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE
+///////////////////////////////////////////////////////////////////////////////
+class DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE : public DIALOG_SHIM
+{
+ private:
+
+ protected:
+ wxStaticText* m_staticTextPosStart;
+ wxTextCtrl* m_textCtrPosX;
+ wxTextCtrl* m_textCtrPosY;
+ wxStaticText* m_staticTextPosUnit;
+ wxStaticText* m_staticTextPosEnd;
+ wxTextCtrl* m_textCtrEndX;
+ wxTextCtrl* m_textCtrEndY;
+ wxStaticText* m_staticTextEndUnit;
+ wxStaticText* m_staticTextAngle;
+ wxTextCtrl* m_textCtrAngle;
+ wxStaticText* m_staticTextAngleUnit;
+ wxStaticText* m_staticTextThickness;
+ wxTextCtrl* m_textCtrlThickness;
+ wxStaticText* m_staticTextThicknessUnit;
+ wxStaticLine* m_staticline1;
+ wxStdDialogButtonSizer* m_sdbSizer;
+ wxButton* m_sdbSizerOK;
+ wxButton* m_sdbSizerCancel;
+
+ public:
+
+ DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 431,201 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE
+///////////////////////////////////////////////////////////////////////////////
+class DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE : public DIALOG_SHIM
+{
+ private:
+
+ protected:
+ wxStaticText* m_staticTextMove;
+ wxTextCtrl* m_textCtrMoveX;
+ wxTextCtrl* m_textCtrMoveY;
+ wxStaticText* m_staticTextMoveUnit;
+ wxStaticText* m_staticTextAngle;
+ wxTextCtrl* m_textCtrAngle;
+ wxStaticText* m_staticTextAngleUnit;
+ wxStaticText* m_staticTextSF;
+ wxTextCtrl* m_textCtrlScalingFactor;
+ wxStaticText* m_staticTextDupCnt;
+ wxSpinCtrl* m_spinCtrlDuplicateCount;
+ wxStaticLine* m_staticline1;
+ wxStdDialogButtonSizer* m_sdbSizer;
+ wxButton* m_sdbSizerOK;
+ wxButton* m_sdbSizerCancel;
+
+ public:
+
+ DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pad Custom Shape Geometry Transform"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 398,203 ), long style = wxDEFAULT_DIALOG_STYLE );
+ ~DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE
+///////////////////////////////////////////////////////////////////////////////
+class DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE : public DIALOG_SHIM
+{
+ private:
+
+ protected:
+ wxStaticText* m_staticTextShapesListWarning;
+ wxStaticText* m_staticTextValidate;
+ wxGrid* m_gridCornersList;
+ wxButton* m_buttonAdd;
+ wxButton* m_buttonDelete;
+ wxPanel* m_panelPoly;
+ wxStaticText* m_staticTextThickness;
+ wxTextCtrl* m_textCtrlThickness;
+ wxStaticText* m_staticTextThicknessUnit;
+ wxStaticLine* m_staticline3;
+ wxStdDialogButtonSizer* m_sdbSizer;
+ wxButton* m_sdbSizerOK;
+ wxButton* m_sdbSizerCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void onCellChange( wxGridEvent& event ) { event.Skip(); }
+ virtual void onGridSelect( wxGridRangeSelectEvent& event ) { event.Skip(); }
+ virtual void onCellSelect( wxGridEvent& event ) { event.Skip(); }
+ virtual void onButtonAdd( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnButtonDelete( wxCommandEvent& event ) { event.Skip(); }
+ virtual void onPaintPolyPanel( wxPaintEvent& event ) { event.Skip(); }
+ virtual void onPolyPanelResize( wxSizeEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Basic Shape Polygon"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 503,396 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE();
+
+};
+
#endif //__DIALOG_PAD_PROPERTIES_BASE_H__
=== modified file 'pcbnew/drc_clearance_test_functions.cpp'
--- pcbnew/drc_clearance_test_functions.cpp 2016-01-09 21:07:52 +0000
+++ pcbnew/drc_clearance_test_functions.cpp 2016-01-27 20:29:30 +0000
@@ -5,9 +5,9 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
- * Copyright (C) 2004-2015 Jean-Pierre Charras, jean-pierre.charras@xxxxxxxxxxxxxxxxx
+ * Copyright (C) 2004-2016 Jean-Pierre Charras, jean-pierre.charras@xxxxxxxxxxxxxxxxx
* Copyright (C) 2007 Dick Hollenbeck, dick@xxxxxxxxxxx
- * Copyright (C) 2015 KiCad Developers, see change_log.txt for contributors.
+ * Copyright (C) 2016 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -27,9 +27,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
-/****************************/
-/* DRC control */
-/****************************/
+/**
+ * DRC control: these functions make a DRC between pads, tracks and pads versus tracks
+ */
#include <fctsys.h>
#include <wxPcbStruct.h>
@@ -45,41 +45,37 @@
#include <class_marker_pcb.h>
#include <math_for_graphics.h>
#include <polygon_test_point_inside.h>
-
-
-/* compare 2 trapezoids (can be rectangle) and return true if distance > aDist
+#include <convert_basic_shapes_to_polygon.h>
+
+
+/* compare 2 convex polygons and return true if distance > aDist
* i.e if for each edge of the first polygon distance from each edge of the other polygon
* is >= aDist
*/
-bool trapezoid2trapezoidDRC( wxPoint aTref[4], wxPoint aTcompare[4], int aDist )
+bool poly2polyDRC( wxPoint* aTref, int aTrefCount,
+ wxPoint* aTcompare, int aTcompareCount, int aDist )
{
/* Test if one polygon is contained in the other and thus the polygon overlap.
- * This case is not covered by the following check if one polygond is
+ * This case is not covered by the following check if one polygone is
* completely contained in the other (because edges don't intersect)!
*/
- if( TestPointInsidePolygon( aTref, 4, aTcompare[0] ) )
- return false;
-
- if( TestPointInsidePolygon( aTcompare, 4, aTref[0] ) )
- return false;
-
- int ii, jj, kk, ll;
-
- for( ii = 0, jj = 3; ii<4; jj = ii, ii++ ) // for all edges in aTref
- {
- for( kk = 0, ll = 3; kk < 4; ll = kk, kk++ ) // for all edges in aTcompare
- {
+ if( TestPointInsidePolygon( aTref, aTrefCount, aTcompare[0] ) )
+ return false;
+
+ if( TestPointInsidePolygon( aTcompare, aTcompareCount, aTref[0] ) )
+ return false;
+
+ for( int ii = 0, jj = aTrefCount - 1; ii < aTrefCount; jj = ii, ii++ )
+ { // for all edges in aTref
+ for( int kk = 0, ll = aTcompareCount - 1; kk < aTcompareCount; ll = kk, kk++ )
+ { // for all edges in aTcompare
double d;
- int intersect = TestForIntersectionOfStraightLineSegments( aTref[ii].x,
- aTref[ii].y,
- aTref[jj].x,
- aTref[jj].y,
- aTcompare[kk].x,
- aTcompare[kk].y,
- aTcompare[ll].x,
- aTcompare[ll].y,
- NULL, NULL, &d );
- if( intersect || (d< aDist) )
+ int intersect = TestForIntersectionOfStraightLineSegments(
+ aTref[ii].x, aTref[ii].y, aTref[jj].x, aTref[jj].y,
+ aTcompare[kk].x, aTcompare[kk].y, aTcompare[ll].x, aTcompare[ll].y,
+ NULL, NULL, &d );
+
+ if( intersect || ( d< aDist ) )
return false;
}
}
@@ -87,58 +83,50 @@
return true;
}
-
/* compare a trapezoids (can be rectangle) and a segment and return true if distance > aDist
*/
-bool trapezoid2segmentDRC( wxPoint aTref[4], wxPoint aSegStart, wxPoint aSegEnd, int aDist )
+bool poly2segmentDRC( wxPoint* aTref, int aTrefCount, wxPoint aSegStart, wxPoint aSegEnd, int aDist )
{
/* Test if the segment is contained in the polygon.
* This case is not covered by the following check if the segment is
* completely contained in the polygon (because edges don't intersect)!
*/
- if( TestPointInsidePolygon( aTref, 4, aSegStart ) )
+ if( TestPointInsidePolygon( aTref, aTrefCount, aSegStart ) )
return false;
- int ii, jj;
-
- for( ii = 0, jj = 3; ii < 4; jj = ii, ii++ ) // for all edges in aTref
- {
+ for( int ii = 0, jj = aTrefCount-1; ii < aTrefCount; jj = ii, ii++ )
+ { // for all edges in polygon
double d;
- int intersect = TestForIntersectionOfStraightLineSegments( aTref[ii].x,
- aTref[ii].y,
- aTref[jj].x,
- aTref[jj].y,
- aSegStart.x,
- aSegStart.y,
- aSegEnd.x,
- aSegEnd.y,
- NULL, NULL, &d );
- if( intersect || (d< aDist) )
+ int intersect = TestForIntersectionOfStraightLineSegments(
+ aTref[ii].x, aTref[ii].y, aTref[jj].x, aTref[jj].y,
+ aSegStart.x, aSegStart.y, aSegEnd.x, aSegEnd.y,
+ NULL, NULL, &d );
+
+ if( intersect || ( d < aDist) )
return false;
}
return true;
}
-
-/* compare a trapezoid to a point and return true if distance > aDist
+/* compare a polygon to a point and return true if distance > aDist
* do not use this function for horizontal or vertical rectangles
* because there is a faster an easier way to compare the distance
*/
-bool trapezoid2pointDRC( wxPoint aTref[4], wxPoint aPcompare, int aDist )
+bool convex2pointDRC( wxPoint* aTref, int aTrefCount, wxPoint aPcompare, int aDist )
{
/* Test if aPcompare point is contained in the polygon.
* This case is not covered by the following check if this point is inside the polygon
*/
- if( TestPointInsidePolygon( aTref, 4, aPcompare ) )
+ if( TestPointInsidePolygon( aTref, aTrefCount, aPcompare ) )
{
return false;
}
// Test distance between aPcompare and each segment of the polygon:
- for( int ii = 0, jj = 3; ii < 4; jj = ii, ii++ ) // for all edge in polygon
+ for( int ii = 0, jj = aTrefCount - 1; ii < aTrefCount; jj = ii, ii++ ) // for all edge in polygon
{
- if( TestSegmentHit( aTref[ii], aTref[jj], aPcompare, aDist ) )
+ if( TestSegmentHit( aPcompare, aTref[ii], aTref[jj], aDist ) )
return false;
}
@@ -577,12 +565,13 @@
/* test DRC between 2 pads.
- * this function can be also used to test DRC between a pas and a hole,
- * because a hole is like a round pad.
+ * this function can be also used to test DRC between a pad and a hole,
+ * because a hole is like a round or oval pad.
*/
bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
{
int dist;
+ double pad_angle;
// Get the clearance between the 2 pads. this is the min distance between aRefPad and aPad
int dist_min = aRefPad->GetClearance( aPad );
@@ -607,10 +596,12 @@
swap_pads = false;
// swap pads to make comparisons easier
- // priority is aRefPad = ROUND then OVAL then RECT then other
+ // Note also a ROUNDRECT pad with a corner radius = r can be considered as
+ // a smaller RECT (size - 2*r) with a clearance increased by r
+ // priority is aRefPad = ROUND then OVAL then RECT/ROUNDRECT then other
if( aRefPad->GetShape() != aPad->GetShape() && aRefPad->GetShape() != PAD_SHAPE_CIRCLE )
{
- // pad ref shape is here oval, rect or trapezoid
+ // pad ref shape is here oval, rect, roundrect, trapezoid or custom
switch( aPad->GetShape() )
{
case PAD_SHAPE_CIRCLE:
@@ -622,6 +613,8 @@
break;
case PAD_SHAPE_RECT:
+ case PAD_SHAPE_ROUNDRECT:
+ case PAD_SHAPE_CUSTOM:
if( aRefPad->GetShape() != PAD_SHAPE_OVAL )
swap_pads = true;
break;
@@ -637,10 +630,20 @@
relativePadPos = -relativePadPos;
}
+ // corners of aRefPad (used only for rect/roundrect/trap pad)
+ wxPoint polyref[4];
+ // corners of aRefPad (used only for custom pad)
+ SHAPE_POLY_SET polysetref;
+
+ // corners of aPad (used only for rect/roundrect/trap pad)
+ wxPoint polycompare[4];
+ // corners of aPad (used only custom pad)
+ SHAPE_POLY_SET polysetcompare;
+
/* Because pad exchange, aRefPad shape is PAD_SHAPE_CIRCLE or PAD_SHAPE_OVAL,
* if one of the 2 pads was a PAD_SHAPE_CIRCLE or PAD_SHAPE_OVAL.
- * Therefore, if aRefPad is a PAD_SHAPE_SHAPE_RECT or a PAD_SHAPE_TRAPEZOID,
- * aPad is also a PAD_SHAPE_RECT or a PAD_SHAPE_TRAPEZOID
+ * Therefore, if aRefPad is a PAD_SHAPE_RECT, PAD_SHAPE_ROUNDRECT or a PAD_SHAPE_TRAPEZOID,
+ * aPad is also a PAD_SHAPE_RECT, PAD_SHAPE_ROUNDRECT or a PAD_SHAPE_TRAPEZOID
*/
bool diag = true;
@@ -660,6 +663,94 @@
diag = checkClearanceSegmToPad( aPad, aRefPad->GetSize().x, dist_min );
break;
+ case PAD_SHAPE_TRAPEZOID:
+ case PAD_SHAPE_ROUNDRECT:
+ case PAD_SHAPE_RECT:
+ case PAD_SHAPE_CUSTOM:
+ // pad_angle = pad orient relative to the aRefPad orient
+ pad_angle = aRefPad->GetOrientation() + aPad->GetOrientation();
+ NORMALIZE_ANGLE_POS( pad_angle );
+
+ if( aRefPad->GetShape() == PAD_SHAPE_ROUNDRECT )
+ {
+ int padRadius = aRefPad->GetRoundRectCornerRadius();
+ dist_min += padRadius;
+ GetRoundRectCornerCenters( polyref, padRadius, wxPoint( 0, 0 ),
+ aRefPad->GetSize(), aRefPad->GetOrientation() );
+ }
+ else if( aRefPad->GetShape() == PAD_SHAPE_CUSTOM )
+ {
+ polysetref.Append( aRefPad->GetCustomShapeAsPolygon() );
+ aRefPad->BasicShapesAsPolygonToBoardPosition( &polysetref,
+ wxPoint( 0, 0), aRefPad->GetOrientation() );
+ }
+ else
+ aRefPad->BuildPadPolygon( polyref, wxSize( 0, 0 ), aRefPad->GetOrientation() );
+
+ switch( aPad->GetShape() )
+ {
+ case PAD_SHAPE_ROUNDRECT:
+ case PAD_SHAPE_RECT:
+ case PAD_SHAPE_TRAPEZOID:
+ if( aPad->GetShape() == PAD_SHAPE_ROUNDRECT )
+ {
+ int padRadius = aPad->GetRoundRectCornerRadius();
+ dist_min += padRadius;
+ GetRoundRectCornerCenters( polycompare, padRadius, relativePadPos,
+ aPad->GetSize(), aPad->GetOrientation() );
+ }
+ else
+ {
+ aPad->BuildPadPolygon( polycompare, wxSize( 0, 0 ), aPad->GetOrientation() );
+
+ // Move aPad shape to relativePadPos
+ for( int ii = 0; ii < 4; ii++ )
+ polycompare[ii] += relativePadPos;
+ }
+
+ // And now test polygons:
+ if( polysetref.OutlineCount() )
+ {
+ const SHAPE_LINE_CHAIN& refpoly = polysetref.COutline( 0 );
+ // And now test polygons:
+ if( !poly2polyDRC( (wxPoint*) &refpoly.CPoint( 0 ), refpoly.PointCount(),
+ polycompare, 4, dist_min ) )
+ diag = false;
+ }
+ else if( !poly2polyDRC( polyref, 4, polycompare, 4, dist_min ) )
+ diag = false;
+ break;
+
+ case PAD_SHAPE_CUSTOM:
+ polysetcompare.Append( aPad->GetCustomShapeAsPolygon() );
+ aRefPad->BasicShapesAsPolygonToBoardPosition( &polysetcompare,
+ relativePadPos, aPad->GetOrientation() );
+
+ if( polysetref.OutlineCount() )
+ {
+ const SHAPE_LINE_CHAIN& refpoly = polysetref.COutline( 0 );
+ const SHAPE_LINE_CHAIN& cmppoly = polysetcompare.COutline( 0 );
+ // And now test polygons:
+ if( !poly2polyDRC( (wxPoint*) &refpoly.CPoint( 0 ), refpoly.PointCount(),
+ (wxPoint*) &cmppoly.CPoint( 0 ), cmppoly.PointCount(),
+ dist_min ) )
+ diag = false;
+ }
+ else
+ {
+ const SHAPE_LINE_CHAIN& cmppoly = polysetcompare.COutline( 0 );
+ // And now test polygons:
+ if( !poly2polyDRC( polyref, 4, (wxPoint*) &cmppoly.CPoint( 0 ), cmppoly.PointCount(), dist_min ) )
+ diag = false;
+ }
+ break;
+
+ default:
+ wxLogDebug( wxT( "DRC::checkClearancePadToPad: unexpected pad shape %d" ), aPad->GetShape() );
+ break;
+ }
+ break;
+
case PAD_SHAPE_OVAL: /* an oval pad is like a track segment */
{
/* Create a track segment with same dimensions as the oval aRefPad
@@ -702,26 +793,8 @@
break;
}
- case PAD_SHAPE_TRAPEZOID:
- case PAD_SHAPE_RECT:
- {
- wxPoint polyref[4]; // Shape of aRefPad
- wxPoint polycompare[4]; // Shape of aPad
- aRefPad->BuildPadPolygon( polyref, wxSize( 0, 0 ), aRefPad->GetOrientation() );
- aPad->BuildPadPolygon( polycompare, wxSize( 0, 0 ), aPad->GetOrientation() );
-
- // Move aPad shape to relativePadPos
- for( int ii = 0; ii < 4; ii++ )
- polycompare[ii] += relativePadPos;
-
- // And now test polygons:
- if( !trapezoid2trapezoidDRC( polyref, polycompare, dist_min ) )
- diag = false;
- }
- break;
-
default:
- wxLogDebug( wxT( "DRC::checkClearancePadToPad: unexpected pad shape" ) );
+ wxLogDebug( wxT( "DRC::checkClearancePadToPad: unknown pad shape" ) );
break;
}
@@ -737,7 +810,7 @@
bool DRC::checkClearanceSegmToPad( const D_PAD* aPad, int aSegmentWidth, int aMinDist )
{
wxSize padHalfsize; // half dimension of the pad
- wxPoint startPoint, endPoint;
+ int r;
int segmHalfWidth = aSegmentWidth / 2;
int distToLine = segmHalfWidth + aMinDist;
@@ -751,6 +824,12 @@
padHalfsize.y += std::abs(aPad->GetDelta().x) / 2; // Remember: GetDelta().x is the GetSize().y change
}
+ if( aPad->GetShape() == PAD_SHAPE_CUSTOM ) // The full shape size is not aPad->GetSize()
+ {
+ padHalfsize.x = aPad->GetBoundingRadius();
+ padHalfsize.y = aPad->GetBoundingRadius();
+ }
+
if( aPad->GetShape() == PAD_SHAPE_CIRCLE )
{
/* Easy case: just test the distance between segment and pad centre
@@ -770,8 +849,8 @@
m_xcliphi = m_padToTestPos.x + distToLine + padHalfsize.x;
m_ycliphi = m_padToTestPos.y + distToLine + padHalfsize.y;
- startPoint.x = startPoint.y = 0;
- endPoint = m_segmEnd;
+ wxPoint startPoint;
+ wxPoint endPoint = m_segmEnd;
double orient = aPad->GetOrientation();
@@ -849,6 +928,13 @@
}
break;
+ case PAD_SHAPE_ROUNDRECT:
+ // a round rect is a smaller rect, with a clearance augmented by the corners radius
+ r = aPad->GetRoundRectCornerRadius();
+ padHalfsize.x -= r;
+ padHalfsize.y -= r;
+ distToLine += r;
+ // Fall through
case PAD_SHAPE_RECT:
// the area to test is a rounded rectangle.
// this can be done by testing 2 rectangles and 4 circles (the corners)
@@ -923,7 +1009,32 @@
RotatePoint( &poly[ii], m_segmAngle );
}
- if( !trapezoid2segmentDRC( poly, wxPoint( 0, 0 ), wxPoint(m_segmLength,0), distToLine ) )
+ if( !poly2segmentDRC( poly, 4, wxPoint( 0, 0 ), wxPoint(m_segmLength,0), distToLine ) )
+ return false;
+ }
+
+ case PAD_SHAPE_CUSTOM:
+ {
+ SHAPE_POLY_SET polySet( aPad->GetCustomShapeAsPolygon() );
+
+ // Update shape corners coordinates according to pad orientation:
+ aPad->BasicShapesAsPolygonToBoardPosition( &polySet, wxPoint( 0, 0 ),
+ orient );
+
+ SHAPE_LINE_CHAIN& poly = polySet.Outline( 0 );
+
+ // Move shape to m_padToTestPos and rotate m_segmAngle
+ for( int ii = 0; ii < poly.PointCount(); ii++ )
+ {
+ wxPoint corner( poly.Point(ii).x, poly.Point(ii).y );
+ corner += m_padToTestPos;
+ RotatePoint( &corner, m_segmAngle );
+ poly.Point(ii).x = corner.x;
+ poly.Point(ii).y = corner.y;
+ }
+
+ if( !poly2segmentDRC( (wxPoint*)&poly.Point(0), poly.PointCount(),
+ wxPoint( 0, 0 ), wxPoint(m_segmLength,0), distToLine ) )
return false;
}
break;
=== modified file 'pcbnew/drc_stuff.h'
--- pcbnew/drc_stuff.h 2015-07-08 07:33:11 +0000
+++ pcbnew/drc_stuff.h 2016-01-22 14:53:47 +0000
@@ -365,12 +365,12 @@
/**
* Helper function checkMarginToCircle
- * Check the distance from a point to
- * a segment. the segment is expected starting at 0,0, and on the X axis
+ * Check the distance from a point to a segment.
+ * The segment is expected starting at 0,0, and on the X axis
* (used to test DRC between a segment and a round pad, via or round end of a track
* @param aCentre The coordinate of the circle's center
* @param aRadius A "keep out" radius centered over the circle
- * @param aLength The length of the segment (i.e. coordinate of end, becuase it is on
+ * @param aLength The length of the segment (i.e. coordinate of end, because it is on
* the X axis)
* @return bool - true if distance >= radius, else
* false when distance < aRadius
=== modified file 'pcbnew/kicad_plugin.cpp'
--- pcbnew/kicad_plugin.cpp 2016-01-17 17:31:00 +0000
+++ pcbnew/kicad_plugin.cpp 2016-02-04 19:02:56 +0000
@@ -1229,6 +1229,8 @@
case PAD_SHAPE_RECT: shape = "rect"; break;
case PAD_SHAPE_OVAL: shape = "oval"; break;
case PAD_SHAPE_TRAPEZOID: shape = "trapezoid"; break;
+ case PAD_SHAPE_ROUNDRECT: shape = "roundrect"; break;
+ case PAD_SHAPE_CUSTOM: shape = "custom"; break;
default:
THROW_IO_ERROR( wxString::Format( _( "unknown pad type: %d"), aPad->GetShape() ) );
@@ -1287,6 +1289,10 @@
formatLayers( aPad->GetLayerSet(), 0 );
+ // Output the radius ratio for rounded rect pads
+ if( aPad->GetShape() == PAD_SHAPE_ROUNDRECT )
+ m_out->Print( 0, "(roundrect_rratio %s)", Double2Str( aPad->GetRoundRectRadiusRatio() ).c_str() );
+
std::string output;
// Unconnected pad is default net so don't save it.
@@ -1325,6 +1331,94 @@
m_out->Print( aNestLevel+1, "%s", output.c_str()+1 ); // +1 skips 1st space on 1st element
}
+ if( aPad->GetShape() == PAD_SHAPE_CUSTOM )
+ {
+ m_out->Print( 0, "\n");
+ m_out->Print( aNestLevel+1, "(basic_shapes\n" );
+
+ int nested_level = aNestLevel+2;
+
+ // Output the anchor pad shape (circle/rect)
+ if( aPad->GetAnchorPadShape() == PAD_SHAPE_RECT )
+ shape = "rect";
+ else
+ shape = "circle";
+
+ m_out->Print( nested_level, "(anchor_pad_shape %s)", shape );
+
+ // Output all basic shapes
+ for( unsigned ii = 0; ii < aPad->GetBasicShapes().size(); ++ii )
+ {
+ m_out->Print( 0, "\n");
+
+ const PAD_BC_SHAPE& bshape = aPad->GetBasicShapes()[ii];
+
+ switch( bshape.m_Type )
+ {
+ case S_SEGMENT: // usual segment : line with rounded ends
+ m_out->Print( nested_level, "(gr_line (start %s) (end %s) (width %s))",
+ FMT_IU( bshape.m_Start ).c_str(),
+ FMT_IU( bshape.m_End ).c_str(),
+ FMT_IU( bshape.m_Thickness ).c_str() );
+ break;
+
+ case S_ARC: // Arc with rounded ends
+ m_out->Print( nested_level, "(gr_arc (start %s) (end %s) (angle %s) (width %s))",
+ FMT_IU( bshape.m_Start ).c_str(),
+ FMT_IU( bshape.m_End ).c_str(),
+ FMT_ANGLE( bshape.m_ArcAngle ).c_str(),
+ FMT_IU( bshape.m_Thickness ).c_str() );
+ break;
+
+ case S_CIRCLE: // ring or circle (circle if width == 0
+ m_out->Print( nested_level, "(gr_circle (center %s) (end %s %s) (width %s))",
+ FMT_IU( bshape.m_Start ).c_str(),
+ FMT_IU( bshape.m_Start.x + bshape.m_Radius ).c_str(),
+ FMT_IU( bshape.m_Start.y ).c_str(),
+ FMT_IU( bshape.m_Thickness ).c_str() );
+ break;
+
+ case S_POLYGON: // polygon
+ if( bshape.m_Poly.size() < 2 )
+ break; // Malformed polygon.
+
+ {
+ m_out->Print( nested_level, "(gr_poly (pts\n");
+
+ // Write the polygon corners coordinates:
+ const std::vector< wxPoint>& poly = bshape.m_Poly;
+ int newLine = 0;
+
+ for( unsigned ii = 0; ii < poly.size(); ii++ )
+ {
+ if( newLine == 0 )
+ m_out->Print( nested_level+1, " (xy %s)", FMT_IU( wxPoint( poly[ii].x, poly[ii].y ) ).c_str() );
+ else
+ m_out->Print( 0, " (xy %s)", FMT_IU( wxPoint( poly[ii].x, poly[ii].y ) ).c_str() );
+
+ if( ++newLine > 4 )
+ {
+ newLine = 0;
+ m_out->Print( 0, "\n" );
+ }
+ }
+
+ if( bshape.m_Thickness != 0 )
+ m_out->Print( 0, ") (width %s))", FMT_IU( bshape.m_Thickness ).c_str() );
+ else
+ m_out->Print( 0, "))");
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ m_out->Print( 0, "\n");
+ m_out->Print( aNestLevel+1, ")" ); // end of (basic_shapes
+ }
+
m_out->Print( 0, ")\n" );
}
=== modified file 'pcbnew/pad_edition_functions.cpp'
--- pcbnew/pad_edition_functions.cpp 2015-11-04 08:48:34 +0000
+++ pcbnew/pad_edition_functions.cpp 2016-02-05 19:34:03 +0000
@@ -51,19 +51,12 @@
SetMsgPanel( aPad );
D_PAD& mp = GetDesignSettings().m_Pad_Master;
-
- mp.SetShape( aPad->GetShape() );
- mp.SetAttribute( aPad->GetAttribute() );
- mp.SetLayerSet( aPad->GetLayerSet() );
-
+ // Copy all settings. Some of them are not used, but they break anything
+ mp.Copy( aPad );
+ // The pad orientation, for historical reasons is the
+ // pad rotation + parent rotation.
+ // store only the pad rotation.
mp.SetOrientation( aPad->GetOrientation() - aPad->GetParent()->GetOrientation() );
-
- mp.SetSize( aPad->GetSize() );
- mp.SetDelta( aPad->GetDelta() );
-
- mp.SetOffset( aPad->GetOffset() );
- mp.SetDrillSize( aPad->GetDrillSize() );
- mp.SetDrillShape( aPad->GetDrillShape() );
}
@@ -113,10 +106,15 @@
aPad->SetDrillSize( wxSize( 0, 0 ) );
aPad->SetOffset( wxPoint( 0, 0 ) );
break;
+
default:
;
}
+ aPad->SetBasicShapes( mp.GetBasicShapes() );
+ aPad->SetAnchorPadShape( mp.GetAnchorPadShape() );
+ aPad->MergeBasicShapesAsPolygon();
+
if( aDraw )
m_canvas->RefreshDrawingRect( aPad->GetBoundingBox() );
=== modified file 'pcbnew/pcb_painter.cpp'
--- pcbnew/pcb_painter.cpp 2016-01-20 14:19:26 +0000
+++ pcbnew/pcb_painter.cpp 2016-02-01 12:18:24 +0000
@@ -38,6 +38,7 @@
#include <pcb_painter.h>
#include <gal/graphics_abstraction_layer.h>
+#include <convert_basic_shapes_to_polygon.h>
using namespace KIGFX;
@@ -567,6 +568,8 @@
m_gal->Translate( VECTOR2D( aPad->GetPosition() ) );
m_gal->Rotate( -aPad->GetOrientation() * M_PI / 1800.0 );
+ int custom_margin = 0; // a clearance/margin for custom shape, for solder paste/mask
+
// Choose drawing settings depending on if we are drawing a pad itself or a hole
if( aLayer == ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ) )
{
@@ -578,6 +581,7 @@
{
// Drawing soldermask
int soldermaskMargin = aPad->GetSolderMaskMargin();
+ custom_margin = soldermaskMargin;
m_gal->Translate( VECTOR2D( aPad->GetOffset() ) );
size = VECTOR2D( aPad->GetSize().x / 2.0 + soldermaskMargin,
@@ -588,6 +592,8 @@
{
// Drawing solderpaste
wxSize solderpasteMargin = aPad->GetSolderPasteMargin();
+ // try to find a clearance which can be used for custom shapes
+ custom_margin = solderpasteMargin.x;
m_gal->Translate( VECTOR2D( aPad->GetOffset() ) );
size = VECTOR2D( aPad->GetSize().x / 2.0 + solderpasteMargin.x,
@@ -653,6 +659,87 @@
m_gal->DrawRectangle( VECTOR2D( -size.x, -size.y ), VECTOR2D( size.x, size.y ) );
break;
+ case PAD_SHAPE_ROUNDRECT:
+ {
+ std::deque<VECTOR2D> pointList;
+
+ // Use solder[Paste/Mask]size or pad size to build pad shape
+ SHAPE_POLY_SET outline;
+ wxSize prsize( size.x*2, size.y*2 );
+ const int segmentToCircleCount = 64;
+ int corner_radius = aPad->GetRoundRectCornerRadius( prsize );
+ TransformRoundRectToPolygon( outline, wxPoint( 0, 0 ), prsize,
+ 0.0 , corner_radius, segmentToCircleCount );
+
+ // Draw the polygon: Inflate creates only one convex polygon
+ SHAPE_LINE_CHAIN& poly = outline.Outline( 0 );
+
+ for( int ii = 0; ii < poly.PointCount(); ii++ )
+ pointList.push_back( poly.Point( ii ) );
+
+ if( m_pcbSettings.m_sketchMode[ITEM_GAL_LAYER( PADS_VISIBLE )] )
+ {
+ // Add the beginning point to close the outline
+ pointList.push_back( pointList.front() );
+ m_gal->DrawPolyline( pointList );
+
+ }
+ else
+ {
+ m_gal->DrawPolygon( pointList );
+ }
+ break;
+ }
+
+ case PAD_SHAPE_CUSTOM:
+ { // Draw the complex custom shape
+ std::deque<VECTOR2D> pointList;
+
+ // Use solder[Paste/Mask]size or pad size to build pad shape
+ // however, solder[Paste/Mask] size has no actual meaning for a
+ // custom shape, because it is a set of basic shapes
+ // We use the custom_margin (good for solder mask, but approximative
+ // for solder paste).
+ if( custom_margin )
+ {
+ SHAPE_POLY_SET outline;
+ outline.Append( aPad->GetCustomShapeAsPolygon() );
+ const int segmentToCircleCount = 32;
+ outline.Inflate( custom_margin, segmentToCircleCount );
+
+ // Draw the polygon: only one polygon is expected
+ SHAPE_LINE_CHAIN& poly = outline.Outline( 0 );
+
+ for( int ii = 0; ii < poly.PointCount(); ii++ )
+ pointList.push_back( poly.Point( ii ) );
+ }
+ else
+ {
+ // Draw the polygon: only one polygon is expected
+ // However we provide a multi polygon shape drawing
+ // ( for the future or to show even an incorrect shape
+ const SHAPE_POLY_SET& outline = aPad->GetCustomShapeAsPolygon();
+
+ for( int jj = 0; jj < outline.OutlineCount(); ++jj )
+ {
+ const SHAPE_LINE_CHAIN& poly = outline.COutline( jj );
+
+ for( int ii = 0; ii < poly.PointCount(); ii++ )
+ pointList.push_back( poly.CPoint( ii ) );
+ }
+ }
+
+ if( m_pcbSettings.m_sketchMode[ITEM_GAL_LAYER( PADS_VISIBLE )] )
+ {
+ // Add the beginning point to close the outline
+ pointList.push_back( pointList.front() );
+ m_gal->DrawPolyline( pointList );
+ }
+ else
+ m_gal->DrawPolygon( pointList );
+ }
+ break;
+
case PAD_SHAPE_TRAPEZOID:
{
std::deque<VECTOR2D> pointList;
@@ -667,7 +754,7 @@
pointList.push_back( VECTOR2D( corners[2] ) );
pointList.push_back( VECTOR2D( corners[3] ) );
- if( m_pcbSettings.m_sketchMode[PADS_VISIBLE] )
+ if( m_pcbSettings.m_sketchMode[ITEM_GAL_LAYER( PADS_VISIBLE )] )
{
// Add the beginning point to close the outline
pointList.push_back( pointList.front() );
=== modified file 'pcbnew/pcb_parser.cpp'
--- pcbnew/pcb_parser.cpp 2016-02-04 16:49:20 +0000
+++ pcbnew/pcb_parser.cpp 2016-02-06 06:58:15 +0000
@@ -2197,8 +2197,16 @@
pad->SetShape( PAD_SHAPE_TRAPEZOID );
break;
+ case T_roundrect:
+ pad->SetShape( PAD_SHAPE_ROUNDRECT );
+ break;
+
+ case T_custom:
+ pad->SetShape( PAD_SHAPE_CUSTOM );
+ break;
+
default:
- Expecting( "circle, rectangle, oval, or trapezoid" );
+ Expecting( "circle, rectangle, roundrect, oval, trapezoid or custom" );
}
for( token = NextTok(); token != T_RIGHT; token = NextTok() )
@@ -2366,13 +2374,90 @@
NeedRIGHT();
break;
+ case T_roundrect_rratio:
+ // This parameter is currently ignored.
+ // I am not sure it is usefull. However, it is accepted
+ // for future compatibility
+ parseDouble( "roundrect radius ratio" );
+ NeedRIGHT();
+ break;
+
+ case T_basic_shapes:
+ for( token = NextTok(); token != T_RIGHT; token = NextTok() )
+ {
+ if( token == T_LEFT )
+ token = NextTok();
+
+ // Currently, I am using parseDRAWSEGMENT() to read bsic shapes parameters,
+ // because they are the same as a DRAWSEGMENT.
+ // However it could be better to write a specific parser, to avoid possible issues
+ // if the DRAWSEGMENT parser is modified.
+ DRAWSEGMENT* dummy = NULL;
+
+ switch( token )
+ {
+ case T_anchor_pad_shape:
+ token = NextTok();
+ // Custom shaped pads have a "anchor pad", which is the reference
+ // for connection calculations.
+ // Because this is an anchor, only the 2 very basic shapes are managed:
+ // circle and rect. The default is circle
+ switch( token )
+ {
+ case T_circle: // default
+ break;
+
+ case T_rect:
+ pad->SetAnchorPadShape( PAD_SHAPE_RECT );
+ break;
+
+ default:
+ break;
+ }
+ NeedRIGHT();
+ break;
+
+ case T_gr_arc:
+ dummy = parseDRAWSEGMENT();
+ pad->AddBasicShape( dummy->GetCenter(), dummy->GetArcStart(),
+ dummy->GetAngle(), dummy->GetWidth() );
+ break;
+
+ case T_gr_line:
+ dummy = parseDRAWSEGMENT();
+ pad->AddBasicShape( dummy->GetStart(), dummy->GetEnd(), dummy->GetWidth() );
+ break;
+
+ case T_gr_circle:
+ dummy = parseDRAWSEGMENT();
+ pad->AddBasicShape( dummy->GetCenter(), dummy->GetRadius(), dummy->GetWidth() );
+ break;
+
+ case T_gr_poly:
+ dummy = parseDRAWSEGMENT();
+ pad->AddBasicShape( dummy->GetPolyPoints(), dummy->GetWidth() );
+ break;
+
+ default:
+ Expecting( "gr_line, gr_arc, gr_circle or gr_poly" );
+ break;
+ }
+
+ delete dummy;
+ }
+ break;
+
default:
- Expecting( "at, drill, layers, net, die_length, solder_mask_margin, "
+ Expecting( "at, drill, layers, net, die_length, solder_mask_margin, roundrect_rratio,"
"solder_paste_margin, solder_paste_margin_ratio, clearance, "
- "zone_connect, thermal_width, or thermal_gap" );
+ "zone_connect, fp_poly, basic_shapes, thermal_width, or thermal_gap" );
}
}
+ // Be sure the custom shape polygon is built:
+ if( pad->GetShape() == PAD_SHAPE_CUSTOM )
+ pad->MergeBasicShapesAsPolygon();
+
return pad.release();
}
=== modified file 'pcbnew/plot_board_layers.cpp'
--- pcbnew/plot_board_layers.cpp 2016-02-11 12:14:46 +0000
+++ pcbnew/plot_board_layers.cpp 2016-02-11 15:04:59 +0000
@@ -380,6 +380,7 @@
// Fall through:
case PAD_SHAPE_TRAPEZOID:
case PAD_SHAPE_RECT:
+ case PAD_SHAPE_ROUNDRECT:
default:
itemplotter.PlotPad( pad, color, plotMode );
break;
@@ -869,7 +870,6 @@
aPlotter->SetViewport( offset, IU_PER_DECIMILS, compound_scale,
aPlotOpts->GetMirror() );
-
// has meaning only for gerber plotter. Must be called only after SetViewport
aPlotter->SetGerberCoordinatesFormat( aPlotOpts->GetGerberPrecision() );
=== modified file 'pcbnew/plot_brditems_plotter.cpp'
--- pcbnew/plot_brditems_plotter.cpp 2015-08-23 19:40:33 +0000
+++ pcbnew/plot_brditems_plotter.cpp 2016-01-27 09:38:07 +0000
@@ -84,10 +84,28 @@
case PAD_SHAPE_TRAPEZOID:
{
- wxPoint coord[4];
- aPad->BuildPadPolygon( coord, wxSize(0,0), 0 );
- m_plotter->FlashPadTrapez( shape_pos, coord,
- aPad->GetOrientation(), aPlotMode );
+ wxPoint coord[4];
+ aPad->BuildPadPolygon( coord, wxSize(0,0), 0 );
+ m_plotter->FlashPadTrapez( shape_pos, coord,
+ aPad->GetOrientation(), aPlotMode );
+ }
+ break;
+
+ case PAD_SHAPE_ROUNDRECT:
+ m_plotter->FlashPadRoundRect( shape_pos, aPad->GetSize(), aPad->GetRoundRectCornerRadius(),
+ aPad->GetOrientation(), aPlotMode );
+ break;
+
+ case PAD_SHAPE_CUSTOM:
+ {
+ SHAPE_POLY_SET polygons;
+ aPad->MergeBasicShapesAsPolygon(&polygons, 64 );
+
+ if( polygons.OutlineCount() == 0 )
+ break;
+
+ aPad->BasicShapesAsPolygonToBoardPosition( &polygons, shape_pos, aPad->GetOrientation() );
+ m_plotter->FlashPadCustom( shape_pos, aPad->GetSize(), &polygons, aPlotMode );
}
break;
=== modified file 'pcbnew/router/pns_router.cpp'
--- pcbnew/router/pns_router.cpp 2015-11-18 14:35:17 +0000
+++ pcbnew/router/pns_router.cpp 2016-02-01 07:59:06 +0000
@@ -60,6 +60,8 @@
#include <class_track.h>
#include <ratsnest_data.h>
#include <layers_id_colors_and_visibility.h>
+#include <geometry/convex_hull.h>
+
// an ugly singleton for drawing debug items within the router context.
// To be fixed sometime in the future.
@@ -267,6 +269,45 @@
break;
}
+ case PAD_SHAPE_ROUNDRECT:
+ {
+ SHAPE_POLY_SET outline;
+ const int segmentToCircleCount = 64;
+
+ aPad->BuildPadShapePolygon( outline, wxSize( 0, 0 ),
+ segmentToCircleCount, 1.0 );
+
+ // TransformRoundRectToPolygon creates only one convex polygon
+ SHAPE_LINE_CHAIN& poly = outline.Outline( 0 );
+ SHAPE_CONVEX* shape = new SHAPE_CONVEX();
+
+ for( int ii = 0; ii < poly.PointCount(); ++ii )
+ {
+ shape->Append( wxPoint( poly.Point( ii ).x, poly.Point( ii ).y ) );
+ }
+
+ solid->SetShape( shape );
+ }
+ break;
+
+ case PAD_SHAPE_CUSTOM:
+ {
+ // I am using the convex hull of the pad shape.
+ // this option can be discussed.
+ std::vector<wxPoint> convex_hull;
+ BuildConvexHull( convex_hull, aPad->GetCustomShapeAsPolygon(),
+ aPad->GetPosition(), aPad->GetOrientation() );
+
+ SHAPE_CONVEX* shape = new SHAPE_CONVEX();
+ for( unsigned ii = 0; ii < convex_hull.size(); ++ii )
+ {
+ shape->Append( convex_hull[ii] );
+ }
+
+ solid->SetShape( shape );
+ }
+ break;
+
default:
TRACEn( 0, "unsupported pad shape" );
delete solid;
@@ -344,6 +385,42 @@
break;
}
+ case PAD_SHAPE_ROUNDRECT:
+ {
+ SHAPE_POLY_SET outline;
+ const int segmentToCircleCount = 32;
+ aPad->BuildPadShapePolygon( outline, wxSize( 0, 0 ),
+ segmentToCircleCount, 1.0 );
+
+ // TransformRoundRectToPolygon creates only one convex polygon
+ SHAPE_LINE_CHAIN& poly = outline.Outline( 0 );
+ SHAPE_CONVEX* shape = new SHAPE_CONVEX();
+
+ for( int ii = 0; ii < poly.PointCount(); ++ii )
+ {
+ shape->Append( wxPoint( poly.Point( ii ).x, poly.Point( ii ).y ) );
+ }
+
+ solid->SetShape( shape );
+ }
+ break;
+
+ case PAD_SHAPE_CUSTOM:
+ {
+ // I am using the convex hull of the pad shape.
+ // this option can be discussed.
+ std::vector<wxPoint> convex_hull;
+ BuildConvexHull( convex_hull, aPad->GetCustomShapeAsPolygon(),
+ aPad->GetPosition(), aPad->GetOrientation() );
+
+ SHAPE_CONVEX* shape = new SHAPE_CONVEX();
+ for( unsigned ii = 0; ii < convex_hull.size(); ++ii )
+ shape->Append( convex_hull[ii] );
+
+ solid->SetShape( shape );
+ }
+ break;
+
default:
TRACEn( 0, "unsupported pad shape" );
delete solid;
=== modified file 'pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp'
--- pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp 2015-12-15 20:21:25 +0000
+++ pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp 2016-02-01 07:58:24 +0000
@@ -4,8 +4,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
- * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@xxxxxxxxxxxxxxx
- * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 1992-2016 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
@@ -71,6 +71,7 @@
#include <geometry/shape_poly_set.h>
#include <geometry/shape_file_io.h>
+#include <geometry/convex_hull.h>
#include <boost/foreach.hpp>
@@ -188,21 +189,57 @@
if( item_boundingbox.Intersects( zone_boundingbox ) )
{
int clearance = std::max( zone_clearance, item_clearance );
- pad->TransformShapeWithClearanceToPolygon( aFeatures,
- clearance,
- segsPerCircle,
- correctionFactor );
+
+ // PAD_SHAPE_CUSTOM have a specific keepout, to avoid to break the shape
+ // The keepout area is the bounding box (with clearance)
+ // Other way: use the convex hull.
+ if( pad->GetShape() == PAD_SHAPE_CUSTOM )
+ {
+ if( clearance > item_clearance )
+ item_boundingbox.Inflate( clearance - item_clearance );
+
+ if( item_boundingbox.Intersects( zone_boundingbox ) )
+ {
+#if 0
+ TransformRoundRectToPolygon( aFeatures,
+ item_boundingbox.Centre(), item_boundingbox.GetSize(),
+ correctionFactor, clearance, segsPerCircle );
+#else
+
+ // I am using the convex hull of the pad shape.
+ // this option can be discussed, but it preserve the complex shape.
+ SHAPE_POLY_SET outline( pad->GetCustomShapeAsPolygon() );
+ outline.Inflate( KiROUND( clearance*correctionFactor) , segsPerCircle );
+ pad->BasicShapesAsPolygonToBoardPosition( &outline,
+ pad->GetPosition(), pad->GetOrientation() );
+
+ std::vector<wxPoint> convex_hull;
+ BuildConvexHull( convex_hull, outline );
+
+ aFeatures.NewOutline();
+ for( unsigned ii = 0; ii < convex_hull.size(); ++ii )
+ aFeatures.Append( convex_hull[ii] );
+ }
+#endif
+ }
+ else
+ pad->TransformShapeWithClearanceToPolygon( aFeatures,
+ clearance,
+ segsPerCircle,
+ correctionFactor );
}
continue;
}
+ // Pads are removed from zone if the setup is PAD_ZONE_CONN_NONE
if( GetPadConnection( pad ) == PAD_ZONE_CONN_NONE )
{
int gap = zone_clearance;
int thermalGap = GetThermalReliefGap( pad );
gap = std::max( gap, thermalGap );
item_boundingbox = pad->GetBoundingBox();
+ item_boundingbox.Inflate( gap );
if( item_boundingbox.Intersects( zone_boundingbox ) )
{
@@ -212,6 +249,42 @@
correctionFactor );
}
}
+
+ // PAD_SHAPE_CUSTOM have a specific keepout, to avoid to break the shape
+ // The keepout area is the bounding box (with clearance)
+ // Other way: use the convex hull.
+ if( pad->GetShape() == PAD_SHAPE_CUSTOM )
+ {
+ int gap = zone_clearance;
+ int thermalGap = GetThermalReliefGap( pad );
+ gap = std::max( gap, thermalGap );
+ item_boundingbox = pad->GetBoundingBox();
+ item_boundingbox.Inflate( gap );
+
+ if( item_boundingbox.Intersects( zone_boundingbox ) )
+ {
+#if 0
+ TransformRoundRectToPolygon( aFeatures,
+ item_boundingbox.Centre(), item_boundingbox.GetSize(),
+ correctionFactor, gap, segsPerCircle );
+#else
+ SHAPE_POLY_SET outline( pad->GetCustomShapeAsPolygon() );
+ outline.Inflate( KiROUND( gap*correctionFactor) , segsPerCircle );
+ pad->BasicShapesAsPolygonToBoardPosition( &outline,
+ pad->GetPosition(), pad->GetOrientation() );
+
+ // I am using the convex hull of the pad shape.
+ // this option can be discussed, but it preserve the complex shape.
+ std::vector<wxPoint> convex_hull;
+ BuildConvexHull( convex_hull, outline );
+
+ aFeatures.NewOutline();
+
+ for( unsigned ii = 0; ii < convex_hull.size(); ++ii )
+ aFeatures.Append( convex_hull[ii] );
+#endif
+ }
+ }
}
}
Follow ups