cube(10); //边长为10的正方体,锚点在其一角
cube([2,3,4]); //长宽高分别为2,3,4的长方体,锚点在其一角
cube(15, center=true); //边长为15的正方体,锚点在其中心
sphere(10); //半径为10的球体
translate([-24,0,0]) //平移
union() //并
intersection //交
difference() // 差
例子:
text(letter,
size=size*22/30,
font="Bitstream Vera Sans",
halign="center",
valign="center");
linear_extrude(height = fanwidth, center = true, convexity = 10, twist = -fanrot, slices = 20, scale = 1.0, $fn = 16) {...}
echo(字符串变量); 会在右边控制台console中第三行左右显示
The $fa, $fs and $fn special variables control the number of facets used to generate an arc:
$fa is the minimum angle for a fragment. Even a huge circle does not have more fragments than 360 divided by this number. The default value is 12 (i.e. 30 fragments for a full circle). The minimum allowed value is 0.01. Any attempt to set a lower value will cause a warning.
$fs is the minimum size of a fragment. Because of this variable very small circles have a smaller number of fragments than specified using $fa. The default value is 2. The minimum allowed value is 0.01. Any attempt to set a lower value will cause a warning.
$fn is usually 0. When this variable has a value greater than zero, the other two variables are ignored and full circle is rendered using this number of fragments. The default value is 0.
原文:https://www.cnblogs.com/YuQiao0303/p/10113976.html