pcb_calculator: New tab for via calculations
NEW: Adds a tab in pcb_calculator for calculations related to via size. Fixes: lp:1802222 * https://bugs.launchpad.net/kicad/+bug/1802222
This commit is contained in:
parent
7d803437e2
commit
9f189ca71a
|
@ -19,6 +19,7 @@ set( PCB_CALCULATOR_SRCS
|
||||||
datafile_read_write.cpp
|
datafile_read_write.cpp
|
||||||
regulators_funct.cpp
|
regulators_funct.cpp
|
||||||
tracks_width_versus_current.cpp
|
tracks_width_versus_current.cpp
|
||||||
|
via.cpp
|
||||||
transline_ident.cpp
|
transline_ident.cpp
|
||||||
UnitSelector.cpp
|
UnitSelector.cpp
|
||||||
pcb_calculator_datafile_keywords.cpp
|
pcb_calculator_datafile_keywords.cpp
|
||||||
|
|
|
@ -0,0 +1,361 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<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"
|
||||||
|
width="287.31168"
|
||||||
|
height="288.8616"
|
||||||
|
viewBox="0 0 76.017877 76.427968"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
inkscape:version="0.92.1 r15371"
|
||||||
|
sodipodi:docname="via.svg"
|
||||||
|
inkscape:export-filename="D:\private-local\working\kicad\kicad\pcb_calculator\bitmaps\sources\via.png"
|
||||||
|
inkscape:export-xdpi="80.409149"
|
||||||
|
inkscape:export-ydpi="80.409149">
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<marker
|
||||||
|
inkscape:isstock="true"
|
||||||
|
style="overflow:visible"
|
||||||
|
id="marker9465"
|
||||||
|
refX="0"
|
||||||
|
refY="0"
|
||||||
|
orient="auto"
|
||||||
|
inkscape:stockid="Arrow2Lend">
|
||||||
|
<path
|
||||||
|
transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
|
||||||
|
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||||
|
style="fill:#0402fc;fill-opacity:1;fill-rule:evenodd;stroke:#0402fc;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
||||||
|
id="path9463"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</marker>
|
||||||
|
<marker
|
||||||
|
inkscape:isstock="true"
|
||||||
|
style="overflow:visible"
|
||||||
|
id="marker9401"
|
||||||
|
refX="0"
|
||||||
|
refY="0"
|
||||||
|
orient="auto"
|
||||||
|
inkscape:stockid="Arrow2Lstart">
|
||||||
|
<path
|
||||||
|
transform="matrix(1.1,0,0,1.1,1.1,0)"
|
||||||
|
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||||
|
style="fill:#0402fc;fill-opacity:1;fill-rule:evenodd;stroke:#0402fc;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
||||||
|
id="path9399"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</marker>
|
||||||
|
<marker
|
||||||
|
inkscape:stockid="Arrow2Lend"
|
||||||
|
orient="auto"
|
||||||
|
refY="0"
|
||||||
|
refX="0"
|
||||||
|
id="Arrow2Lend"
|
||||||
|
style="overflow:visible"
|
||||||
|
inkscape:isstock="true"
|
||||||
|
inkscape:collect="always">
|
||||||
|
<path
|
||||||
|
id="path8476"
|
||||||
|
style="fill:#0402fc;fill-opacity:1;fill-rule:evenodd;stroke:#0402fc;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
||||||
|
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||||
|
transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</marker>
|
||||||
|
<marker
|
||||||
|
inkscape:stockid="Arrow1Lend"
|
||||||
|
orient="auto"
|
||||||
|
refY="0"
|
||||||
|
refX="0"
|
||||||
|
id="Arrow1Lend"
|
||||||
|
style="overflow:visible"
|
||||||
|
inkscape:isstock="true">
|
||||||
|
<path
|
||||||
|
id="path8458"
|
||||||
|
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||||
|
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||||
|
transform="matrix(-0.8,0,0,-0.8,-10,0)"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</marker>
|
||||||
|
<marker
|
||||||
|
inkscape:stockid="Arrow2Lstart"
|
||||||
|
orient="auto"
|
||||||
|
refY="0"
|
||||||
|
refX="0"
|
||||||
|
id="marker8801"
|
||||||
|
style="overflow:visible"
|
||||||
|
inkscape:isstock="true"
|
||||||
|
inkscape:collect="always">
|
||||||
|
<path
|
||||||
|
id="path8799"
|
||||||
|
style="fill:#0402fc;fill-opacity:1;fill-rule:evenodd;stroke:#0402fc;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
||||||
|
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||||
|
transform="matrix(1.1,0,0,1.1,1.1,0)"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</marker>
|
||||||
|
<marker
|
||||||
|
inkscape:stockid="Arrow1Mstart"
|
||||||
|
orient="auto"
|
||||||
|
refY="0"
|
||||||
|
refX="0"
|
||||||
|
id="Arrow1Mstart"
|
||||||
|
style="overflow:visible"
|
||||||
|
inkscape:isstock="true">
|
||||||
|
<path
|
||||||
|
id="path8461"
|
||||||
|
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||||
|
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||||
|
transform="matrix(0.4,0,0,0.4,4,0)"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</marker>
|
||||||
|
<marker
|
||||||
|
inkscape:stockid="Arrow2Lstart"
|
||||||
|
orient="auto"
|
||||||
|
refY="0"
|
||||||
|
refX="0"
|
||||||
|
id="Arrow2Lstart"
|
||||||
|
style="overflow:visible"
|
||||||
|
inkscape:isstock="true">
|
||||||
|
<path
|
||||||
|
id="path8473"
|
||||||
|
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
||||||
|
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||||
|
transform="matrix(1.1,0,0,1.1,1.1,0)"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</marker>
|
||||||
|
<marker
|
||||||
|
inkscape:stockid="Arrow1Lstart"
|
||||||
|
orient="auto"
|
||||||
|
refY="0"
|
||||||
|
refX="0"
|
||||||
|
id="marker8341"
|
||||||
|
style="overflow:visible"
|
||||||
|
inkscape:isstock="true">
|
||||||
|
<path
|
||||||
|
id="path8339"
|
||||||
|
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||||
|
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||||
|
transform="matrix(0.8,0,0,0.8,10,0)"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</marker>
|
||||||
|
<marker
|
||||||
|
inkscape:isstock="true"
|
||||||
|
style="overflow:visible"
|
||||||
|
id="marker4531"
|
||||||
|
refX="0"
|
||||||
|
refY="0"
|
||||||
|
orient="auto"
|
||||||
|
inkscape:stockid="Arrow1Lstart">
|
||||||
|
<path
|
||||||
|
transform="matrix(0.8,0,0,0.8,10,0)"
|
||||||
|
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||||
|
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||||
|
id="path4529"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</marker>
|
||||||
|
<marker
|
||||||
|
inkscape:isstock="true"
|
||||||
|
style="overflow:visible"
|
||||||
|
id="marker4495"
|
||||||
|
refX="0"
|
||||||
|
refY="0"
|
||||||
|
orient="auto"
|
||||||
|
inkscape:stockid="Arrow1Lstart">
|
||||||
|
<path
|
||||||
|
transform="matrix(0.8,0,0,0.8,10,0)"
|
||||||
|
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||||
|
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||||
|
id="path4493"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</marker>
|
||||||
|
<symbol
|
||||||
|
id="RightAndDownArrow">
|
||||||
|
<title
|
||||||
|
id="title2315">Right and Down Arrow</title>
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
d="M 14.816667,14.816667 H 6.35 L 3.4395833,11.90625 h 6.35 L 3.7041667,5.8208333 5.8208333,3.7041667 11.90625,9.7895833 v -6.35 L 14.816667,6.35 Z"
|
||||||
|
style="stroke:none;stroke-width:0.26458332"
|
||||||
|
id="path2317" />
|
||||||
|
</symbol>
|
||||||
|
<marker
|
||||||
|
inkscape:isstock="true"
|
||||||
|
style="overflow:visible"
|
||||||
|
id="marker9465-7"
|
||||||
|
refX="0"
|
||||||
|
refY="0"
|
||||||
|
orient="auto"
|
||||||
|
inkscape:stockid="Arrow2Lend">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
|
||||||
|
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||||
|
style="fill:#0402fc;fill-opacity:1;fill-rule:evenodd;stroke:#0402fc;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
||||||
|
id="path9463-6" />
|
||||||
|
</marker>
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="1"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.072"
|
||||||
|
inkscape:cx="102.28598"
|
||||||
|
inkscape:cy="209.41831"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1366"
|
||||||
|
inkscape:window-height="705"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:measure-start="-145.714,988.571"
|
||||||
|
inkscape:measure-end="148.571,591.429"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:lockguides="false"
|
||||||
|
units="px"
|
||||||
|
objecttolerance="20"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
inkscape:snap-bbox="false"
|
||||||
|
inkscape:snap-others="true"
|
||||||
|
inkscape:snap-object-midpoints="true"
|
||||||
|
inkscape:snap-tangential="true"
|
||||||
|
inkscape:snap-perpendicular="true"
|
||||||
|
inkscape:object-paths="true"
|
||||||
|
inkscape:snap-intersection-paths="true"
|
||||||
|
inkscape:snap-smooth-nodes="true"
|
||||||
|
inkscape:object-nodes="true"
|
||||||
|
inkscape:snap-midpoints="true"
|
||||||
|
inkscape:pagecheckerboard="false"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid3684"
|
||||||
|
originx="-18.400886"
|
||||||
|
originy="-30.764148" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<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:license
|
||||||
|
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||||
|
</cc:Work>
|
||||||
|
<cc:License
|
||||||
|
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||||
|
</cc:License>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-18.400887,-189.80787)">
|
||||||
|
<circle
|
||||||
|
id="path3680"
|
||||||
|
style="fill:#ffffff;stroke:#000000;stroke-width:0.5291667;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
transform="rotate(151.126)"
|
||||||
|
cy="-232.45309"
|
||||||
|
cx="56.370422"
|
||||||
|
r="31.26413" />
|
||||||
|
<circle
|
||||||
|
id="path3680-3"
|
||||||
|
style="fill:#fcb23c;fill-opacity:1;stroke:none;stroke-width:0.35277778;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
transform="rotate(151.126)"
|
||||||
|
cy="-232.45309"
|
||||||
|
cx="56.370422"
|
||||||
|
r="27.438532" />
|
||||||
|
<circle
|
||||||
|
id="path3680-3-8"
|
||||||
|
style="fill:#cccecc;fill-opacity:1;stroke:none;stroke-width:0.35277778;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
transform="rotate(151.126)"
|
||||||
|
cy="-232.45309"
|
||||||
|
cx="56.370419"
|
||||||
|
r="19.417116" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#0402fc;stroke-width:0.35277778;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.41111115, 1.41111115;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
d="m 43.468435,230.84224 v -36.2682"
|
||||||
|
id="path11320"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="use4645"
|
||||||
|
d="m 82.302065,230.91777 v -36.2682"
|
||||||
|
style="fill:none;stroke:#0402fc;stroke-width:0.35277778;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.41111115, 1.41111115;stroke-dashoffset:0;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#0402fc;stroke-width:0.35277778;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#marker8801);marker-end:url(#Arrow2Lend)"
|
||||||
|
d="m 43.468435,197.25123 h 38.83363"
|
||||||
|
id="path8441"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.46666622px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#0402fc;fill-opacity:1;stroke:none;stroke-width:0.35277778;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
x="59.458069"
|
||||||
|
y="195.96356"
|
||||||
|
id="text8995"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan8993"
|
||||||
|
x="59.458069"
|
||||||
|
y="195.96356"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.46666622px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#0402fc;fill-opacity:1;stroke-width:0.35277778;stroke-miterlimit:4;stroke-dasharray:none">D</tspan></text>
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path9381"
|
||||||
|
d="M 63.084305,250.19193 H 23.910954"
|
||||||
|
style="fill:none;stroke:#0402fc;stroke-width:0.35277778;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.41111115, 1.41111115;stroke-dashoffset:0;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#0402fc;stroke-width:0.35277778;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.41111115, 1.41111115;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
d="M 63.044661,258.21388 H 23.87131"
|
||||||
|
id="path9383"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path9397"
|
||||||
|
d="m 26.967687,237.97416 v 11.93043"
|
||||||
|
style="fill:none;stroke:#0402fc;stroke-width:0.35277778;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker9465)" />
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.46666622px;line-height:0.30000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#0402fc;fill-opacity:1;stroke:none;stroke-width:0.35277778;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
x="18.400887"
|
||||||
|
y="246.25377"
|
||||||
|
id="text8995-0"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
x="18.400887"
|
||||||
|
y="246.25377"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.46666622px;line-height:0.30000001;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#0402fc;fill-opacity:1;stroke-width:0.35277778;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
id="tspan10739">T</tspan></text>
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path9397-6"
|
||||||
|
d="m 26.980116,266.23583 v -8.02195"
|
||||||
|
style="fill:none;stroke:#0402fc;stroke-width:0.35277778;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker9465-7)" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 15 KiB |
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version v3.8.0)
|
// C++ code generated with wxFormBuilder (version Aug 8 2018)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
#include "../bitmaps/microstrip_zodd_zeven.xpm"
|
#include "../bitmaps/microstrip_zodd_zeven.xpm"
|
||||||
#include "../bitmaps/regul.xpm"
|
#include "../bitmaps/regul.xpm"
|
||||||
#include "../bitmaps/regul_3pins.xpm"
|
#include "../bitmaps/regul_3pins.xpm"
|
||||||
|
#include "../bitmaps/via.xpm"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -519,6 +520,333 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
|
||||||
m_panelTrackWidth->Layout();
|
m_panelTrackWidth->Layout();
|
||||||
bSizerTrackWidth->Fit( m_panelTrackWidth );
|
bSizerTrackWidth->Fit( m_panelTrackWidth );
|
||||||
m_Notebook->AddPage( m_panelTrackWidth, _("Track Width"), false );
|
m_Notebook->AddPage( m_panelTrackWidth, _("Track Width"), false );
|
||||||
|
m_panelViaSize = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
|
wxBoxSizer* bSizerViaSize;
|
||||||
|
bSizerViaSize = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxStaticBoxSizer* sbSizerVS_Inputs;
|
||||||
|
sbSizerVS_Inputs = new wxStaticBoxSizer( new wxStaticBox( m_panelViaSize, wxID_ANY, _("Parameters:") ), wxVERTICAL );
|
||||||
|
|
||||||
|
wxFlexGridSizer* fgSizerVS_Inputs;
|
||||||
|
fgSizerVS_Inputs = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||||
|
fgSizerVS_Inputs->AddGrowableCol( 1 );
|
||||||
|
fgSizerVS_Inputs->SetFlexibleDirection( wxBOTH );
|
||||||
|
fgSizerVS_Inputs->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
|
m_staticTextHoleDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("D:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextHoleDia->Wrap( -1 );
|
||||||
|
m_staticTextHoleDia->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
|
||||||
|
m_staticTextHoleDia->SetToolTip( _("Finished hole dia") );
|
||||||
|
|
||||||
|
fgSizerVS_Inputs->Add( m_staticTextHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
m_textCtrlHoleDia = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_textCtrlHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
wxArrayString m_choiceHoleDiaChoices;
|
||||||
|
m_choiceHoleDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHoleDiaChoices, 0 );
|
||||||
|
m_choiceHoleDia->SetSelection( 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_choiceHoleDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
m_staticTextPlatingThickness = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("T:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextPlatingThickness->Wrap( -1 );
|
||||||
|
m_staticTextPlatingThickness->SetToolTip( _("Plating thickness") );
|
||||||
|
|
||||||
|
fgSizerVS_Inputs->Add( m_staticTextPlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_textCtrlPlatingThickness = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_textCtrlPlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
wxArrayString m_choicePlatingThicknessChoices;
|
||||||
|
m_choicePlatingThickness = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePlatingThicknessChoices, 0 );
|
||||||
|
m_choicePlatingThickness->SetSelection( 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_choicePlatingThickness, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_staticTextViaLength = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Via length:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextViaLength->Wrap( -1 );
|
||||||
|
fgSizerVS_Inputs->Add( m_staticTextViaLength, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
m_textCtrlViaLength = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_textCtrlViaLength, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
wxArrayString m_choiceViaLengthChoices;
|
||||||
|
m_choiceViaLength = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceViaLengthChoices, 0 );
|
||||||
|
m_choiceViaLength->SetSelection( 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_choiceViaLength, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
m_staticTextViaPadDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Via pad dia:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextViaPadDia->Wrap( -1 );
|
||||||
|
m_staticTextViaPadDia->SetToolTip( _("Diameter of pad surrounding via") );
|
||||||
|
|
||||||
|
fgSizerVS_Inputs->Add( m_staticTextViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
m_textCtrlViaPadDia = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_textCtrlViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
wxArrayString m_choiceViaPadDiaChoices;
|
||||||
|
m_choiceViaPadDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceViaPadDiaChoices, 0 );
|
||||||
|
m_choiceViaPadDia->SetSelection( 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_choiceViaPadDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
m_staticTextClearanceDia = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Clearance hole dia:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextClearanceDia->Wrap( -1 );
|
||||||
|
m_staticTextClearanceDia->SetToolTip( _("Diameter of clearance hole in ground plane(s)") );
|
||||||
|
|
||||||
|
fgSizerVS_Inputs->Add( m_staticTextClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
m_textCtrlClearanceDia = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_textCtrlClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
wxArrayString m_choiceClearanceDiaChoices;
|
||||||
|
m_choiceClearanceDia = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceClearanceDiaChoices, 0 );
|
||||||
|
m_choiceClearanceDia->SetSelection( 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_choiceClearanceDia, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
m_staticTextBoardThickness = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("PCB thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextBoardThickness->Wrap( -1 );
|
||||||
|
fgSizerVS_Inputs->Add( m_staticTextBoardThickness, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
m_textCtrlBoardThickness = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_textCtrlBoardThickness, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
wxArrayString m_choiceBoardThicknessChoices;
|
||||||
|
m_choiceBoardThickness = new UNIT_SELECTOR_LEN( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceBoardThicknessChoices, 0 );
|
||||||
|
m_choiceBoardThickness->SetSelection( 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_choiceBoardThickness, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
m_staticTextImpedance = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Z0:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextImpedance->Wrap( -1 );
|
||||||
|
m_staticTextImpedance->SetToolTip( _("Characteristic impedance of conductor") );
|
||||||
|
|
||||||
|
fgSizerVS_Inputs->Add( m_staticTextImpedance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
m_textCtrlImpedance = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_textCtrlImpedance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
wxArrayString m_choiceImpedanceChoices;
|
||||||
|
m_choiceImpedance = new UNIT_SELECTOR_RESISTOR( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceImpedanceChoices, 0 );
|
||||||
|
m_choiceImpedance->SetSelection( 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_choiceImpedance, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
m_staticAppliedCurrent = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Applied current:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticAppliedCurrent->Wrap( -1 );
|
||||||
|
fgSizerVS_Inputs->Add( m_staticAppliedCurrent, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
m_textCtrlAppliedCurrent = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_textCtrlAppliedCurrent, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
m_staticTextAppliedCurrentUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextAppliedCurrentUnits->Wrap( -1 );
|
||||||
|
fgSizerVS_Inputs->Add( m_staticTextAppliedCurrentUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticTextResistivity = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Plating resistivity:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextResistivity->Wrap( -1 );
|
||||||
|
m_staticTextResistivity->SetToolTip( _("Specific resistance in ohms * meters") );
|
||||||
|
|
||||||
|
fgSizerVS_Inputs->Add( m_staticTextResistivity, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
m_textCtrlPlatingResistivity = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_textCtrlPlatingResistivity, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
m_button_ResistivityVia = new wxButton( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||||
|
fgSizerVS_Inputs->Add( m_button_ResistivityVia, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
m_staticTextPermittivity = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Er:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextPermittivity->Wrap( -1 );
|
||||||
|
m_staticTextPermittivity->SetToolTip( _("Relative dielectric constant (epsilon r)") );
|
||||||
|
|
||||||
|
fgSizerVS_Inputs->Add( m_staticTextPermittivity, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
m_textCtrlPlatingPermittivity = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_textCtrlPlatingPermittivity, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
m_button_Permittivity = new wxButton( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||||
|
fgSizerVS_Inputs->Add( m_button_Permittivity, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
m_staticTextTemperatureDiff = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Temperature rise:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextTemperatureDiff->Wrap( -1 );
|
||||||
|
m_staticTextTemperatureDiff->SetToolTip( _("Maximum acceptable rise in temperature") );
|
||||||
|
|
||||||
|
fgSizerVS_Inputs->Add( m_staticTextTemperatureDiff, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
m_textCtrlTemperatureDiff = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_textCtrlTemperatureDiff, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
m_staticTextTemperatureUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("deg C"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextTemperatureUnits->Wrap( -1 );
|
||||||
|
fgSizerVS_Inputs->Add( m_staticTextTemperatureUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticTextRiseTime = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("Pulse rise time:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextRiseTime->Wrap( -1 );
|
||||||
|
m_staticTextRiseTime->SetToolTip( _("Pulse rise time to calculate reactance") );
|
||||||
|
|
||||||
|
fgSizerVS_Inputs->Add( m_staticTextRiseTime, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
m_textCtrlRiseTime = new wxTextCtrl( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerVS_Inputs->Add( m_textCtrlRiseTime, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
m_staticTextRiseTimeUnits = new wxStaticText( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, _("ns"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextRiseTimeUnits->Wrap( -1 );
|
||||||
|
m_staticTextRiseTimeUnits->SetToolTip( _("nanoseconds") );
|
||||||
|
|
||||||
|
fgSizerVS_Inputs->Add( m_staticTextRiseTimeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
sbSizerVS_Inputs->Add( fgSizerVS_Inputs, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticline31 = new wxStaticLine( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
sbSizerVS_Inputs->Add( m_staticline31, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_bitmap10 = new wxStaticBitmap( sbSizerVS_Inputs->GetStaticBox(), wxID_ANY, wxBitmap( via_xpm ), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_bitmap10->SetToolTip( _("Top view of via") );
|
||||||
|
|
||||||
|
sbSizerVS_Inputs->Add( m_bitmap10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerViaSize->Add( sbSizerVS_Inputs, 1, wxEXPAND|wxALL, 5 );
|
||||||
|
|
||||||
|
wxStaticBoxSizer* sbSizerVS_Result;
|
||||||
|
sbSizerVS_Result = new wxStaticBoxSizer( new wxStaticBox( m_panelViaSize, wxID_ANY, _("Results:") ), wxVERTICAL );
|
||||||
|
|
||||||
|
wxFlexGridSizer* fgSizerTW_Results11;
|
||||||
|
fgSizerTW_Results11 = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||||
|
fgSizerTW_Results11->AddGrowableCol( 1 );
|
||||||
|
fgSizerTW_Results11->SetFlexibleDirection( wxBOTH );
|
||||||
|
fgSizerTW_Results11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
|
m_staticTextArea11 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Resistance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextArea11->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_staticTextArea11, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
m_ViaResistance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_ViaResistance->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_ViaResistance, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_IntTrackAreaUnitLabel1 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Ohm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_IntTrackAreaUnitLabel1->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_IntTrackAreaUnitLabel1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText65111 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Voltage drop:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText65111->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_staticText65111, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
m_ViaVoltageDrop = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_ViaVoltageDrop->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_ViaVoltageDrop, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticText8411 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Volt"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText8411->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_staticText8411, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText66111 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Power loss:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText66111->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_staticText66111, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
m_ViaPowerLoss = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_ViaPowerLoss->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_ViaPowerLoss, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticText8311 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Watt"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText8311->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_staticText8311, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText79211 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Thermal resistance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText79211->Wrap( -1 );
|
||||||
|
m_staticText79211->SetToolTip( _("Using thermal conductivity value 401 Watts/(meter-Kelvin)") );
|
||||||
|
|
||||||
|
fgSizerTW_Results11->Add( m_staticText79211, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
m_ViaThermalResistance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_ViaThermalResistance->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_ViaThermalResistance, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticText791111 = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("deg C/Watt"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText791111->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_staticText791111, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticTextAmpacity = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Estimated ampacity:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextAmpacity->Wrap( -1 );
|
||||||
|
m_staticTextAmpacity->SetToolTip( _("Based on temperature rise") );
|
||||||
|
|
||||||
|
fgSizerTW_Results11->Add( m_staticTextAmpacity, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_ViaAmpacity = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_ViaAmpacity->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_ViaAmpacity, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticTextAmpacityUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextAmpacityUnits->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_staticTextAmpacityUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticTextCapacitance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Capacitance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextCapacitance->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_staticTextCapacitance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
m_ViaCapacitance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_ViaCapacitance->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_ViaCapacitance, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticTextCapacitanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("pF"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextCapacitanceUnits->Wrap( -1 );
|
||||||
|
m_staticTextCapacitanceUnits->SetToolTip( _("pico-Farad") );
|
||||||
|
|
||||||
|
fgSizerTW_Results11->Add( m_staticTextCapacitanceUnits, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticTextRiseTimeOutput = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Rise time degradation:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextRiseTimeOutput->Wrap( -1 );
|
||||||
|
m_staticTextRiseTimeOutput->SetToolTip( _("Rise time degradation for given Z0 and calculated capacitance") );
|
||||||
|
|
||||||
|
fgSizerTW_Results11->Add( m_staticTextRiseTimeOutput, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
m_RiseTimeOutput = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_RiseTimeOutput->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_RiseTimeOutput, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticTextRiseTimeOutputUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("ps"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextRiseTimeOutputUnits->Wrap( -1 );
|
||||||
|
m_staticTextRiseTimeOutputUnits->SetToolTip( _("picoseconds") );
|
||||||
|
|
||||||
|
fgSizerTW_Results11->Add( m_staticTextRiseTimeOutputUnits, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticTextInductance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Inductance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextInductance->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_staticTextInductance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
m_Inductance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_Inductance->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_Inductance, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticTextInductanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("nH"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextInductanceUnits->Wrap( -1 );
|
||||||
|
m_staticTextInductanceUnits->SetToolTip( _("nano-Henry") );
|
||||||
|
|
||||||
|
fgSizerTW_Results11->Add( m_staticTextInductanceUnits, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticTextReactance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Reactance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextReactance->Wrap( -1 );
|
||||||
|
m_staticTextReactance->SetToolTip( _("Inductive reactance for given rise time and calculated inductance") );
|
||||||
|
|
||||||
|
fgSizerTW_Results11->Add( m_staticTextReactance, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
m_Reactance = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_Reactance->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_Reactance, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticTextReactanceUnits = new wxStaticText( sbSizerVS_Result->GetStaticBox(), wxID_ANY, _("Ohm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextReactanceUnits->Wrap( -1 );
|
||||||
|
fgSizerTW_Results11->Add( m_staticTextReactanceUnits, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
sbSizerVS_Result->Add( fgSizerTW_Results11, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerViaSize->Add( sbSizerVS_Result, 1, wxEXPAND|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
m_panelViaSize->SetSizer( bSizerViaSize );
|
||||||
|
m_panelViaSize->Layout();
|
||||||
|
bSizerViaSize->Fit( m_panelViaSize );
|
||||||
|
m_Notebook->AddPage( m_panelViaSize, _("Via Size"), true );
|
||||||
m_panelElectricalSpacing = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
m_panelElectricalSpacing = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
wxBoxSizer* bSizerElectricalClearance;
|
wxBoxSizer* bSizerElectricalClearance;
|
||||||
bSizerElectricalClearance = new wxBoxSizer( wxHORIZONTAL );
|
bSizerElectricalClearance = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
@ -1330,14 +1658,14 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
|
||||||
m_panelBoardClass->SetSizer( bSizerBoardClass );
|
m_panelBoardClass->SetSizer( bSizerBoardClass );
|
||||||
m_panelBoardClass->Layout();
|
m_panelBoardClass->Layout();
|
||||||
bSizerBoardClass->Fit( m_panelBoardClass );
|
bSizerBoardClass->Fit( m_panelBoardClass );
|
||||||
m_Notebook->AddPage( m_panelBoardClass, _("Board Classes"), true );
|
m_Notebook->AddPage( m_panelBoardClass, _("Board Classes"), false );
|
||||||
|
|
||||||
bmainFrameSizer->Add( m_Notebook, 1, wxEXPAND, 5 );
|
bmainFrameSizer->Add( m_Notebook, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
this->SetSizer( bmainFrameSizer );
|
this->SetSizer( bmainFrameSizer );
|
||||||
this->Layout();
|
this->Layout();
|
||||||
|
bmainFrameSizer->Fit( this );
|
||||||
this->Centre( wxBOTH );
|
this->Centre( wxBOTH );
|
||||||
|
|
||||||
// Connect Events
|
// Connect Events
|
||||||
|
@ -1362,6 +1690,27 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
|
||||||
m_TW_IntTrackWidth_choiceUnit->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
m_TW_IntTrackWidth_choiceUnit->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
||||||
m_IntTrackThicknessValue->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
m_IntTrackThicknessValue->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
||||||
m_IntTrackThicknessUnit->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
m_IntTrackThicknessUnit->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
||||||
|
m_textCtrlHoleDia->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_choiceHoleDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlPlatingThickness->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_choicePlatingThickness->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlViaLength->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_choiceViaLength->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlViaPadDia->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_choiceViaPadDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlClearanceDia->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_choiceClearanceDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlBoardThickness->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_choiceBoardThickness->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlImpedance->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_choiceImpedance->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlAppliedCurrent->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlPlatingResistivity->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_button_ResistivityVia->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaRho_Button ), NULL, this );
|
||||||
|
m_textCtrlPlatingPermittivity->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_button_Permittivity->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaEpsilonR_Button ), NULL, this );
|
||||||
|
m_textCtrlTemperatureDiff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlRiseTime->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
m_ElectricalSpacingUnitsSelector->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingUnitsSelection ), NULL, this );
|
m_ElectricalSpacingUnitsSelector->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingUnitsSelection ), NULL, this );
|
||||||
m_buttonElectSpacingRefresh->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingRefresh ), NULL, this );
|
m_buttonElectSpacingRefresh->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingRefresh ), NULL, this );
|
||||||
m_TranslineSelection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSelection ), NULL, this );
|
m_TranslineSelection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSelection ), NULL, this );
|
||||||
|
@ -1405,6 +1754,27 @@ PCB_CALCULATOR_FRAME_BASE::~PCB_CALCULATOR_FRAME_BASE()
|
||||||
m_TW_IntTrackWidth_choiceUnit->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
m_TW_IntTrackWidth_choiceUnit->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
||||||
m_IntTrackThicknessValue->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
m_IntTrackThicknessValue->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
||||||
m_IntTrackThicknessUnit->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
m_IntTrackThicknessUnit->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
||||||
|
m_textCtrlHoleDia->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_choiceHoleDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlPlatingThickness->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_choicePlatingThickness->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlViaLength->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_choiceViaLength->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlViaPadDia->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_choiceViaPadDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlClearanceDia->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_choiceClearanceDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlBoardThickness->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_choiceBoardThickness->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlImpedance->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_choiceImpedance->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlAppliedCurrent->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlPlatingResistivity->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_button_ResistivityVia->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaRho_Button ), NULL, this );
|
||||||
|
m_textCtrlPlatingPermittivity->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_button_Permittivity->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaEpsilonR_Button ), NULL, this );
|
||||||
|
m_textCtrlTemperatureDiff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
m_textCtrlRiseTime->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
m_ElectricalSpacingUnitsSelector->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingUnitsSelection ), NULL, this );
|
m_ElectricalSpacingUnitsSelector->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingUnitsSelection ), NULL, this );
|
||||||
m_buttonElectSpacingRefresh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingRefresh ), NULL, this );
|
m_buttonElectSpacingRefresh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingRefresh ), NULL, this );
|
||||||
m_TranslineSelection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSelection ), NULL, this );
|
m_TranslineSelection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSelection ), NULL, this );
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version v3.8.0)
|
// C++ code generated with wxFormBuilder (version Aug 8 2018)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -16,6 +16,7 @@ class UNIT_SELECTOR_LEN;
|
||||||
class UNIT_SELECTOR_RESISTOR;
|
class UNIT_SELECTOR_RESISTOR;
|
||||||
class UNIT_SELECTOR_THICKNESS;
|
class UNIT_SELECTOR_THICKNESS;
|
||||||
|
|
||||||
|
#include "UnitSelector.h"
|
||||||
#include "kiway_player.h"
|
#include "kiway_player.h"
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/menu.h>
|
#include <wx/menu.h>
|
||||||
|
@ -144,6 +145,72 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER
|
||||||
wxStaticText* m_staticText792;
|
wxStaticText* m_staticText792;
|
||||||
wxStaticText* m_IntTrackLossValue;
|
wxStaticText* m_IntTrackLossValue;
|
||||||
wxStaticText* m_staticText7911;
|
wxStaticText* m_staticText7911;
|
||||||
|
wxPanel* m_panelViaSize;
|
||||||
|
wxStaticText* m_staticTextHoleDia;
|
||||||
|
wxTextCtrl* m_textCtrlHoleDia;
|
||||||
|
UNIT_SELECTOR_LEN* m_choiceHoleDia;
|
||||||
|
wxStaticText* m_staticTextPlatingThickness;
|
||||||
|
wxTextCtrl* m_textCtrlPlatingThickness;
|
||||||
|
UNIT_SELECTOR_LEN* m_choicePlatingThickness;
|
||||||
|
wxStaticText* m_staticTextViaLength;
|
||||||
|
wxTextCtrl* m_textCtrlViaLength;
|
||||||
|
UNIT_SELECTOR_LEN* m_choiceViaLength;
|
||||||
|
wxStaticText* m_staticTextViaPadDia;
|
||||||
|
wxTextCtrl* m_textCtrlViaPadDia;
|
||||||
|
UNIT_SELECTOR_LEN* m_choiceViaPadDia;
|
||||||
|
wxStaticText* m_staticTextClearanceDia;
|
||||||
|
wxTextCtrl* m_textCtrlClearanceDia;
|
||||||
|
UNIT_SELECTOR_LEN* m_choiceClearanceDia;
|
||||||
|
wxStaticText* m_staticTextBoardThickness;
|
||||||
|
wxTextCtrl* m_textCtrlBoardThickness;
|
||||||
|
UNIT_SELECTOR_LEN* m_choiceBoardThickness;
|
||||||
|
wxStaticText* m_staticTextImpedance;
|
||||||
|
wxTextCtrl* m_textCtrlImpedance;
|
||||||
|
UNIT_SELECTOR_RESISTOR* m_choiceImpedance;
|
||||||
|
wxStaticText* m_staticAppliedCurrent;
|
||||||
|
wxTextCtrl* m_textCtrlAppliedCurrent;
|
||||||
|
wxStaticText* m_staticTextAppliedCurrentUnits;
|
||||||
|
wxStaticText* m_staticTextResistivity;
|
||||||
|
wxTextCtrl* m_textCtrlPlatingResistivity;
|
||||||
|
wxButton* m_button_ResistivityVia;
|
||||||
|
wxStaticText* m_staticTextPermittivity;
|
||||||
|
wxTextCtrl* m_textCtrlPlatingPermittivity;
|
||||||
|
wxButton* m_button_Permittivity;
|
||||||
|
wxStaticText* m_staticTextTemperatureDiff;
|
||||||
|
wxTextCtrl* m_textCtrlTemperatureDiff;
|
||||||
|
wxStaticText* m_staticTextTemperatureUnits;
|
||||||
|
wxStaticText* m_staticTextRiseTime;
|
||||||
|
wxTextCtrl* m_textCtrlRiseTime;
|
||||||
|
wxStaticText* m_staticTextRiseTimeUnits;
|
||||||
|
wxStaticLine* m_staticline31;
|
||||||
|
wxStaticBitmap* m_bitmap10;
|
||||||
|
wxStaticText* m_staticTextArea11;
|
||||||
|
wxStaticText* m_ViaResistance;
|
||||||
|
wxStaticText* m_IntTrackAreaUnitLabel1;
|
||||||
|
wxStaticText* m_staticText65111;
|
||||||
|
wxStaticText* m_ViaVoltageDrop;
|
||||||
|
wxStaticText* m_staticText8411;
|
||||||
|
wxStaticText* m_staticText66111;
|
||||||
|
wxStaticText* m_ViaPowerLoss;
|
||||||
|
wxStaticText* m_staticText8311;
|
||||||
|
wxStaticText* m_staticText79211;
|
||||||
|
wxStaticText* m_ViaThermalResistance;
|
||||||
|
wxStaticText* m_staticText791111;
|
||||||
|
wxStaticText* m_staticTextAmpacity;
|
||||||
|
wxStaticText* m_ViaAmpacity;
|
||||||
|
wxStaticText* m_staticTextAmpacityUnits;
|
||||||
|
wxStaticText* m_staticTextCapacitance;
|
||||||
|
wxStaticText* m_ViaCapacitance;
|
||||||
|
wxStaticText* m_staticTextCapacitanceUnits;
|
||||||
|
wxStaticText* m_staticTextRiseTimeOutput;
|
||||||
|
wxStaticText* m_RiseTimeOutput;
|
||||||
|
wxStaticText* m_staticTextRiseTimeOutputUnits;
|
||||||
|
wxStaticText* m_staticTextInductance;
|
||||||
|
wxStaticText* m_Inductance;
|
||||||
|
wxStaticText* m_staticTextInductanceUnits;
|
||||||
|
wxStaticText* m_staticTextReactance;
|
||||||
|
wxStaticText* m_Reactance;
|
||||||
|
wxStaticText* m_staticTextReactanceUnits;
|
||||||
wxPanel* m_panelElectricalSpacing;
|
wxPanel* m_panelElectricalSpacing;
|
||||||
UNIT_SELECTOR_LEN* m_ElectricalSpacingUnitsSelector;
|
UNIT_SELECTOR_LEN* m_ElectricalSpacingUnitsSelector;
|
||||||
wxStaticLine* m_staticline2;
|
wxStaticLine* m_staticline2;
|
||||||
|
@ -288,6 +355,9 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER
|
||||||
virtual void OnTWParametersChanged( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnTWParametersChanged( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnTWCalculateFromExtWidth( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnTWCalculateFromExtWidth( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnTWCalculateFromIntWidth( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnTWCalculateFromIntWidth( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnViaCalculate( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnViaRho_Button( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnViaEpsilonR_Button( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnElectricalSpacingUnitsSelection( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnElectricalSpacingUnitsSelection( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnElectricalSpacingRefresh( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnElectricalSpacingRefresh( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnTranslineSelection( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnTranslineSelection( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
@ -306,7 +376,7 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("PCB Calculator"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 877,580 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL, const wxString& name = wxT("pcb_calculator") );
|
PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("PCB Calculator"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL, const wxString& name = wxT("pcb_calculator") );
|
||||||
|
|
||||||
~PCB_CALCULATOR_FRAME_BASE();
|
~PCB_CALCULATOR_FRAME_BASE();
|
||||||
|
|
||||||
|
|
|
@ -176,6 +176,44 @@ private:
|
||||||
*/
|
*/
|
||||||
void TWUpdateModeDisplay();
|
void TWUpdateModeDisplay();
|
||||||
|
|
||||||
|
// Via size calculations
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function VS_Init
|
||||||
|
* Read config and init dialog widgets values
|
||||||
|
*/
|
||||||
|
void VS_Init( wxConfigBase* aCfg );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function VS_WriteConfig
|
||||||
|
* Write Via Size prameters in config
|
||||||
|
*/
|
||||||
|
void VS_WriteConfig( wxConfigBase* aCfg );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function OnViaCalculate
|
||||||
|
* Called when the user changes any value in the via calcultor.
|
||||||
|
*/
|
||||||
|
void OnViaCalculate( wxCommandEvent& event ) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function OnViaEpsilonR_Button
|
||||||
|
*/
|
||||||
|
void OnViaEpsilonR_Button( wxCommandEvent& event ) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function OnViaRho_Button
|
||||||
|
*/
|
||||||
|
void OnViaRho_Button( wxCommandEvent& event ) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function VSDisplayValues
|
||||||
|
* Displays the results of the calculation.
|
||||||
|
*/
|
||||||
|
void VSDisplayValues( double aViaResistance, double aVoltageDrop, double aPowerLoss,
|
||||||
|
double aEstimatedAmpacity, double aThermalResistance, double aCapacitance,
|
||||||
|
double aTimeDegradation, double aInductance, double aReactance );
|
||||||
|
|
||||||
// Electrical spacing panel:
|
// Electrical spacing panel:
|
||||||
void OnElectricalSpacingUnitsSelection( wxCommandEvent& event ) override;
|
void OnElectricalSpacingUnitsSelection( wxCommandEvent& event ) override;
|
||||||
void OnElectricalSpacingRefresh( wxCommandEvent& event ) override;
|
void OnElectricalSpacingRefresh( wxCommandEvent& event ) override;
|
||||||
|
|
|
@ -93,6 +93,8 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
|
|
||||||
TW_Init( config.get() );
|
TW_Init( config.get() );
|
||||||
|
|
||||||
|
VS_Init( config.get() );
|
||||||
|
|
||||||
SetAttenuator( m_AttenuatorsSelection->GetSelection() );
|
SetAttenuator( m_AttenuatorsSelection->GetSelection() );
|
||||||
|
|
||||||
ToleranceSelection( m_rbToleranceSelection->GetSelection() );
|
ToleranceSelection( m_rbToleranceSelection->GetSelection() );
|
||||||
|
@ -269,6 +271,8 @@ void PCB_CALCULATOR_FRAME::SaveSettings( wxConfigBase* aCfg )
|
||||||
|
|
||||||
TW_WriteConfig( aCfg );
|
TW_WriteConfig( aCfg );
|
||||||
|
|
||||||
|
VS_WriteConfig( aCfg );
|
||||||
|
|
||||||
for( unsigned ii = 0; ii < m_transline_list.size(); ii++ )
|
for( unsigned ii = 0; ii < m_transline_list.size(); ii++ )
|
||||||
m_transline_list[ii]->WriteConfig( aCfg );
|
m_transline_list[ii]->WriteConfig( aCfg );
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,308 @@
|
||||||
|
/*
|
||||||
|
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||||
|
*
|
||||||
|
* Copyright (C) 1992-2019 Kicad Developers, see change_log.txt for contributors.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, you may find one here:
|
||||||
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||||
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||||
|
* or you may write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* All calculations are based on this [1] online calculator:
|
||||||
|
*
|
||||||
|
* References:
|
||||||
|
*
|
||||||
|
* [1]: The CircuitCalculator.com Blog - PCB Via Calculator
|
||||||
|
* http://circuitcalculator.com/wordpress/2006/03/12/pcb-via-calculator/
|
||||||
|
*
|
||||||
|
* [2]: Constructing Your Power Supply - Layout Considerations
|
||||||
|
* https://www.ti.com/seclit/ml/slup230/slup230.pdf
|
||||||
|
*
|
||||||
|
* [3]: Current Carrying Capacity of Vias - Some Conceptual Observations
|
||||||
|
* https://www.ultracad.com/articles/viacurrents.pdf
|
||||||
|
*
|
||||||
|
* [4]: IPC-2221A - Generic Standard on Printed Board Design
|
||||||
|
* http://www.sphere.bc.ca/class/downloads/ipc_2221a-pcb%20standards.pdf
|
||||||
|
*
|
||||||
|
* [5]: Copper - online catalogue source - Goodfellow
|
||||||
|
* http://www.goodfellow.com/E/Copper.html
|
||||||
|
*
|
||||||
|
* [6]: Thermal Conductivity of Metals, Metallic Elements and Alloys
|
||||||
|
* https://www.engineeringtoolbox.com/thermal-conductivity-metals-d_858.html
|
||||||
|
*
|
||||||
|
* [7]: Johnson & Graham, High Speed Digital Design: A Handbook of Black Magic
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
#include <wx/wx.h>
|
||||||
|
#include <wx/config.h>
|
||||||
|
|
||||||
|
#include <pcb_calculator_frame_base.h>
|
||||||
|
|
||||||
|
#include <pcb_calculator.h>
|
||||||
|
#include <UnitSelector.h>
|
||||||
|
#include <units_scales.h>
|
||||||
|
|
||||||
|
extern double DoubleFromString( const wxString& TextValue );
|
||||||
|
|
||||||
|
// Key words to read/write some parameters in config:
|
||||||
|
#define KEYWORD_VS_HOLE_DIA wxT( "VS_Hole_Dia" )
|
||||||
|
#define KEYWORD_VS_HOLE_DIA_UNIT wxT( "VS_Hole_Dia_Unit" )
|
||||||
|
#define KEYWORD_VS_THICKNESS wxT( "VS_Plating_Thickness" )
|
||||||
|
#define KEYWORD_VS_THICKNESS_UNIT wxT( "VS_Plating_Thickness_Unit" )
|
||||||
|
#define KEYWORD_VS_LENGTH wxT( "VS_Via_Length" )
|
||||||
|
#define KEYWORD_VS_LENGTH_UNIT wxT( "VS_Via_Length_Unit" )
|
||||||
|
#define KEYWORD_VS_PAD_DIA wxT( "VS_Pad_Dia" )
|
||||||
|
#define KEYWORD_VS_PAD_DIA_UNIT wxT( "VS_Pad_Dia_Unit" )
|
||||||
|
#define KEYWORD_VS_CLEARANCE_DIA wxT( "VS_Clearance_Dia" )
|
||||||
|
#define KEYWORD_VS_CLEARANCE_DIA_UNIT wxT( "VS_Clearance_Dia_Unit" )
|
||||||
|
#define KEYWORD_VS_PCB_THICKNESS wxT( "VS_PCB_Thickness" )
|
||||||
|
#define KEYWORD_VS_PCB_THICKNESS_UNIT wxT( "VS_PCB_Thickness_Unit" )
|
||||||
|
#define KEYWORD_VS_CH_IMPEDANCE wxT( "VS_Characteristic_Impedance" )
|
||||||
|
#define KEYWORD_VS_CH_IMPEDANCE_UNIT wxT( "VS_Characteristic_Impedance_Unit" )
|
||||||
|
#define KEYWORD_VS_CURRENT wxT( "VS_Current" )
|
||||||
|
#define KEYWORD_VS_RESISTIVITY wxT( "VS_Resistivity" )
|
||||||
|
#define KEYWORD_VS_PERMITTIVITY wxT( "VS_Permittivity" )
|
||||||
|
#define KEYWORD_VS_TEMP_DIFF wxT( "VS_Temperature_Differential" )
|
||||||
|
#define KEYWORD_VS_PULSE_RISE_TIME wxT( "VS_Pulse_Rise_Time" )
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shows a list of current relative dielectric constant(Er)
|
||||||
|
* and set the selected value in main dialog frame
|
||||||
|
*/
|
||||||
|
void PCB_CALCULATOR_FRAME::OnViaEpsilonR_Button( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
wxArrayString list;
|
||||||
|
|
||||||
|
// EpsilonR ( relative dielectric constant) list
|
||||||
|
list.Add( wxT( "4.5 FR4" ) );
|
||||||
|
list.Add( wxT( "9.8 alumina (Al2O3)" ) );
|
||||||
|
list.Add( wxT( "3.78 fused quartz" ) );
|
||||||
|
list.Add( wxT( "3.38 RO4003" ) );
|
||||||
|
list.Add( wxT( "2.2 RT/duroid 5880" ) );
|
||||||
|
list.Add( wxT( "10.2 RT/duroid 6010LM" ) );
|
||||||
|
list.Add( wxT( "2.1 teflon (PTFE)" ) );
|
||||||
|
list.Add( wxT( "4.0 PVC" ) );
|
||||||
|
list.Add( wxT( "2.3 PE" ) );
|
||||||
|
list.Add( wxT( "6.6 beryllia (BeO)" ) );
|
||||||
|
list.Add( wxT( "8.7 aluminum nitride" ) );
|
||||||
|
list.Add( wxT( "11.9 silicon" ) );
|
||||||
|
list.Add( wxT( "12.9 GaAs" ) );
|
||||||
|
|
||||||
|
wxString value = wxGetSingleChoice( wxEmptyString,
|
||||||
|
_("Relative Dielectric Constants"), list).BeforeFirst( ' ' );
|
||||||
|
if( ! value.IsEmpty() )
|
||||||
|
m_textCtrlPlatingPermittivity->SetValue( value );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shows a list of current Specific resistance list (rho)
|
||||||
|
* and set the selected value in main dialog frame
|
||||||
|
*/
|
||||||
|
void PCB_CALCULATOR_FRAME::OnViaRho_Button( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
wxArrayString list;
|
||||||
|
|
||||||
|
// Specific resistance list in ohms*meters (rho):
|
||||||
|
list.Clear();
|
||||||
|
list.Add( wxT( "2.4e-8 gold" ) );
|
||||||
|
list.Add( wxT( "1.72e-8 copper" ) );
|
||||||
|
list.Add( wxT( "1.62e-8 silver" ) );
|
||||||
|
list.Add( wxT( "12.4e-8 tin" ) );
|
||||||
|
list.Add( wxT( "10.5e-8 platinum" ) );
|
||||||
|
list.Add( wxT( "2.62e-8 aluminum" ) );
|
||||||
|
list.Add( wxT( "6.9e-8 nickel" ) );
|
||||||
|
list.Add( wxT( "3.9e-8 brass (66Cu 34Zn)" ) );
|
||||||
|
list.Add( wxT( "9.71e-8 iron" ) );
|
||||||
|
list.Add( wxT( "6.0e-8 zinc" ) );
|
||||||
|
|
||||||
|
wxString value = wxGetSingleChoice( wxEmptyString,
|
||||||
|
_("Specific Resistance"), list).BeforeFirst( ' ' );
|
||||||
|
if( ! value.IsEmpty() )
|
||||||
|
m_textCtrlPlatingResistivity->SetValue( value );
|
||||||
|
}
|
||||||
|
|
||||||
|
void PCB_CALCULATOR_FRAME::VS_Init( wxConfigBase* aCfg )
|
||||||
|
{
|
||||||
|
int tmp;
|
||||||
|
wxString msg;
|
||||||
|
|
||||||
|
// Read parameter values
|
||||||
|
aCfg->Read( KEYWORD_VS_HOLE_DIA, &msg, wxT( "18" ) );
|
||||||
|
m_textCtrlHoleDia->SetValue( msg );
|
||||||
|
aCfg->Read( KEYWORD_VS_HOLE_DIA_UNIT, &tmp, 0 );
|
||||||
|
m_choiceHoleDia->SetSelection( tmp );
|
||||||
|
aCfg->Read( KEYWORD_VS_THICKNESS, &msg, wxT( "1" ) );
|
||||||
|
m_textCtrlPlatingThickness->SetValue( msg );
|
||||||
|
aCfg->Read( KEYWORD_VS_THICKNESS_UNIT, &tmp, 0 );
|
||||||
|
m_choicePlatingThickness->SetSelection( tmp );
|
||||||
|
aCfg->Read( KEYWORD_VS_LENGTH, &msg, wxT( "60" ) );
|
||||||
|
m_textCtrlViaLength->SetValue( msg );
|
||||||
|
aCfg->Read( KEYWORD_VS_LENGTH_UNIT, &tmp, 0 );
|
||||||
|
m_choiceViaLength->SetSelection( tmp );
|
||||||
|
aCfg->Read( KEYWORD_VS_PAD_DIA, &msg, wxT( "22" ) );
|
||||||
|
m_textCtrlViaPadDia->SetValue( msg );
|
||||||
|
aCfg->Read( KEYWORD_VS_PAD_DIA_UNIT, &tmp, 0 );
|
||||||
|
m_choiceViaPadDia->SetSelection( tmp );
|
||||||
|
aCfg->Read( KEYWORD_VS_CLEARANCE_DIA, &msg, wxT( "25" ) );
|
||||||
|
m_textCtrlClearanceDia->SetValue( msg );
|
||||||
|
aCfg->Read( KEYWORD_VS_CLEARANCE_DIA_UNIT, &tmp, 0 );
|
||||||
|
m_choiceClearanceDia->SetSelection( tmp );
|
||||||
|
aCfg->Read( KEYWORD_VS_PCB_THICKNESS, &msg, wxT( "70" ) );
|
||||||
|
m_textCtrlBoardThickness->SetValue( msg );
|
||||||
|
aCfg->Read( KEYWORD_VS_PCB_THICKNESS_UNIT, &tmp, 0 );
|
||||||
|
m_choiceBoardThickness->SetSelection( tmp );
|
||||||
|
aCfg->Read( KEYWORD_VS_CH_IMPEDANCE, &msg, wxT( "50" ) );
|
||||||
|
m_textCtrlImpedance->SetValue( msg );
|
||||||
|
aCfg->Read( KEYWORD_VS_CH_IMPEDANCE_UNIT , &tmp, 0 );
|
||||||
|
m_choiceImpedance->SetSelection( tmp );
|
||||||
|
aCfg->Read( KEYWORD_VS_CURRENT, &msg, wxT( "1" ) );
|
||||||
|
m_textCtrlAppliedCurrent->SetValue( msg );
|
||||||
|
aCfg->Read( KEYWORD_VS_RESISTIVITY, &msg, wxT( "1.72e-8" ) );
|
||||||
|
m_textCtrlPlatingResistivity->SetValue( msg );
|
||||||
|
aCfg->Read( KEYWORD_VS_PERMITTIVITY, &msg, wxT( "4.5" ) );
|
||||||
|
m_textCtrlPlatingPermittivity->SetValue( msg );
|
||||||
|
aCfg->Read( KEYWORD_VS_TEMP_DIFF, &msg, wxT( "10" ) );
|
||||||
|
m_textCtrlTemperatureDiff->SetValue( msg );
|
||||||
|
aCfg->Read( KEYWORD_VS_PULSE_RISE_TIME, &msg, wxT( "1" ) );
|
||||||
|
m_textCtrlRiseTime->SetValue( msg );
|
||||||
|
}
|
||||||
|
|
||||||
|
void PCB_CALCULATOR_FRAME::VS_WriteConfig( wxConfigBase* aCfg )
|
||||||
|
{
|
||||||
|
// Save current parameters values in config
|
||||||
|
aCfg->Write( KEYWORD_VS_HOLE_DIA, m_textCtrlHoleDia->GetValue() );
|
||||||
|
aCfg->Write( KEYWORD_VS_HOLE_DIA_UNIT, m_choiceHoleDia->GetSelection() );
|
||||||
|
aCfg->Write( KEYWORD_VS_THICKNESS, m_textCtrlPlatingThickness->GetValue() );
|
||||||
|
aCfg->Write( KEYWORD_VS_THICKNESS_UNIT, m_choicePlatingThickness->GetSelection() );
|
||||||
|
aCfg->Write( KEYWORD_VS_LENGTH, m_textCtrlViaLength->GetValue() );
|
||||||
|
aCfg->Write( KEYWORD_VS_LENGTH_UNIT, m_choiceViaLength->GetSelection() );
|
||||||
|
aCfg->Write( KEYWORD_VS_PAD_DIA, m_textCtrlViaPadDia->GetValue() );
|
||||||
|
aCfg->Write( KEYWORD_VS_PAD_DIA_UNIT, m_choiceViaPadDia->GetSelection() );
|
||||||
|
aCfg->Write( KEYWORD_VS_CLEARANCE_DIA, m_textCtrlClearanceDia->GetValue() );
|
||||||
|
aCfg->Write( KEYWORD_VS_CLEARANCE_DIA_UNIT, m_choiceClearanceDia->GetSelection() );
|
||||||
|
aCfg->Write( KEYWORD_VS_PCB_THICKNESS, m_textCtrlBoardThickness->GetValue() );
|
||||||
|
aCfg->Write( KEYWORD_VS_PCB_THICKNESS_UNIT, m_choiceBoardThickness->GetSelection() );
|
||||||
|
aCfg->Write( KEYWORD_VS_CH_IMPEDANCE, m_textCtrlImpedance->GetValue() );
|
||||||
|
aCfg->Write( KEYWORD_VS_CH_IMPEDANCE_UNIT, m_choiceImpedance->GetSelection() );
|
||||||
|
aCfg->Write( KEYWORD_VS_CURRENT, m_textCtrlAppliedCurrent->GetValue() );
|
||||||
|
aCfg->Write( KEYWORD_VS_RESISTIVITY, m_textCtrlPlatingResistivity->GetValue() );
|
||||||
|
aCfg->Write( KEYWORD_VS_PERMITTIVITY, m_textCtrlPlatingPermittivity->GetValue() );
|
||||||
|
aCfg->Write( KEYWORD_VS_TEMP_DIFF, m_textCtrlTemperatureDiff->GetValue() );
|
||||||
|
aCfg->Write( KEYWORD_VS_PULSE_RISE_TIME, m_textCtrlRiseTime->GetValue() );
|
||||||
|
}
|
||||||
|
|
||||||
|
void PCB_CALCULATOR_FRAME::OnViaCalculate( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
// Load parameters
|
||||||
|
double finishedHoleDia = std::abs( DoubleFromString( m_textCtrlHoleDia->GetValue() ) );
|
||||||
|
double platingThickness = std::abs( DoubleFromString( m_textCtrlPlatingThickness->GetValue() ) );
|
||||||
|
double viaLength = std::abs( DoubleFromString( m_textCtrlViaLength->GetValue() ) );
|
||||||
|
double padDia = std::abs( DoubleFromString( m_textCtrlViaPadDia->GetValue() ) );
|
||||||
|
double clearanceDia = std::abs( DoubleFromString( m_textCtrlClearanceDia->GetValue() ) );
|
||||||
|
double pcbThickness = std::abs( DoubleFromString( m_textCtrlBoardThickness->GetValue() ) );
|
||||||
|
double charImpedance = std::abs( DoubleFromString( m_textCtrlImpedance->GetValue() ) );
|
||||||
|
double appliedCurrent = std::abs( DoubleFromString( m_textCtrlAppliedCurrent->GetValue() ) );
|
||||||
|
double platingResistivity = std::abs( DoubleFromString( m_textCtrlPlatingResistivity->GetValue() ) );
|
||||||
|
double relativePermitivity = std::abs( DoubleFromString( m_textCtrlPlatingPermittivity->GetValue() ) );
|
||||||
|
double temperatureDiff = std::abs( DoubleFromString( m_textCtrlTemperatureDiff->GetValue() ) );
|
||||||
|
double pulseRiseTime = std::abs( DoubleFromString( m_textCtrlRiseTime->GetValue() ) );
|
||||||
|
|
||||||
|
// Normalize units
|
||||||
|
finishedHoleDia *= m_choiceHoleDia->GetUnitScale();
|
||||||
|
platingThickness *= m_choicePlatingThickness->GetUnitScale();
|
||||||
|
viaLength *= m_choiceViaLength->GetUnitScale();
|
||||||
|
padDia *= m_choiceViaPadDia->GetUnitScale();
|
||||||
|
clearanceDia *= m_choiceClearanceDia->GetUnitScale();
|
||||||
|
pcbThickness *= m_choiceBoardThickness->GetUnitScale();
|
||||||
|
charImpedance *= m_choiceImpedance->GetUnitScale();
|
||||||
|
platingResistivity = platingResistivity / 100; // Ohm-cm to Ohm-m
|
||||||
|
|
||||||
|
// Calculate cross-sectional area of the via's cylindrical structure [3]
|
||||||
|
double area = M_PI * (finishedHoleDia + platingThickness) * platingThickness; // m^2
|
||||||
|
|
||||||
|
double viaResistance = platingResistivity * viaLength / area; // Ohms
|
||||||
|
|
||||||
|
// Using thermal resistivity value 2.49e-3 meter-Kelvin/Watt, equivalent to
|
||||||
|
// thermal conductivity of 401 Watt/(meter-Kelvin) [5][6]
|
||||||
|
const double thermalResistivity = 2.49e-3; // m K/W
|
||||||
|
double thermalResistance = thermalResistivity * viaLength / area; // deg C/W
|
||||||
|
|
||||||
|
double voltageDrop = appliedCurrent * viaResistance;
|
||||||
|
|
||||||
|
double powerLoss = appliedCurrent * voltageDrop;
|
||||||
|
|
||||||
|
// Estimate current carrying capacity of the via
|
||||||
|
// See comment #17 in [1] for a brief discussion on the formula
|
||||||
|
// This formula from IPC-2221 [4] is also used in the Track Width calculator
|
||||||
|
area /= pow( UNIT_MIL, 2 ); // m^2 to mil^2
|
||||||
|
const double k = 0.048;
|
||||||
|
const double b = 0.44;
|
||||||
|
const double c = 0.725;
|
||||||
|
double estimatedAmpacity = k * pow( temperatureDiff, b ) * pow( area, c );
|
||||||
|
|
||||||
|
// Equation 7.6 in [7]
|
||||||
|
double capacitance = 55.51 * relativePermitivity * viaLength * padDia;
|
||||||
|
capacitance /= clearanceDia - padDia;
|
||||||
|
|
||||||
|
// Equation 7.8 in [7]
|
||||||
|
double timeDegradation = 2.2 * capacitance * charImpedance / 2;
|
||||||
|
|
||||||
|
// Equation 7.9 in [7]
|
||||||
|
double inductance = 200 * viaLength;
|
||||||
|
inductance *= log( 4 * viaLength / finishedHoleDia ) + 1;
|
||||||
|
|
||||||
|
// Equation 7.11 in [7]
|
||||||
|
double reactance = M_PI * inductance / pulseRiseTime;
|
||||||
|
|
||||||
|
// Update the display
|
||||||
|
VSDisplayValues( viaResistance, voltageDrop, powerLoss, estimatedAmpacity,
|
||||||
|
thermalResistance, capacitance, timeDegradation, inductance, reactance );
|
||||||
|
}
|
||||||
|
|
||||||
|
void PCB_CALCULATOR_FRAME::VSDisplayValues( double aViaResistance, double aVoltageDrop,
|
||||||
|
double aPowerLoss, double aEstimatedAmpacity, double aThermalResistance,
|
||||||
|
double aCapacitance, double aTimeDegradation, double aInductance, double aReactance )
|
||||||
|
{
|
||||||
|
wxString msg;
|
||||||
|
|
||||||
|
msg.Printf( wxT( "%g" ), aViaResistance );
|
||||||
|
m_ViaResistance->SetLabel( msg );
|
||||||
|
|
||||||
|
msg.Printf( wxT( "%g" ), aVoltageDrop );
|
||||||
|
m_ViaVoltageDrop->SetLabel( msg );
|
||||||
|
|
||||||
|
msg.Printf( wxT( "%g" ), aPowerLoss );
|
||||||
|
m_ViaPowerLoss->SetLabel( msg );
|
||||||
|
|
||||||
|
msg.Printf( wxT( "%g" ), aEstimatedAmpacity );
|
||||||
|
m_ViaAmpacity->SetLabel( msg );
|
||||||
|
|
||||||
|
msg.Printf( wxT( "%g" ), aThermalResistance );
|
||||||
|
m_ViaThermalResistance->SetLabel( msg );
|
||||||
|
|
||||||
|
msg.Printf( wxT( "%g" ), aCapacitance );
|
||||||
|
m_ViaCapacitance->SetLabel( msg );
|
||||||
|
|
||||||
|
msg.Printf( wxT( "%g" ), aTimeDegradation );
|
||||||
|
m_RiseTimeOutput->SetLabel( msg );
|
||||||
|
|
||||||
|
msg.Printf( wxT( "%g" ), aInductance );
|
||||||
|
m_Inductance->SetLabel( msg );
|
||||||
|
|
||||||
|
msg.Printf( wxT( "%g" ), aReactance );
|
||||||
|
m_Reactance->SetLabel( msg );
|
||||||
|
}
|
Loading…
Reference in New Issue