本篇内容介绍了“OpenSCAD如何设计3D打印智能路由器盒子”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
原始的OpenSCAD代码如下:
//WRTnode智能路由器,盒子,防雨淋型(垂直安装) //Author:openthings@163.com, //copyright 2015-2025. //打印时注意比例变化,并且旋转向上。 //避免上部打印时无支撑塌陷。 //盖子单独打印,或放为两个模型。 /*Changelog: V1.1,2015-02-27: 1、盒盖的USB接口向Y偏移0.2,更好适应WRTnode的接口。 2、盒盖整体尺寸长宽减少0.2,以方便组装。 3、盒盖的偏移量和进风口相应调整。 4、盒盖的挡格向内移0.1,使盖子能完全嵌入盒体。 */ //常量定义 athick=0.5; //盖子厚度 bthick=0.10; //盒壁厚度 bwidth=5.0; //内径净宽 bhight=1.8; //内径净高 blong_inter=5.5;//内径净长 //外径长度=底厚+内径+挡格+盖子厚度 blong=bthick+blong_inter+bthick+athick; //文字或图标标识 //translate([-2,0,0]) //scale([1, 1, 0.1]) // surface(file = "smiley.png", center = true); //====================================== //盒子体,采用挖空切割方式造型。 difference() { //外盒 translate([0,0,0]) { color([0.8,0.8,0.8]) cube([blong,bwidth+bthick*2, bhight+bthick*2]); } //内盒,挖空。 translate([bthick,bthick,bthick]) { color([0.2,0.8,0.8]) cube([blong+1,bwidth,bhight]); } //底部,凹陷标识。 translate([blong-2,2.2,bhight+bthick+0.08]) { color([0.2,0.2,0.2]) cube([1.5,bwidth*0.5,0.1]); } } //底部加强,在内部形成边角挡格。 translate([bthick,bthick,bthick]) { color([0.2,0.5,0.2]) cube([bthick,bwidth,bthick]); } translate([bthick,bthick,bhight]) { color([0.2,0.5,0.2]) cube([bthick,bwidth,bthick]); } translate([bthick,bthick,bthick]) { color([0.2,0.5,0.2]) cube([bthick,bthick,bhight]); } translate([bthick,bwidth,bthick]) { color([0.2,0.5,0.2]) cube([bthick,bthick,bhight]); } //盖子挡格。 translate([blong-athick-0.1,bthick,bthick]) { color([0.2,0.5,0.2]) cube([bthick,bwidth,bthick]); } translate([blong-athick-0.1,bthick,bhight]) { color([0.2,0.5,0.2]) cube([bthick,bwidth,bthick]); } //====================================== //盖子,单独打印。嵌入盒子内部,注意留公差。 //translate([2,0.0,0.0]){ translate([0,0.05,2.55]){ difference() { //盖子,挖空。 translate([0,bthick,bthick]) { color([0.5,0.5,0.5]) cube([athick-0.05,bwidth-0.1,bhight-0.1]); } translate([0.2,bthick*2,bthick*2]) { color([0.6,0.3,0.8]) cube([athick+1,bwidth-bthick*2-0.1, bhight-bthick*2-0.1]); } //通风口,挖空。================ //左侧出风口 translate([-0.1,0.5,1.2]) { color([1,0.8,0.8]) cube([0.8,1.5,0.2]); } translate([-0.1,0.5,0.85]) { color([1,0.8,0.8]) cube([0.8,1.5,0.2]); } translate([-0.1,0.5,0.5]) { color([1,0.8,0.8]) cube([0.8,1.5,0.2]); } //右侧进风口 translate([-0.1,3.2,0.5]) { color([1,0.8,0.8]) cube([0.8,0.8,0.4]); } translate([-0.1,4.2,0.5]) { color([1,0.8,0.8]) cube([0.8,0.2,0.9]); } translate([-0.1,4.6,0.5]) { color([1,0.8,0.8]) cube([0.8,0.2,0.9]); } //USB接口,挖空。 translate([-0.1,3.2,1.10]) { color([1,0.8,0.8]) cube([0.8,0.8,0.3]); } } }
“OpenSCAD如何设计3D打印智能路由器盒子”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注亿速云网站,小编将为大家输出更多高质量的实用文章!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。