Fixed orient and anchor for PCO1881 threadings.

This commit is contained in:
Revar Desmera
2019-05-03 16:13:02 -07:00
parent 30af11d7be
commit 8ecc282ced

View File

@@ -798,11 +798,19 @@ module square_threaded_nut(
// Creates an approximation of a standard PCO-1881 threaded beverage bottle neck.
// Arguments:
// wall = Wall thickness in mm.
// Extra Anchors:
// "support-ring" = Centered at the bottom of the support ring.
// Example:
// pco1881_neck();
module pco1881_neck(wall=2)
module pco1881_neck(wall=2, orient=ORIENT_Z, anchor="support-ring")
{
$fn = segs(33/2);
h = 17+5;
anchors = [
anchorpt("support-ring", [0,0,5-h/2])
];
orient_and_anchor([33,33,17+5], orient, anchor, anchors=anchors, chain=true) {
up(5-h/2)
difference() {
union() {
difference() {
@@ -824,9 +832,9 @@ module pco1881_neck(wall=2)
// Threads
up(17-1.7)
thread_helix(
base_d=24.2,
base_d=24.1,
pitch=2.7,
thread_depth=1.6,
thread_depth=1.7,
thread_angle=15,
twist=650,
higbee=60,
@@ -846,6 +854,8 @@ module pco1881_neck(wall=2)
// Neck hole
down(5.01) cylinder(d=24.2-2*wall, h=17.02+5, anchor=BOTTOM);
}
children();
}
}
@@ -856,15 +866,29 @@ module pco1881_neck(wall=2)
// Creates a basic cap for a PCO1881 threaded beverage bottle.
// Arguments:
// wall = Wall thickness in mm.
// orient = Orientation of the threads. Use the `ORIENT_` constants from `constants.scad`. Default: `ORIENT_Z`.
// anchor = Alignment of the threads. Use the constants from `constants.scad`. Default: `"inside-top"`.
// Extra Anchors:
// "inside-top" = Centered on the inside top of the cap.
// Example:
// pco1881_cap();
module pco1881_cap(wall=2)
module pco1881_cap(wall=2, orient=ORIENT_Z, anchor=TOP)
{
$fn = segs(33/2);
w = 28.58 + 2*wall;
h = 11.2 + wall;
anchors = [
anchorpt("inside-top", [0,0,h/2-wall])
];
orient_and_anchor([w, w, 11.2+wall], orient, anchor, anchors=anchors, orig_anchor=TOP, chain=true) {
zrot(45) xrot(180) {
tube(id=28.58, wall=wall, h=11.2+wall, anchor=BOTTOM);
cylinder(d=28.58+wall, h=wall, anchor=BOTTOM);
cylinder(d=w, h=wall, anchor=BOTTOM);
up(wall+2) thread_helix(base_d=25.5, pitch=2.7, thread_depth=1.6, thread_angle=15, twist=650, higbee=45, interior=true, anchor=BOTTOM);
}
children();
}
}