其他分享
首页 > 其他分享> > openscad螺栓数据生成2

openscad螺栓数据生成2

作者:互联网

 

下载库:

BOSL2

https://github.com/revarbat/BOSL2

ubuntu16.04  openscad2021版本

放入:/home/×××/.local/share/OpenSCAD/libraries/BOSL2

include <BOSL2/std.scad>
include <BOSL2/screws.scad>
include <BOSL2/metric_screws.scad>



module bolt_ynh(bolt_rot, screw_height, plane_exist, bolt_exist, screw_exist){
  union(){
      
    //螺栓orient
    //UP, DOWN, FRONT, BACK, LEFT, and RIGHT LEFT+BACK
    //螺栓自转spin
    //details如果真正的模型应该用额外的细节来渲染。
    zdistribute(-1-(screw_height)){
        metric_bolt(headtype="hex", size=16, l=3.5+screw_height/2, coarse=false, shank=1.5, details=true, orient=UP, spin=bolt_rot);
    }
    ydistribute(35){
        cube([25,10,3], anchor=TOP);
    }
    cylinder(r=20, h=3, anchor=TOP);
  }
}



screw_height = 10;
bolt_rot = 10;


bolt_ynh(bolt_rot, screw_height);

 

标签:screw,include,openscad,height,exist,bolt,生成,rot,螺栓
来源: https://blog.csdn.net/baidu_40840693/article/details/117478861