see also: https://github.com/jscad/OpenJSCAD.org/discussions/819
Parts:
Read File:M12ViceHandleKnob.xml into BlocksCAD
Read File:M12ViceHandleKnob.xml into BlocksCAD
<xml xmlns="https://blockscad3d.com">
<version num="1.13.0"></version>
<color rgba="255,128,255"></color>
<block type="procedures_callnoreturn" id="K7n@]+UN3OB%%SgZXm[G" x="-2130" y="-440">
<mutation name="knob">
<arg name="screwdiameter"></arg>
<arg name="radius"></arg>
</mutation>
<value name="ARG0">
<block type="math_number" id="2hWWDODGS5XAD[(vecI1">
<field name="NUM">12.3</field>
</block>
</value>
<value name="ARG1">
<block type="math_number" id="Ra@0W)~5HXv~laz*vwhw">
<field name="NUM">20</field>
</block>
</value>
</block>
<block type="procedures_defnoreturn" id="}z+#0D0xkg5IPW~6dASc" x="-2127" y="-352">
<mutation>
<arg name="screwdiameter"></arg>
<arg name="radius"></arg>
</mutation>
<field name="NAME">knob</field>
<statement name="STACK">
<block type="difference" id="%BR7mF0YLKRvy#y)*jlW">
<mutation minus="1"></mutation>
<statement name="A">
<block type="sphere" id=")Ro2Sn+K?dHaS/YBgO(K">
<value name="RAD">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="*qB){hFvq{)Y=8ipd}N=">
<field name="NUM">5</field>
</shadow>
<block type="variables_get" id="h)hV1pTrmya}Z(82p?ug">
<field name="VAR">radius</field>
</block>
</value>
</block>
</statement>
<statement name="MINUS0">
<block type="cylinder" id="_v.Fa1({g[y?|5h0Xrt0">
<field name="LOCKED">TRUE</field>
<field name="CENTERDROPDOWN">true</field>
<value name="RAD1">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="a[0zf2e-Y.la:4LlfhE[">
<field name="NUM">3.175</field>
</shadow>
<block type="math_arithmetic" id="pC.Lp{6kpfR`nZ_0_Q]]">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="I{U;~]SCYF|XGWn-]Oah">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="I0}k]qi8#Xfcz85zVjMi">
<field name="VAR">screwdiameter</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="Plt@gr@RHqEd)ovho3d.">
<field name="NUM">2</field>
</shadow>
</value>
</block>
</value>
<value name="RAD2">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="Chq*`1WOs7eTDhly8+*B">
<field name="NUM">3.175</field>
</shadow>
<block type="math_arithmetic" id="+,gUWrICug!rN2gF^zfE">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="I{U;~]SCYF|XGWn-]Oah">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="n^%!uDn7Zs#w~rC)X|xA">
<field name="VAR">screwdiameter</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="/K1W];Eh~lmiAT2yWmV6">
<field name="NUM">2</field>
</shadow>
</value>
</block>
</value>
<value name="HEIGHT">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="K|:g9;F:^N#-GPFI)y9h">
<field name="NUM">13.5</field>
</shadow>
<block type="math_arithmetic" id="@98U|PfnT^m]-CG(KK6L">
<field name="OP">MULTIPLY</field>
<value name="A">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="e!Gu;WozrYIfC2BQ:N;1">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="p*M*5D]]IQq3)|ew?*y4">
<field name="VAR">radius</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="pH6%_ejNn_mIkD::IHH;">
<field name="NUM">2</field>
</shadow>
</value>
</block>
</value>
</block>
</statement>
<statement name="MINUS1">
<block type="variables_set" id="x}GG{pA9=eTHBs@:wIx-">
<field name="VAR">headiameter</field>
<value name="VALUE">
<block type="math_number" id="Dzeb[:RnaOvDYgzLEE@n">
<field name="NUM">22</field>
</block>
</value>
<next>
<block type="variables_set" id="*#:rmveV[s18~%mT`#KI">
<field name="VAR">head</field>
<value name="VALUE">
<block type="math_number" id="bcQGFPr;9|G(a0At]s!,">
<field name="NUM">9</field>
</block>
</value>
<next>
<block type="translate" id="ROeNh0q3AguO@a}-fAP1">
<value name="XVAL">
<shadow type="math_number" id="6/1-f=HoHEV-Qa80WjTU">
<field name="NUM">0</field>
</shadow>
</value>
<value name="YVAL">
<shadow type="math_number" id="}|!ZpLXB3^yLg6|[be:5">
<field name="NUM">0</field>
</shadow>
</value>
<value name="ZVAL">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="Z86_(RdeBBh(By6X#Uh[">
<field name="NUM">0</field>
</shadow>
<block type="math_arithmetic" id="l}{Ewb8zETVsIYPIVk]j">
<field name="OP">MINUS</field>
<value name="A">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="I{U;~]SCYF|XGWn-]Oah">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="_4;n.-KNiT[3wR7,uprG">
<field name="VAR">radius</field>
</block>
</value>
<value name="B">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="^7kIcW+tk@TD6o(,?2`/">
<field name="NUM">3.5</field>
</shadow>
<block type="math_arithmetic" id="bJ-2rw6:a|E*OzMbe^-Y">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="Jo?*9dY{==4=,.e@|t:;">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="`w^;7XOrEU;fD6!~aCWu">
<field name="VAR">head</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="]E;O_wy[q@7qZ)1FuF@)">
<field name="NUM">2</field>
</shadow>
</value>
</block>
</value>
</block>
</value>
<statement name="A">
<block type="procedures_callnoreturn" id="-_ne;:u4SI/KLV/Jj[nh">
<mutation name="screwhead">
<arg name="phead"></arg>
<arg name="pheaddiameter"></arg>
</mutation>
<value name="ARG0">
<block type="variables_get" id="%RrXTEcnTzR0[gcUI#`.">
<field name="VAR">head</field>
</block>
</value>
<value name="ARG1">
<block type="variables_get" id="*d^/D8/B8WebXo9|?28_">
<field name="VAR">headiameter</field>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
<block type="procedures_defnoreturn" id="S(RX0}^(LQVuZB?jfKtM" x="-2131" y="74">
<mutation>
<arg name="phead"></arg>
<arg name="pheaddiameter"></arg>
</mutation>
<field name="NAME">screwhead</field>
<statement name="STACK">
<block type="$fn" id="2)J}er7o)qay1G)+G90t">
<value name="SIDES">
<shadow type="math_number" id="|JV+@]8(Z/(7S#?-UsB!">
<field name="NUM">6</field>
</shadow>
</value>
<statement name="A">
<block type="cylinder" id="}W(R1;R]upEC(uWTyE{r">
<field name="LOCKED">TRUE</field>
<field name="CENTERDROPDOWN">true</field>
<value name="RAD1">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="/.Y4CzXIKS@[S)6WMjPq">
<field name="NUM">6.25</field>
</shadow>
<block type="math_arithmetic" id="2^:TVe931!vtRpYw93QQ">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="I{U;~]SCYF|XGWn-]Oah">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="_^y@Sn.~@Lpo%A%k1X!I">
<field name="VAR">pheaddiameter</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="U_*QNaoNCz|hhlybpiGh">
<field name="NUM">2</field>
</shadow>
</value>
</block>
</value>
<value name="RAD2">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="3xvccMdADxh8avWmGZ(2">
<field name="NUM">6.25</field>
</shadow>
<block type="math_arithmetic" id="hJx(C+QuWA`{KUe5_lpA">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="I{U;~]SCYF|XGWn-]Oah">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="TONdedww:WEIwYz_@(_`">
<field name="VAR">pheaddiameter</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="9O=._[D6m]QX!uUXJ%Z=">
<field name="NUM">2</field>
</shadow>
</value>
</block>
</value>
<value name="HEIGHT">
<shadow xmlns="https://blockscad3d.com" type="math_number" id=",z@T:xy{O[YG-*#_0sE^">
<field name="NUM">4.5</field>
</shadow>
<block type="variables_get" id="y,dJ}(i?PD^]o-fc=In)">
<field name="VAR">phead</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</xml>
<xml xmlns="https://blockscad3d.com">
<version num="1.13.0"></version>
<color rgba="255,128,255"></color>
<block type="procedures_callnoreturn" id="K7n@]+UN3OB%%SgZXm[G" x="-2130" y="-440">
<mutation name="knob">
<arg name="screwdiameter"></arg>
<arg name="radius"></arg>
</mutation>
<value name="ARG0">
<block type="math_number" id="2hWWDODGS5XAD[(vecI1">
<field name="NUM">12.3</field>
</block>
</value>
<value name="ARG1">
<block type="math_number" id="Ra@0W)~5HXv~laz*vwhw">
<field name="NUM">20</field>
</block>
</value>
</block>
<block type="procedures_defnoreturn" id="}z+#0D0xkg5IPW~6dASc" x="-2127" y="-352">
<mutation>
<arg name="screwdiameter"></arg>
<arg name="radius"></arg>
</mutation>
<field name="NAME">knob</field>
<statement name="STACK">
<block type="difference" id="%BR7mF0YLKRvy#y)*jlW">
<mutation minus="1"></mutation>
<statement name="A">
<block type="sphere" id=")Ro2Sn+K?dHaS/YBgO(K">
<value name="RAD">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="*qB){hFvq{)Y=8ipd}N=">
<field name="NUM">5</field>
</shadow>
<block type="variables_get" id="h)hV1pTrmya}Z(82p?ug">
<field name="VAR">radius</field>
</block>
</value>
</block>
</statement>
<statement name="MINUS0">
<block type="cylinder" id="_v.Fa1({g[y?|5h0Xrt0">
<field name="LOCKED">TRUE</field>
<field name="CENTERDROPDOWN">true</field>
<value name="RAD1">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="a[0zf2e-Y.la:4LlfhE[">
<field name="NUM">3.175</field>
</shadow>
<block type="math_arithmetic" id="pC.Lp{6kpfR`nZ_0_Q]]">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="I{U;~]SCYF|XGWn-]Oah">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="I0}k]qi8#Xfcz85zVjMi">
<field name="VAR">screwdiameter</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="Plt@gr@RHqEd)ovho3d.">
<field name="NUM">2</field>
</shadow>
</value>
</block>
</value>
<value name="RAD2">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="Chq*`1WOs7eTDhly8+*B">
<field name="NUM">3.175</field>
</shadow>
<block type="math_arithmetic" id="+,gUWrICug!rN2gF^zfE">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="I{U;~]SCYF|XGWn-]Oah">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="n^%!uDn7Zs#w~rC)X|xA">
<field name="VAR">screwdiameter</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="/K1W];Eh~lmiAT2yWmV6">
<field name="NUM">2</field>
</shadow>
</value>
</block>
</value>
<value name="HEIGHT">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="K|:g9;F:^N#-GPFI)y9h">
<field name="NUM">13.5</field>
</shadow>
<block type="math_arithmetic" id="@98U|PfnT^m]-CG(KK6L">
<field name="OP">MULTIPLY</field>
<value name="A">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="e!Gu;WozrYIfC2BQ:N;1">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="p*M*5D]]IQq3)|ew?*y4">
<field name="VAR">radius</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="pH6%_ejNn_mIkD::IHH;">
<field name="NUM">2</field>
</shadow>
</value>
</block>
</value>
</block>
</statement>
<statement name="MINUS1">
<block type="variables_set" id="x}GG{pA9=eTHBs@:wIx-">
<field name="VAR">headiameter</field>
<value name="VALUE">
<block type="math_number" id="Dzeb[:RnaOvDYgzLEE@n">
<field name="NUM">22</field>
</block>
</value>
<next>
<block type="variables_set" id="*#:rmveV[s18~%mT`#KI">
<field name="VAR">head</field>
<value name="VALUE">
<block type="math_number" id="bcQGFPr;9|G(a0At]s!,">
<field name="NUM">9</field>
</block>
</value>
<next>
<block type="translate" id="ROeNh0q3AguO@a}-fAP1">
<value name="XVAL">
<shadow type="math_number" id="6/1-f=HoHEV-Qa80WjTU">
<field name="NUM">0</field>
</shadow>
</value>
<value name="YVAL">
<shadow type="math_number" id="}|!ZpLXB3^yLg6|[be:5">
<field name="NUM">0</field>
</shadow>
</value>
<value name="ZVAL">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="Z86_(RdeBBh(By6X#Uh[">
<field name="NUM">0</field>
</shadow>
<block type="math_arithmetic" id="l}{Ewb8zETVsIYPIVk]j">
<field name="OP">MINUS</field>
<value name="A">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="I{U;~]SCYF|XGWn-]Oah">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="_4;n.-KNiT[3wR7,uprG">
<field name="VAR">radius</field>
</block>
</value>
<value name="B">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="^7kIcW+tk@TD6o(,?2`/">
<field name="NUM">3.5</field>
</shadow>
<block type="math_arithmetic" id="bJ-2rw6:a|E*OzMbe^-Y">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="Jo?*9dY{==4=,.e@|t:;">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="`w^;7XOrEU;fD6!~aCWu">
<field name="VAR">head</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="]E;O_wy[q@7qZ)1FuF@)">
<field name="NUM">2</field>
</shadow>
</value>
</block>
</value>
</block>
</value>
<statement name="A">
<block type="procedures_callnoreturn" id="-_ne;:u4SI/KLV/Jj[nh">
<mutation name="screwhead">
<arg name="phead"></arg>
<arg name="pheaddiameter"></arg>
</mutation>
<value name="ARG0">
<block type="variables_get" id="%RrXTEcnTzR0[gcUI#`.">
<field name="VAR">head</field>
</block>
</value>
<value name="ARG1">
<block type="variables_get" id="*d^/D8/B8WebXo9|?28_">
<field name="VAR">headiameter</field>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
<block type="procedures_defnoreturn" id="S(RX0}^(LQVuZB?jfKtM" x="-2131" y="74">
<mutation>
<arg name="phead"></arg>
<arg name="pheaddiameter"></arg>
</mutation>
<field name="NAME">screwhead</field>
<statement name="STACK">
<block type="$fn" id="2)J}er7o)qay1G)+G90t">
<value name="SIDES">
<shadow type="math_number" id="|JV+@]8(Z/(7S#?-UsB!">
<field name="NUM">6</field>
</shadow>
</value>
<statement name="A">
<block type="cylinder" id="}W(R1;R]upEC(uWTyE{r">
<field name="LOCKED">TRUE</field>
<field name="CENTERDROPDOWN">true</field>
<value name="RAD1">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="/.Y4CzXIKS@[S)6WMjPq">
<field name="NUM">6.25</field>
</shadow>
<block type="math_arithmetic" id="2^:TVe931!vtRpYw93QQ">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="I{U;~]SCYF|XGWn-]Oah">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="_^y@Sn.~@Lpo%A%k1X!I">
<field name="VAR">pheaddiameter</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="U_*QNaoNCz|hhlybpiGh">
<field name="NUM">2</field>
</shadow>
</value>
</block>
</value>
<value name="RAD2">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="3xvccMdADxh8avWmGZ(2">
<field name="NUM">6.25</field>
</shadow>
<block type="math_arithmetic" id="hJx(C+QuWA`{KUe5_lpA">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow xmlns="https://blockscad3d.com" type="math_number" id="I{U;~]SCYF|XGWn-]Oah">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="TONdedww:WEIwYz_@(_`">
<field name="VAR">pheaddiameter</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="9O=._[D6m]QX!uUXJ%Z=">
<field name="NUM">2</field>
</shadow>
</value>
</block>
</value>
<value name="HEIGHT">
<shadow xmlns="https://blockscad3d.com" type="math_number" id=",z@T:xy{O[YG-*#_0sE^">
<field name="NUM">4.5</field>
</shadow>
<block type="variables_get" id="y,dJ}(i?PD^]o-fc=In)">
<field name="VAR">phead</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</xml>