Skip to content

Commit

Permalink
tweak snap fit defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
lijon committed Feb 15, 2024
1 parent 46b8917 commit 32d0b5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions examples/snap_fit_test.scad
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ box_make(explode=10.1,hide_box=false)
}
else
up($box_rim_height/2)
box_part([LEFT,RIGHT])
box_snap_fit([5,1],spring_len=0,depth=0.2,spring_dir=LEFT,anchor=BOT);
box_part([LEFT,RIGHT,FRONT,BACK])
box_snap_fit([5,1],anchor=BOT);
}

// rim snap
right(sz.x*1.5+15) box_shell_base_lid(sz,wall_sides=2,wall_top=1.2,rbot_inside=1,rtop_inside=1,rsides=15,rim_height=3,k=0.5,rim_snap=true);
right(sz.x*1.5+15) box_shell_base_lid(sz,wall_sides=2,wall_top=1.2,rbot_inside=1,rtop_inside=1,rsides=15,rim_height=3,k=0.5,rim_snap=true) {
box_part([TOP+FRONT,TOP+BACK]) fwd(0.001) box_cutout(rect([4,1]),anchor=FRONT);
}
}
2 changes: 1 addition & 1 deletion parts.scad
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ module box_wall(dir=BACK,height,length,gap=0,width=1,fillet=1.5,anchor=BOTTOM,sp
cuboid([width,l,height],rounding=-fillet,edges=edges,anchor=anchor,spin=spin,orient=orient);
}

module box_snap_fit(size=[3,2],depth=0.5,thickness,thru_hole=false,spring_len=3,spring_dir=FRONT,spring_slot=0.5,spring_slot2,gap=0.1,anchor=BOT+BACK,spin=0,orient=DOWN) {
module box_snap_fit(size=[5,1],depth=0.25,thickness,thru_hole=false,spring_len=0,spring_dir=FRONT,spring_slot=0.5,spring_slot2,gap=0.1,anchor=BOT+BACK,spin=0,orient=DOWN) {
checks = assert(depth<=size.y/2);

thickness = is_def(thickness) ? thickness : is_def($box_wall) ? $box_wall/2 : 1;
Expand Down

0 comments on commit 32d0b5a

Please sign in to comment.