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);

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值