Commit 721cdc48 authored by jean-pierre charras's avatar jean-pierre charras

Pcbnew: connect.cpp: enhanced ( faster and more powerful ) algorithm to...

Pcbnew: connect.cpp: enhanced ( faster and more powerful ) algorithm to calculate connections between pads.
Code cleaning.
parent 3541335a
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48" version="1.0" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<linearGradient id="ay" y2="7.0165" gradientUnits="userSpaceOnUse" x2="45.448" gradientTransform="scale(1.0059 .99417)" y1="92.54" x1="45.448">
<stop offset="0"/>
<stop stop-opacity=".58824" offset="1"/>
</linearGradient>
<filter id="ba" color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="1.71"/>
<?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:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="48"
width="48"
version="1.0"
id="svg2"
inkscape:version="0.48.1 "
sodipodi:docname="tree_nosel.svg">
<metadata
id="metadata305">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</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="640"
inkscape:window-height="480"
id="namedview303"
showgrid="true"
inkscape:zoom="6.4360702"
inkscape:cx="24.828895"
inkscape:cy="23.289671"
inkscape:window-x="119"
inkscape:window-y="105"
inkscape:window-maximized="0"
inkscape:current-layer="svg2">
<inkscape:grid
type="xygrid"
id="grid3282"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
empcolor="#a0a0ff"
empopacity="0.25098039"
dotted="false"
color="#5d5dff"
opacity="0.1254902" />
</sodipodi:namedview>
<defs
id="defs4">
<linearGradient
id="ay"
y2="7.0165"
gradientUnits="userSpaceOnUse"
x2="45.448"
gradientTransform="scale(1.0059 .99417)"
y1="92.54"
x1="45.448">
<stop
offset="0"
id="stop7" />
<stop
stop-opacity=".58824"
offset="1"
id="stop9" />
</linearGradient>
<filter
id="ba"
color-interpolation-filters="sRGB">
<feGaussianBlur
stdDeviation="1.71"
id="feGaussianBlur12" />
</filter>
<linearGradient id="a">
<stop stop-color="#9f9e7d" offset="0"/>
<stop stop-color="#9f9e7d" stop-opacity="0" offset="1"/>
</linearGradient>
<linearGradient id="bd" y2="38.033" gradientUnits="userSpaceOnUse" x2="79.007" gradientTransform="matrix(1.5526 -.40855 .40858 1.4975 -13.1 -83.236)" y1="21.664" x1="83.315">
<stop stop-color="#ffe119" offset="0"/>
<stop stop-color="#f7a700" offset="1"/>
</linearGradient>
<linearGradient id="be" y2="42.017" gradientUnits="userSpaceOnUse" x2="89.412" gradientTransform="matrix(1.5526 -.40855 .40858 1.4975 -13.1 -83.236)" y1="23.504" x1="91.968">
<stop stop-color="#fff1b7" offset="0"/>
<stop stop-color="#ad6100" offset="1"/>
</linearGradient>
<linearGradient id="bf" y2="43.082" xlink:href="#a" gradientUnits="userSpaceOnUse" x2="85.196" gradientTransform="matrix(2.1696 -.57092 .57097 2.0927 -72.664 -88.008)" y1="24.087" x1="90.195"/>
<linearGradient id="bg" y2="38.724" gradientUnits="userSpaceOnUse" x2="79.935" gradientTransform="matrix(1.5526 -.40855 .40858 1.4975 -13.1 -40.199)" y1="21.771" x1="84.397">
<stop stop-color="#2bca00" offset="0"/>
<stop stop-color="#1e9000" offset="1"/>
</linearGradient>
<linearGradient id="bh" y2="41.144" gradientUnits="userSpaceOnUse" x2="85.706" gradientTransform="matrix(1.5526 -.40855 .40858 1.4975 -13.1 -40.199)" y1="23.092" x1="90.457">
<stop stop-color="#57ff0c" offset="0"/>
<stop stop-color="#004617" offset="1"/>
</linearGradient>
<linearGradient id="bi" y2="43.082" xlink:href="#a" gradientUnits="userSpaceOnUse" x2="85.196" gradientTransform="matrix(2.1696 -.57092 .57097 2.0927 -72.672 -44.971)" y1="24.087" x1="90.195"/>
<linearGradient id="bj" y2="39.307" gradientUnits="userSpaceOnUse" x2="80.337" gradientTransform="matrix(1.5526 -.40855 .40858 1.4975 -13.101 37.246)" y1="21.561" x1="85.007">
<stop stop-color="#006ada" offset="0"/>
<stop stop-color="#00438a" offset="1"/>
</linearGradient>
<linearGradient id="bk" y2="41.359" gradientUnits="userSpaceOnUse" x2="86.898" gradientTransform="matrix(1.5526 -.40855 .40858 1.4975 -13.101 37.246)" y1="23.41" x1="91.622">
<stop stop-color="#67b1ff" offset="0"/>
<stop stop-color="#001a35" offset="1"/>
</linearGradient>
<linearGradient id="bl" y2="43.082" xlink:href="#a" gradientUnits="userSpaceOnUse" x2="85.196" gradientTransform="matrix(2.1696 -.57092 .57097 2.0927 -72.672 32.474)" y1="24.087" x1="90.195"/>
<linearGradient id="bm" y2="114.04" xlink:href="#a" gradientUnits="userSpaceOnUse" x2="78.803" y1="101.97" x1="78.803"/>
<linearGradient id="ar" y2="112" gradientUnits="userSpaceOnUse" x2="78" gradientTransform="matrix(0.75,0,0,0.75,-2.0895e-6,-1)" y1="104" x1="78">
<stop stop-color="#706f6b" offset="0"/>
<stop stop-color="#51504e" offset="1"/>
</linearGradient>
<linearGradient id="as" y2="107.94" gradientUnits="userSpaceOnUse" x2="79.067" gradientTransform="matrix(0.75,0,0,0.75,-2.0895e-6,-1)" y1="104.35" x1="79.067">
<stop stop-color="#fff" offset="0"/>
<stop stop-color="#fff" stop-opacity="0" offset="1"/>
</linearGradient>
<linearGradient id="at" y2="96.645" gradientUnits="userSpaceOnUse" x2="110.64" y1="92.773" x1="110.64">
<stop stop-color="#858362" offset="0"/>
<stop stop-color="#fff" offset="1"/>
</linearGradient>
<linearGradient id="au" y2="43.082" xlink:href="#a" gradientUnits="userSpaceOnUse" x2="85.196" y1="24.087" x1="90.195"/>
<linearGradient id="av" y2="38.933" gradientUnits="userSpaceOnUse" x2="79.88" y1="21.771" x1="84.397">
<stop stop-color="#fd2306" offset="0"/>
<stop stop-color="#b31602" offset="1"/>
</linearGradient>
<linearGradient id="aw" y2="41.015" gradientUnits="userSpaceOnUse" x2="85.74" y1="23.092" x1="90.457">
<stop stop-color="#fe774b" offset="0"/>
<stop stop-color="#610601" offset="1"/>
</linearGradient>
<linearGradient id="ax" y2="45.017" gradientUnits="userSpaceOnUse" x2="20.759" gradientTransform="matrix(.83721 0 0 .83721 107.91 38.744)" y1="1" x1="20.759">
<stop stop-color="#f0f0f0" offset="0"/>
<stop stop-color="#aaa" offset="1"/>
</linearGradient>
<clipPath id="az">
<path display="block" fill="url(#linearGradient3774)" d="m30.916 135.97c-0.93726 0.54113-1.2283 1.7475-0.67792 2.7008l1.9375 3.3558c-1.4181 1.4141-2.6223 3.012-3.5955 4.71l-3.7836-0.99094c-0.53163-0.14245-1.0379-0.11751-1.4762 0.13061-0.43816 0.24835-0.79654 0.66758-0.9366 1.1903l-1.9788 7.3851c-0.2801 1.0454 0.36595 2.0654 1.4291 2.3503l3.7722 1.0336c-0.0062 1.9571 0.23771 3.943 0.75875 5.8767l-3.3558 1.9375c-0.95328 0.55038-1.3044 1.7407-0.7633 2.6779l3.8125 6.6034c0.54113 0.93726 1.7475 1.2283 2.7008 0.67792l3.3558-1.9375c1.4141 1.4181 3.012 2.6223 4.71 3.5954l-0.99094 3.7836c-0.2849 1.0632 0.27544 2.1327 1.3209 2.4128l7.3851 1.9788c1.0454 0.28012 2.0654-0.36588 2.3503-1.4291l1.0336-3.7722c1.9571 0.006 3.943-0.2377 5.8767-0.75875l1.9375 3.3558c0.55038 0.95327 1.7407 1.3044 2.6779 0.7633l6.6034-3.8125c0.93726-0.54113 1.2283-1.7475 0.67792-2.7008l-1.9375-3.3558c1.4181-1.4141 2.6223-3.012 3.5955-4.71l3.7836 0.99095c1.0632 0.28489 2.1327-0.2755 2.4128-1.3209l1.9788-7.3851c0.2801-1.0454-0.36595-2.0654-1.4291-2.3503l-3.7722-1.0336c0.0062-1.9571-0.2377-3.943-0.75876-5.8767l3.3558-1.9375c0.95327-0.55037 1.3044-1.7407 0.7633-2.6779l-3.8125-6.6034c-0.54113-0.93727-1.7475-1.2283-2.7008-0.67793l-3.3558 1.9375c-1.4141-1.4181-3.012-2.6223-4.71-3.5954l0.99094-3.7836c0.2849-1.0632-0.27542-2.1328-1.3209-2.4128l-7.3851-1.9788c-1.0454-0.28011-2.0654 0.36588-2.3503 1.4291l-1.0336 3.7722c-1.9571-0.006-3.943 0.23771-5.8767 0.75876l-1.9375-3.3558c-0.55038-0.95329-1.7407-1.3044-2.6779-0.7633l-6.6034 3.8125zm13.052 14.981c3.8263-2.2091 8.7191-0.89814 10.928 2.9282 2.2091 3.8263 0.89814 8.7191-2.9282 10.928-3.8263 2.2091-8.7191 0.89814-10.928-2.9282-2.2091-3.8264-0.89814-8.7191 2.9282-10.928z"/>
<linearGradient
id="a">
<stop
stop-color="#9f9e7d"
offset="0"
id="stop15" />
<stop
stop-color="#9f9e7d"
stop-opacity="0"
offset="1"
id="stop17" />
</linearGradient>
<linearGradient
id="bd"
y2="38.033"
gradientUnits="userSpaceOnUse"
x2="79.007"
gradientTransform="matrix(1.5526 -.40855 .40858 1.4975 -13.1 -83.236)"
y1="21.664"
x1="83.315">
<stop
stop-color="#ffe119"
offset="0"
id="stop20" />
<stop
stop-color="#f7a700"
offset="1"
id="stop22" />
</linearGradient>
<linearGradient
id="be"
y2="42.017"
gradientUnits="userSpaceOnUse"
x2="89.412"
gradientTransform="matrix(1.5526 -.40855 .40858 1.4975 -13.1 -83.236)"
y1="23.504"
x1="91.968">
<stop
stop-color="#fff1b7"
offset="0"
id="stop25" />
<stop
stop-color="#ad6100"
offset="1"
id="stop27" />
</linearGradient>
<linearGradient
id="bf"
y2="43.082"
xlink:href="#a"
gradientUnits="userSpaceOnUse"
x2="85.196"
gradientTransform="matrix(2.1696 -.57092 .57097 2.0927 -72.664 -88.008)"
y1="24.087"
x1="90.195" />
<linearGradient
id="bg"
y2="38.724"
gradientUnits="userSpaceOnUse"
x2="79.935"
gradientTransform="matrix(1.5526 -.40855 .40858 1.4975 -13.1 -40.199)"
y1="21.771"
x1="84.397">
<stop
stop-color="#2bca00"
offset="0"
id="stop31" />
<stop
stop-color="#1e9000"
offset="1"
id="stop33" />
</linearGradient>
<linearGradient
id="bh"
y2="41.144"
gradientUnits="userSpaceOnUse"
x2="85.706"
gradientTransform="matrix(1.5526 -.40855 .40858 1.4975 -13.1 -40.199)"
y1="23.092"
x1="90.457">
<stop
stop-color="#57ff0c"
offset="0"
id="stop36" />
<stop
stop-color="#004617"
offset="1"
id="stop38" />
</linearGradient>
<linearGradient
id="bi"
y2="43.082"
xlink:href="#a"
gradientUnits="userSpaceOnUse"
x2="85.196"
gradientTransform="matrix(2.1696 -.57092 .57097 2.0927 -72.672 -44.971)"
y1="24.087"
x1="90.195" />
<linearGradient
id="bj"
y2="39.307"
gradientUnits="userSpaceOnUse"
x2="80.337"
gradientTransform="matrix(1.5526 -.40855 .40858 1.4975 -13.101 37.246)"
y1="21.561"
x1="85.007">
<stop
stop-color="#006ada"
offset="0"
id="stop42" />
<stop
stop-color="#00438a"
offset="1"
id="stop44" />
</linearGradient>
<linearGradient
id="bk"
y2="41.359"
gradientUnits="userSpaceOnUse"
x2="86.898"
gradientTransform="matrix(1.5526 -.40855 .40858 1.4975 -13.101 37.246)"
y1="23.41"
x1="91.622">
<stop
stop-color="#67b1ff"
offset="0"
id="stop47" />
<stop
stop-color="#001a35"
offset="1"
id="stop49" />
</linearGradient>
<linearGradient
id="bl"
y2="43.082"
xlink:href="#a"
gradientUnits="userSpaceOnUse"
x2="85.196"
gradientTransform="matrix(2.1696 -.57092 .57097 2.0927 -72.672 32.474)"
y1="24.087"
x1="90.195" />
<linearGradient
id="bm"
y2="114.04"
xlink:href="#a"
gradientUnits="userSpaceOnUse"
x2="78.803"
y1="101.97"
x1="78.803" />
<linearGradient
id="ar"
y2="112"
gradientUnits="userSpaceOnUse"
x2="78"
gradientTransform="matrix(0.75,0,0,0.75,-2.0895e-6,-1)"
y1="104"
x1="78">
<stop
stop-color="#706f6b"
offset="0"
id="stop54" />
<stop
stop-color="#51504e"
offset="1"
id="stop56" />
</linearGradient>
<linearGradient
id="as"
y2="107.94"
gradientUnits="userSpaceOnUse"
x2="79.067"
gradientTransform="matrix(0.75,0,0,0.75,-2.0895e-6,-1)"
y1="104.35"
x1="79.067">
<stop
stop-color="#fff"
offset="0"
id="stop59" />
<stop
stop-color="#fff"
stop-opacity="0"
offset="1"
id="stop61" />
</linearGradient>
<linearGradient
id="at"
y2="96.645"
gradientUnits="userSpaceOnUse"
x2="110.64"
y1="92.773"
x1="110.64">
<stop
stop-color="#858362"
offset="0"
id="stop64" />
<stop
stop-color="#fff"
offset="1"
id="stop66" />
</linearGradient>
<linearGradient
id="au"
y2="43.082"
xlink:href="#a"
gradientUnits="userSpaceOnUse"
x2="85.196"
y1="24.087"
x1="90.195" />
<linearGradient
id="av"
y2="38.933"
gradientUnits="userSpaceOnUse"
x2="79.88"
y1="21.771"
x1="84.397">
<stop
stop-color="#fd2306"
offset="0"
id="stop70" />
<stop
stop-color="#b31602"
offset="1"
id="stop72" />
</linearGradient>
<linearGradient
id="aw"
y2="41.015"
gradientUnits="userSpaceOnUse"
x2="85.74"
y1="23.092"
x1="90.457">
<stop
stop-color="#fe774b"
offset="0"
id="stop75" />
<stop
stop-color="#610601"
offset="1"
id="stop77" />
</linearGradient>
<linearGradient
id="ax"
y2="45.017"
gradientUnits="userSpaceOnUse"
x2="20.759"
gradientTransform="matrix(.83721 0 0 .83721 107.91 38.744)"
y1="1"
x1="20.759">
<stop
stop-color="#f0f0f0"
offset="0"
id="stop80" />
<stop
stop-color="#aaa"
offset="1"
id="stop82" />
</linearGradient>
<clipPath
id="az">
<path
display="block"
fill="url(#linearGradient3774)"
d="m30.916 135.97c-0.93726 0.54113-1.2283 1.7475-0.67792 2.7008l1.9375 3.3558c-1.4181 1.4141-2.6223 3.012-3.5955 4.71l-3.7836-0.99094c-0.53163-0.14245-1.0379-0.11751-1.4762 0.13061-0.43816 0.24835-0.79654 0.66758-0.9366 1.1903l-1.9788 7.3851c-0.2801 1.0454 0.36595 2.0654 1.4291 2.3503l3.7722 1.0336c-0.0062 1.9571 0.23771 3.943 0.75875 5.8767l-3.3558 1.9375c-0.95328 0.55038-1.3044 1.7407-0.7633 2.6779l3.8125 6.6034c0.54113 0.93726 1.7475 1.2283 2.7008 0.67792l3.3558-1.9375c1.4141 1.4181 3.012 2.6223 4.71 3.5954l-0.99094 3.7836c-0.2849 1.0632 0.27544 2.1327 1.3209 2.4128l7.3851 1.9788c1.0454 0.28012 2.0654-0.36588 2.3503-1.4291l1.0336-3.7722c1.9571 0.006 3.943-0.2377 5.8767-0.75875l1.9375 3.3558c0.55038 0.95327 1.7407 1.3044 2.6779 0.7633l6.6034-3.8125c0.93726-0.54113 1.2283-1.7475 0.67792-2.7008l-1.9375-3.3558c1.4181-1.4141 2.6223-3.012 3.5955-4.71l3.7836 0.99095c1.0632 0.28489 2.1327-0.2755 2.4128-1.3209l1.9788-7.3851c0.2801-1.0454-0.36595-2.0654-1.4291-2.3503l-3.7722-1.0336c0.0062-1.9571-0.2377-3.943-0.75876-5.8767l3.3558-1.9375c0.95327-0.55037 1.3044-1.7407 0.7633-2.6779l-3.8125-6.6034c-0.54113-0.93727-1.7475-1.2283-2.7008-0.67793l-3.3558 1.9375c-1.4141-1.4181-3.012-2.6223-4.71-3.5954l0.99094-3.7836c0.2849-1.0632-0.27542-2.1328-1.3209-2.4128l-7.3851-1.9788c-1.0454-0.28011-2.0654 0.36588-2.3503 1.4291l-1.0336 3.7722c-1.9571-0.006-3.943 0.23771-5.8767 0.75876l-1.9375-3.3558c-0.55038-0.95329-1.7407-1.3044-2.6779-0.7633l-6.6034 3.8125zm13.052 14.981c3.8263-2.2091 8.7191-0.89814 10.928 2.9282 2.2091 3.8263 0.89814 8.7191-2.9282 10.928-3.8263 2.2091-8.7191 0.89814-10.928-2.9282-2.2091-3.8264-0.89814-8.7191 2.9282-10.928z"
id="path85" />
</clipPath>
<linearGradient id="aj" y2="66.233" xlink:href="#ai" gradientUnits="userSpaceOnUse" x2="126.14" y1="48.047" x1="48.234"/>
<linearGradient id="ai">
<stop offset="0"/>
<stop stop-opacity="0" offset="1"/>
</linearGradient>
<linearGradient id="ak" y2="62.839" xlink:href="#ai" gradientUnits="userSpaceOnUse" x2="126.67" y1="48.032" x1="48.055"/>
<linearGradient id="al" y2="60.29" xlink:href="#ai" gradientUnits="userSpaceOnUse" x2="127.05" y1="48.029" x1="47.997"/>
<linearGradient id="am" y2="57.665" xlink:href="#ai" gradientUnits="userSpaceOnUse" x2="127.42" y1="48.029" x1="47.998"/>
<linearGradient id="an" y2="66.233" xlink:href="#ah" gradientUnits="userSpaceOnUse" x2="126.14" y1="48.047" x1="48.234"/>
<linearGradient id="ah">
<stop stop-color="#fff" offset="0"/>
<stop stop-color="#fff" stop-opacity="0" offset="1"/>
</linearGradient>
<linearGradient id="ao" y2="62.839" xlink:href="#ah" gradientUnits="userSpaceOnUse" x2="126.67" y1="48.032" x1="48.055"/>
<linearGradient id="ap" y2="60.29" xlink:href="#ah" gradientUnits="userSpaceOnUse" x2="127.05" y1="48.029" x1="47.997"/>
<linearGradient id="aq" y2="57.665" xlink:href="#ah" gradientUnits="userSpaceOnUse" x2="127.42" y1="48.029" x1="47.998"/>
<linearGradient id="bc" y2="39.685" gradientUnits="userSpaceOnUse" x2="34.534" gradientTransform="matrix(.92364 0 0 .82548 8.343 11.456)" y1="12.285" x1="14.463">
<stop stop-color="#c9c9c9" offset="0"/>
<stop stop-color="#f8f8f8" offset=".25"/>
<stop stop-color="#e2e2e2" offset=".5"/>
<stop stop-color="#b0b0b0" offset=".75"/>
<stop stop-color="#c9c9c9" offset="1"/>
</linearGradient>
<linearGradient id="bb" y2="6.7758" gradientUnits="userSpaceOnUse" x2="20.631" gradientTransform="matrix(.98748 0 0 1.0024 -121.03 -23.389)" y1="42.254" x1="19.648">
<stop stop-color="#b6b6b6" offset="0"/>
<stop stop-color="#f2f2f2" offset=".5"/>
<stop stop-color="#fafafa" offset=".67613"/>
<stop stop-color="#d8d8d8" offset=".84052"/>
<stop stop-color="#f2f2f2" offset=".875"/>
<stop stop-color="#dbdbdb" offset="1"/>
<linearGradient
id="aj"
y2="66.233"
xlink:href="#ai"
gradientUnits="userSpaceOnUse"
x2="126.14"
y1="48.047"
x1="48.234" />
<linearGradient
id="ai">
<stop
offset="0"
id="stop89" />
<stop
stop-opacity="0"
offset="1"
id="stop91" />
</linearGradient>
<linearGradient
id="ak"
y2="62.839"
xlink:href="#ai"
gradientUnits="userSpaceOnUse"
x2="126.67"
y1="48.032"
x1="48.055" />
<linearGradient
id="al"
y2="60.29"
xlink:href="#ai"
gradientUnits="userSpaceOnUse"
x2="127.05"
y1="48.029"
x1="47.997" />
<linearGradient
id="am"
y2="57.665"
xlink:href="#ai"
gradientUnits="userSpaceOnUse"
x2="127.42"
y1="48.029"
x1="47.998" />
<linearGradient
id="an"
y2="66.233"
xlink:href="#ah"
gradientUnits="userSpaceOnUse"
x2="126.14"
y1="48.047"
x1="48.234" />
<linearGradient
id="ah">
<stop
stop-color="#fff"
offset="0"
id="stop98" />
<stop
stop-color="#fff"
stop-opacity="0"
offset="1"
id="stop100" />
</linearGradient>
<linearGradient
id="ao"
y2="62.839"
xlink:href="#ah"
gradientUnits="userSpaceOnUse"
x2="126.67"
y1="48.032"
x1="48.055" />
<linearGradient
id="ap"
y2="60.29"
xlink:href="#ah"
gradientUnits="userSpaceOnUse"
x2="127.05"
y1="48.029"
x1="47.997" />
<linearGradient
id="aq"
y2="57.665"
xlink:href="#ah"
gradientUnits="userSpaceOnUse"
x2="127.42"
y1="48.029"
x1="47.998" />
<linearGradient
id="bc"
y2="39.685"
gradientUnits="userSpaceOnUse"
x2="34.534"
gradientTransform="matrix(.92364 0 0 .82548 8.343 11.456)"
y1="12.285"
x1="14.463">
<stop
stop-color="#c9c9c9"
offset="0"
id="stop106" />
<stop
stop-color="#f8f8f8"
offset=".25"
id="stop108" />
<stop
stop-color="#e2e2e2"
offset=".5"
id="stop110" />
<stop
stop-color="#b0b0b0"
offset=".75"
id="stop112" />
<stop
stop-color="#c9c9c9"
offset="1"
id="stop114" />
</linearGradient>
<linearGradient
id="bb"
y2="6.7758"
gradientUnits="userSpaceOnUse"
x2="20.631"
gradientTransform="matrix(.98748 0 0 1.0024 -121.03 -23.389)"
y1="42.254"
x1="19.648">
<stop
stop-color="#b6b6b6"
offset="0"
id="stop117" />
<stop
stop-color="#f2f2f2"
offset=".5"
id="stop119" />
<stop
stop-color="#fafafa"
offset=".67613"
id="stop121" />
<stop
stop-color="#d8d8d8"
offset=".84052"
id="stop123" />
<stop
stop-color="#f2f2f2"
offset=".875"
id="stop125" />
<stop
stop-color="#dbdbdb"
offset="1"
id="stop127" />
</linearGradient>
</defs>
<path opacity=".64773" style="color:#000000" d="m36.719 30.555a5.7412 5.1311 0 0 1 -11.482 0 5.7412 5.1311 0 1 1 11.482 0z" stroke="#fff" stroke-width=".70308" fill="none"/>
<path opacity=".34659" style="color:#000000" d="m29.6 16.789-0.65312 3.8411c-1.2427 0.25294-3.5287 1.0265-4.5805 1.6098l-3.4746-2.3178c-0.92455 0.64151-0.98796 0.68502-1.7273 1.4953l2.5123 3.33c-0.72096 0.98468-1.5869 2.7394-1.8978 3.9934 0 0-4.4023 0.66324-4.4023 0.66324-0.07567 0.55238-0.0393 1.7347 0.01162 2.1896l4.2051 0.67702c0.29437 1.2846 1.396 3.3523 2.1762 4.4114l-2.6592 3.1399c0.70499 0.7822 0.84609 0.85378 1.7235 1.4816l3.5558-2.3282c1.2181 0.69448 3.636 1.5393 5.11 1.7791l0.58358 3.7928c0.4644 0.03778 1.7473 0.14376 2.3958 0.06914l0.65312-3.9482c1.3995-0.31126 3.8176-1.1984 4.9593-1.9242l3.552 2.2936c0.87-0.66151 0.87779-0.76119 1.5649-1.5783l-2.633-3.344c0.66075-1.0199 1.5151-3.0144 1.7471-4.218l4.3095-0.63906c0.03611-0.38399 0.03786-1.4548-0.06954-2.11l-4.389-0.678c-0.32777-1.0817-1.4526-3.0309-2.1337-3.9382l2.7907-3.1399c-0.76302-0.83397-1.0467-0.9484-2.0056-1.6024l-3.6756 2.3524c-1.0206-0.53943-3.0556-1.3617-4.248-1.596l-0.64931-3.7582c-0.59483-0.06254-2.311-0.03477-2.6509 0z" stroke="#fff" stroke-width=".70308" fill="none"/>
<g transform="matrix(.81279 0 0 .82971 -84.015 -37.181)">
<g transform="translate(-60,16)">
<path opacity=".05" d="m126 38.469c-1.8584 0-3.2812 1.5681-3.2812 3.3438v1.1875c-0.36268 0.13513-0.71008 0.30878-1.0625 0.46875l-0.875-0.875c-0.5657-0.56571-1.3669-0.99198-2.3125-1-0.82395-0.007-1.699 0.29275-2.375 0.96875l-3.5312 3.5312c-1.3106 1.3106-1.2411 3.415 0.0313 4.6875l0.875 0.875c-0.15997 0.35242-0.33362 0.69982-0.46875 1.0625h-1.1875c-1.7756 0-3.3438 1.4228-3.3438 3.2812v5c0 1.8584 1.5681 3.2812 3.3438 3.2812h1.1875c0.13513 0.36268 0.30878 0.71008 0.46875 1.0625l-0.875 0.875c-1.2725 1.2725-1.3419 3.377-0.0313 4.6875l3.5312 3.5312c1.3105 1.3105 3.415 1.2413 4.6875-0.03125l0.875-0.875c0.35242 0.15997 0.69982 0.33362 1.0625 0.46875v1.1875c0 1.7756 1.4228 3.3438 3.2812 3.3438h5c1.8584 0 3.2812-1.5681 3.2812-3.3438v-1.1875c0.36268-0.13513 0.71008-0.30878 1.0625-0.46875l0.875 0.875c1.2726 1.2725 3.377 1.3418 4.6875 0.03125l3.5312-3.5312c1.3106-1.3106 1.2411-3.415-0.0313-4.6875l-0.875-0.875c0.15997-0.35242 0.33362-0.69982 0.46875-1.0625h1.1875c1.7756 0 3.3438-1.4228 3.3438-3.2812v-5c0-1.8584-1.5681-3.2812-3.3438-3.2812h-1.1875c-0.13513-0.36268-0.30878-0.71008-0.46875-1.0625l0.875-0.875c1.2725-1.2725 1.342-3.3769 0.0313-4.6875l-3.5312-3.5312c-1.3105-1.3105-3.415-1.2413-4.6875 0.03125l-0.875 0.875c-0.35-0.16-0.7-0.334-1.06-0.469v-1.1875c0-1.7756-1.4228-3.3438-3.2812-3.3438h-5zm2.5 16.812c1.7874 0 3.2188 1.4313 3.2188 3.2188 0 1.7874-1.4313 3.2188-3.2188 3.2188-1.7874 0-3.2188-1.4313-3.2188-3.2188 0-1.7874 1.4313-3.2188 3.2188-3.2188z" transform="translate(-.5 .5)" display="block"/>
<path opacity=".15" d="m126 39.5c-1.2683 0-2.25 1.0884-2.25 2.3125v1.875c-0.81272 0.26478-1.5968 0.58312-2.3438 0.96875l-1.35-1.344c-0.38667-0.38668-0.96689-0.68219-1.5938-0.6875-0.5946-0.005-1.1882 0.18823-1.6562 0.65625l-3.5312 3.5312c-0.89095 0.89096-0.84049 2.3782 0.0313 3.25l1.3438 1.3438c-0.38563 0.74697-0.70397 1.531-0.96875 2.3438h-1.875c-1.2241 0-2.3125 0.98174-2.3125 2.25v5c0 1.2683 1.0884 2.25 2.3125 2.25h1.875c0.26478 0.81272 0.58312 1.5968 0.96875 2.3438l-1.3438 1.3438c-0.87182 0.87182-0.92228 2.3591-0.0313 3.25l3.5312 3.5312c0.89093 0.89094 2.3782 0.8406 3.25-0.03125l1.3438-1.3438c0.74697 0.38563 1.531 0.70397 2.3438 0.96875v1.875c0 1.2241 0.98174 2.3125 2.25 2.3125h5c1.2683 0 2.25-1.0884 2.25-2.3125v-1.875c0.81272-0.26478 1.5968-0.58312 2.3438-0.96875l1.3438 1.3438c0.87184 0.87184 2.3591 0.92218 3.25 0.03125l3.5312-3.5312c0.89095-0.89096 0.84047-2.3782-0.0313-3.25l-1.3438-1.3438c0.38563-0.74696 0.70397-1.531 0.96875-2.3438h1.875c1.2241 0 2.3125-0.98172 2.3125-2.25v-5c0-1.2683-1.0884-2.25-2.3125-2.25h-1.875c-0.26478-0.81272-0.58312-1.5968-0.96875-2.3438l1.3438-1.3438c0.87182-0.87181 0.9223-2.3591 0.0313-3.25l-3.5312-3.5312c-0.89093-0.89094-2.3782-0.84059-3.25 0.03125l-1.3438 1.3438c-0.73-0.385-1.52-0.704-2.33-0.968v-1.875c0-1.225-0.98-2.313-2.25-2.313h-5zm2.5 14.75c2.3457 0 4.25 1.9043 4.25 4.25s-1.9043 4.25-4.25 4.25-4.25-1.9043-4.25-4.25 1.9043-4.25 4.25-4.25z" transform="translate(-.5 .5)" display="block"/>
<path opacity=".3" display="block" d="m125.5 41c-0.70838 0-1.2682 0.5886-1.2682 1.3091v2.5364c-1.2666 0.33748-2.4722 0.84915-3.5795 1.4932l-1.8205-1.8c-0.25473-0.25473-0.54989-0.4063-0.87954-0.40909-0.32965-0.0028-0.67001 0.11773-0.92046 0.36818l-3.5386 3.5386c-0.5009 0.5009-0.46851 1.2905 0.0409 1.8l1.8 1.8205c-0.64403 1.1074-1.1557 2.3129-1.4932 3.5795h-2.5364c-0.72049 0-1.3091 0.5598-1.3091 1.2682v4.9909c0 0.70838 0.5886 1.2682 1.3091 1.2682h2.5364c0.33749 1.2666 0.84916 2.4722 1.4932 3.5795l-1.8 1.8205c-0.50947 0.50946-0.54186 1.2991-0.0409 1.8l3.5386 3.5386c0.5009 0.5009 1.2905 0.46856 1.8-0.04091l1.8205-1.8c1.1074 0.64403 2.3129 1.1557 3.5795 1.4932v2.5364c0 0.72049 0.5598 1.3091 1.2682 1.3091h4.9909c0.70838 0 1.2682-0.5886 1.2682-1.3091v-2.5364c1.2666-0.33748 2.4722-0.84915 3.5796-1.4932l1.8204 1.8c0.50947 0.50947 1.2991 0.54181 1.8 0.04091l3.5386-3.5386c0.5009-0.5009 0.4685-1.2905-0.0409-1.8l-1.8-1.8205c0.64403-1.1074 1.1557-2.3129 1.4932-3.5795h2.5364c0.72048 0 1.3091-0.5598 1.3091-1.2682v-4.9909c0-0.70838-0.58861-1.2682-1.3091-1.2682h-2.54c-0.33748-1.2666-0.84915-2.4722-1.4932-3.5795l1.8-1.8205c0.50947-0.50947 0.54187-1.2991 0.0409-1.8l-3.5386-3.5386c-0.5009-0.5009-1.2905-0.46856-1.8 0.04091l-1.8204 1.8c-1.1074-0.64403-2.3129-1.1557-3.5796-1.4932v-2.536c0-0.72-0.56-1.309-1.27-1.309h-4.99zm2.5 12.764c2.892 0 5.2364 2.3444 5.2364 5.2364s-2.3444 5.2364-5.2364 5.2364-5.2364-2.3444-5.2364-5.2364 2.3444-5.2364 5.2364-5.2364z"/>
<path display="block" fill="url(#ax)" d="m125.5 40c-0.70838 0-1.2682 0.5886-1.2682 1.3091v2.5364c-1.2666 0.33748-2.4722 0.84915-3.5795 1.4932l-1.8205-1.8c-0.25473-0.25473-0.54989-0.4063-0.87954-0.40909-0.32965-0.0028-0.67001 0.11773-0.92046 0.36818l-3.5386 3.5386c-0.5009 0.5009-0.46851 1.2905 0.0409 1.8l1.8 1.8205c-0.64403 1.1074-1.1557 2.3129-1.4932 3.5795h-2.5364c-0.72049 0-1.3091 0.5598-1.3091 1.2682v4.9909c0 0.70838 0.5886 1.2682 1.3091 1.2682h2.5364c0.33749 1.2666 0.84916 2.4722 1.4932 3.5795l-1.8 1.8205c-0.50947 0.50946-0.54186 1.2991-0.0409 1.8l3.5386 3.5386c0.5009 0.5009 1.2905 0.46856 1.8-0.04091l1.8205-1.8c1.1074 0.64403 2.3129 1.1557 3.5795 1.4932v2.5364c0 0.72049 0.5598 1.3091 1.2682 1.3091h4.9909c0.70838 0 1.2682-0.5886 1.2682-1.3091v-2.5364c1.2666-0.33748 2.4722-0.84915 3.5796-1.4932l1.8204 1.8c0.50947 0.50947 1.2991 0.54181 1.8 0.04091l3.5386-3.5386c0.5009-0.5009 0.4685-1.2905-0.0409-1.8l-1.8-1.8205c0.64403-1.1074 1.1557-2.3129 1.4932-3.5795h2.5364c0.72048 0 1.3091-0.5598 1.3091-1.2682v-4.9909c0-0.70838-0.58861-1.2682-1.3091-1.2682h-2.54c-0.33748-1.2666-0.84915-2.4722-1.4932-3.5795l1.8-1.8205c0.50947-0.50947 0.54187-1.2991 0.0409-1.8l-3.5386-3.5386c-0.5009-0.5009-1.2905-0.46856-1.8 0.04091l-1.8204 1.8c-1.1074-0.64403-2.3129-1.1557-3.5796-1.4932v-2.536c0-0.72-0.56-1.309-1.27-1.309h-4.99zm2.5 12.764c2.892 0 5.2364 2.3444 5.2364 5.2364s-2.3444 5.2364-5.2364 5.2364-5.2364-2.3444-5.2364-5.2364 2.3444-5.2364 5.2364-5.2364z"/>
<g transform="matrix(.56685 .32727 -.32727 .56685 152.48 -47.194)" clip-path="url(#az)">
<g opacity=".9" transform="matrix(.14137 .99272 -1.1652 .12045 96.937 104.81)">
<path opacity=".05" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -6.5462 27.467l-54.338-27.467z" transform="matrix(.99411 -.10837 .10837 .99411 -5.1582 5.4919)" fill="url(#aj)"/>
<path opacity="0.07" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -4.4572 22.869l-56.431-22.869z" transform="matrix(.99786 -.065374 .065374 .99786 -3.094 3.2416)" fill="url(#ak)"/>
<path opacity=".1" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -3.1299 19.272l-57.77-19.272z" transform="matrix(.99945 -.033121 .033121 .99945 -1.5635 1.6161)" fill="url(#al)"/>
<path opacity=".05" style="color:#000000" fill="url(#am)" d="m108.9 48a60.896 60.896 0 0 1 -2.075 15.761l-58.805-15.761z"/>
</g>
<g opacity=".9" transform="matrix(1.0628 -.13088 -.7401 3.2275 32.525 9.3323)">
<path opacity=".2" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -6.5462 27.467l-54.338-27.467z" transform="matrix(.99411 -.10837 .10837 .99411 -5.1582 5.4919)" fill="url(#an)"/>
<path opacity=".4" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -4.4572 22.869l-56.431-22.869z" transform="matrix(.99786 -.065374 .065374 .99786 -3.094 3.2416)" fill="url(#ao)"/>
<path opacity=".6" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -3.1299 19.272l-57.77-19.272z" transform="matrix(.99945 -.033121 .033121 .99945 -1.5635 1.6161)" fill="url(#ap)"/>
<path opacity=".8" style="color:#000000" fill="url(#aq)" d="m108.9 48a60.896 60.896 0 0 1 -2.075 15.761l-58.805-15.761z"/>
</g>
<g opacity=".5" transform="matrix(-.61679 .78713 -.78713 -.61679 115 150.01)">
<path opacity=".05" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -6.5462 27.467l-54.338-27.467z" transform="matrix(.99411 -.10837 .10837 .99411 -5.1582 5.4919)" fill="url(#aj)"/>
<path opacity="0.07" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -4.4572 22.869l-56.431-22.869z" transform="matrix(.99786 -.065374 .065374 .99786 -3.094 3.2416)" fill="url(#ak)"/>
<path opacity=".1" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -3.1299 19.272l-57.77-19.272z" transform="matrix(.99945 -.033121 .033121 .99945 -1.5635 1.6161)" fill="url(#al)"/>
<path opacity=".1" style="color:#000000" fill="url(#am)" d="m108.9 48a60.896 60.896 0 0 1 -2.075 15.761l-58.805-15.761z"/>
</g>
<g opacity=".8" transform="matrix(-.068172 -1.046 2.7107 .60163 -79.095 179.08)">
<path opacity=".05" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -6.5462 27.467l-54.338-27.467z" transform="matrix(.99411 -.10837 .10837 .99411 -5.1582 5.4919)" fill="url(#aj)"/>
<path opacity="0.07" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -4.4572 22.869l-56.431-22.869z" transform="matrix(.99786 -.065374 .065374 .99786 -3.094 3.2416)" fill="url(#ak)"/>
<path opacity=".1" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -3.1299 19.272l-57.77-19.272z" transform="matrix(.99945 -.033121 .033121 .99945 -1.5635 1.6161)" fill="url(#al)"/>
<path opacity=".1" style="color:#000000" fill="url(#am)" d="m108.9 48a60.896 60.896 0 0 1 -2.075 15.761l-58.805-15.761z"/>
</g>
<g opacity=".9" transform="matrix(-1.0628 .13088 .7401 -3.2275 62.997 306.67)">
<path opacity=".2" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -6.5462 27.467l-54.338-27.467z" transform="matrix(.99411 -.10837 .10837 .99411 -5.1582 5.4919)" fill="url(#an)"/>
<path opacity=".4" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -4.4572 22.869l-56.431-22.869z" transform="matrix(.99786 -.065374 .065374 .99786 -3.094 3.2416)" fill="url(#ao)"/>
<path opacity=".6" style="color:#000000" d="m108.9 48a60.896 60.896 0 0 1 -3.1299 19.272l-57.77-19.272z" transform="matrix(.99945 -.033121 .033121 .99945 -1.5635 1.6161)" fill="url(#ap)"/>
<path opacity=".8" style="color:#000000" fill="url(#aq)" d="m108.9 48a60.896 60.896 0 0 1 -2.075 15.761l-58.805-15.761z"/>
</g>
</g>
<path display="block" fill="url(#linearGradient4407)" d="m125.5 40c-0.70838-0.000001-1.2682 0.5886-1.2682 1.3091v2.5364c-1.2666 0.33748-2.4722 0.84915-3.5795 1.4932l-1.8205-1.8c-0.25473-0.25474-0.54989-0.4063-0.87954-0.40909-0.32965-0.0026-0.67 0.11773-0.92046 0.36818l-3.5386 3.5386c-0.5009 0.50091-0.4685 1.2905 0.0409 1.8l1.8 1.8205c-0.64403 1.1074-1.1557 2.3129-1.4932 3.5796h-2.5364c-0.72049-0.000004-1.3091 0.55979-1.3091 1.2682v4.9909c0 0.70839 0.5886 1.2682 1.3091 1.2682h2.5364c0.33749 1.2666 0.84916 2.4722 1.4932 3.5795l-1.8 1.8205c-0.50947 0.50947-0.54186 1.2991-0.0409 1.8l3.5386 3.5386c0.5009 0.5009 1.2905 0.46856 1.8-0.04091l1.8205-1.8c1.1074 0.64391 2.3129 1.1557 3.5795 1.4932v2.5364c0 0.72049 0.5598 1.3091 1.2682 1.3091l4.9909 0.000001c0.70839-0.000003 1.2682-0.5886 1.2682-1.3091v-2.5364c1.2666-0.33749 2.4722-0.84915 3.5796-1.4932l1.8204 1.8c0.50947 0.50947 1.2991 0.54182 1.8 0.04091l3.5386-3.5386c0.5009-0.5009 0.4685-1.2905-0.0409-1.8l-1.8-1.8205c0.64403-1.1074 1.1557-2.3129 1.4932-3.5795h2.5364c0.72048 0.000001 1.3091-0.55979 1.3091-1.2682v-4.9909c0-0.70838-0.5886-1.2682-1.3091-1.2682h-2.54c-0.33747-1.2666-0.84915-2.4722-1.4932-3.5796l1.8-1.8205c0.50947-0.50946 0.54187-1.2991 0.0409-1.8l-3.5386-3.5386c-0.5009-0.50091-1.2905-0.46856-1.8 0.0409l-1.8204 1.8c-1.1074-0.64391-2.3129-1.1557-3.5796-1.4932v-2.5364c0-0.72049-0.5598-1.3091-1.2682-1.3091h-4.99zm2.5 8.836c5.0609-0.000004 9.1636 4.1027 9.1636 9.1636s-4.1027 9.1636-9.1636 9.1636c-5.0609-0.000001-9.1636-4.1027-9.1636-9.1636s4.1027-9.1636 9.1636-9.1636z"/>
<path opacity=".7" d="m125.5 40c-0.70838 0-1.25 0.59201-1.25 1.3125v0.71875c0.12-0.595 0.63-1.031 1.25-1.031h5c0.61983 0 1.1332 0.43591 1.25 1.0312v-0.718c0-0.72-0.54-1.312-1.25-1.312h-5zm-7.5312 3.125c-0.32965-0.0028-0.68705 0.12455-0.9375 0.375l-3.53 3.531c-0.37568 0.37568-0.45054 0.91451-0.25 1.375 0.059-0.12899 0.14211-0.26711 0.25-0.375l3.53-3.531c0.25045-0.25045 0.60785-0.3778 0.9375-0.375s0.62027 0.15152 0.875 0.40625l1.8125 1.8125c1.1074-0.64403 2.3271-1.1625 3.5938-1.5v-1c-1.2666 0.33748-2.4864 0.85597-3.5938 1.5l-1.8125-1.8125c-0.25473-0.25473-0.54535-0.40346-0.875-0.40625zm20.094 0c-0.3237 0.0092-0.65151 0.15152-0.90625 0.40625l-1.8125 1.8125c-1.1074-0.64403-2.3271-1.1625-3.5938-1.5v1c1.2666 0.33748 2.4864 0.85597 3.5938 1.5l1.8125-1.8125c0.50947-0.50947 1.3116-0.53215 1.8125-0.03125l3.54 3.53c0.1079 0.10789 0.19102 0.24601 0.25 0.375 0.20056-0.46049 0.12573-0.99932-0.25-1.375l-3.53-3.531c-0.25-0.25-0.58-0.384-0.91-0.375zm-23.06 8.187c-0.47821 0.92428-0.8835 1.9138-1.1562 2.9375h-2.5312c-0.72 0-1.31 0.542-1.31 1.25v1c0-0.70839 0.59201-1.25 1.3125-1.25h2.5312c0.33749-1.2666 0.85597-2.4864 1.5-3.5938l-0.34-0.344zm26 0-0.34375 0.34375c0.64403 1.1074 1.1625 2.3271 1.5 3.5938h2.5312c0.72048 0 1.3125 0.54162 1.3125 1.25v-1c0-0.70838-0.59202-1.25-1.3125-1.25h-2.5312c-0.28-1.024-0.68-2.013-1.16-2.938zm-18.219 7.2188c-0.014 0.15592-0.0313 0.30919-0.0313 0.46875 0 2.892 2.358 5.25 5.25 5.25s5.25-2.358 5.25-5.25c0-0.15956-0.0173-0.31283-0.0313-0.46875-0.27 2.641-2.51 4.719-5.22 4.719-2.7112 0-4.9506-2.0783-5.2188-4.7188zm-7.78 7.157-1.4688 1.4688c-0.39974 0.39973-0.49609 0.9676-0.28125 1.4375 0.0669-0.1535 0.15388-0.31013 0.28125-0.4375l1.8125-1.8125c-0.12-0.213-0.23-0.437-0.34-0.656zm26 0c-0.1135 0.21938-0.22021 0.44383-0.34375 0.65625l1.8125 1.8125c0.12735 0.12737 0.2144 0.284 0.28125 0.4375 0.21481-0.4699 0.11843-1.0378-0.28125-1.4375l-1.47-1.468z" display="block" fill="#fff"/>
</g>
</g>
<g display="none" transform="translate(0,-48)">
<rect opacity=".9" rx="6" ry="6" height="85" filter="url(#ba)" width="86" y="7" x="5" fill="url(#ay)"/>
</g>
<path fill-rule="evenodd" fill="url(#bl)" d="m154.34 44.63a18.19 17.864 0 1 1 -35.14 9.247 18.19 17.864 0 0 1 35.14 -9.247z"/>
<path stroke-linejoin="round" d="m149.35 45.945a13.017 12.783 0 1 1 -25.146 6.617 13.017 12.783 0 0 1 25.146 -6.617z" fill-rule="evenodd" stroke="url(#bk)" stroke-width="2.2538" fill="url(#bj)"/>
<g transform="matrix(.77259 0 0 .7398 -88.968 7.7524)">
<g fill-rule="evenodd" transform="matrix(2.1805,0,0,2.1409,26.333,-103.83)">
<path fill="url(#au)" d="m96.197 32.053a8.0985 8.2456 0 1 1 -16.197 0 8.0985 8.2456 0 1 1 16.197 0z" transform="matrix(.99503 -.26667 .26186 .97748 -45.404 45.726)"/>
<path stroke-linejoin="round" d="m96.197 32.053a8.0985 8.2456 0 1 1 -16.197 0 8.0985 8.2456 0 1 1 16.197 0z" transform="matrix(.71203 -.19083 .18738 .69948 -18.085 47.955)" stroke="url(#aw)" stroke-width="1.4278" fill="url(#av)"/>
</g>
</g>
<path fill-rule="evenodd" fill="url(#bi)" d="m154.34-32.815a18.19 17.864 0 1 1 -35.14 9.2469 18.19 17.864 0 0 1 35.14 -9.2469z"/>
<path stroke-linejoin="round" d="m149.35-31.5a13.017 12.783 0 0 1 -25.146 6.617 13.017 12.783 0 1 1 25.146 -6.617z" fill-rule="evenodd" stroke="url(#bh)" stroke-width="2.2538" fill="url(#bg)"/>
<path fill-rule="evenodd" fill="url(#bf)" d="m154.35-75.851a18.19 17.864 0 0 1 -35.14 9.2469 18.19 17.864 0 1 1 35.14 -9.2469z"/>
<path stroke-linejoin="round" d="m149.35-74.536a13.017 12.783 0 0 1 -25.146 6.617 13.017 12.783 0 1 1 25.146 -6.617z" fill-rule="evenodd" stroke="url(#be)" stroke-width="2.2538" fill="url(#bd)"/>
<g stroke-linejoin="round" fill-rule="evenodd" transform="matrix(2.2743,0,0,2.2335,44.701,-128.2)" stroke="url(#at)" stroke-width="1.7298" fill="#4d4c38">
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 18.792 14.634)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 12.822 14.634)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 6.8523 14.634)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 .88269 14.634)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 -5.0869 14.634)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 15.807 11.649)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 9.8372 11.649)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 3.8675 11.649)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 -2.1021 11.649)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 18.792 8.6635)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 12.822 8.6635)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 6.8523 8.6635)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 .88269 8.6635)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 15.807 5.6781)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 9.8372 5.6781)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 3.8675 5.6781)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 18.792 2.6926)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 12.822 2.6926)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 6.8523 2.6926)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 15.807 -.29283)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 9.8372 -.29283)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 18.792 -3.2783)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 12.822 -3.2783)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 15.807 -6.2637)"/>
<path d="m111.94 94.064a1.9364 1.9364 0 1 1 -3.8728 0 1.9364 1.9364 0 1 1 3.8728 0z" transform="matrix(.57803 0 0 .57815 18.792 -9.2492)"/>
<path
opacity=".64773"
style="color:#000000"
d="m36.719 30.555a5.7412 5.1311 0 0 1 -11.482 0 5.7412 5.1311 0 1 1 11.482 0z"
stroke="#fff"
stroke-width=".70308"
fill="none"
id="path129" />
<path
opacity=".34659"
style="color:#000000"
d="m29.6 16.789-0.65312 3.8411c-1.2427 0.25294-3.5287 1.0265-4.5805 1.6098l-3.4746-2.3178c-0.92455 0.64151-0.98796 0.68502-1.7273 1.4953l2.5123 3.33c-0.72096 0.98468-1.5869 2.7394-1.8978 3.9934 0 0-4.4023 0.66324-4.4023 0.66324-0.07567 0.55238-0.0393 1.7347 0.01162 2.1896l4.2051 0.67702c0.29437 1.2846 1.396 3.3523 2.1762 4.4114l-2.6592 3.1399c0.70499 0.7822 0.84609 0.85378 1.7235 1.4816l3.5558-2.3282c1.2181 0.69448 3.636 1.5393 5.11 1.7791l0.58358 3.7928c0.4644 0.03778 1.7473 0.14376 2.3958 0.06914l0.65312-3.9482c1.3995-0.31126 3.8176-1.1984 4.9593-1.9242l3.552 2.2936c0.87-0.66151 0.87779-0.76119 1.5649-1.5783l-2.633-3.344c0.66075-1.0199 1.5151-3.0144 1.7471-4.218l4.3095-0.63906c0.03611-0.38399 0.03786-1.4548-0.06954-2.11l-4.389-0.678c-0.32777-1.0817-1.4526-3.0309-2.1337-3.9382l2.7907-3.1399c-0.76302-0.83397-1.0467-0.9484-2.0056-1.6024l-3.6756 2.3524c-1.0206-0.53943-3.0556-1.3617-4.248-1.596l-0.64931-3.7582c-0.59483-0.06254-2.311-0.03477-2.6509 0z"
stroke="#fff"
stroke-width=".70308"
fill="none"
id="path131" />
<g
display="none"
transform="translate(0,-48)"
id="g201">
<rect
opacity=".9"
rx="6"
ry="6"
height="85"
filter="url(#ba)"
width="86"
y="7"
x="5"
fill="url(#ay)"
id="rect203" />
</g>
<g fill-rule="evenodd" transform="matrix(2.2743,0,0,2.2335,59.653,-210.83)">
<path fill="url(#bm)" d="m76 101.97c-3.3106 0-6.0312 2.7207-6.0312 6.0312 0 3.3106 2.7207 6.0312 6.0312 6.0312h8c3.3106 0 6.0312-2.7207 6.0312-6.0312 0-3.3106-2.7207-6.0312-6.0312-6.0312h-8z" transform="matrix(.74766 0 0 .74611 .18692 -.58031)"/>
<rect rx="3" ry="3" height="6" width="12" y="77" x="54" fill="url(#ar)"/>
<rect opacity=".6" rx="1.3436" ry="1.3436" height="2.6873" width="9.8799" y="77.265" x="55.06" fill="url(#as)"/>
<path opacity=".3" d="m52.062 79.5c-0.028 0.167-0.062 0.325-0.062 0.5 0 1.662 1.338 3 3 3h6c1.662 0 3-1.338 3-3 0-0.17531-0.03392-0.33309-0.0625-0.5-0.243 1.415-1.451 2.5-2.938 2.5h-6c-1.4867 0-2.6951-1.0845-2.9375-2.5z" transform="translate(2)" fill="#1a1a1a"/>
<g
transform="matrix(.77259 0 0 .7398 -88.968 7.7524)"
id="g209">
<g
fill-rule="evenodd"
transform="matrix(2.1805,0,0,2.1409,26.333,-103.83)"
id="g211">
<path
fill="url(#au)"
d="m96.197 32.053a8.0985 8.2456 0 1 1 -16.197 0 8.0985 8.2456 0 1 1 16.197 0z"
transform="matrix(.99503 -.26667 .26186 .97748 -45.404 45.726)"
id="path213" />
<path
stroke-linejoin="round"
d="m96.197 32.053a8.0985 8.2456 0 1 1 -16.197 0 8.0985 8.2456 0 1 1 16.197 0z"
transform="matrix(.71203 -.19083 .18738 .69948 -18.085 47.955)"
stroke="url(#aw)"
stroke-width="1.4278"
fill="url(#av)"
id="path215" />
</g>
<g stroke-width=".70308" transform="matrix(1.0045,0,0,1.015,43.282,-5.8903)">
<path style="color:#000000" fill="url(#bc)" d="m29.373 16.559c-0.34615 0.02117-0.6826 0.06908-1.0226 0.10385h-0.02324l-0.81343 3.9672c-1.3258 0.26985-2.5732 0.72781-3.6953 1.3501l-3.6488-2.3471c-0.98637 0.6844-1.884 1.4826-2.6727 2.3471l2.5333 3.3026c-0.76917 1.0505-1.3476 2.2501-1.6733 3.5103-0.000056 0.006-0.000045 0.01973 0 0.02077l-4.4158 0.62313c-0.08073 0.58932-0.1162 1.1984-0.1162 1.8071 0 0.49804 0.01539 0.98942 0.06972 1.4747l4.4158 0.70621c0.31405 1.3705 0.91064 2.6504 1.7431 3.7803l-2.6262 3.2195c0.75213 0.8345 1.6205 1.5943 2.5565 2.264l3.7185-2.2848c1.2996 0.74092 2.7503 1.2605 4.3228 1.5163l0.69723 3.9257c0.49545 0.04031 1.0035 0.04154 1.5107 0.04154 0.71596-0.000001 1.3998-0.02425 2.0917-0.10386l0.83667-4.0088c1.493-0.33207 2.8956-0.90813 4.1136-1.6824l3.5791 2.3263c0.92817-0.70574 1.7769-1.5169 2.51-2.3887l-2.603-3.3649c0.70493-1.0881 1.1934-2.2886 1.4409-3.5726l4.3925-0.62313c0.03852-0.40967 0.04648-0.80697 0.04648-1.2255 0-0.72729-0.09459-1.4404-0.20917-2.1394l-4.461-0.725c-0.35-1.154-0.924-2.231-1.65-3.199l2.6262-3.2195c-0.814-0.89-1.743-1.712-2.766-2.41l-3.7883 2.3263c-1.089-0.575-2.261-1.016-3.533-1.266l-0.69723-3.9465c-0.63461-0.06672-1.2744-0.10385-1.929-0.10385-0.17691 0-0.35898-0.005-0.53454 0-0.08559 0.0024-0.17028-0.0045-0.25565 0-0.02312 0.0012-0.04665-0.0014-0.06972 0zm0.60426 10.095c0.08491-0.0039 0.16968 0 0.25565 0 2.7511 0 4.9968 2.0071 4.9968 4.4658 0.000001 2.4587-2.2457 4.445-4.9968 4.445s-4.9736-1.9863-4.9736-4.445c0.000001-2.3819 2.0858-4.3464 4.7179-4.4658z" stroke="#808080"/>
<path opacity=".64773" style="color:#000000" d="m35.977 31.11a5.7412 5.1311 0 0 1 -11.482 0 5.7412 5.1311 0 1 1 11.482 0z" stroke="#fff" fill="none"/>
<path opacity=".34659" style="color:#000000" d="m28.858 17.345-0.65312 3.8411c-1.2427 0.25294-3.5287 1.0265-4.5805 1.6098l-3.474-2.318c-0.92455 0.64151-0.98796 0.68502-1.7273 1.4953l2.5123 3.33c-0.72096 0.98468-1.5869 2.7394-1.8978 3.9934 0 0-4.4023 0.66324-4.4023 0.66324-0.07567 0.55238-0.0393 1.7347 0.01162 2.1896l4.2051 0.67702c0.29437 1.2846 1.396 3.3523 2.1762 4.4114l-2.6592 3.1399c0.70499 0.7822 0.84609 0.85378 1.7235 1.4816l3.5558-2.3282c1.2181 0.69448 3.636 1.5393 5.11 1.7791l0.58358 3.7928c0.4644 0.03778 1.7473 0.14376 2.3958 0.06914l0.653-3.948c1.3995-0.31126 3.8176-1.1984 4.9593-1.9242l3.552 2.2936c0.87-0.66151 0.87779-0.76119 1.5649-1.5783l-2.632-3.345c0.66075-1.0199 1.5151-3.0144 1.7471-4.218l4.3095-0.63906c0.03611-0.38399 0.03786-1.4548-0.06954-2.11l-4.391-0.677c-0.328-1.082-1.453-3.031-2.134-3.938l2.7907-3.1399c-0.76302-0.83397-1.0467-0.9484-2.0056-1.6024l-3.6756 2.3524c-1.0206-0.53943-3.0556-1.3617-4.248-1.596l-0.64931-3.7582c-0.59483-0.06254-2.311-0.03477-2.6509 0z" stroke="#fff" fill="none"/>
</g>
<g transform="matrix(.071608 .89642 -.93884 .068372 31.654 112.96)">
<path style="color:#000000" d="m-103.75-4.8441 21.354 22.179c0.86405 1.0024 3.6019 1.7772 5.4312 0 1.7665-1.7162 1.3578-4.1351-0.37031-5.8893l-20.486-22.305c2.5298-7.1336-2.5904-13.125-9.196-11.841l-1.4195 1.3157 4.4437 4.2604 0.24687 3.7591-3.3178 3.0744-3.9649-0.44302-4.0734-3.8844s-1.4281 1.4323-1.4281 1.4323c-0.66423 6.4389 5.9678 12.194 12.784 8.3414z" stroke="#7c7e79" stroke-width="1.833" fill="url(#bb)"/>
<path opacity=".42614" style="color:#000000" d="m-103.51-6.3 21.591 22.859c0.66889 0.77601 2.7883 1.3758 4.2044 0 1.369-1.328 1.053-3.201-0.285-4.559l-20.791-22.395c1.6865-7.419-2.0899-11.419-7.7117-11.276l-0.30373 0.31203 4.051 3.6938 0.14635 4.773-4.0633 3.7648-4.7698-0.52299-3.5716-3.4144-0.39649 0.49086c-0.35136 6.8126 7.299 9.9126 11.902 6.2745z" stroke="#fff" stroke-width="1.1328" fill="none"/>
<path style="color:#000000" d="m43.25 37.5a1.375 1.375 0 1 1 -2.75 0 1.375 1.375 0 1 1 2.75 0z" transform="matrix(.98748 0 0 1.0024 -121.15 -23.264)" stroke="#a1a1a1" stroke-width="1.1386" fill="#fff"/>
<g
transform="matrix(.071608 .89642 -.93884 .068372 31.654 112.96)"
id="g295">
<path
style="color:#000000"
d="m-103.75-4.8441 21.354 22.179c0.86405 1.0024 3.6019 1.7772 5.4312 0 1.7665-1.7162 1.3578-4.1351-0.37031-5.8893l-20.486-22.305c2.5298-7.1336-2.5904-13.125-9.196-11.841l-1.4195 1.3157 4.4437 4.2604 0.24687 3.7591-3.3178 3.0744-3.9649-0.44302-4.0734-3.8844s-1.4281 1.4323-1.4281 1.4323c-0.66423 6.4389 5.9678 12.194 12.784 8.3414z"
stroke="#7c7e79"
stroke-width="1.833"
fill="url(#bb)"
id="path297" />
<path
opacity=".42614"
style="color:#000000"
d="m-103.51-6.3 21.591 22.859c0.66889 0.77601 2.7883 1.3758 4.2044 0 1.369-1.328 1.053-3.201-0.285-4.559l-20.791-22.395c1.6865-7.419-2.0899-11.419-7.7117-11.276l-0.30373 0.31203 4.051 3.6938 0.14635 4.773-4.0633 3.7648-4.7698-0.52299-3.5716-3.4144-0.39649 0.49086c-0.35136 6.8126 7.299 9.9126 11.902 6.2745z"
stroke="#fff"
stroke-width="1.1328"
fill="none"
id="path299" />
<path
style="color:#000000"
d="m43.25 37.5a1.375 1.375 0 1 1 -2.75 0 1.375 1.375 0 1 1 2.75 0z"
transform="matrix(.98748 0 0 1.0024 -121.15 -23.264)"
stroke="#a1a1a1"
stroke-width="1.1386"
fill="#fff"
id="path301" />
</g>
</svg>
......@@ -61,8 +61,8 @@ protected:
int m_Drill; // for vias: via drill (- 1 for default value)
public:
BOARD_ITEM* start; // pointers to a connected item (pad or track)
BOARD_ITEM* end;
BOARD_CONNECTED_ITEM* start; // pointers to a connected item (pad or track)
BOARD_CONNECTED_ITEM* end;
std::vector<TRACK*> m_TracksConnected; // list of other tracks connected to me
int m_Param; // Auxiliary variable ( used in some computations )
......
......@@ -6,7 +6,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2011 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2011 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
......@@ -43,8 +43,6 @@ extern void Merge_SubNets_Connected_By_CopperAreas( BOARD* aPcb );
extern void Merge_SubNets_Connected_By_CopperAreas( BOARD* aPcb, int aNetcode );
/* Local functions */
static void Propagate_SubNet( TRACK* pt_start_conn, TRACK* pt_end_conn );
static void Build_Pads_Info_Connections_By_Tracks( TRACK* pt_start_conn, TRACK* pt_end_conn );
static void RebuildTrackChain( BOARD* pcb );
......@@ -73,11 +71,28 @@ public:
private:
BOARD * m_brd; // the master board.
const TRACK * m_firstTrack; // The first track used to build m_Candidates
const TRACK * m_lastTrack; // The last track used to build m_Candidates
public:
CONNECTIONS( BOARD * aBrd );
~CONNECTIONS() {};
/** Function Build_CurrNet_SubNets_Connections
* Connections to pads are assumed to be already initialized,
* and are not recalculated
* An be called after a track change (delete or add a track):
* If a track is deleted, the other pointers to pads do not change.
* When a new track is added in track list, its pointers to pads are already initialized
* Builds the subnets inside a net (tracks from aFirstTrack to aFirstTrack).
* subnets are clusters of pads and tracks that are connected together.
* When all tracks are created relative to the net, there is only a cluster
* when not tracks there are a cluster per pad
* @param aFirstTrack = first track of the given net
* @param aLastTrack = last track of the given net
*/
void Build_CurrNet_SubNets_Connections( TRACK* aFirstTrack, TRACK* aLastTrack );
/** Function BuildCandidatesList
* Fills m_Candidates with all connecting points (track ends or via location)
* with tracks from aBegin to aEnd.
......@@ -93,6 +108,22 @@ public:
*/
int SearchConnectedTracks( const TRACK * aTrack );
/**
* Function Propagate_SubNets
* Test a list of tracks, to create or propagate a sub netcode to pads and
* segments connected together.
* The track list must be sorted by nets, and all segments
* from m_firstTrack to m_lastTrack have the same net.
* When 2 items are connected (a track to a pad, or a track to an other track),
* they are grouped in a cluster.
* For pads, this is the .m_physical_connexion member which is a cluster identifier
* For tracks, this is the .m_Subnet member which is a cluster identifier
* For a given net, if all tracks are created, there is only one cluster.
* but if not all tracks are created, there are more than one cluster,
* and some ratsnests will be left active.
*/
void Propagate_SubNets();
private:
/**
* function searchEntryPoint
......@@ -104,6 +135,20 @@ private:
* @return the index of item found or -1 if no candidate
*/
int searchEntryPoint( const wxPoint & aPoint);
/**
* Function Merge_SubNets
* Change a subnet value to a new value, for tracks ans pads which are connected to
* corresponding track for pads and tracks, this is the .m_Subnet member that is tested
* and modified these members are block numbers (or cluster numbers) for a given net
* The result is merging 2 cluster (or subnets) into only one.
* Note: the resulting sub net value is the smallest between aOldSubNet et aNewSubNet
* @return modification count
* @param aOldSubNet = subnet value to modify
* @param aNewSubNet = new subnet value for each item which have old_val as subnet value
*/
int Merge_SubNets( int aOldSubNet, int aNewSubNet );
};
/* sort function used to sort .m_Connected by X the Y values
......@@ -125,11 +170,13 @@ CONNECTIONS::CONNECTIONS( BOARD * aBrd )
void CONNECTIONS::BuildCandidatesList( TRACK * aBegin, TRACK * aEnd)
{
m_Connected.clear();
m_Candidates.clear();
if( aBegin == NULL )
aBegin = m_brd->m_Track;
m_firstTrack = aBegin;
unsigned ii = 0;
// Count candidates ( i.e. end points )
for( const TRACK* track = aBegin; track; track = track->Next() )
......@@ -139,12 +186,13 @@ void CONNECTIONS::BuildCandidatesList( TRACK * aBegin, TRACK * aEnd)
else
ii += 2;
m_lastTrack = track;
if( track == aEnd )
break;
}
// Build candidate list
m_Connected.reserve( ii );
for( TRACK* track = aBegin; track != aEnd; track = track->Next() )
m_Candidates.reserve( ii );
for( TRACK* track = aBegin; track; track = track->Next() )
{
CONNECTED_POINT candidate( track, track->m_Start);
m_Candidates.push_back( candidate );
......@@ -267,283 +315,202 @@ int CONNECTIONS::searchEntryPoint( const wxPoint & aPoint)
return -1;
}
/* Used after a track change (delete a track ou add a track)
* Connections to pads are assumed to be already initialized.
* and are not recalculated
*/
void CONNECTIONS::Build_CurrNet_SubNets_Connections( TRACK* aFirstTrack, TRACK* aLastTrack )
{
/**
* Function Merge_Two_SubNets
* Used by Propagate_SubNet()
* Change a subnet value to a new value, for tracks ans pads which are connected to
* corresponding track for pads and tracks, this is the .m_Subnet member that is tested
* and modified these members are block numbers (or cluster numbers) for a given net
* The result is merging 2 blocks (or subnets)
* @return modification count
* @param old_val = subnet value to modify
* @param new_val = new subnet value for each item which have old_val as subnet value
* @param pt_start_conn = first track segment to test
* @param pt_end_conn = last track segment to test
* If pt_end_conn = NULL: search is made from pt_start_conn to end of linked list
m_firstTrack = aFirstTrack; // The first track used to build m_Candidates
m_lastTrack = aLastTrack; // The last track used to build m_Candidates
TRACK* curr_track;
// Pads subnets are expected already cleared, because this function
// does not know the full list of pads
BuildCandidatesList( aFirstTrack, aLastTrack );
for( curr_track = aFirstTrack; curr_track != NULL; curr_track = curr_track->Next() )
{
// Clear track subnet id (Pads subnets are cleared outside this function)
curr_track->SetSubNet( 0 );
curr_track->m_TracksConnected.clear();
// Update connections between tracks:
SearchConnectedTracks( curr_track );
curr_track->m_TracksConnected = m_Connected;
if( curr_track == aLastTrack )
break;
}
// Creates sub nets (clusters) for the current net:
Propagate_SubNets();
}
/*
* Change a subnet value to a new value, for tracks and pads which are connected to.
* The result is merging 2 clusters (or subnets) into only one cluster.
* Note: the resultig sub net value is the smallest between aOldSubNet et aNewSubNet
*/
static int Merge_Two_SubNets( TRACK* pt_start_conn, TRACK* pt_end_conn, int old_val, int new_val )
int CONNECTIONS::Merge_SubNets( int aOldSubNet, int aNewSubNet )
{
TRACK* pt_conn;
int nb_change = 0;
D_PAD* pt_pad;
TRACK* curr_track;
int change_count = 0;
if( old_val == new_val )
if( aOldSubNet == aNewSubNet )
return 0;
if( (old_val > 0) && (old_val < new_val) )
EXCHG( old_val, new_val );
if( (aOldSubNet > 0) && (aOldSubNet < aNewSubNet) )
EXCHG( aOldSubNet, aNewSubNet );
pt_conn = pt_start_conn;
curr_track = (TRACK*)m_firstTrack;
for( ; pt_conn != NULL; pt_conn = pt_conn->Next() )
for( ; curr_track != NULL; curr_track = curr_track->Next() )
{
if( pt_conn->GetSubNet() != old_val )
if( curr_track->GetSubNet() != aOldSubNet )
{
if( pt_conn == pt_end_conn )
if( curr_track == m_lastTrack )
break;
continue;
}
nb_change++;
pt_conn->SetSubNet( new_val );
change_count++;
curr_track->SetSubNet( aNewSubNet );
if( pt_conn->start && ( pt_conn->start->Type() == PCB_PAD_T) )
BOARD_CONNECTED_ITEM * item = curr_track->start;
if( item && ( item->Type() == PCB_PAD_T) )
{
pt_pad = (D_PAD*) (pt_conn->start);
if( pt_pad->GetSubNet() == old_val )
pt_pad->SetSubNet( pt_conn->GetSubNet() );
if( item->GetSubNet() == aOldSubNet )
item->SetSubNet( curr_track->GetSubNet() );
}
if( pt_conn->end && (pt_conn->end->Type() == PCB_PAD_T) )
item = curr_track->end;
if( item && (item->Type() == PCB_PAD_T) )
{
pt_pad = (D_PAD*) (pt_conn->end);
if( pt_pad->GetSubNet() == old_val )
pt_pad->SetSubNet( pt_conn->GetSubNet() );
if( item->GetSubNet() == aOldSubNet )
item->SetSubNet( curr_track->GetSubNet() );
}
if( pt_conn == pt_end_conn )
if( curr_track == m_lastTrack )
break;
}
return nb_change;
return change_count;
}
/**
* Function Propagate_SubNet
* Test a list of track segments, to create or propagate a sub netcode to pads and
* segments connected together the track list must be sorted by nets, and all segments
* from pt_start_conn to pt_end_conn have the same net when 2 items are connected (a
* track to a pad, or a track to an other track) they are grouped in a cluster.
* for pads, this is the .m_physical_connexion member which is a cluster identifier
* for tracks, this is the .m_Subnet member which is a cluster identifier
/* Test a list of track segments, to create or propagate a sub netcode to pads and
* segments connected together.
* The track list must be sorted by nets, and all segments
* from m_firstTrack to m_lastTrack have the same net
* When 2 items are connected (a track to a pad, or a track to an other track),
* they are grouped in a cluster.
* For pads, this is the .m_physical_connexion member which is a cluster identifier
* For tracks, this is the .m_Subnet member which is a cluster identifier
* For a given net, if all tracks are created, there is only one cluster.
* but if not all tracks are created, there are more than one cluster, and some ratsnest
* will be shown.
* @param pt_start_conn = first track to test
* @param pt_end_conn = last segment to test
* but if not all tracks are created, there are more than one cluster,
* and some ratsnests will be left active.
*/
static void Propagate_SubNet( TRACK* pt_start_conn, TRACK* pt_end_conn )
void CONNECTIONS::Propagate_SubNets()
{
TRACK* pt_conn;
TRACK* curr_track;
int sub_netcode;
D_PAD* pt_pad;
TRACK* pt_other_trace;
BOARD_ITEM* PtStruct;
/* Clear variables used in computations */
pt_conn = pt_start_conn;
for( ; pt_conn != NULL; pt_conn = pt_conn->Next() )
{
pt_conn->SetSubNet( 0 );
PtStruct = pt_conn->start;
if( PtStruct && (PtStruct->Type() == PCB_PAD_T) )
( (D_PAD*) PtStruct )->SetSubNet( 0 );
PtStruct = pt_conn->end;
if( PtStruct && (PtStruct->Type() == PCB_PAD_T) )
( (D_PAD*) PtStruct )->SetSubNet( 0 );
if( pt_conn == pt_end_conn )
break;
}
curr_track = (TRACK*)m_firstTrack;
sub_netcode = 1;
pt_start_conn->SetSubNet( sub_netcode );
curr_track->SetSubNet( sub_netcode );
/* Start of calculation */
pt_conn = pt_start_conn;
for( ; pt_conn != NULL; pt_conn = pt_conn->Next() )
for( ; curr_track != NULL; curr_track = curr_track->Next() )
{
/* First: handling connections to pads */
PtStruct = pt_conn->start;
BOARD_CONNECTED_ITEM* pad = curr_track->start;
for( int ii = 0; ii < 2; ii++ )
{
/* The segment starts on a pad */
if( PtStruct && (PtStruct->Type() == PCB_PAD_T) )
if( pad && (pad->Type() == PCB_PAD_T) )
{
pt_pad = (D_PAD*) PtStruct;
if( pt_conn->GetSubNet() ) /* the track segment is already a cluster member */
if( curr_track->GetSubNet() ) /* the track segment is already a cluster member */
{
if( pt_pad->GetSubNet() > 0 )
if( pad->GetSubNet() > 0 )
{
/* The pad is already a cluster member, so we can merge the 2 clusters */
Merge_Two_SubNets( pt_start_conn, pt_end_conn,
pt_pad->GetSubNet(), pt_conn->GetSubNet() );
Merge_SubNets( pad->GetSubNet(), curr_track->GetSubNet() );
}
else
{
/* The pad is not yet attached to a cluster , so we can add this pad to
* the cluster */
pt_pad->SetSubNet( pt_conn->GetSubNet() );
pad->SetSubNet( curr_track->GetSubNet() );
}
}
else /* the track segment is not attached to a cluster */
{
if( pt_pad->GetSubNet() > 0 )
if( pad->GetSubNet() > 0 )
{
/* it is connected to a pad in a cluster, merge this track */
pt_conn->SetSubNet( pt_pad->GetSubNet() );
curr_track->SetSubNet( pad->GetSubNet() );
}
else
{
/* it is connected to a pad not in a cluster, so we must create a new
* cluster (only with the 2 items: the track and the pad) */
sub_netcode++;
pt_conn->SetSubNet( sub_netcode );
pt_pad->SetSubNet( pt_conn->GetSubNet() );
curr_track->SetSubNet( sub_netcode );
pad->SetSubNet( curr_track->GetSubNet() );
}
}
}
PtStruct = pt_conn->end;
/* The segment end on a pad */
if( PtStruct && (PtStruct->Type() == PCB_PAD_T) )
{
pt_pad = (D_PAD*) PtStruct;
if( pt_conn->GetSubNet() )
{
if( pt_pad->GetSubNet() > 0 )
{
Merge_Two_SubNets( pt_start_conn, pt_end_conn,
pt_pad->GetSubNet(), pt_conn->GetSubNet() );
}
else
{
pt_pad->SetSubNet( pt_conn->GetSubNet() );
}
}
else
{
if( pt_pad->GetSubNet() > 0 )
{
pt_conn->SetSubNet( pt_pad->GetSubNet() );
}
else
{
sub_netcode++;
pt_conn->SetSubNet( sub_netcode );
pt_pad->SetSubNet( pt_conn->GetSubNet() );
}
}
pad = curr_track->end;
}
/* Test connections between segments */
PtStruct = pt_conn->start;
if( PtStruct && (PtStruct->Type() != PCB_PAD_T) )
for( unsigned ii = 0; ii < curr_track->m_TracksConnected.size(); ii++ )
{
/* The segment starts on an other track */
pt_other_trace = (TRACK*) PtStruct;
/* the track segment is already a cluster member */
if( pt_conn->GetSubNet() )
BOARD_CONNECTED_ITEM* track = curr_track->m_TracksConnected[ii];
if( curr_track->GetSubNet() ) // The current track is already a cluster member
{
/* The other track is already a cluster member, so we can merge the 2 clusters */
if( pt_other_trace->GetSubNet() )
if( track->GetSubNet() )
{
Merge_Two_SubNets( pt_start_conn, pt_end_conn,
pt_other_trace->GetSubNet(), pt_conn->GetSubNet() );
Merge_SubNets( track->GetSubNet(), curr_track->GetSubNet() );
}
else
{
/* The other track is not yet attached to a cluster , so we can add this
* other track to the cluster */
pt_other_trace->SetSubNet( pt_conn->GetSubNet() );
track->SetSubNet( curr_track->GetSubNet() );
}
}
else
else // the current track segment is not yet attached to a cluster
{
/* the track segment is not yet attached to a cluster */
if( pt_other_trace->GetSubNet() )
if( track->GetSubNet() )
{
/* The other track is already a cluster member, so we can add the segment
* to the cluster */
pt_conn->SetSubNet( pt_other_trace->GetSubNet() );
// The other track is already a cluster member, so we can add
// the current segment to the cluster
curr_track->SetSubNet( track->GetSubNet() );
}
else
{
/* it is connected to an other segment not in a cluster, so we must
* create a new cluster (only with the 2 track segments) */
sub_netcode++;
pt_conn->SetSubNet( sub_netcode );
pt_other_trace->SetSubNet( pt_conn->GetSubNet() );
curr_track->SetSubNet( sub_netcode );
track->SetSubNet( curr_track->GetSubNet() );
}
}
}
PtStruct = pt_conn->end; // Do the same calculations for the segment end point
if( PtStruct && (PtStruct->Type() != PCB_PAD_T) )
{
pt_other_trace = (TRACK*) PtStruct;
if( pt_conn->GetSubNet() ) /* the track segment is already a cluster member */
{
if( pt_other_trace->GetSubNet() )
{
Merge_Two_SubNets( pt_start_conn, pt_end_conn,
pt_other_trace->GetSubNet(), pt_conn->GetSubNet() );
}
else
{
pt_other_trace->SetSubNet( pt_conn->GetSubNet() );
}
}
else
{
/* the track segment is not yet attached to a cluster */
if( pt_other_trace->GetSubNet() )
{
pt_conn->SetSubNet( pt_other_trace->GetSubNet() );
}
else
{
sub_netcode++;
pt_conn->SetSubNet( sub_netcode );
pt_other_trace->SetSubNet( pt_conn->GetSubNet() );
}
}
}
if( pt_conn == pt_end_conn )
if( curr_track == m_lastTrack )
break;
}
}
void PCB_BASE_FRAME::TestConnections( wxDC* aDC )
{
// Clear the cluster identifier for all pads
......@@ -558,17 +525,19 @@ void PCB_BASE_FRAME::TestConnections( wxDC* aDC )
m_Pcb->Test_Connections_To_Copper_Areas();
// Test existing connections net by net
CONNECTIONS connections( m_Pcb );
for( TRACK* track = m_Pcb->m_Track; track; )
{
// this is the current net because pt_start_conn is the first segment of the net
// At this point, track is the first track of a given net
int current_net_code = track->GetNet();
// this is the last segment of the current net
TRACK* pt_end_conn = track->GetEndNetCode( current_net_code );
// Get last track of the current net
TRACK* lastTrack = track->GetEndNetCode( current_net_code );
Build_Pads_Info_Connections_By_Tracks( track, pt_end_conn );
if( current_net_code ) // do not spend time if net code = 0, this is not a dummy net
connections.Build_CurrNet_SubNets_Connections( track, lastTrack );
track = pt_end_conn->Next(); // this is now the first segment of the next net
track = lastTrack->Next(); // this is now the first track of the next net
}
Merge_SubNets_Connected_By_CopperAreas( m_Pcb );
......@@ -587,7 +556,8 @@ void PCB_BASE_FRAME::TestNetConnection( wxDC* aDC, int aNetCode )
if( (m_Pcb->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK) == 0 )
Compile_Ratsnest( aDC, true );
for( unsigned i = 0; i<m_Pcb->GetPadsCount(); ++i )
// Clear the cluster identifier (subnet) of pads for this net
for( unsigned i = 0; i < m_Pcb->GetPadsCount(); ++i )
{
D_PAD* pad = m_Pcb->m_NetInfo->GetPad(i);
......@@ -607,16 +577,17 @@ void PCB_BASE_FRAME::TestNetConnection( wxDC* aDC, int aNetCode )
/* Search for the first and the last segment relative to the given net code */
if( m_Pcb->m_Track )
{
TRACK* pt_start_conn;
TRACK* pt_end_conn = NULL;
pt_start_conn = m_Pcb->m_Track.GetFirst()->GetStartNetCode( aNetCode );
CONNECTIONS connections( m_Pcb );
TRACK* firstTrack;
TRACK* lastTrack = NULL;
firstTrack = m_Pcb->m_Track.GetFirst()->GetStartNetCode( aNetCode );
if( pt_start_conn )
pt_end_conn = pt_start_conn->GetEndNetCode( aNetCode );
if( firstTrack )
lastTrack = firstTrack->GetEndNetCode( aNetCode );
if( pt_start_conn && pt_end_conn ) // c.a.d. if there are segments
if( firstTrack && lastTrack ) // i.e. if there are segments
{
Build_Pads_Info_Connections_By_Tracks( pt_start_conn, pt_end_conn );
connections.Build_CurrNet_SubNets_Connections( firstTrack, lastTrack );
}
}
......@@ -635,83 +606,10 @@ void PCB_BASE_FRAME::TestNetConnection( wxDC* aDC, int aNetCode )
}
/** Used after a track change (delete a track ou add a track)
* Compute connections (initialize the .start and .end members) for a single net.
* tracks must be sorted by net, as usual
* @param pt_start_conn = first segment of the net
* @param pt_end_conn = last segment of the net
* Connections to pads are assumed to be already initialized.
* If a track is deleted, the other pointers to pads do not change.
* When a track is added, its pointers to pads are already initialized
/* search connections between tracks and pads and propagate pad net codes to the track
* segments.
* Pads netcodes are assumed to be up to date.
*/
static void Build_Pads_Info_Connections_By_Tracks( TRACK* pt_start_conn, TRACK* pt_end_conn )
{
TRACK* Track;
/* Reset the old connections type track to track */
for( Track = pt_start_conn; Track != NULL; Track = Track->Next() )
{
Track->SetSubNet( 0 );
if( Track->GetState( BEGIN_ONPAD ) == 0 )
Track->start = NULL;
if( Track->GetState( END_ONPAD ) == 0 )
Track->end = NULL;
if( Track == pt_end_conn )
break;
}
/* Update connections type track to track */
for( Track = pt_start_conn; Track != NULL; Track = Track->Next() )
{
if( Track->Type() == PCB_VIA_T )
{
// A via can connect many tracks, we must search for all track segments in this net
TRACK* pt_segm;
int layermask = Track->ReturnMaskLayer();
for( pt_segm = pt_start_conn; pt_segm != NULL; pt_segm = pt_segm->Next() )
{
int curlayermask = pt_segm->ReturnMaskLayer();
if( !pt_segm->start && (pt_segm->m_Start == Track->m_Start)
&& ( layermask & curlayermask ) )
{
pt_segm->start = Track;
}
if( !pt_segm->end && (pt_segm->m_End == Track->m_Start)
&& (layermask & curlayermask) )
{
pt_segm->end = Track;
}
if( pt_segm == pt_end_conn )
break;
}
}
if( Track->start == NULL ) // end track not already connected, search a connection
{
Track->start = Track->GetTrace( Track, pt_end_conn, START );
}
if( Track->end == NULL ) // end track not already connected, search a connection
{
Track->end = Track->GetTrace( Track, pt_end_conn, END );
}
if( Track == pt_end_conn )
break;
}
/* Creates sub nets (cluster) for the current net: */
Propagate_SubNet( pt_start_conn, pt_end_conn );
}
void PCB_BASE_FRAME::RecalculateAllTracksNetcode()
{
TRACK* curr_track;
......@@ -735,13 +633,10 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode()
return;
}
/**************************************************************/
/* Pass 1: search the connections between track ends and pads */
/**************************************************************/
// Prepare connections calculations between tracks and pads */
m_Pcb->GetSortedPadListByXthenYCoord( sortedPads );
/* Reset variables and flags used in computation */
// Reset variables and flags used in computation
curr_track = m_Pcb->m_Track;
for( ; curr_track != NULL; curr_track = curr_track->Next() )
......@@ -882,7 +777,5 @@ static void RebuildTrackChain( BOARD* pcb )
// add them back to the list
for( int i = 0; i < item_count; ++i )
{
pcb->m_Track.PushBack( trackList[i] );
}
}
......@@ -994,7 +994,7 @@ void DeleteNullTrackSegments( BOARD* pcb, DLIST<TRACK>& aTrackList )
TRACK* firsttrack = track;
TRACK* oldtrack;
BOARD_ITEM* LockPoint = track->start;
BOARD_CONNECTED_ITEM* LockPoint = track->start;
while( track != NULL )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment