首页 > 其他 > 详细

OpenSCAD 建模:相框

时间:2017-07-14 19:19:42      阅读:331      评论:0      收藏:0      [点我收藏+]

  下载地址: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();

 

  效果图:

技术分享

OpenSCAD 建模:相框

原文:http://www.cnblogs.com/zhanggaoxing/p/7171936.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!