Add trace part movement command
This commit is contained in:
parent
990e5a2ef3
commit
da2b81312b
966
Gui/Resources/icons/Assembly_Trace.svg
Normal file
966
Gui/Resources/icons/Assembly_Trace.svg
Normal file
|
@ -0,0 +1,966 @@
|
|||
<?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: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"
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2985"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="Assembly_Trace.svg">
|
||||
<defs
|
||||
id="defs2987">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4173">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4175" />
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop4177" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4165">
|
||||
<stop
|
||||
style="stop-color:#888a85;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop4167" />
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop4169" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4060">
|
||||
<stop
|
||||
style="stop-color:#204a87;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4062" />
|
||||
<stop
|
||||
style="stop-color:#3465a4;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop4064" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4050">
|
||||
<stop
|
||||
style="stop-color:#3465a4;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop4052" />
|
||||
<stop
|
||||
style="stop-color:#729fcf;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop4054" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4113">
|
||||
<stop
|
||||
id="stop4115"
|
||||
offset="0"
|
||||
style="stop-color:#6f6f6f;stop-opacity:0.50196081;" />
|
||||
<stop
|
||||
id="stop4117"
|
||||
offset="1"
|
||||
style="stop-color:#ffffff;stop-opacity:0.50196081;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4081">
|
||||
<stop
|
||||
id="stop4083"
|
||||
offset="0"
|
||||
style="stop-color:#808080;stop-opacity:0.50196081;" />
|
||||
<stop
|
||||
id="stop4085"
|
||||
offset="1"
|
||||
style="stop-color:#ffffff;stop-opacity:0.50196081;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4049">
|
||||
<stop
|
||||
id="stop4051"
|
||||
offset="0"
|
||||
style="stop-color:#c1c1c1;stop-opacity:0.50196081;" />
|
||||
<stop
|
||||
id="stop4053"
|
||||
offset="1"
|
||||
style="stop-color:#ffffff;stop-opacity:0.50196081;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4015">
|
||||
<stop
|
||||
style="stop-color:#585858;stop-opacity:0.50196081;"
|
||||
offset="0"
|
||||
id="stop4017" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0.50196081;"
|
||||
offset="1"
|
||||
id="stop4019" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3968">
|
||||
<stop
|
||||
id="stop3970"
|
||||
offset="0"
|
||||
style="stop-color:#000000;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#828282;stop-opacity:1;"
|
||||
offset="0.54039383"
|
||||
id="stop3976" />
|
||||
<stop
|
||||
style="stop-color:#606060;stop-opacity:1;"
|
||||
offset="0.77134961"
|
||||
id="stop3974" />
|
||||
<stop
|
||||
id="stop3972"
|
||||
offset="1"
|
||||
style="stop-color:#000000;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3911">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3913" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop3915" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient3903">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3905" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop3907" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4722">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4724" />
|
||||
<stop
|
||||
style="stop-color:#bebebe;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop4726" />
|
||||
</linearGradient>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Mend"
|
||||
orient="auto"
|
||||
refY="0.0"
|
||||
refX="0.0"
|
||||
id="Arrow1Mend"
|
||||
style="overflow:visible;">
|
||||
<path
|
||||
id="path3873"
|
||||
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
|
||||
transform="scale(0.4) rotate(180) translate(10,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0.0"
|
||||
refX="0.0"
|
||||
id="Arrow1Lend"
|
||||
style="overflow:visible;">
|
||||
<path
|
||||
id="path3867"
|
||||
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
|
||||
transform="scale(0.8) rotate(180) translate(12.5,0)" />
|
||||
</marker>
|
||||
<linearGradient
|
||||
id="linearGradient3937">
|
||||
<stop
|
||||
style="stop-color:#be7328;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3939" />
|
||||
<stop
|
||||
style="stop-color:#dc962d;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3941" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3929">
|
||||
<stop
|
||||
id="stop3931"
|
||||
offset="0"
|
||||
style="stop-color:#c88c3c;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3933"
|
||||
offset="1"
|
||||
style="stop-color:#ffff96;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3893">
|
||||
<stop
|
||||
style="stop-color:#505050;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3895" />
|
||||
<stop
|
||||
style="stop-color:#aaaaaa;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3897" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3873">
|
||||
<stop
|
||||
style="stop-color:#f0be6e;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3875" />
|
||||
<stop
|
||||
style="stop-color:#c88228;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3877" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3863">
|
||||
<stop
|
||||
id="stop3865"
|
||||
offset="0"
|
||||
style="stop-color:#6e4b18;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3867"
|
||||
offset="1"
|
||||
style="stop-color:#c88228;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3979">
|
||||
<stop
|
||||
id="stop3981"
|
||||
offset="0"
|
||||
style="stop-color:#ffffff;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3983"
|
||||
offset="1"
|
||||
style="stop-color:#ff9600;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3971">
|
||||
<stop
|
||||
id="stop3973"
|
||||
offset="0"
|
||||
style="stop-color:#ffffff;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3975"
|
||||
offset="1"
|
||||
style="stop-color:#be7300;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Send"
|
||||
orient="auto"
|
||||
refY="0.0"
|
||||
refX="0.0"
|
||||
id="Arrow1Send"
|
||||
style="overflow:visible;">
|
||||
<path
|
||||
id="path4031"
|
||||
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
|
||||
transform="scale(0.2) rotate(180) translate(6,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Send"
|
||||
orient="auto"
|
||||
refY="0.0"
|
||||
refX="0.0"
|
||||
id="Arrow2Send"
|
||||
style="overflow:visible;">
|
||||
<path
|
||||
id="path4049"
|
||||
style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
|
||||
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
|
||||
transform="scale(0.3) rotate(180) translate(-2.3,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Sstart"
|
||||
orient="auto"
|
||||
refY="0.0"
|
||||
refX="0.0"
|
||||
id="Arrow2Sstart"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4046"
|
||||
style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
|
||||
transform="scale(0.3) translate(-2.3,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Mstart"
|
||||
orient="auto"
|
||||
refY="0.0"
|
||||
refX="0.0"
|
||||
id="Arrow2Mstart"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4040"
|
||||
style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
|
||||
transform="scale(0.6) translate(0,0)" />
|
||||
</marker>
|
||||
<linearGradient
|
||||
id="linearGradient3900">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3902" />
|
||||
<stop
|
||||
style="stop-color:#a0a0a0;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3904" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3882">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3884" />
|
||||
<stop
|
||||
style="stop-color:#960000;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3886" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3860">
|
||||
<stop
|
||||
style="stop-color:#1e76e3;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3862" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3864" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3860-6"
|
||||
id="linearGradient3866-5"
|
||||
x1="31.125395"
|
||||
y1="61.410763"
|
||||
x2="30.113636"
|
||||
y2="12.160761"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient3860-6">
|
||||
<stop
|
||||
style="stop-color:#5a9ff5;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3862-4" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3864-4" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3873"
|
||||
id="linearGradient3871"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="38.907837"
|
||||
y1="51.470051"
|
||||
x2="45.302406"
|
||||
y2="54.091148" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3863"
|
||||
id="linearGradient3891"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="51.657837"
|
||||
y1="34.470051"
|
||||
x2="45.427406"
|
||||
y2="32.216148" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3893"
|
||||
id="linearGradient3899"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="51.657837"
|
||||
y1="34.470051"
|
||||
x2="45.427406"
|
||||
y2="32.216148" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3882"
|
||||
id="radialGradient3903"
|
||||
cx="53.748837"
|
||||
cy="4.9173141"
|
||||
fx="53.748837"
|
||||
fy="4.9173141"
|
||||
r="3.2874005"
|
||||
gradientTransform="matrix(2.3303929,-1.4921636,1.0936999,1.7080907,-77.643882,78.644487)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3929"
|
||||
id="radialGradient3927"
|
||||
cx="15.125"
|
||||
cy="48.035076"
|
||||
fx="15.125"
|
||||
fy="48.035076"
|
||||
r="18.875"
|
||||
gradientTransform="matrix(2.7636523,-0.71644256,0.733044,2.8276918,-61.887066,-71.992203)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3937"
|
||||
id="radialGradient3943"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.40097726,-0.37931652,0.11734116,0.12404187,14.422507,4.6205505)"
|
||||
cx="-14.308363"
|
||||
cy="14.910047"
|
||||
fx="-14.308363"
|
||||
fy="14.910047"
|
||||
r="18.875" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3929"
|
||||
id="radialGradient3949"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(2.7636523,-0.71644256,0.733044,2.8276918,-61.887066,-71.992203)"
|
||||
cx="15.125"
|
||||
cy="48.035076"
|
||||
fx="15.125"
|
||||
fy="48.035076"
|
||||
r="18.875" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3937"
|
||||
id="radialGradient3951"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.40097726,-0.37931652,0.11734116,0.12404187,14.422507,4.6205505)"
|
||||
cx="-14.308363"
|
||||
cy="14.910047"
|
||||
fx="-14.308363"
|
||||
fy="14.910047"
|
||||
r="18.875" />
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Mend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Mend-3"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3873-0"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(-0.4,0,0,-0.4,-4,0)" />
|
||||
</marker>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4722"
|
||||
id="radialGradient4730"
|
||||
cx="22.399223"
|
||||
cy="27.920977"
|
||||
fx="22.399223"
|
||||
fy="27.920977"
|
||||
r="25.5625"
|
||||
gradientTransform="matrix(0.61346721,-0.22517965,0.21191717,0.57733561,2.1543769,16.986575)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3903"
|
||||
id="linearGradient3909"
|
||||
x1="33.267635"
|
||||
y1="23.615986"
|
||||
x2="33.267635"
|
||||
y2="63.06311"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3911"
|
||||
id="linearGradient3917"
|
||||
x1="39.647182"
|
||||
y1="67.479065"
|
||||
x2="39.647182"
|
||||
y2="15.294641"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3911"
|
||||
id="linearGradient3928"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="39.647182"
|
||||
y1="67.479065"
|
||||
x2="39.647182"
|
||||
y2="15.294641" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3903"
|
||||
id="linearGradient3930"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="33.267635"
|
||||
y1="23.615986"
|
||||
x2="33.267635"
|
||||
y2="63.06311" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3911"
|
||||
id="linearGradient3935"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="39.647182"
|
||||
y1="67.479065"
|
||||
x2="39.647182"
|
||||
y2="15.294641" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3903"
|
||||
id="linearGradient3938"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="33.267635"
|
||||
y1="23.615986"
|
||||
x2="33.267635"
|
||||
y2="63.06311" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3968"
|
||||
id="radialGradient3952"
|
||||
cx="30.228815"
|
||||
cy="20.070992"
|
||||
fx="30.228815"
|
||||
fy="20.070992"
|
||||
r="3.4475341"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.2238696,-8.502217e-5,8.5302128e-5,1.2278995,-6.7690238,-4.5715991)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4021"
|
||||
x1="53.411106"
|
||||
y1="58.639683"
|
||||
x2="32.679878"
|
||||
y2="21.516573"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4047"
|
||||
x1="20.465359"
|
||||
y1="-8.8792562"
|
||||
x2="33.356091"
|
||||
y2="21.526335"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4079"
|
||||
x1="3.5355339"
|
||||
y1="17.904108"
|
||||
x2="33.157169"
|
||||
y2="22.146749"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4111"
|
||||
x1="11.667262"
|
||||
y1="37.693783"
|
||||
x2="32.844353"
|
||||
y2="22.137434"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4143"
|
||||
x1="19.445436"
|
||||
y1="39.81237"
|
||||
x2="32.639404"
|
||||
y2="21.60437"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4180"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="53.411106"
|
||||
y1="58.639683"
|
||||
x2="32.679878"
|
||||
y2="21.516573" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4182"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="20.465359"
|
||||
y1="-8.8792562"
|
||||
x2="33.356091"
|
||||
y2="21.526335" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4184"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="3.5355339"
|
||||
y1="17.904108"
|
||||
x2="33.157169"
|
||||
y2="22.146749" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4186"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="11.667262"
|
||||
y1="37.693783"
|
||||
x2="32.844353"
|
||||
y2="22.137434" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4188"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="19.445436"
|
||||
y1="39.81237"
|
||||
x2="32.639404"
|
||||
y2="21.60437" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4219"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="53.411106"
|
||||
y1="58.639683"
|
||||
x2="32.679878"
|
||||
y2="21.516573" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4221"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="20.465359"
|
||||
y1="-8.8792562"
|
||||
x2="33.356091"
|
||||
y2="21.526335" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4223"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="3.5355339"
|
||||
y1="17.904108"
|
||||
x2="33.157169"
|
||||
y2="22.146749" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4225"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="11.667262"
|
||||
y1="37.693783"
|
||||
x2="32.844353"
|
||||
y2="22.137434" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4015"
|
||||
id="linearGradient4227"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="19.445436"
|
||||
y1="39.81237"
|
||||
x2="32.639404"
|
||||
y2="21.60437" />
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Mend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Mend-9"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3873-03"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(-0.4,0,0,-0.4,-4,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Mend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="marker3057"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3059"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(-0.4,0,0,-0.4,-4,0)" />
|
||||
</marker>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3935-1"
|
||||
id="radialGradient3944"
|
||||
cx="27"
|
||||
cy="26.346153"
|
||||
fx="27"
|
||||
fy="26.346153"
|
||||
r="21"
|
||||
gradientTransform="matrix(0.42857143,1.1428572,-0.86944853,0.32604319,38.335196,-12.447128)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient3935-1">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3937" />
|
||||
<stop
|
||||
style="stop-color:#888a85;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3940" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4050"
|
||||
id="linearGradient4056"
|
||||
x1="-55"
|
||||
y1="45"
|
||||
x2="-56"
|
||||
y2="37"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4060"
|
||||
id="linearGradient4066"
|
||||
x1="-33"
|
||||
y1="45"
|
||||
x2="-35"
|
||||
y2="37"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4165"
|
||||
id="linearGradient4171"
|
||||
x1="-48"
|
||||
y1="36"
|
||||
x2="-53"
|
||||
y2="7"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4173"
|
||||
id="linearGradient4179"
|
||||
x1="-30"
|
||||
y1="29"
|
||||
x2="-31"
|
||||
y2="13"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.2170726"
|
||||
inkscape:cx="-133.24295"
|
||||
inkscape:cy="0.58685745"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1375"
|
||||
inkscape:window-height="876"
|
||||
inkscape:window-x="65"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:snap-bbox="false"
|
||||
inkscape:snap-nodes="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3137"
|
||||
empspacing="2"
|
||||
visible="true"
|
||||
enabled="true"
|
||||
snapvisiblegridlinesonly="true" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata2990">
|
||||
<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>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[J.L. Cercos-Pita]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:title>Ship_CapacityCurve</dc:title>
|
||||
<dc:date>2014-12-12</dc:date>
|
||||
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Ship/resources/icons/Ship_CapacityCurve.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<cc:license>https://www.gnu.org/copyleft/lesser.html</cc:license>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<g
|
||||
id="g3981"
|
||||
transform="translate(-3.3406913,-0.87148469)">
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3139"
|
||||
d="M 9,55 C 35,55 35,5 59,5"
|
||||
style="fill:none;stroke:#a40000;stroke-width:6;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3139-7"
|
||||
d="M 9,55 C 35,55 35,5 59,5"
|
||||
style="fill:none;stroke:#ef2929;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:6;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 9,7.0000001 9,59"
|
||||
id="path3047"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:#d3d7cf;stroke:#2e3436;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 9,7.0000001 7,11 l 4,0 z"
|
||||
id="path3859"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:#d3d7cf;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 9,7.0000001 7,11 l 4,0 z"
|
||||
id="path3859-7"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3047-2"
|
||||
d="M 57,55 5,55"
|
||||
style="fill:none;stroke:#2e3436;stroke-width:6;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3859-4"
|
||||
d="m 57,55 -4,-2 0,4 z"
|
||||
style="fill:#d3d7cf;stroke:#2e3436;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3859-7-5"
|
||||
d="m 57,55 -4,-2 0,4 z"
|
||||
style="fill:#d3d7cf;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3047-1-5"
|
||||
d="M 57,55 5,55"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 9,7.0000001 9,59"
|
||||
id="path3047-1"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<g
|
||||
id="g4068" />
|
||||
<g
|
||||
style="stroke:#271903;stroke-width:1"
|
||||
transform="matrix(-0.85358103,-0.06348248,-0.33736024,0.80312478,462.51401,-11.965329)"
|
||||
id="g3973">
|
||||
<g
|
||||
style="stroke-width:1"
|
||||
id="g3939">
|
||||
<rect
|
||||
style="fill:#d3d7cf;fill-opacity:1;stroke:#2e3436;stroke-width:2.37886381;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.89999998;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3933"
|
||||
width="16.827255"
|
||||
height="4.0355906"
|
||||
x="-253.6333"
|
||||
y="375.18082"
|
||||
transform="matrix(-0.71328835,0.7008707,0.71328836,0.70087068,0,0)" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3969"
|
||||
d="m 477.31119,113.47336 5.38951,17.33174 -17.6928,-5.799 -2.03543,-4 10.17717,-10 z"
|
||||
style="fill:#ffffff;stroke:#271903;stroke-width:2.37868023;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3843-5-6"
|
||||
d="m 451.40433,88.017513 -4.00089,3.931243 25.18722,24.748734 c 0.002,-3.68844 0.56098,-3.37983 4.72053,-3.22413 z"
|
||||
style="fill:#e9b96e;stroke:#271903;stroke-width:2.37868023;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3843-5-6-2"
|
||||
d="m 447.40344,91.948756 -4.0009,3.931244 25.18723,24.74874 c 0.0722,-3.7572 0.002,-3.68845 4.00089,-3.93125 z"
|
||||
style="fill:#c17d11;stroke:#271903;stroke-width:2.37868023;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3843-5-6-9"
|
||||
d="m 443.40254,95.880002 -4.00089,3.93124 25.18722,24.748738 c 0.56118,-3.37983 0.0722,-3.75719 4.0009,-3.93124 z"
|
||||
style="fill:#8f5902;stroke:#271903;stroke-width:2.37868023;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3971"
|
||||
d="m 479.82216,122.31981 c -3.19428,0.31024 -5.19473,2.27586 -5.75708,5.65686 l 8.63562,2.82843 -2.87854,-8.48529 0,0"
|
||||
style="fill:#271903;stroke:#271903;stroke-width:1.18934011px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||
<rect
|
||||
style="fill:#cc0000;fill-opacity:1;stroke:#280000;stroke-width:2.37886381;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.89999998;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3935"
|
||||
width="16.827255"
|
||||
height="6.0533857"
|
||||
x="-253.6333"
|
||||
y="369.12744"
|
||||
transform="matrix(-0.71328835,0.7008707,0.71328836,0.70087068,0,0)" />
|
||||
<path
|
||||
style="fill:none;stroke:#ef2929;stroke-width:2.37868047;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 445.80571,86.447596 -2.1589,-2.121316 -9.00202,8.845293"
|
||||
id="path3937"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 30 KiB |
99
assembly.py
99
assembly.py
|
@ -547,55 +547,69 @@ class AsmElementLink(AsmBase):
|
|||
def setPlacement(part,pla,undoDocs,undoName=None):
|
||||
AsmElementLink.setPlacement(part,pla,undoDocs,undoName)
|
||||
|
||||
|
||||
class ViewProviderAsmElementLink(ViewProviderAsmBase):
|
||||
def __init__(self,vobj):
|
||||
self._draggingPart = None
|
||||
self._draggingOffset = None
|
||||
self._draggingOffsetInv = None
|
||||
self._draggingUndos = None
|
||||
self._draggingPlacement = None
|
||||
super(ViewProviderAsmElementLink,self).__init__(vobj)
|
||||
|
||||
def doubleClicked(self, vobj):
|
||||
return vobj.Document.setEdit(vobj,1)
|
||||
|
||||
def onExecute(self,info):
|
||||
if not getattr(self,'_draggingPart',None):
|
||||
return
|
||||
self._draggingPart = info.Part
|
||||
self._draggingPlacement = info.Placement.multiply(
|
||||
FreeCAD.Placement(self._draggingOffset))
|
||||
self.ViewObject.DraggingPlacement = self._draggingPlacement
|
||||
|
||||
def initDraggingPlacement(self):
|
||||
obj = self.ViewObject.Object
|
||||
info = obj.Proxy.getInfo()
|
||||
self._draggingPart = info.Part
|
||||
class AsmDraggingContext(object):
|
||||
def __init__(self,info):
|
||||
self.undos = None
|
||||
self.part = info.Part
|
||||
rot = utils.getElementRotation(info.Shape)
|
||||
if not rot:
|
||||
# in case the shape has no normal, like a vertex, just use an empty
|
||||
# rotation, which means having the same rotation has the owner part.
|
||||
rot = FreeCAD.Rotation()
|
||||
pla = FreeCAD.Placement(utils.getElementPos(info.Shape),rot)
|
||||
self._draggingOffset = FreeCAD.Placement(pla.toMatrix())
|
||||
self._draggingOffsetInv = FreeCAD.Placement(pla.toMatrix().inverse())
|
||||
self._draggingPlacement = info.Placement.multiply(pla)
|
||||
mat = FreeCADGui.editDocument().EditingTransform
|
||||
return (mat,self._draggingPlacement,info.Shape.BoundBox)
|
||||
self.offset = FreeCAD.Placement(pla.toMatrix())
|
||||
self.offsetInv = FreeCAD.Placement(pla.toMatrix().inverse())
|
||||
self.placement = info.Placement.multiply(pla)
|
||||
self.tracePoint = self.placement.Base
|
||||
self.trace = None
|
||||
|
||||
def update(self,info):
|
||||
self.part = info.Part
|
||||
pla = info.Placement.multiply(FreeCAD.Placement(self.offset))
|
||||
self.placement = pla
|
||||
if asm3.gui.AsmCmdManager.Trace and \
|
||||
self.tracePoint.isEqual(pla.Base,1e5):
|
||||
if not self.trace:
|
||||
self.trace = FreeCAD.ActiveDocument.addObject(
|
||||
'Part::Polygon','AsmTrace')
|
||||
self.trace.Nodes = {-1:self.tracePoint}
|
||||
self.tracePoint = pla.Base
|
||||
self.trace.Nodes = {-1:pla.Base}
|
||||
self.trace.recompute()
|
||||
return pla
|
||||
|
||||
|
||||
class ViewProviderAsmElementLink(ViewProviderAsmBase):
|
||||
def __init__(self,vobj):
|
||||
self._draggingContext = None
|
||||
super(ViewProviderAsmElementLink,self).__init__(vobj)
|
||||
|
||||
def doubleClicked(self, vobj):
|
||||
return vobj.Document.setEdit(vobj,1)
|
||||
|
||||
def onExecute(self,info):
|
||||
if not getattr(self,'_draggingContext',None):
|
||||
return
|
||||
self.ViewObject.DraggingPlacement = self._draggingContext.update(info)
|
||||
|
||||
def initDraggingPlacement(self):
|
||||
info = self.ViewObject.Object.Proxy.getInfo()
|
||||
self._draggingContext = AsmDraggingContext(info)
|
||||
return (FreeCADGui.editDocument().EditingTransform,
|
||||
self._draggingContext.placement,
|
||||
info.Shape.BoundBox)
|
||||
|
||||
def onDragStart(self):
|
||||
self._draggingUndos = set()
|
||||
self._draggingContext.undos = set()
|
||||
|
||||
def onDragMotion(self):
|
||||
pla = self.ViewObject.DraggingPlacement.multiply(
|
||||
self._draggingOffsetInv)
|
||||
setPlacement(self._draggingPart,pla,
|
||||
self._draggingUndos, 'Assembly drag')
|
||||
|
||||
obj = self.ViewObject.Object
|
||||
ctx = self._draggingContext
|
||||
pla = self.ViewObject.DraggingPlacement.multiply(ctx.offsetInv)
|
||||
setPlacement(ctx.part,pla,ctx.undos, 'Assembly drag')
|
||||
|
||||
from PySide import QtCore,QtGui
|
||||
|
||||
obj = self.ViewObject.Object
|
||||
if QtGui.QApplication.keyboardModifiers() == QtCore.Qt.ControlModifier:
|
||||
obj.getLinkedObject(False).recompute()
|
||||
obj.recompute()
|
||||
|
@ -605,19 +619,14 @@ class ViewProviderAsmElementLink(ViewProviderAsmBase):
|
|||
asm3.solver.solve(obj.Proxy.getAssembly().Object)
|
||||
except RuntimeError as e:
|
||||
logger.error(e)
|
||||
return self._draggingPlacement
|
||||
return ctx.placement
|
||||
|
||||
def onDragEnd(self):
|
||||
for doc in self._draggingUndos:
|
||||
for doc in self._draggingContext.undos:
|
||||
doc.commitTransaction()
|
||||
self._draggingUndos.clear()
|
||||
|
||||
def unsetEdit(self,_vobj,_mode):
|
||||
self._draggingPart = None
|
||||
self._draggingOffset = None
|
||||
self._draggingOffsetInv = None
|
||||
self._draggingUndos = None
|
||||
self._draggingPlacement = None
|
||||
self._draggingContext = None
|
||||
return False
|
||||
|
||||
|
||||
|
|
73
gui.py
73
gui.py
|
@ -59,6 +59,16 @@ class AsmCmdManager(ProxyType):
|
|||
name = mcs._defaultMenuGroupName
|
||||
mcs.Menus.setdefault(name,[]).append(cls)
|
||||
|
||||
def getParamGroup(cls):
|
||||
return FreeCAD.ParamGet(
|
||||
'User parameter:BaseApp/Preferences/Mod/Assembly3')
|
||||
|
||||
def getParam(cls,tp,name,default=None):
|
||||
return getattr(cls.getParamGroup(),'Get'+tp)(name,default)
|
||||
|
||||
def setParam(cls,tp,name,v):
|
||||
getattr(cls.getParamGroup(),'Set'+tp)(name,v)
|
||||
|
||||
def workbenchActivated(cls):
|
||||
pass
|
||||
|
||||
|
@ -158,3 +168,66 @@ class AsmCmdAxialMove(AsmCmdMove):
|
|||
_iconName = 'Assembly_AxialMove.svg'
|
||||
_useCenterballDragger = False
|
||||
|
||||
class AsmCmdCheckable(AsmCmdBase):
|
||||
_id = -2
|
||||
_action = None
|
||||
_saveParam = False
|
||||
|
||||
@classmethod
|
||||
def getAttributeName(cls):
|
||||
return cls.__name__[6:]
|
||||
|
||||
@classmethod
|
||||
def getChecked(cls):
|
||||
return getattr(cls.__class__,cls.getAttributeName())
|
||||
|
||||
@classmethod
|
||||
def setChecked(cls,v):
|
||||
setattr(cls.__class__,cls.getAttributeName(),v)
|
||||
cls.setParam('Bool',cls.getAttributeName(),v)
|
||||
|
||||
@classmethod
|
||||
def onRegister(cls):
|
||||
if cls._saveParam:
|
||||
v = cls.getParam('Bool',cls.getAttributeName(),False)
|
||||
else:
|
||||
v = False
|
||||
cls.setChecked(v)
|
||||
|
||||
@classmethod
|
||||
def workbenchActivated(cls):
|
||||
if cls._action:
|
||||
return
|
||||
from PySide import QtGui
|
||||
mw = FreeCADGui.getMainWindow()
|
||||
tb = mw.findChild(QtGui.QToolBar,cls._toolbarName)
|
||||
if not tb:
|
||||
logger.error('cannot find toolbar "{}"'.format(cls._toolbarName))
|
||||
return
|
||||
name = cls.getName()
|
||||
for action in tb.actions():
|
||||
if action.objectName() == name:
|
||||
action.setCheckable(True)
|
||||
action.setChecked(cls.getChecked())
|
||||
cls._action = action
|
||||
break
|
||||
if not cls._action:
|
||||
cls._active = False
|
||||
logger.error('cannot find action "{}"'.format(cls.getName()))
|
||||
else:
|
||||
cls._active = True
|
||||
return
|
||||
|
||||
@classmethod
|
||||
def Activated(cls):
|
||||
if not cls._action:
|
||||
return
|
||||
checked = not cls.getChecked()
|
||||
cls.setChecked(checked)
|
||||
cls._action.setChecked(checked)
|
||||
|
||||
class AsmCmdTrace(AsmCmdCheckable):
|
||||
_id = 4
|
||||
_menuText = 'Trace part move'
|
||||
_iconName = 'Assembly_Trace.svg'
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user