phillips_drive bugfix:

wing angle corrected from ~70 deg to 92 deg
   adjusted cutouts so length "b" in the spec is correct
      (this causes the cutout to not align with the end so it
       doesn't look as pretty, but the spec wins, right?)
   Changed construction method to avoid z-fighting which gave
       rise to failed render

doc fixes and shifting in paths.scad
decompose_path -> polygon_parts
This commit is contained in:
Adrian Mariano
2021-09-21 19:19:02 -04:00
parent ef9f54c369
commit 3c6e9804a8
7 changed files with 498 additions and 466 deletions

View File

@@ -1163,37 +1163,6 @@ function subdivide_and_slice(profiles, slices, numpoints, method="length", close
// Function: subdivide_long_segments()
// Topics: Paths, Path Subdivision
// See Also: subdivide_path(), subdivide_and_slice(), path_add_jitter(), jittered_poly()
// Usage:
// spath = subdivide_long_segments(path, maxlen, [closed=]);
// Description:
// Evenly subdivides long `path` segments until they are all shorter than `maxlen`.
// Arguments:
// path = The path to subdivide.
// maxlen = The maximum allowed path segment length.
// ---
// closed = If true, treat path like a closed polygon. Default: true
// Example:
// path = pentagon(d=100);
// spath = subdivide_long_segments(path, 10, closed=true);
// stroke(path);
// color("lightgreen") move_copies(path) circle(d=5,$fn=12);
// color("blue") move_copies(spath) circle(d=3,$fn=12);
function subdivide_long_segments(path, maxlen, closed=false) =
assert(is_path(path))
assert(is_finite(maxlen))
assert(is_bool(closed))
[
for (p=pair(path,closed)) let(
steps = ceil(norm(p[1]-p[0])/maxlen)
) each lerpn(p[0], p[1], steps, false),
if (!closed) last(path)
];
// Function: slice_profiles()
// Topics: Paths, Path Subdivision
// Usage: