OpenSCAD记录

安装:
www.openscad.org/


参考资料:
https://www.openscad.org/documentation.html
https://www.openscad.org/cheatsheet/index.html官网


//长方体:
cube(size = [x,y,z], center = true/false); //false default

//球体:
sphere(10,$fn=100); //default半径,碎片的分辨率; $fn越大结果表面越光滑生成的STL文件越大
sphere(10,$fa=0.05,$fs=1); //半径 碎片的角度(°)片段大小(mm)生成文件可能小一点
//柱体
cylinder(h = height, r1 = BottomRadius, r2 = TopRadius, center = true/false);
//多面体
polyhedron( points = [ [X0, Y0, Z0], [X1, Y1, Z1], ... ], faces = [ [P0, P1, P2, P3, ...], ... ], convexity = N);

points
Vector of 3d points or vertices. Each point is in turn a vector, [x,y,z], of its coordinates.Points may be defined in any order. N points are referenced, in the order defined, as 0 to N-1.
faces [Note: Requires version 2014.03]
Vector of faces that collectively enclose the solid. Each face is a vector containing the indices (0 based) of 3 or more points from the points vector.
Faces may be defined in any order. Define enough faces to fully enclose the solid, with no overlap.
If points that describe a single face are not on the same plane, the face is automatically split into triangles as needed.
convexity
Integer. The convexity parameter specifies the maximum number of faces a ray intersecting the object might penetrate. This parameter is needed only for correct display of the object in OpenCSG preview mode. It has no effect on the polyhedron rendering. For display problems, setting it to 10 should work fine for most cases.
default values: polyhedron();
yields: polyhedron(points = undef, faces = undef, convexity = 1);


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值