
Export STL format 3D models created in turtleSpaces 3D Logo using the SAVESTL primitive
turtleSpaces has a new primitive, SAVESTL, which can be used to export 3D models of the current turtleSpace.
savestl "modelname
creates a new folder in the current project folder (TSP) with the extension MDL (eg modelname.mdl), inside which contains STL format files, one for each color used in the space. These files can be used with other 3D applications (such as the pictured viewstl.com website), and can be 3D printed (although the sides of objects may need to be extruded using another application first, if the desire is for the objects to be hollow).
Another primitive, SETSTLLINETHICKNESS, is used to set the radius of the ropes used to represent lines in exported STL files. It takes a number.
setstllinethickness 10
Happy 3D printing!
























































































































TO tree
clearscreen penup
setpos [0 80] setfillcolor 4
repeat 6 [
setfillshade -6 + 3 * repcount
;repcount returns the current iteration
back 4 * repcount
fiso 8 * repcount 5 * repcount
;fiso = filled iso triangle
lower 0.1
]
setfillcolor 8 setfillshade 5
back 50 slideleft 10
quad 20 50
;trunk
END
TO tree3d
cs pu setpos [0 80]
;cs = clearscreen
;pu = penup
setfc 4
;setfc = setfillcolor
repeat 6 [
setfs -6 + 3 * repcount
;setfs = setfillshade
bk 4 * repcount
;bk = back
tent 8 * repcount 5 * repcount 10
lo 0.1
;lo = lower
]
setfc 8 setfs 5
bk 50 sl 10
;sl = slideleft
voxeloid 20 50 10
;voxeloids are stretched cubes
END
TO conetree
cs pu setpos [0 80]
setfc 4 up 90
repeat 6 [
setfs -6 + 3 * repcount
ra 4 * repcount
cone 8 * repcount 5 * repcount 20
]
setfc 8 setfs 5 ra 50
cylinder 8 50 20
END
TO pyramidtree
cs pu setpos [0 80]
setfc 4 up 90
repeat 6 [
setfs -6 + 3 * repcount ra 4 * repcount
cone 8 * repcount 5 * repcount 4
;while there is also a pyramid primitive, you can
;also create a pyramid by creating a 4-sided cone
]
setfc 8 setfs 5 ra 50
cylinder 8 50 4
END
TO tetratree
cs pu setpos [0 80] setfc 4 up 90
repeat 6 [setfs -6 + 3 * repcount
ra 4 * repcount
cone 8 * repcount 5 * repcount 3]
setfc 8 setfs 5 ra 50
cylinder 8 50 3
END