From e75133d3f40501b024b76db178e00ad1178c0028 Mon Sep 17 00:00:00 2001 From: Garth Minette Date: Wed, 5 May 2021 12:29:39 -0700 Subject: [PATCH] Fixed reference to gears.scad. Fixed hull3d() for small vertex counts. --- examples/BOSL2logo.scad | 2 +- hull.scad | 2 +- tutorials/Attachments.md | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/BOSL2logo.scad b/examples/BOSL2logo.scad index 8828b52..f786cf6 100644 --- a/examples/BOSL2logo.scad +++ b/examples/BOSL2logo.scad @@ -1,5 +1,5 @@ include -include +include include include include diff --git a/hull.scad b/hull.scad index f18e4ab..929d3f9 100644 --- a/hull.scad +++ b/hull.scad @@ -168,7 +168,7 @@ function hull3d_faces(points) = b = tri[1], c = tri[2], plane = plane3pt_indexed(points, a, b, c), - d = _find_first_noncoplanar(plane, points, 3) + d = _find_first_noncoplanar(plane, points, 0) ) d == len(points) ? /* all coplanar*/ diff --git a/tutorials/Attachments.md b/tutorials/Attachments.md index 5be59a8..b17b70a 100644 --- a/tutorials/Attachments.md +++ b/tutorials/Attachments.md @@ -390,7 +390,7 @@ the shape to make attachable, and the second will be `children()`, literally. To make a cuboidal or prismoidal shape attachable, you use the `size`, `size2`, and `offset` arguments of `attachable()`. -In the most basic form, where the shape in fully cuboid, with top and bottom of the same size, +In the most basic form, where the shape is fully cuboid, with top and bottom of the same size, and directly over one another, you can just use `size=`. ```openscad @@ -407,7 +407,8 @@ cubic_barbell(100) show_anchors(30); ``` When the shape is prismoidal, where the top is a different size from the bottom, you can use -the `size2=` argument as well. +the `size2=` argument as well. While `size=` takes all three axes sizes, the `size2=` argument +only takes the [X,Y] sizes of the top of the shape. ```openscad module prismoidal(size=[100,100,100], scale=0.5, anchor=CENTER, spin=0, orient=UP) { @@ -427,7 +428,8 @@ prismoidal([100,60,30], scale=0.5) show_anchors(20); ``` When the top of the prismoid can be shifted away from directly above the bottom, you can use -the `shift=` argument. +the `shift=` argument. The `shift=` argument takes an [X,Y] vector of the offset of the center +of the top from the XY center of the bottom of the shape. ```openscad module prismoidal(size=[100,100,100], scale=0.5, shift=[0,0], anchor=CENTER, spin=0, orient=UP) { @@ -446,7 +448,9 @@ module prismoidal(size=[100,100,100], scale=0.5, shift=[0,0], anchor=CENTER, spi prismoidal([100,60,30], scale=0.5, shift=[-30,20]) show_anchors(20); ``` -In the case that the prismoid is not oriented vertically, you can use the `axis=` argument. +In the case that the prismoid is not oriented vertically, (ie, where the `shift=` or `size2=` +arguments should refer to a plane other than XY) you can use the `axis=` argument. This lets +you make prismoids naturally oriented forwards/backwards or sideways. ```openscad module yprismoidal(