mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Fix cheese some head types for consistent design when $fn is odd, and
ensure facets match
This commit is contained in:
parent
d8dccc0005
commit
f402c09e8f
1 changed files with 4 additions and 2 deletions
|
@ -1406,9 +1406,11 @@ module screw_head(screw_info,details=false, counterbore=0,flat_height,oversize=0
|
||||||
head=="cheese" ? .7 * head_height :
|
head=="cheese" ? .7 * head_height :
|
||||||
0.1 * head_height; // round and button
|
0.1 * head_height; // round and button
|
||||||
head_size2 = head=="cheese" ? head_size-2*tan(5)*head_height : head_size; // 5 deg slope on cheese head
|
head_size2 = head=="cheese" ? head_size-2*tan(5)*head_height : head_size; // 5 deg slope on cheese head
|
||||||
cyl(l=base, d1=head_size, d2=head_size2,anchor=BOTTOM)
|
segs = segs(head_size);
|
||||||
|
cyl(l=base, d1=head_size, d2=head_size2,anchor=BOTTOM, $fn=segs)
|
||||||
attach(TOP)
|
attach(TOP)
|
||||||
rotate_extrude()
|
zrot(180) // Needed to align facets when $fn is odd
|
||||||
|
rotate_extrude($fn=segs) // ensure same number of segments for cap as for head body
|
||||||
intersection(){
|
intersection(){
|
||||||
arc(points=[[-head_size2/2,0], [0,-base+head_height * (head=="button"?4/3:1)], [head_size2/2,0]]);
|
arc(points=[[-head_size2/2,0], [0,-base+head_height * (head=="button"?4/3:1)], [head_size2/2,0]]);
|
||||||
square([head_size2, head_height-base]);
|
square([head_size2, head_height-base]);
|
||||||
|
|
Loading…
Reference in a new issue