More aggressive sheet-selection

This commit is contained in:
Maciej Suminski 2017-09-18 13:51:25 +02:00
commit 54cffb7bf7
15 changed files with 602 additions and 6 deletions

View File

@ -469,6 +469,7 @@ set( BMAPS_MID
select_grid
select_layer_pair
select_w_layer
select_same_sheet
shape_3d
sheetset
simulator

View File

@ -0,0 +1,87 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x04, 0x5f, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xa5, 0x96, 0x0b, 0x4c, 0x53,
0x57, 0x18, 0x80, 0xff, 0x0a, 0x12, 0xc8, 0x4c, 0x16, 0x07, 0x71, 0x3c, 0x04, 0xc6, 0xcb, 0xa9,
0x91, 0x09, 0x02, 0x6e, 0x4b, 0x3a, 0x10, 0xda, 0xce, 0xa2, 0x15, 0x84, 0x14, 0x3b, 0x08, 0xcf,
0xbe, 0xa0, 0x05, 0xd9, 0x06, 0x6d, 0x28, 0x28, 0xa4, 0xe3, 0xb1, 0x18, 0x93, 0xe9, 0x96, 0x21,
0xd1, 0x0d, 0x49, 0x10, 0x33, 0x1c, 0xc8, 0xd4, 0x28, 0xc8, 0xc2, 0x58, 0xf6, 0xe2, 0x75, 0x33,
0x16, 0x74, 0x1b, 0x2f, 0xf7, 0x10, 0xe4, 0xb1, 0x96, 0x01, 0x59, 0xe6, 0x12, 0xa6, 0xb3, 0x67,
0xff, 0xc1, 0xcb, 0x2c, 0xa5, 0x4d, 0x5a, 0x76, 0x9a, 0x2f, 0xb9, 0xe7, 0xf4, 0x9e, 0xf3, 0x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, 0x56, 0x46, 0x50, 0xfa, 0x74, 0x91, 0xfa, 0x9b, 0xd2, 0x2d, 0x43, 0x07, 0xf6,
0x84, 0xcc, 0x75, 0xdc, 0x78, 0x22, 0xa1, 0x88, 0x82, 0x39, 0x86, 0xfa, 0x74, 0x18, 0x4e, 0x88,
0x83, 0x6b, 0x90, 0x80, 0xc5, 0x2c, 0x85, 0x48, 0x90, 0x43, 0xc4, 0x1a, 0x14, 0xd0, 0x8a, 0x1c,
0x31, 0x13, 0x45, 0x23, 0x45, 0xf4, 0x20, 0x6a, 0x65, 0xe4, 0x81, 0x16, 0x5e, 0x6f, 0x57, 0xc1,
0x40, 0x52, 0x54, 0xc8, 0x3d, 0x73, 0x09, 0x25, 0x65, 0x3b, 0xc7, 0xf0, 0x96, 0x0c, 0xee, 0xec,
0x93, 0xe0, 0x15, 0x67, 0x41, 0x3e, 0x28, 0xe1, 0x69, 0xab, 0x81, 0x52, 0x60, 0x68, 0x57, 0x8b,
0x7c, 0x90, 0x3d, 0xab, 0xb2, 0x6e, 0x5e, 0x03, 0x7a, 0x77, 0x05, 0x3c, 0x78, 0x35, 0x78, 0xd3,
0x04, 0x97, 0x2b, 0x59, 0x32, 0x47, 0xb6, 0x9b, 0x33, 0xab, 0x96, 0x81, 0x31, 0x5c, 0x02, 0x63,
0x78, 0xe5, 0x14, 0x81, 0x9d, 0xa2, 0xb5, 0xe9, 0x0d, 0x2f, 0xc0, 0x53, 0x18, 0x92, 0x05, 0x3c,
0x92, 0x23, 0xf9, 0x16, 0xd0, 0x02, 0xce, 0x46, 0xa4, 0xf8, 0x6b, 0xfd, 0x7f, 0xa2, 0x14, 0x70,
0xc1, 0x93, 0xa6, 0xf1, 0x68, 0x23, 0xe2, 0x62, 0x85, 0x8d, 0xcb, 0xc8, 0xe1, 0x12, 0x2b, 0xe2,
0x58, 0x64, 0x1f, 0x67, 0x59, 0x24, 0x07, 0x89, 0xbd, 0x22, 0x9b, 0x6d, 0xa9, 0x08, 0xb6, 0x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0xe1,
0xdb, 0xe1, 0x9c, 0x93, 0x93, 0xd3, 0x45, 0x3a, 0xb7, 0xce, 0xc1, 0x8f, 0x0d, 0xfa, 0x24, 0x70,
0x47, 0x02, 0x11, 0x3f, 0xc4, 0xdf, 0x1c, 0x8d, 0x46, 0x73, 0xb6, 0xb8, 0xb8, 0xf8, 0xbc, 0x4e,
0xa7, 0x7b, 0x17, 0x5f, 0x3d, 0x27, 0x0a, 0x0b, 0x0b, 0xcf, 0xb8, 0xb9, 0xb9, 0x89, 0xe9, 0x44,
0xd5, 0x3a, 0xbe, 0x6c, 0x38, 0x76, 0x42, 0x5b, 0x28, 0xb2, 0x2c, 0x22, 0x6c, 0xf8, 0xcc, 0xd1,
0x21, 0x6f, 0x5b, 0x19, 0xa7, 0x64, 0x22, 0x8d, 0x36, 0xfe, 0xe3, 0x23, 0x5d, 0x16, 0x63, 0xf4,
0xbb, 0xb1, 0xe9, 0x5f, 0xd7, 0xbc, 0x43, 0xad, 0x1e, 0x70, 0x31, 0x57, 0x00, 0x00, 0x00, 0x00,
0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE select_same_sheet_xpm[1] = {{ png, sizeof( png ), "select_same_sheet_xpm" }};
//EOF

View File

@ -0,0 +1,409 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="29.582222"
width="29.582222"
version="1.1"
id="svg2"
inkscape:version="0.92.1 r"
sodipodi:docname="select_same_sheet.svg">
<metadata
id="metadata40">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1421"
id="namedview38"
showgrid="true"
inkscape:snap-to-guides="false"
inkscape:snap-grids="true"
inkscape:zoom="22.961538"
inkscape:cx="2.6023547"
inkscape:cy="18.289212"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="g60653">
<inkscape:grid
type="xygrid"
id="grid3017"
empspacing="2"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
spacingx="0.56888889"
spacingy="0.56888889"
originx="0"
originy="0" />
</sodipodi:namedview>
<defs
id="defs4">
<filter
style="color-interpolation-filters:sRGB"
id="d"
height="1.2585"
width="1.2406"
y="-0.12927"
x="-0.12029">
<feGaussianBlur
stdDeviation="1.6250782"
id="feGaussianBlur60602" />
</filter>
<linearGradient
id="f"
y2="36.848"
gradientUnits="userSpaceOnUse"
x2="41.355"
gradientTransform="matrix(1.5371733,0,0,3.1982933,-108.84267,-76.834133)"
y1="32.207001"
x1="39.181999">
<stop
stop-color="#fff"
offset="0"
id="stop60597" />
<stop
stop-color="#afadff"
offset="1"
id="stop60599" />
</linearGradient>
<filter
style="color-interpolation-filters:sRGB"
id="d-0"
height="1.2585"
width="1.2406"
y="-0.12927"
x="-0.12029">
<feGaussianBlur
stdDeviation="1.6250782"
id="feGaussianBlur60602-0" />
</filter>
<linearGradient
id="f-3"
y2="36.848"
gradientUnits="userSpaceOnUse"
x2="41.355"
gradientTransform="matrix(1.5371733,0,0,3.1982933,-108.84267,-76.834133)"
y1="32.207001"
x1="39.181999">
<stop
stop-color="#fff"
offset="0"
id="stop60597-4" />
<stop
stop-color="#afadff"
offset="1"
id="stop60599-6" />
</linearGradient>
</defs>
<g
transform="matrix(1.6382539,0,0,1.5572263,1.4304378,0.41317431)"
id="g16">
<rect
height="18.204445"
width="18.204445"
y="0"
x="0"
id="rect18"
style="fill-opacity:0;stroke-width:1.13777781" />
</g>
<rect
style="fill:none;fill-opacity:0.62745098;stroke:#000000;stroke-width:1.13688195;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6.82129135, 1.13688189;stroke-dashoffset:0;stroke-opacity:1"
id="rect3884"
width="28.444445"
height="28.444445"
x="0.5688889"
y="0.5688889" />
<g
transform="matrix(0.2981076,0,0,0.29684259,22.721478,-2.8316546)"
id="g60653">
<g
style="opacity:0.71483998;filter:url(#d)"
transform="translate(0.301696,0.75425067)"
id="g60631">
<path
inkscape:connector-curvature="0"
d="m -53.6192,56.357333 20.752,-8e-6 -3.8e-5,-31.982934 -6.91712,9e-6 -1.152854,2.13216 -4.61152,-9e-6 -1.152853,-2.13216 -6.917227,9e-6 2.3e-5,31.982933 z"
id="path60611"
style="stroke-width:1.06666672" />
<g
transform="matrix(2.1616,0,0,1.9989,-106.5344,-72.5696)"
id="g60629">
<path
inkscape:connector-curvature="0"
d="m 21.278933,48.465067 v 3.23328 h 3.2 V 48.46528 h -3.2 z m 1.066667,1.099946 h 1.066667 V 50.63168 H 22.3456 Z"
id="path60613"
style="stroke-width:1.06666672" />
<path
inkscape:connector-curvature="0"
d="m 21.278933,52.7648 v 3.23328 h 3.2 v -3.233067 h -3.2 z m 1.066667,1.099947 h 1.066667 v 1.066666 H 22.3456 Z"
id="path60615"
style="stroke-width:1.06666672" />
<path
inkscape:connector-curvature="0"
d="m 21.278933,56.9984 v 3.23328 h 3.2 v -3.233067 h -3.2 z m 1.066667,1.099947 h 1.066667 v 1.066666 H 22.3456 Z"
id="path60617"
style="stroke-width:1.06666672" />
<path
inkscape:connector-curvature="0"
d="m 21.278933,61.298133 v 3.23328 h 3.2 v -3.233066 h -3.2 z M 22.3456,62.39808 h 1.066667 v 1.066667 H 22.3456 Z"
id="path60619"
style="stroke-width:1.06666672" />
<path
inkscape:connector-curvature="0"
d="m 34.078933,48.498133 v 3.23328 h 3.2 v -3.233066 h -3.2 z M 35.1456,49.59808 h 1.066667 v 1.066667 H 35.1456 Z"
id="path60621"
style="stroke-width:1.06666672" />
<path
inkscape:connector-curvature="0"
d="m 34.078933,52.797867 v 3.23328 h 3.2 V 52.79808 h -3.2 z m 1.066667,1.099946 h 1.066667 V 54.96448 H 35.1456 Z"
id="path60623"
style="stroke-width:1.06666672" />
<path
inkscape:connector-curvature="0"
d="m 34.078933,57.031467 v 3.23328 h 3.2 V 57.03168 h -3.2 z m 1.066667,1.099946 h 1.066667 V 59.19808 H 35.1456 Z"
id="path60625"
style="stroke-width:1.06666672" />
<path
inkscape:connector-curvature="0"
d="m 34.078933,61.3312 v 3.23328 h 3.2 v -3.233067 h -3.2 z m 1.066667,1.099947 h 1.066667 v 1.066666 H 35.1456 Z"
id="path60627"
style="stroke-width:1.06666672" />
</g>
</g>
<path
inkscape:connector-curvature="0"
d="m -55.925333,54.225067 20.752,-9e-6 -4e-5,-31.982933 -6.91712,8e-6 -1.152853,2.13216 -4.61152,-8e-6 -1.152853,-2.13216 -6.917227,8e-6 2.3e-5,31.982934 z"
id="path60633"
style="stroke-width:1.06666672" />
<path
style="fill:url(#f);stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -53.6192,52.0928 h 16.139733 V 24.3744 h -3.45856 l -1.152853,2.13216 h -6.917227 L -50.16096,24.3744 h -3.45856 v 27.7184 z"
id="path60635" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -62.842667,22.174933 v 6.463147 h 6.917227 v -6.462933 h -6.917227 z m 2.305707,2.198827 h 2.305707 v 2.13216 h -2.305707 z"
id="path60637" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -62.842667,30.7712 v 6.463147 h 6.917227 v -6.462934 h -6.917227 z m 2.305707,2.198827 h 2.305707 v 2.13216 h -2.305707 z"
id="path60639" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -62.842667,39.233067 v 6.463146 h 6.917227 V 39.23328 h -6.917227 z m 2.305707,2.198826 h 2.305707 v 2.13216 h -2.305707 z"
id="path60641" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -62.842667,47.828267 v 6.463146 h 6.917227 V 47.82848 h -6.917227 z m 2.305707,2.198826 h 2.305707 v 2.13216 h -2.305707 z"
id="path60643" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -35.173333,22.242133 v 6.463147 h 6.917226 v -6.462933 h -6.917226 z m 2.305706,2.198827 h 2.305707 v 2.13216 h -2.305707 z"
id="path60645" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -35.173333,30.837333 v 6.463147 h 6.917226 v -6.462933 h -6.917226 z m 2.305706,2.198827 h 2.305707 v 2.13216 h -2.305707 z"
id="path60647" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -35.173333,39.2992 v 6.463147 h 6.917226 v -6.462934 h -6.917226 z m 2.305706,2.198827 h 2.305707 v 2.13216 h -2.305707 z"
id="path60649" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -35.173333,47.8944 v 6.463147 h 6.917226 v -6.462934 h -6.917226 z m 2.305706,2.198827 h 2.305707 v 2.13216 h -2.305707 z"
id="path60651" />
</g>
<g
transform="matrix(0.2981076,0,0,0.29684259,33.530367,9.3514996)"
id="g60653-6">
<g
style="opacity:0.71483998;filter:url(#d-0)"
transform="translate(0.301696,0.75425067)"
id="g60631-0">
<path
inkscape:connector-curvature="0"
d="m -53.6192,56.357333 20.752,-8e-6 -3.8e-5,-31.982934 -6.91712,9e-6 -1.152854,2.13216 -4.61152,-9e-6 -1.152853,-2.13216 -6.917227,9e-6 2.3e-5,31.982933 z"
id="path60611-2"
style="stroke-width:1.06666672" />
<g
transform="matrix(2.1616,0,0,1.9989,-106.5344,-72.5696)"
id="g60629-5">
<path
inkscape:connector-curvature="0"
d="m 21.278933,48.465067 v 3.23328 h 3.2 V 48.46528 h -3.2 z m 1.066667,1.099946 h 1.066667 V 50.63168 H 22.3456 Z"
id="path60613-8"
style="stroke-width:1.06666672" />
<path
inkscape:connector-curvature="0"
d="m 21.278933,52.7648 v 3.23328 h 3.2 v -3.233067 h -3.2 z m 1.066667,1.099947 h 1.066667 v 1.066666 H 22.3456 Z"
id="path60615-9"
style="stroke-width:1.06666672" />
<path
inkscape:connector-curvature="0"
d="m 21.278933,56.9984 v 3.23328 h 3.2 v -3.233067 h -3.2 z m 1.066667,1.099947 h 1.066667 v 1.066666 H 22.3456 Z"
id="path60617-5"
style="stroke-width:1.06666672" />
<path
inkscape:connector-curvature="0"
d="m 21.278933,61.298133 v 3.23328 h 3.2 v -3.233066 h -3.2 z M 22.3456,62.39808 h 1.066667 v 1.066667 H 22.3456 Z"
id="path60619-0"
style="stroke-width:1.06666672" />
<path
inkscape:connector-curvature="0"
d="m 34.078933,48.498133 v 3.23328 h 3.2 v -3.233066 h -3.2 z M 35.1456,49.59808 h 1.066667 v 1.066667 H 35.1456 Z"
id="path60621-6"
style="stroke-width:1.06666672" />
<path
inkscape:connector-curvature="0"
d="m 34.078933,52.797867 v 3.23328 h 3.2 V 52.79808 h -3.2 z m 1.066667,1.099946 h 1.066667 V 54.96448 H 35.1456 Z"
id="path60623-0"
style="stroke-width:1.06666672" />
<path
inkscape:connector-curvature="0"
d="m 34.078933,57.031467 v 3.23328 h 3.2 V 57.03168 h -3.2 z m 1.066667,1.099946 h 1.066667 V 59.19808 H 35.1456 Z"
id="path60625-8"
style="stroke-width:1.06666672" />
<path
inkscape:connector-curvature="0"
d="m 34.078933,61.3312 v 3.23328 h 3.2 v -3.233067 h -3.2 z m 1.066667,1.099947 h 1.066667 v 1.066666 H 35.1456 Z"
id="path60627-3"
style="stroke-width:1.06666672" />
</g>
</g>
<path
inkscape:connector-curvature="0"
d="m -55.925333,54.225067 20.752,-9e-6 -4e-5,-31.982933 -6.91712,8e-6 -1.152853,2.13216 -4.61152,-8e-6 -1.152853,-2.13216 -6.917227,8e-6 2.3e-5,31.982934 z"
id="path60633-7"
style="stroke-width:1.06666672" />
<path
style="fill:url(#f-3);stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -53.6192,52.0928 h 16.139733 V 24.3744 h -3.45856 l -1.152853,2.13216 h -6.917227 L -50.16096,24.3744 h -3.45856 v 27.7184 z"
id="path60635-8" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -62.842667,22.174933 v 6.463147 h 6.917227 v -6.462933 h -6.917227 z m 2.305707,2.198827 h 2.305707 v 2.13216 h -2.305707 z"
id="path60637-2" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -62.842667,30.7712 v 6.463147 h 6.917227 v -6.462934 h -6.917227 z m 2.305707,2.198827 h 2.305707 v 2.13216 h -2.305707 z"
id="path60639-1" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -62.842667,39.233067 v 6.463146 h 6.917227 V 39.23328 h -6.917227 z m 2.305707,2.198826 h 2.305707 v 2.13216 h -2.305707 z"
id="path60641-0" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -62.842667,47.828267 v 6.463146 h 6.917227 V 47.82848 h -6.917227 z m 2.305707,2.198826 h 2.305707 v 2.13216 h -2.305707 z"
id="path60643-5" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -35.173333,22.242133 v 6.463147 h 6.917226 v -6.462933 h -6.917226 z m 2.305706,2.198827 h 2.305707 v 2.13216 h -2.305707 z"
id="path60645-8" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -35.173333,30.837333 v 6.463147 h 6.917226 v -6.462933 h -6.917226 z m 2.305706,2.198827 h 2.305707 v 2.13216 h -2.305707 z"
id="path60647-5" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -35.173333,39.2992 v 6.463147 h 6.917226 v -6.462934 h -6.917226 z m 2.305706,2.198827 h 2.305707 v 2.13216 h -2.305707 z"
id="path60649-5" />
<path
style="fill:#ff7800;stroke-width:1.06666672"
inkscape:connector-curvature="0"
d="m -35.173333,47.8944 v 6.463147 h 6.917226 v -6.462934 h -6.917226 z m 2.305706,2.198827 h 2.305707 v 2.13216 h -2.305707 z"
id="path60651-0" />
</g>
<path
style="fill:none;fill-rule:evenodd;stroke:#006500;stroke-width:1.06666672px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="m 13.287133,12.33687 h 2.641756 v 4.729797"
id="path62336"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#006500;stroke-width:1.06666672px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="M 24.084466,16.837086 V 9.6711115 H 13.303557"
id="path62338"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#006500;stroke-width:1.06666672px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="m 5.12,12.515556 v 6.826667 h 10.808889"
id="path62340"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:#4d4d4d;fill-rule:evenodd;stroke:#808080;stroke-width:1.06666672px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.084445,7.3955559 V 4.5511116 0.56888934"
id="path62342"
inkscape:connector-curvature="0" />
<path
style="fill:#4d4d4d;fill-rule:evenodd;stroke:#808080;stroke-width:1.06666672px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 5.12,4.5511116 H 0.56888889"
id="path62344"
inkscape:connector-curvature="0" />
<path
style="fill:#4d4d4d;fill-rule:evenodd;stroke:#808080;stroke-width:1.06666672px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 5.12,7.3955559 H 0.56888889"
id="path62346"
inkscape:connector-curvature="0" />
<path
style="fill:#4d4d4d;fill-rule:evenodd;stroke:#808080;stroke-width:1.06666672px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 5.12,9.6711115 H 0.56888889"
id="path62348"
inkscape:connector-curvature="0" />
<path
style="fill:#4d4d4d;fill-rule:evenodd;stroke:#808080;stroke-width:1.06834638;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 15.928889,21.923821 v 2.538402"
id="path62350"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:#4d4d4d;fill-rule:evenodd;stroke:#808080;stroke-width:1.06666672px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 23.893333,26.168889 V 23.324445 19.342222"
id="path62342-0"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:#4d4d4d;fill-rule:evenodd;stroke:#808080;stroke-width:1.06666672px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 28.444444,26.168889 H 23.893333"
id="path62348-7"
inkscape:connector-curvature="0" />
</svg>

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -87,10 +87,6 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateAndShowItem( const wxPoint& aPosition, const KIC
SendMessageToPCBNEW( item, component );
break;
case SCH_SHEET_T:
SendMessageToPCBNEW( item, nullptr );
break;
case SCH_COMPONENT_T:
component = (SCH_COMPONENT*) item;
SendMessageToPCBNEW( item, component );
@ -101,6 +97,10 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateAndShowItem( const wxPoint& aPosition, const KIC
component = (SCH_COMPONENT*) LocateItem( aPosition, SCH_COLLECTOR::ComponentsOnly );
break;
/* case SCH_SHEET_T: */
/* // This may lag on larger projects */
/* SendMessageToPCBNEW( item, nullptr ); */
/* break; */
default:
;
}

View File

@ -129,6 +129,7 @@ enum id_eeschema_frm
ID_POPUP_SCH_DISPLAYDOC_CMP,
ID_POPUP_SCH_ENTER_SHEET,
ID_POPUP_SCH_LEAVE_SHEET,
ID_POPUP_SCH_SELECT_ON_PCB,
ID_POPUP_SCH_ADD_JUNCTION,
ID_POPUP_SCH_ADD_LABEL,
ID_POPUP_SCH_ADD_GLABEL,

View File

@ -83,7 +83,8 @@ enum hotkey_id_commnand {
HK_LEAVE_SHEET,
HK_DELETE_NODE,
HK_AUTOPLACE_FIELDS,
HK_UPDATE_PCB_FROM_SCH
HK_UPDATE_PCB_FROM_SCH,
HK_SELECT_ITEMS_ON_PCB
};
// List of hotkey descriptors for Eeschema

View File

@ -762,6 +762,11 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet )
msg = AddHotkeyName( _( "Drag" ), g_Schematic_Hokeys_Descr, HK_DRAG );
AddMenuItem( PopMenu, ID_SCH_DRAG_ITEM, msg, KiBitmap( drag_xpm ) );
PopMenu->AppendSeparator();
msg = AddHotkeyName( _( "Select Items On PCB" ), g_Schematic_Hokeys_Descr, HK_SELECT_ITEMS_ON_PCB );
AddMenuItem( PopMenu, ID_POPUP_SCH_SELECT_ON_PCB, msg, KiBitmap( select_same_sheet_xpm ) );
PopMenu->AppendSeparator();
wxMenu* orientmenu = new wxMenu;
msg = AddHotkeyName( _( "Rotate Clockwise" ), g_Schematic_Hokeys_Descr, HK_ROTATE );
AddMenuItem( orientmenu, ID_SCH_ROTATE_CLOCKWISE, msg, KiBitmap( rotate_cw_xpm ) );

View File

@ -834,6 +834,32 @@ void SCH_EDIT_FRAME::PrepareMoveItem( SCH_ITEM* aItem, wxDC* aDC )
}
void SCH_EDIT_FRAME::SelectAllFromSheet( wxCommandEvent& aEvent )
{
SCH_SCREEN* screen = GetScreen();
SCH_ITEM* item = screen->GetCurItem();
if( item != NULL )
{
item = LocateAndShowItem( item->GetPosition() );
SendMessageToPCBNEW( item, NULL );
}
else
{
// If we didn't get here by a hot key, then something has gone wrong.
if( aEvent.GetInt() == 0 )
return;
EDA_HOTKEY_CLIENT_DATA* data = (EDA_HOTKEY_CLIENT_DATA*) aEvent.GetClientObject();
wxCHECK_RET( data != NULL, wxT( "Invalid hot key client object." ) );
item = LocateAndShowItem( data->GetPosition() );
SendMessageToPCBNEW( item, NULL );
}
}
void SCH_EDIT_FRAME::OnRotate( wxCommandEvent& aEvent )
{
SCH_SCREEN* screen = GetScreen();

View File

@ -233,6 +233,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_MENU( ID_GEN_PLOT_SCHEMATIC, SCH_EDIT_FRAME::PlotSchematic )
EVT_MENU( ID_GEN_COPY_SHEET_TO_CLIPBOARD, EDA_DRAW_FRAME::CopyToClipboard )
EVT_MENU( wxID_EXIT, SCH_EDIT_FRAME::OnExit )
EVT_MENU( ID_POPUP_SCH_SELECT_ON_PCB, SCH_EDIT_FRAME::SelectAllFromSheet )
EVT_MENU( ID_POPUP_SCH_DUPLICATE_ITEM, SCH_EDIT_FRAME::OnCopySchematicItemRequest )

View File

@ -812,6 +812,13 @@ private:
*/
void OnEditItem( wxCommandEvent& aEvent );
/**
* Function SelectAllFromSheet
* handles the #ID_POPUP_SCH_SELECT_ON_PCB event used to select items in pcbnew
* based on the sheet they are placed on.
*/
void SelectAllFromSheet( wxCommandEvent& aEvent );
/**
* Function OnDragItem
* handles the #ID_SCH_DRAG_ITEM event used to drag schematic itams.

View File

@ -437,6 +437,7 @@ EXTERN_BITMAP( save_xpm )
EXTERN_BITMAP( select_grid_xpm )
EXTERN_BITMAP( select_layer_pair_xpm )
EXTERN_BITMAP( select_w_layer_xpm )
EXTERN_BITMAP( select_same_sheet_xpm )
EXTERN_BITMAP( sheetset_xpm )
EXTERN_BITMAP( setcolor_3d_bg_xpm )
EXTERN_BITMAP( setcolor_silkscreen_xpm )

View File

@ -32,6 +32,7 @@
#include <limits.h>
#include <algorithm>
#include <iterator>
#include <fctsys.h>
#include <common.h>
@ -1560,6 +1561,24 @@ D_PAD* BOARD::GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint )
}
return NULL;
}
std::list<TRACK*> BOARD::GetTracksByPosition( const wxPoint& aPosition, PCB_LAYER_ID aLayer ) const
{
std::list<TRACK*> tracks;
for( TRACK* track = GetFirstTrack( m_Track ); track; track = GetFirstTrack( track->Next() ) )
{
if( ( ( track->GetStart() == aPosition ) || track->GetEnd() == aPosition ) &&
( track->GetState( BUSY | IS_DELETED ) == 0 ) &&
( ( aLayer == UNDEFINED_LAYER ) || ( track->IsOnLayer( aLayer ) ) ) )
tracks.push_back( track );
}
return tracks;
}

View File

@ -1151,6 +1151,16 @@ public:
VIA* GetViaByPosition( const wxPoint& aPosition,
PCB_LAYER_ID aLayer = PCB_LAYER_ID( -1 ) ) const;
/**
* Function GetTracksByPosition
* finds the list of tracks that starts or ends at \a aPosition on \a aLayer.
*
* @param aPosition The wxPoint to check start agains against.
* @param aLayer The layer to search. Use -1 (<PCB_LAYER_ID>::UNDEFINED_LAYER) for a don't care.
* @return std::list<TRACK*> A list of TRACK* items that can be zero if no track is found.
*/
std::list<TRACK*> GetTracksByPosition( const wxPoint& aPosition, PCB_LAYER_ID aLayer = PCB_LAYER_ID( -1 ) ) const;
/**
* Function GetPad
* finds a pad \a aPosition on \a aLayer.

View File

@ -499,4 +499,18 @@ inline VIA* GetFirstVia( TRACK* aTrk, const TRACK* aStopPoint = NULL )
return NULL;
}
/// Scan a track list for the first TRACK object. Returns NULL if not found (or NULL passed)
inline TRACK* GetFirstTrack( TRACK* aTrk, const TRACK* aStopPoint = NULL )
{
while( aTrk && ( aTrk != aStopPoint ) && ( aTrk->Type() != PCB_TRACE_T ) )
aTrk = aTrk->Next();
// It could stop because of the stop point, not on a via
if( aTrk && ( aTrk->Type() == PCB_TRACE_T ) )
return static_cast<TRACK*>( aTrk );
else
return NULL;
}
#endif // CLASS_TRACK_H

View File

@ -897,6 +897,7 @@ void SELECTION_TOOL::selectAllItemsOnSheet( wxString& aSheetpath )
//Generate a list of all pads, and of all nets they belong to.
std::list<int> netcodeList;
std::list<BOARD_CONNECTED_ITEM*> padList;
for( MODULE* mmod : modList )
{
for( auto pad : mmod->Pads() )
@ -904,14 +905,27 @@ void SELECTION_TOOL::selectAllItemsOnSheet( wxString& aSheetpath )
if( pad->IsConnected() )
{
netcodeList.push_back( pad->GetNetCode() );
padList.push_back( pad );
}
}
}
// remove all duplicates
netcodeList.sort();
netcodeList.unique();
// auto select trivial connections segments which are launched from the pads
std::list<TRACK*> launchTracks;
for( auto pad : padList )
{
launchTracks = board()->GetTracksByPosition( pad->GetPosition() );
for( auto track : launchTracks )
{
selectAllItemsConnectedToTrack( *track );
}
}
// now we need to find all modules that are connected to each of these nets
// then we need to determine if these modules are in the list of modules
// belonging to this sheet ( modList )