Zhang Yuexin

C# programmer. Know a bit of hardware knowledge. 3D model design novice.

张高兴 - 土味儿编程

高兴不高兴

OpenSCAD 建模:相框

本文约 197 字,包含 1 张图片,1 个代码段,阅读时间约 1 分钟
QR Code

在手机上查看此页面


下载地址:https://github.com/ZhangGaoxing/openscad-models/tree/master/PhotoFrame

代码:

module bottom(){
    difference(){
        cube([109,147,3]);
        translate([8.5,8.5,2])cube([92,140,1]);
    }
}

module frame(){
    points=[
        [0,0,0],[109,0,0],[109,147,0],[0,147,0],
        [0,0,7],[109,0,7],[109,147,7],[0,147,7],
        [10,10,0],[98,10,0],[98,136,0],[10,136,0],
        [10,10,2],[98,10,2],[98,136,2],[10,136,2]
    ];

    faces=[
        [0,1,9,8],[1,2,10,9],[2,3,11,10],[3,0,8,11],
        [4,5,13,12],[5,6,14,13],[6,7,15,14],[7,4,12,15],
        [0,1,5,4],[1,2,6,5],[2,3,7,6],[3,0,4,7],
        [8,9,13,12],[9,10,14,13],[10,11,15,14],[11,8,12,15]
    ];

    translate([0,0,3])polyhedron(points,faces);
}

frame();
//bottom();

效果图:

effect

最后更新时间 : 2019/06/16 16:41 张高兴 阅读(296) 评论(0)
文章分类: OpenSCAD 建模
文章标签: OpenSCAD
  发表评论
Click to Refresh