Example in Blockly

Example in Blockly script details
Type
Blockly logo image
blockly
App Version
0.13.0
Visibility
public
Date Created
Mar 19, 2021, 12:34:26 PM
Last Edit Date
Dec 5, 2023, 6:05:35 PM

Script Details

The Code
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="#m#?`4B/fIGB5f^ctze!">circles</variable> <variable id="qeJRR~q.d{kpSK(?-$sg">thickness</variable> <variable id="q#]YpD{Zl?(]jJdMn=Ma">ellipseSubdivision</variable> <variable id="V]IQeV!~h5zjiRb[(QJs">downloadStlFile</variable> <variable id="ganPNXl+N+P4TYZ=.U3J">xRadius</variable> <variable id="Cu@}0h#9bwk*|6amhXAt">yRadius</variable> <variable id="Yfyh70]_@hctQkR[JnHi">zRadius</variable> <variable id="k(NMn9HtAgOim5LuL/{O">largeEllipsoidRadius</variable> <variable id="dCX$Yha!6gT7,?:)z`g5">smallEllipsoidRadius</variable> <variable id="rHtv!K!1W.$*|ls,@;Wx">extrusion</variable> <variable id="_K.Y}_:Z}Kr^6#P(R.}c">i</variable> <variable id="$8Pre_QrNE@21=$qMTqO">transformedCircle</variable> </variables> <block type="bitbybit.babylon.scene.drawPointLightNoReturn" id="XK2j*QtVmE=O*rf]9e7_" x="-870" y="-797"> <value name="Position"> <block type="bitbybit.point.pointXYZ" id="e78W:t[mIvEMwC;@4vCp"> <value name="X"> <block type="math_number" id=";j;BeP=v@;E9XT@v?yE:"> <field name="NUM">60</field> </block> </value> <value name="Y"> <block type="math_number" id="c7@yCkM,BgVEi-TebLsa"> <field name="NUM">50</field> </block> </value> <value name="Z"> <block type="math_number" id="0fe*WIG~A_K$g#yx}sO#"> <field name="NUM">60</field> </block> </value> </block> </value> <value name="Intensity"> <block type="math_number" id="7sYxT;?}_M/,[P@.?S-v"> <field name="NUM">8000</field> </block> </value> <value name="Diffuse"> <block type="colour_picker" id=":L3QJE8g3$VeEt7-AlgP"> <field name="COLOUR">#ffffff</field> </block> </value> <value name="Specular"> <block type="colour_picker" id="`^=+*Mx:D(Oag;5!}8ke"> <field name="COLOUR">#ffffff</field> </block> </value> <value name="Radius"> <block type="math_number" id="]iY#nXFh;Y3d#.c,k3@6"> <field name="NUM">0</field> </block> </value> <value name="ShadowGeneratorMapSize"> <block type="math_number" id="J#@D8oa37#^#TsgBB4eL"> <field name="NUM">1024</field> </block> </value> <value name="EnableShadows"> <block type="logic_boolean" id="UA6*7AXMtvO@XQF)HXQS"> <field name="BOOL">TRUE</field> </block> </value> <value name="ShadowDarkness"> <block type="math_number" id="QT(/nRZh$T;/bPrL|^V@"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="AD|+IhFM/R,|G~K}OUB`"> <field name="VAR" id="#m#?`4B/fIGB5f^ctze!">circles</field> <value name="VALUE"> <block type="lists_create_with" id="/EPm)Z8HKO2RGz}:P.W@"> <mutation items="0"> </mutation> </block> </value> <next> <block type="variables_set" id="([cdR-cD~Ufru6n7v[6["> <field name="VAR" id="qeJRR~q.d{kpSK(?-$sg">thickness</field> <value name="VALUE"> <block type="math_number" id="~RM1e}6lTY*;SuC?4^pM"> <field name="NUM">0.5</field> </block> </value> <next> <block type="variables_set" id="|w]PM,fW?xSvRu$DL8qg"> <field name="VAR" id="q#]YpD{Zl?(]jJdMn=Ma">ellipseSubdivision</field> <value name="VALUE"> <block type="math_number" id="o}=rlW[,GXiO~w~i0-z8"> <field name="NUM">64</field> </block> </value> <next> <block type="variables_set" id="`V?Khs{@)+U*fr={fD(@"> <field name="VAR" id="V]IQeV!~h5zjiRb[(QJs">downloadStlFile</field> <value name="VALUE"> <block type="logic_boolean" id="j_kSO~!}1AU9vaBjE,DY"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="variables_set" id="6k33RyL(jT5rU6+Hvqu("> <field name="VAR" id="ganPNXl+N+P4TYZ=.U3J">xRadius</field> <value name="VALUE"> <block type="math_number" id="1y/oLQ=@Xb=kp_G_r*0p"> <field name="NUM">2</field> </block> </value> <next> <block type="variables_set" id="eAc[_ij1PuXBHfoSRLzd"> <field name="VAR" id="Cu@}0h#9bwk*|6amhXAt">yRadius</field> <value name="VALUE"> <block type="math_number" id="#]!nWqLGms@ZY7EtDMpT"> <field name="NUM">2.3</field> </block> </value> <next> <block type="variables_set" id="CstZs[=G39RHVJOHeL**"> <field name="VAR" id="Yfyh70]_@hctQkR[JnHi">zRadius</field> <value name="VALUE"> <block type="math_number" id="og98Jgss:%M@6KRkhov7"> <field name="NUM">1</field> </block> </value> <next> <block type="variables_set" id="1nA_r1pa,Vn*u$fx2xo{"> <field name="VAR" id="k(NMn9HtAgOim5LuL/{O">largeEllipsoidRadius</field> <value name="VALUE"> <block type="bitbybit.point.pointXYZ" id="D7RLP^ZreL.~uEX)J4ng"> <value name="X"> <block type="variables_get" id="[e-EU*^a7H=sOONNrwaW"> <field name="VAR" id="ganPNXl+N+P4TYZ=.U3J">xRadius</field> </block> </value> <value name="Y"> <block type="variables_get" id="@vU]9i$KlW[7c7^qEc),"> <field name="VAR" id="Cu@}0h#9bwk*|6amhXAt">yRadius</field> </block> </value> <value name="Z"> <block type="variables_get" id="8;aGmKqeg+n-gHg5nET{"> <field name="VAR" id="Yfyh70]_@hctQkR[JnHi">zRadius</field> </block> </value> </block> </value> <next> <block type="variables_set" id="M-Z)%t-D,ANBHO0v*Q7x"> <field name="VAR" id="dCX$Yha!6gT7,?:)z`g5">smallEllipsoidRadius</field> <value name="VALUE"> <block type="bitbybit.point.pointXYZ" id="+vboC`;0v)F`:$WO#5EX"> <value name="X"> <block type="math_arithmetic" id="gSxjZ%nE=(ZL+vAD%Zvn"> <field name="OP">MINUS</field> <value name="A"> <block type="variables_get" id="C,$~@%R$Hk)5/I}c$x$B"> <field name="VAR" id="ganPNXl+N+P4TYZ=.U3J">xRadius</field> </block> </value> <value name="B"> <block type="math_number" id="p2-LG;^Lr9SB{q)jmis|"> <field name="NUM">0.04</field> </block> </value> </block> </value> <value name="Y"> <block type="math_arithmetic" id="2Td:JJ5bCL-:K6mHkPAO"> <field name="OP">MINUS</field> <value name="A"> <block type="variables_get" id="[l`Y,GQYMq(Z~d.e|T5R"> <field name="VAR" id="Cu@}0h#9bwk*|6amhXAt">yRadius</field> </block> </value> <value name="B"> <block type="math_number" id="prP.c8Plg@^[Iu-QSrJa"> <field name="NUM">0.3</field> </block> </value> </block> </value> <value name="Z"> <block type="math_arithmetic" id="3:%6m6$`Rd}ET,Em]JaX"> <field name="OP">MULTIPLY</field> <value name="A"> <block type="variables_get" id="ym/JHB]Pp]K=_+O-w9ib"> <field name="VAR" id="Yfyh70]_@hctQkR[JnHi">zRadius</field> </block> </value> <value name="B"> <block type="math_number" id="[|QTg]$7[CAgl#$}k{qb"> <field name="NUM">2</field> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="WmXIl^%vk?`llE.gr9hF"> <field name="VAR" id="rHtv!K!1W.$*|ls,@;Wx">extrusion</field> <value name="VALUE"> <block type="bitbybit.jscad.booleans.subtractTwo" id="?%m,tGrAxySR%nHc6+A7"> <value name="First"> <block type="bitbybit.jscad.booleans.subtractTwo" id="#S*qQ!z?JqsNAOyujZ]2"> <value name="First"> <block type="bitbybit.jscad.shapes.ellipsoid" id="cT4Hup3rsC10_DVdE3LZ"> <value name="Center"> <block type="bitbybit.point.pointXYZ" id="-1tzjXYX:he(eHjC8NA)"> <value name="X"> <block type="math_number" id="m3*Cr|dYBU[~eZB,iqcr"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="Nju[wyymp}dTtMEbPNlH"> <field name="NUM">0</field> </block> </value> <value name="Z"> <block type="math_number" id="_zGl:^+cdTuT$t2}7k5g"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="Radius"> <block type="variables_get" id="nwkz!nR{i$}^jxUL_1~k"> <field name="VAR" id="k(NMn9HtAgOim5LuL/{O">largeEllipsoidRadius</field> </block> </value> <value name="Segments"> <block type="variables_get" id="mmsna*D|azxOe*S+/iZO"> <field name="VAR" id="q#]YpD{Zl?(]jJdMn=Ma">ellipseSubdivision</field> </block> </value> </block> </value> <value name="Second"> <block type="bitbybit.jscad.shapes.ellipsoid" id="J(VB^-Ie[j96sf;7xv0V"> <value name="Center"> <block type="bitbybit.point.pointXYZ" id="O0jHzrwtYKod@T|vCZ.W"> <value name="X"> <block type="math_number" id="ZxuNMFw)!N1YNJDA!88p"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="M68O,Ld.o^B:St8)-c*r"> <field name="NUM">0.3</field> </block> </value> <value name="Z"> <block type="math_number" id="a}z%/Sa]iTAO#H}}mpNK"> <field name="NUM">0.5</field> </block> </value> </block> </value> <value name="Radius"> <block type="variables_get" id="Mt02jOwbvxU)]-W8m/HZ"> <field name="VAR" id="dCX$Yha!6gT7,?:)z`g5">smallEllipsoidRadius</field> </block> </value> <value name="Segments"> <block type="variables_get" id="~x`.2:9}UM8uy(etYqhs"> <field name="VAR" id="q#]YpD{Zl?(]jJdMn=Ma">ellipseSubdivision</field> </block> </value> </block> </value> </block> </value> <value name="Second"> <block type="bitbybit.jscad.shapes.ellipsoid" id="/I__Jv[Z*Z,~0@{a)}X7"> <value name="Center"> <block type="bitbybit.point.pointXYZ" id="mm9wK[u}bjO@5T-|MkI3"> <value name="X"> <block type="math_number" id="JgI)JI4nQR!rkdP)QVFh"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="FpU#A!y8n?|*^),OoOef"> <field name="NUM">0.3</field> </block> </value> <value name="Z"> <block type="math_number" id="l*}}0:6LpB31(=F3FpQ#"> <field name="NUM">-0.5</field> </block> </value> </block> </value> <value name="Radius"> <block type="variables_get" id="ri2UWojaTaQOCHkHc:.r"> <field name="VAR" id="dCX$Yha!6gT7,?:)z`g5">smallEllipsoidRadius</field> </block> </value> <value name="Segments"> <block type="variables_get" id="yLr1Q;]Y}b33%`p-%wR]"> <field name="VAR" id="q#]YpD{Zl?(]jJdMn=Ma">ellipseSubdivision</field> </block> </value> </block> </value> </block> </value> <next> <block type="controls_for" id="CUJyz{Mz/s|[b9@BQ;9#"> <field name="VAR" id="_K.Y}_:Z}Kr^6#P(R.}c">i</field> <value name="FROM"> <block type="math_number" id=")2eo=W)n2):(A]*q~k.D"> <field name="NUM">4</field> </block> </value> <value name="TO"> <block type="math_number" id="/-_?{L8D?b3SwsKxoM2;"> <field name="NUM">30</field> </block> </value> <value name="BY"> <block type="math_number" id="4XWT1Jh4fG`a*YBBW}+t"> <field name="NUM">0.6</field> </block> </value> <statement name="DO"> <block type="variables_set" id="cM?f]VMsnWw;.2ngM9t{"> <field name="VAR" id="$8Pre_QrNE@21=$qMTqO">transformedCircle</field> <value name="VALUE"> <block type="bitbybit.jscad.transformSolid" id="q/)_12J%t([I,%dZeeGK"> <value name="Mesh"> <block type="bitbybit.jscad.transformSolid" id="=~hV_s?h+)NII}F@S?EZ"> <value name="Mesh"> <block type="variables_get" id="*[S.gHC~jv=]`StL8?k1"> <field name="VAR" id="rHtv!K!1W.$*|ls,@;Wx">extrusion</field> </block> </value> <value name="Transformation"> <block type="bitbybit.babylon.transforms.scaleCenterXYZ" id="b+ilDY1nm*M{?vvzcd|M"> <value name="Center"> <block type="bitbybit.vector.vectorXYZ" id="NdQ^k9d4Zn=C$G@9WPP}"> <value name="X"> <block type="math_number" id="8LCmNHXD73_3^x6K2F5b"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_arithmetic" id="R{kN:h[C=)YP[xfWEB@!"> <field name="OP">ADD</field> <value name="A"> <block type="math_number" id="INXp-i=Ub$:Q:_2%%Mkh"> <field name="NUM">1</field> </block> </value> <value name="B"> <block type="math_arithmetic" id="}^^?$4:rDRL;*l@*7pAg"> <field name="OP">DIVIDE</field> <value name="A"> <block type="variables_get" id="_H/c*HVYwbM-==C;lWNU"> <field name="VAR" id="_K.Y}_:Z}Kr^6#P(R.}c">i</field> </block> </value> <value name="B"> <block type="math_number" id="#xU[8Lb%v}3Ko{RA--Od"> <field name="NUM">-100</field> </block> </value> </block> </value> </block> </value> <value name="Z"> <block type="math_number" id="R4Te~h$*^5p;]q$;qN}?"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="ScaleXyz"> <block type="bitbybit.vector.vectorXYZ" id="~,Q7wUW@HtbEXzP.[zOL"> <value name="X"> <block type="variables_get" id="BVfEYL(~2k-=!S71:p?:"> <field name="VAR" id="_K.Y}_:Z}Kr^6#P(R.}c">i</field> </block> </value> <value name="Y"> <block type="variables_get" id="0QmXBwC2jnflK)~9w]@/"> <field name="VAR" id="_K.Y}_:Z}Kr^6#P(R.}c">i</field> </block> </value> <value name="Z"> <block type="bitbybit.math.remap" id="4|ItHtGvH%Zj?yh[(+Vp"> <value name="Number"> <block type="variables_get" id="A@j]D;p(`GE(#gkv:uv]"> <field name="VAR" id="_K.Y}_:Z}Kr^6#P(R.}c">i</field> </block> </value> <value name="FromLow"> <block type="math_number" id="4*7$wB{VFy6@%6T.GXe}"> <field name="NUM">4</field> </block> </value> <value name="FromHigh"> <block type="math_number" id="PHjoZf,23R/-vNLW{s/:"> <field name="NUM">20</field> </block> </value> <value name="ToLow"> <block type="math_number" id="R%QTH7,M0)/2,#XRXxke"> <field name="NUM">3</field> </block> </value> <value name="ToHigh"> <block type="math_number" id="V{xl#Z=bUvepr1{1$5#j"> <field name="NUM">5</field> </block> </value> </block> </value> </block> </value> </block> </value> </block> </value> <value name="Transformation"> <block type="bitbybit.babylon.transforms.rotationCenterAxis" id="+ec,0ufR*PoeE`iD7!I`"> <value name="Angle"> <block type="math_arithmetic" id="EX~CjL`F#7Q)`rR`/y%f"> <field name="OP">ADD</field> <value name="A"> <block type="math_arithmetic" id="%[8qziNKvuPp|(g}FFJL"> <field name="OP">MULTIPLY</field> <value name="A"> <block type="variables_get" id="2L`pCZ1T;T~79WU0}?K,"> <field name="VAR" id="_K.Y}_:Z}Kr^6#P(R.}c">i</field> </block> </value> <value name="B"> <block type="math_number" id="![EU#f/6(mD/ISkODQ~P"> <field name="NUM">20</field> </block> </value> </block> </value> <value name="B"> <block type="variables_get" id="3%zP.|e=%{(,gdP-*4HZ"> <field name="VAR" id="_K.Y}_:Z}Kr^6#P(R.}c">i</field> </block> </value> </block> </value> <value name="Axis"> <block type="bitbybit.vector.vectorXYZ" id="oTVc|lkY:KO4K:#:).U["> <value name="X"> <block type="math_number" id="[1#]6b/u%$o~X#,;3gXJ"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="math_number" id="rCN4#[Q,`?~#f*J-F55j"> <field name="NUM">1</field> </block> </value> <value name="Z"> <block type="math_number" id="E^++=[=d;D$S50;]Iul6"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="Center"> <block type="bitbybit.point.pointXYZ" id="cPV$@p9*R!B-,Ai9HVmj"> <value name="X"> <block type="math_number" id="n?Y.V=$as_d=spe~:SW}"> <field name="NUM">0</field> </block> </value> <value name="Y"> <block type="variables_get" id="qv22kZP0DlbFo3`%)H^Q"> <field name="VAR" id="_K.Y}_:Z}Kr^6#P(R.}c">i</field> </block> </value> <value name="Z"> <block type="math_arithmetic" id="Qh2LtPBwliwqo~$DYl?C"> <field name="OP">DIVIDE</field> <value name="A"> <block type="variables_get" id="5I?`b23gQOT_@QlU)ZfE"> <field name="VAR" id="_K.Y}_:Z}Kr^6#P(R.}c">i</field> </block> </value> <value name="B"> <block type="math_number" id="~W75u24sU)8PpaJS#;Ft"> <field name="NUM">2</field> </block> </value> </block> </value> </block> </value> </block> </value> </block> </value> <next> <block type="lists_setIndex" id=",9f-s]aJJBnQ^PsujJ2D"> <mutation at="false"> </mutation> <field name="MODE">INSERT</field> <field name="WHERE">LAST</field> <value name="LIST"> <block type="variables_get" id="Qc9uyI+i}Dm8lh5M7t+s"> <field name="VAR" id="#m#?`4B/fIGB5f^ctze!">circles</field> </block> </value> <value name="TO"> <block type="variables_get" id="CSqp#RSCW9Nb4CSa#{|d"> <field name="VAR" id="$8Pre_QrNE@21=$qMTqO">transformedCircle</field> </block> </value> </block> </next> </block> </statement> <next> <block type="bitbybit.draw.drawAnyAsyncNoReturn" id="*vny=)w)@)[uO8YFa-7i"> <value name="Entity"> <block type="variables_get" id="CQ.B?|RIWfGG3q4V;@ue"> <field name="VAR" id="#m#?`4B/fIGB5f^ctze!">circles</field> </block> </value> <value name="Options"> <block type="bitbybit.draw.optionsSimple" id="!P^@;q(u*l_]fX$c#*PH"> <value name="Colours"> <block type="colour_picker" id="~vn4JzXZ-TXfNhh`|}G+"> <field name="COLOUR">#ff6666</field> </block> </value> <value name="Size"> <block type="math_number" id="0oxII?BCm9C|2,$3]_5*"> <field name="NUM">3</field> </block> </value> <value name="Opacity"> <block type="math_number" id="RjDI?bq.sE1@Q*!D9pK7"> <field name="NUM">1</field> </block> </value> <value name="Updatable"> <block type="logic_boolean" id="I?ve/??WqrM0|p5h6/3)"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <next> <block type="controls_if" id=",Nk?T!pzC|*qX{l=cUez"> <value name="IF0"> <block type="variables_get" id="W^PKs}k)[T4g|q@IE`6-"> <field name="VAR" id="V]IQeV!~h5zjiRb[(QJs">downloadStlFile</field> </block> </value> <statement name="DO0"> <block type="bitbybit.jscad.downloadSolidsSTL" id="Wxe)sYK2N$xL)^$^CPMB"> <value name="Meshes"> <block type="variables_get" id="L`Mt}PFyq~(T]V:*b?r~"> <field name="VAR" id="#m#?`4B/fIGB5f^ctze!">circles</field> </block> </value> <value name="FileName"> <block type="text" id="HtDzA[ufLrci41/__=BJ"> <field name="TEXT">bitbybit-model</field> </block> </value> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>