mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-28 15:59:45 +00:00
usage messages fixes, req_children additions
This commit is contained in:
parent
a34c689889
commit
7afef10a79
10 changed files with 158 additions and 168 deletions
|
@ -390,7 +390,7 @@ _ANCHOR_TYPES = ["intersect","hull"];
|
|||
|
||||
// Module: position()
|
||||
// Usage:
|
||||
// position(from) {...}
|
||||
// position(from) CHILDREN;
|
||||
//
|
||||
// Topics: Attachments
|
||||
// See Also: attachable(), attach(), orient()
|
||||
|
@ -408,6 +408,7 @@ _ANCHOR_TYPES = ["intersect","hull"];
|
|||
// }
|
||||
module position(from)
|
||||
{
|
||||
req_children($children);
|
||||
assert($parent_geom != undef, "No object to attach to!");
|
||||
anchors = (is_vector(from)||is_string(from))? [from] : from;
|
||||
for (anchr = anchors) {
|
||||
|
@ -422,8 +423,8 @@ module position(from)
|
|||
|
||||
// Module: orient()
|
||||
// Usage:
|
||||
// orient(dir, <spin=>) ...
|
||||
// orient(anchor=, <spin=>) ...
|
||||
// orient(dir, [spin=]) CHILDREN;
|
||||
// orient(anchor=, [spin=]) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// Description:
|
||||
// Orients children such that their top is tilted towards the given direction, or towards the
|
||||
|
@ -460,6 +461,7 @@ module position(from)
|
|||
// prismoid([30,30],[0,5],h=20,anchor=BOT+BACK);
|
||||
// }
|
||||
module orient(dir, anchor, spin) {
|
||||
req_children($children);
|
||||
if (!is_undef(dir)) {
|
||||
assert(anchor==undef, "Only one of dir= or anchor= may be given to orient()");
|
||||
assert(is_vector(dir));
|
||||
|
@ -486,11 +488,10 @@ module orient(dir, anchor, spin) {
|
|||
|
||||
|
||||
|
||||
|
||||
// Module: attach()
|
||||
// Usage:
|
||||
// attach(from, [overlap=], [norot=]) {...}
|
||||
// attach(from, to, [overlap=], [norot=]) {...}
|
||||
// attach(from, [overlap=], [norot=]) CHILDREN;
|
||||
// attach(from, to, [overlap=], [norot=]) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: attachable(), position(), face_profile(), edge_profile(), corner_profile()
|
||||
// Description:
|
||||
|
@ -514,6 +515,7 @@ module orient(dir, anchor, spin) {
|
|||
// }
|
||||
module attach(from, to, overlap, norot=false)
|
||||
{
|
||||
req_children($children);
|
||||
assert($parent_geom != undef, "No object to attach to!");
|
||||
overlap = (overlap!=undef)? overlap : $overlap;
|
||||
anchors = (is_vector(from)||is_string(from))? [from] : from;
|
||||
|
@ -537,7 +539,7 @@ module attach(from, to, overlap, norot=false)
|
|||
|
||||
// Module: tags()
|
||||
// Usage:
|
||||
// tags(tags) {...}
|
||||
// tags(tags) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: force_tags(), recolor(), hide(), show(), diff(), intersect()
|
||||
// Description:
|
||||
|
@ -559,7 +561,8 @@ module attach(from, to, overlap, norot=false)
|
|||
// }
|
||||
// }
|
||||
module tags(tags)
|
||||
{
|
||||
{
|
||||
req_children($children);
|
||||
$tags = tags;
|
||||
children();
|
||||
}
|
||||
|
@ -567,7 +570,7 @@ module tags(tags)
|
|||
|
||||
// Module: force_tags()
|
||||
// Usage:
|
||||
// force_tags([tags]) {...}
|
||||
// force_tags([tags]) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: tags(), recolor(), hide(), show(), diff(), intersect()
|
||||
// Description:
|
||||
|
@ -609,6 +612,7 @@ module tags(tags)
|
|||
// }
|
||||
module force_tags(tags)
|
||||
{
|
||||
req_children($children);
|
||||
$tags = is_def(tags) ? tags : $tags;
|
||||
if(_attachment_is_shown($tags)) {
|
||||
children();
|
||||
|
@ -618,7 +622,7 @@ module force_tags(tags)
|
|||
|
||||
// Module: diff()
|
||||
// Usage:
|
||||
// diff(neg, [keep]) {...}
|
||||
// diff(neg, [keep]) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: tags(), recolor(), show(), hide(), intersect()
|
||||
// Description:
|
||||
|
@ -706,6 +710,7 @@ module force_tags(tags)
|
|||
// }
|
||||
module diff(neg, keep)
|
||||
{
|
||||
req_children($children);
|
||||
// Don't perform the operation if the current tags are hidden
|
||||
if (_attachment_is_shown($tags)) {
|
||||
difference() {
|
||||
|
@ -725,14 +730,14 @@ module diff(neg, keep)
|
|||
|
||||
// Module: intersect()
|
||||
// Usage:
|
||||
// intersect(a, [keep=]) {...}
|
||||
// intersect(a, b, [keep=]) {...}
|
||||
// intersect(a, [keep=]) CHILDREN;
|
||||
// intersect(a, b, [keep=]) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: tags(), recolor(), show(), hide(), diff()
|
||||
// Description:
|
||||
// If `a` is given, takes the union of all children with tags that are in `a`, and `intersection()`s
|
||||
// If `a` is given, takes the union of all children with tags that are in `a`, and intersects
|
||||
// them with the union of all children with tags in `b`. If `b` is not given, then the union of all
|
||||
// items with tags in `a` are intersection()ed with the union of all items without tags in `a`. If
|
||||
// items with tags in `a` are intersected with the union of all items without tags in `a`. If
|
||||
// `keep` is given, then the result is unioned with all the children with tags in `keep`. If `keep`
|
||||
// is not given, all children without tags in `a` or `b` are unioned with the result.
|
||||
// Cannot be used in conjunction with `diff()` or `hulling()` on the same parent object.
|
||||
|
@ -764,6 +769,7 @@ module diff(neg, keep)
|
|||
// }
|
||||
module intersect(a, b=undef, keep=undef)
|
||||
{
|
||||
req_children($children);
|
||||
// Don't perform the operation if the current tags are hidden
|
||||
if (_attachment_is_shown($tags)) {
|
||||
intersection() {
|
||||
|
@ -790,7 +796,7 @@ module intersect(a, b=undef, keep=undef)
|
|||
|
||||
// Module: hulling()
|
||||
// Usage:
|
||||
// hulling(a) {...}
|
||||
// hulling(a) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: tags(), recolor(), show(), hide(), diff(), intersect()
|
||||
// Description:
|
||||
|
@ -810,6 +816,7 @@ module intersect(a, b=undef, keep=undef)
|
|||
// }
|
||||
module hulling(a)
|
||||
{
|
||||
req_children($children);
|
||||
if (is_undef(a)) {
|
||||
hull() children();
|
||||
} else {
|
||||
|
@ -821,7 +828,7 @@ module hulling(a)
|
|||
|
||||
// Module: hide()
|
||||
// Usage:
|
||||
// hide(tags) {...}
|
||||
// hide(tags) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: tags(), recolor(), show(), diff(), intersect()
|
||||
// Description:
|
||||
|
@ -834,6 +841,7 @@ module hulling(a)
|
|||
// }
|
||||
module hide(tags="")
|
||||
{
|
||||
req_children($children);
|
||||
$tags_hidden = tags==""? [] : str_split(tags, " ");
|
||||
$tags_shown = [];
|
||||
children();
|
||||
|
@ -842,7 +850,7 @@ module hide(tags="")
|
|||
|
||||
// Module: show()
|
||||
// Usage:
|
||||
// show(tags) {...}
|
||||
// show(tags) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: tags(), recolor(), hide(), diff(), intersect()
|
||||
// Description:
|
||||
|
@ -855,6 +863,7 @@ module hide(tags="")
|
|||
// }
|
||||
module show(tags="")
|
||||
{
|
||||
req_children($children);
|
||||
$tags_shown = tags==""? [] : str_split(tags, " ");
|
||||
$tags_hidden = [];
|
||||
children();
|
||||
|
@ -867,7 +876,7 @@ module show(tags="")
|
|||
|
||||
// Module: edge_mask()
|
||||
// Usage:
|
||||
// edge_mask([edges], [except]) {...}
|
||||
// edge_mask([edges], [except]) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: attachable(), position(), attach(), face_profile(), edge_profile(), corner_mask()
|
||||
// Description:
|
||||
|
@ -895,6 +904,7 @@ module show(tags="")
|
|||
// edge_mask([TOP,"Z"],except=[BACK,TOP+LEFT])
|
||||
// rounding_edge_mask(l=71,r=10);
|
||||
module edge_mask(edges=EDGES_ALL, except=[]) {
|
||||
req_children($children);
|
||||
assert($parent_geom != undef, "No object to attach to!");
|
||||
edges = _edges(edges, except=except);
|
||||
vecs = [
|
||||
|
@ -922,7 +932,7 @@ module edge_mask(edges=EDGES_ALL, except=[]) {
|
|||
|
||||
// Module: corner_mask()
|
||||
// Usage:
|
||||
// corner_mask([corners], [except]) {...}
|
||||
// corner_mask([corners], [except]) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: attachable(), position(), attach(), face_profile(), edge_profile(), edge_mask()
|
||||
// Description:
|
||||
|
@ -944,6 +954,7 @@ module edge_mask(edges=EDGES_ALL, except=[]) {
|
|||
// translate([20,20,20]) sphere(r=20);
|
||||
// }
|
||||
module corner_mask(corners=CORNERS_ALL, except=[]) {
|
||||
req_children($children);
|
||||
assert($parent_geom != undef, "No object to attach to!");
|
||||
corners = _corners(corners, except=except);
|
||||
vecs = [for (i = [0:7]) if (corners[i]>0) CORNER_OFFSETS[i]];
|
||||
|
@ -965,7 +976,7 @@ module corner_mask(corners=CORNERS_ALL, except=[]) {
|
|||
|
||||
// Module: face_profile()
|
||||
// Usage:
|
||||
// face_profile(faces, r|d=, [convexity=]) {...}
|
||||
// face_profile(faces, r|d=, [convexity=]) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: attachable(), position(), attach(), edge_profile(), corner_profile()
|
||||
// Description:
|
||||
|
@ -986,6 +997,7 @@ module corner_mask(corners=CORNERS_ALL, except=[]) {
|
|||
// face_profile(TOP,r=10)
|
||||
// mask2d_roundover(r=10);
|
||||
module face_profile(faces=[], r, d, convexity=10) {
|
||||
req_children($children);
|
||||
faces = is_vector(faces)? [faces] : faces;
|
||||
assert(all([for (face=faces) is_vector(face) && sum([for (x=face) x!=0? 1 : 0])==1]), "Vector in faces doesn't point at a face.");
|
||||
r = get_radius(r=r, d=d, dflt=undef);
|
||||
|
@ -997,7 +1009,7 @@ module face_profile(faces=[], r, d, convexity=10) {
|
|||
|
||||
// Module: edge_profile()
|
||||
// Usage:
|
||||
// edge_profile([edges], [except], [convexity]) {...}
|
||||
// edge_profile([edges], [except], [convexity]) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: attachable(), position(), attach(), face_profile(), corner_profile()
|
||||
// Description:
|
||||
|
@ -1018,6 +1030,7 @@ module face_profile(faces=[], r, d, convexity=10) {
|
|||
// edge_profile([TOP,"Z"],except=[BACK,TOP+LEFT])
|
||||
// mask2d_roundover(r=10, inset=2);
|
||||
module edge_profile(edges=EDGES_ALL, except=[], convexity=10) {
|
||||
req_children($children);
|
||||
assert($parent_geom != undef, "No object to attach to!");
|
||||
edges = _edges(edges, except=except);
|
||||
vecs = [
|
||||
|
@ -1052,7 +1065,7 @@ module edge_profile(edges=EDGES_ALL, except=[], convexity=10) {
|
|||
|
||||
// Module: corner_profile()
|
||||
// Usage:
|
||||
// corner_profile([corners], [except], <r=|d=>, [convexity=]) {...}
|
||||
// corner_profile([corners], [except], [r=|d=], [convexity=]) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: attachable(), position(), attach(), face_profile(), edge_profile()
|
||||
// Description:
|
||||
|
@ -1121,33 +1134,33 @@ module corner_profile(corners=CORNERS_ALL, except=[], r, d, convexity=10) {
|
|||
// Module: attachable()
|
||||
//
|
||||
// Usage: Square/Trapezoid Geometry
|
||||
// attachable(anchor, spin, two_d=true, size=, [size2=], [shift=], ...) {...}
|
||||
// attachable(anchor, spin, two_d=true, size=, [size2=], [shift=], ...) {OBJECT; children();}
|
||||
// Usage: Circle/Oval Geometry
|
||||
// attachable(anchor, spin, two_d=true, r=|d=, ...) {...}
|
||||
// attachable(anchor, spin, two_d=true, r=|d=, ...) {OBJECT; children();}
|
||||
// Usage: 2D Path/Polygon Geometry
|
||||
// attachable(anchor, spin, two_d=true, path=, [extent=], ...) {...}
|
||||
// attachable(anchor, spin, two_d=true, path=, [extent=], ...) {OBJECT; children();}
|
||||
// Usage: 2D Region Geometry
|
||||
// attachable(anchor, spin, two_d=true, region=, [extent=], ...) {...}
|
||||
// attachable(anchor, spin, two_d=true, region=, [extent=], ...) {OBJECT; children();}
|
||||
// Usage: Cubical/Prismoidal Geometry
|
||||
// attachable(anchor, spin, [orient], size=, [size2=], [shift=], ...) {...}
|
||||
// attachable(anchor, spin, [orient], size=, [size2=], [shift=], ...) {OBJECT; children();}
|
||||
// Usage: Cylindrical Geometry
|
||||
// attachable(anchor, spin, [orient], r=|d=, l=, [axis=], ...) {...}
|
||||
// attachable(anchor, spin, [orient], r=|d=, l=, [axis=], ...) {OBJECT; children();}
|
||||
// Usage: Conical Geometry
|
||||
// attachable(anchor, spin, [orient], r1=|d1=, r2=|d2=, l=, [axis=], ...) {...}
|
||||
// attachable(anchor, spin, [orient], r1=|d1=, r2=|d2=, l=, [axis=], ...) {OBJECT; children();}
|
||||
// Usage: Spheroid/Ovoid Geometry
|
||||
// attachable(anchor, spin, [orient], r=|d=, ...) {...}
|
||||
// attachable(anchor, spin, [orient], r=|d=, ...) {OBJECT; children();}
|
||||
// Usage: Extruded Path/Polygon Geometry
|
||||
// attachable(anchor, spin, path=, l=|h=, [extent=], ...) {...}
|
||||
// attachable(anchor, spin, path=, l=|h=, [extent=], ...) {OBJECT; children();}
|
||||
// Usage: Extruded Region Geometry
|
||||
// attachable(anchor, spin, region=, l=|h=, [extent=], ...) {...}
|
||||
// attachable(anchor, spin, region=, l=|h=, [extent=], ...) {OBJECT; children();}
|
||||
// Usage: VNF Geometry
|
||||
// attachable(anchor, spin, [orient], vnf=, [extent=], ...) {...}
|
||||
// attachable(anchor, spin, [orient], vnf=, [extent=], ...) {OBJECT; children();}
|
||||
//
|
||||
// Topics: Attachments
|
||||
// See Also: reorient()
|
||||
//
|
||||
// Description:
|
||||
// Manages the anchoring, spin, orientation, and attachments for a 3D volume or 2D area.
|
||||
// Manages the anchoring, spin, orientation, and attachments for OBJECT, located in a 3D volume or 2D area.
|
||||
// A managed 3D volume is assumed to be vertically (Z-axis) oriented, and centered.
|
||||
// A managed 2D area is just assumed to be centered. The shape to be managed is given
|
||||
// as the first child to this module, and the second child should be given as `children()`.
|
||||
|
|
|
@ -371,7 +371,7 @@ function bezier_length(bezier, start_u=0, end_u=1, max_deflect=0.01) =
|
|||
|
||||
// Function: bezier_line_intersection()
|
||||
// Usage:
|
||||
// u = bezier_line_intersection(curve, line);
|
||||
// u = bezier_line_intersection(bezier, line);
|
||||
// Topics: Bezier Curves, Geometry, Intersection
|
||||
// See Also: bezier_points(), bezier_length(), bezier_closest_point()
|
||||
// Description:
|
||||
|
@ -708,6 +708,7 @@ function bezpath_offset(offset, bezier, N=3) =
|
|||
// pt = The starting endpoint for the bezier path.
|
||||
// a = If given a scalar, specifies the theta (XY plane) angle in degrees from X+. If given a vector, specifies the direction and possibly distance of the first control point.
|
||||
// r = Specifies the distance of the control point from the endpoint `pt`.
|
||||
// ---
|
||||
// p = If given, specifies the number of degrees away from the Z+ axis.
|
||||
// Example(2D): 2D Bezier Path by Angle
|
||||
// bezpath = flatten([
|
||||
|
@ -781,6 +782,7 @@ function bez_begin(pt,a,r,p) =
|
|||
// a = If given a scalar, specifies the theta (XY plane) angle in degrees from X+. If given a vector, specifies the direction and possibly distance of the departing control point.
|
||||
// r1 = Specifies the distance of the approching control point from the fixed point. Overrides the distance component of the vector if `a` contains a vector.
|
||||
// r2 = Specifies the distance of the departing control point from the fixed point. Overrides the distance component of the vector if `a` contains a vector. If `r1` is given and `r2` is not, uses the value of `r1` for `r2`.
|
||||
// ---
|
||||
// p = If given, specifies the number of degrees away from the Z+ axis.
|
||||
function bez_tang(pt,a,r1,r2,p) =
|
||||
assert(is_finite(r1) || is_vector(a))
|
||||
|
@ -816,6 +818,7 @@ function bez_tang(pt,a,r1,r2,p) =
|
|||
// a2 = If given a scalar, specifies the theta (XY plane) angle in degrees from X+. If given a vector, specifies the direction and possibly distance of the departing control point.
|
||||
// r1 = Specifies the distance of the approching control point from the fixed point. Overrides the distance component of the vector if `a1` contains a vector.
|
||||
// r2 = Specifies the distance of the departing control point from the fixed point. Overrides the distance component of the vector if `a2` contains a vector.
|
||||
// ---
|
||||
// p1 = If given, specifies the number of degrees away from the Z+ axis of the approaching control point.
|
||||
// p2 = If given, specifies the number of degrees away from the Z+ axis of the departing control point.
|
||||
function bez_joint(pt,a1,a2,r1,r2,p1,p2) =
|
||||
|
|
10
color.scad
10
color.scad
|
@ -15,7 +15,7 @@ use <builtins.scad>
|
|||
|
||||
// Module: recolor()
|
||||
// Usage:
|
||||
// recolor([c]) children;
|
||||
// recolor([c]) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: color_this()
|
||||
// Description:
|
||||
|
@ -42,7 +42,7 @@ module recolor(c="default")
|
|||
|
||||
// Module: color_this()
|
||||
// Usage:
|
||||
// color_this([c]) children;
|
||||
// color_this([c]) CHILDREN;
|
||||
// Topics: Attachments
|
||||
// See Also: recolor()
|
||||
// Description:
|
||||
|
@ -71,7 +71,7 @@ module color_this(c="default")
|
|||
|
||||
// Module: rainbow()
|
||||
// Usage:
|
||||
// rainbow(list,[stride],[maxhues],[shuffle],[seed]) children;
|
||||
// rainbow(list,[stride],[maxhues],[shuffle],[seed]) CHILDREN;
|
||||
// Description:
|
||||
// Iterates the list, displaying children in different colors for each list item. The color
|
||||
// is set using the color() module, so this module is not compatible with {{recolor()}} or
|
||||
|
@ -110,7 +110,7 @@ module rainbow(list, stride=1, maxhues, shuffle=false, seed)
|
|||
|
||||
// Function&Module: hsl()
|
||||
// Usage:
|
||||
// hsl(h,[s],[l],[a]) children;
|
||||
// hsl(h,[s],[l],[a]) CHILDREN;
|
||||
// rgb = hsl(h,[s],[l],[a]);
|
||||
// Description:
|
||||
// When called as a function, returns the [R,G,B] color for the given hue `h`, saturation `s`, and lightness `l` from the HSL colorspace. If you supply
|
||||
|
@ -145,7 +145,7 @@ module hsl(h,s=1,l=0.5,a=1)
|
|||
|
||||
// Function&Module: hsv()
|
||||
// Usage:
|
||||
// hsv(h,[s],[v],[a]) children;
|
||||
// hsv(h,[s],[v],[a]) CHILDREN;
|
||||
// rgb = hsv(h,[s],[v],[a]);
|
||||
// Description:
|
||||
// When called as a function, returns the [R,G,B] color for the given hue `h`, saturation `s`, and value `v` from the HSV colorspace. If you supply
|
||||
|
|
20
drawing.scad
20
drawing.scad
|
@ -534,9 +534,9 @@ module stroke(
|
|||
|
||||
// Function&Module: dashed_stroke()
|
||||
// Usage: As a Module
|
||||
// dashed_stroke(path, dashpat, [closed=]);
|
||||
// dashed_stroke(path, dashpat, [width=], [closed=]);
|
||||
// Usage: As a Function
|
||||
// dashes = dashed_stroke(path, dashpat, width=, [closed=]);
|
||||
// dashes = dashed_stroke(path, dashpat, [closed=]);
|
||||
// Topics: Paths, Drawing Tools
|
||||
// See Also: stroke(), path_cut()
|
||||
// Description:
|
||||
|
@ -595,17 +595,19 @@ module dashed_stroke(path, dashpat=[3,3], width=1, closed=false) {
|
|||
|
||||
// Function&Module: arc()
|
||||
// Usage: 2D arc from 0º to `angle` degrees.
|
||||
// arc(n, r|d=, angle);
|
||||
// path=arc(n, r|d=, angle);
|
||||
// Usage: 2D arc from START to END degrees.
|
||||
// arc(n, r|d=, angle=[START,END])
|
||||
// path=arc(n, r|d=, angle=[START,END]);
|
||||
// Usage: 2D arc from `start` to `start+angle` degrees.
|
||||
// arc(n, r|d=, start=, angle=)
|
||||
// path=arc(n, r|d=, start=, angle=);
|
||||
// Usage: 2D circle segment by `width` and `thickness`, starting and ending on the X axis.
|
||||
// arc(n, width=, thickness=)
|
||||
// path=arc(n, width=, thickness=);
|
||||
// Usage: Shortest 2D or 3D arc around centerpoint `cp`, starting at P0 and ending on the vector pointing from `cp` to `P1`.
|
||||
// arc(n, cp=, points=[P0,P1], [long=], [cw=], [ccw=])
|
||||
// path=arc(n, cp=, points=[P0,P1], [long=], [cw=], [ccw=]);
|
||||
// Usage: 2D or 3D arc, starting at `P0`, passing through `P1` and ending at `P2`.
|
||||
// arc(n, points=[P0,P1,P2])
|
||||
// path=arc(n, points=[P0,P1,P2]);
|
||||
// Usage: as module
|
||||
// arc(...) [ATTACHMENTS];
|
||||
// Topics: Paths (2D), Paths (3D), Shapes (2D), Path Generators
|
||||
// Description:
|
||||
// If called as a function, returns a 2D or 3D path forming an arc.
|
||||
|
@ -742,7 +744,7 @@ module arc(n, r, angle, d, cp, points, width, thickness, start, wedge=false, anc
|
|||
|
||||
// Function: helix()
|
||||
// Usage:
|
||||
// helix([l|h], [turns], [angle], r|r1|r2, d|d1|d2)
|
||||
// path = helix(l|h, [turns=], [angle=], r=|r1=|r2=, d=|d1=|d2=);
|
||||
// Description:
|
||||
// Returns a 3D helical path on a cone, including the degerate case of flat spirals.
|
||||
// You can specify start and end radii. You can give the length, the helix angle, or the number of turns: two
|
||||
|
|
10
regions.scad
10
regions.scad
|
@ -281,7 +281,7 @@ function force_region(poly) = is_path(poly) ? [poly] : poly;
|
|||
|
||||
// Module: region()
|
||||
// Usage:
|
||||
// region(r, [anchor], [spin=], [cp=], [atype=]) [attachments];
|
||||
// region(r, [anchor], [spin=], [cp=], [atype=]) [ATTACHMENTS];
|
||||
// Description:
|
||||
// Creates the 2D polygons described by the given region or list of polygons. This module works on
|
||||
// arbitrary lists of polygons that cross each other and hence do not define a valid region. The
|
||||
|
@ -983,7 +983,7 @@ function _list_three(a,b,c) =
|
|||
|
||||
// Function&Module: union()
|
||||
// Usage:
|
||||
// union() children;
|
||||
// union() CHILDREN;
|
||||
// region = union(regions);
|
||||
// region = union(REGION1,REGION2);
|
||||
// region = union(REGION1,REGION2,REGION3);
|
||||
|
@ -1013,7 +1013,7 @@ function union(regions=[],b=undef,c=undef,eps=EPSILON) =
|
|||
|
||||
// Function&Module: difference()
|
||||
// Usage:
|
||||
// difference() children;
|
||||
// difference() CHILDREN;
|
||||
// region = difference(regions);
|
||||
// region = difference(REGION1,REGION2);
|
||||
// region = difference(REGION1,REGION2,REGION3);
|
||||
|
@ -1045,7 +1045,7 @@ function difference(regions=[],b=undef,c=undef,eps=EPSILON) =
|
|||
|
||||
// Function&Module: intersection()
|
||||
// Usage:
|
||||
// intersection() children;
|
||||
// intersection() CHILDREN;
|
||||
// region = intersection(regions);
|
||||
// region = intersection(REGION1,REGION2);
|
||||
// region = intersection(REGION1,REGION2,REGION3);
|
||||
|
@ -1076,7 +1076,7 @@ function intersection(regions=[],b=undef,c=undef,eps=EPSILON) =
|
|||
|
||||
// Function&Module: exclusive_or()
|
||||
// Usage:
|
||||
// exclusive_or() children;
|
||||
// exclusive_or() CHILDREN;
|
||||
// region = exclusive_or(regions);
|
||||
// region = exclusive_or(REGION1,REGION2);
|
||||
// region = exclusive_or(REGION1,REGION2,REGION3);
|
||||
|
|
|
@ -1241,7 +1241,7 @@ module offset_stroke(path, width=1, rounded=true, start, end, check_valid=true,
|
|||
|
||||
// Function&Module: offset_sweep()
|
||||
// Usage: most common module arguments. See Arguments list below for more.
|
||||
// offset_sweep(path, [height|length|h|l|], [bottom], [top], [offset=], [convexity=],...) {attachments};
|
||||
// offset_sweep(path, [height|length|h|l|], [bottom], [top], [offset=], [convexity=],...) [ATTACHMENTS];
|
||||
// Usage: most common function arguments. See Arguments list below for more.
|
||||
// vnf = offset_sweep(path, [height|h|l|length], [bottom], [top], [offset=], ...);
|
||||
// Description:
|
||||
|
@ -1707,7 +1707,7 @@ function os_mask(mask, out=false, extra,check_valid, quality, offset) =
|
|||
|
||||
// Module: convex_offset_extrude()
|
||||
// Usage: Basic usage. See below for full options
|
||||
// convex_offset_extrude(height, [bottom], [top], ...) 2D-children;
|
||||
// convex_offset_extrude(height, [bottom], [top], ...) 2D-CHILDREN;
|
||||
// Description:
|
||||
// Extrudes 2d children with layers formed from the convex hull of the offset of each child according to a sequence of offset values.
|
||||
// Like `offset_sweep` this module can use built-in offset profiles to provide treatments such as roundovers or chamfers but unlike `offset_sweep()` it
|
||||
|
@ -1939,7 +1939,7 @@ function _rp_compute_patches(top, bot, rtop, rsides, ktop, ksides, concave) =
|
|||
|
||||
// Function&Module: rounded_prism()
|
||||
// Usage: as a module
|
||||
// rounded_prism(bottom, [top], [height=|h=|length=|l=], [joint_top=], [joint_bot=], [joint_sides=], [k=], [k_top=], [k_bot=], [k_sides=], [splinesteps=], [debug=], [convexity=],...) {attachments};
|
||||
// rounded_prism(bottom, [top], [height=|h=|length=|l=], [joint_top=], [joint_bot=], [joint_sides=], [k=], [k_top=], [k_bot=], [k_sides=], [splinesteps=], [debug=], [convexity=],...) [ATTACHMENTS];
|
||||
// Usage: as a function
|
||||
// vnf = rounded_prism(bottom, [top], [height=|h=|length=|l=], [joint_top=], [joint_bot=], [joint_sides=], [k=], [k_top=], [k_bot=], [k_sides=], [splinesteps=], [debug=]);
|
||||
// Description:
|
||||
|
@ -2476,8 +2476,8 @@ Access to the derivative smoothing parameter?
|
|||
|
||||
// Function&Module: join_prism()
|
||||
// Usage: The two main forms with most common options
|
||||
// join_prism(polygon, base, length=|height=|l=|h=, fillet=, [base_T=], [scale=], [prism_end_T=], [short=], ...) {attachments};
|
||||
// join_prism(polygon, base, aux=, fillet=, [base_T=], [aux_T=], [scale=], [prism_end_T=], [short=], ...) {attachments};
|
||||
// join_prism(polygon, base, length=|height=|l=|h=, fillet=, [base_T=], [scale=], [prism_end_T=], [short=], ...) [ATTACHMENTS];
|
||||
// join_prism(polygon, base, aux=, fillet=, [base_T=], [aux_T=], [scale=], [prism_end_T=], [short=], ...) [ATTACHMENTS];
|
||||
// Usage: As function
|
||||
// vnf = join_prism( ... );
|
||||
// Description:
|
||||
|
|
122
shapes2d.scad
122
shapes2d.scad
|
@ -25,7 +25,7 @@ use <builtins.scad>
|
|||
// Usage: As a Module
|
||||
// square(size, [center], ...);
|
||||
// Usage: With Attachments
|
||||
// square(size, [center], ...) { attachables }
|
||||
// square(size, [center], ...) [ATTACHMENTS];
|
||||
// Usage: As a Function
|
||||
// path = square(size, [center], ...);
|
||||
// See Also: rect()
|
||||
|
@ -72,9 +72,7 @@ module square(size=1, center, anchor, spin) {
|
|||
|
||||
// Function&Module: rect()
|
||||
// Usage: As Module
|
||||
// rect(size, [rounding], [chamfer], ...);
|
||||
// Usage: With Attachments
|
||||
// rect(size, ...) { attachables }
|
||||
// rect(size, [rounding], [chamfer], ...) [ATTACHMENTS];
|
||||
// Usage: As Function
|
||||
// path = rect(size, [rounding], [chamfer], ...);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
|
@ -205,9 +203,7 @@ function rect(size=1, rounding=0, chamfer=0, atype="box", anchor=CENTER, spin=0)
|
|||
// Function&Module: circle()
|
||||
// Topics: Shapes (2D), Path Generators (2D)
|
||||
// Usage: As a Module
|
||||
// circle(r|d=, ...);
|
||||
// Usage: With Attachments
|
||||
// circle(r|d=, ...) { attachables }
|
||||
// circle(r|d=, ...) [ATTACHMENTS];
|
||||
// Usage: As a Function
|
||||
// path = circle(r|d=, ...);
|
||||
// See Also: ellipse(), circle_2tangents(), circle_3points()
|
||||
|
@ -245,9 +241,7 @@ module circle(r, d, anchor=CENTER, spin=0) {
|
|||
|
||||
// Function&Module: ellipse()
|
||||
// Usage: As a Module
|
||||
// ellipse(r|d=, [realign=], [circum=], ...);
|
||||
// Usage: With Attachments
|
||||
// ellipse(r|d=, [realign=], [circum=], ...) { attachables }
|
||||
// ellipse(r|d=, [realign=], [circum=], ...) [ATTACHMENTS];
|
||||
// Usage: As a Function
|
||||
// path = ellipse(r|d=, [realign=], [circum=], ...);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
|
@ -427,9 +421,9 @@ function ellipse(r, d, realign=false, circum=false, uniform=false, anchor=CENTER
|
|||
|
||||
// Function&Module: regular_ngon()
|
||||
// Usage:
|
||||
// regular_ngon(n, r/d=/or=/od=, [realign=]);
|
||||
// regular_ngon(n, ir=/id=, [realign=]);
|
||||
// regular_ngon(n, side=, [realign=]);
|
||||
// regular_ngon(n, r|d=|or=|od=, [realign=]) [ATTACHMENTS];
|
||||
// regular_ngon(n, ir=|id=, [realign=]) [ATTACHMENTS];
|
||||
// regular_ngon(n, side=, [realign=]) [ATTACHMENTS];
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: circle(), pentagon(), hexagon(), octagon(), ellipse(), star()
|
||||
// Description:
|
||||
|
@ -563,9 +557,11 @@ module regular_ngon(n=6, r, d, or, od, ir, id, side, rounding=0, realign=false,
|
|||
|
||||
// Function&Module: pentagon()
|
||||
// Usage:
|
||||
// pentagon(or|od=, [realign=]);
|
||||
// pentagon(ir=|id=, [realign=]);
|
||||
// pentagon(side=, [realign=]);
|
||||
// pentagon(or|od=, [realign=], [align_tip=|align_side=]) [ATTACHMENTS];
|
||||
// pentagon(ir=|id=, [realign=], [align_tip=|align_side=]) [ATTACHMENTS];
|
||||
// pentagon(side=, [realign=], [align_tip=|align_side=]) [ATTACHMENTS];
|
||||
// Usage: as function
|
||||
// path = pentagon(...);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: circle(), regular_ngon(), hexagon(), octagon(), ellipse(), star()
|
||||
// Description:
|
||||
|
@ -619,17 +615,12 @@ module pentagon(r, d, or, od, ir, id, side, rounding=0, realign=false, align_tip
|
|||
|
||||
// Function&Module: hexagon()
|
||||
// Usage: As Module
|
||||
// hexagon(r/or, [realign=], <align_tip=|align_side=>, [rounding=], ...);
|
||||
// hexagon(d=/od=, ...);
|
||||
// hexagon(ir=/id=, ...);
|
||||
// hexagon(side=, ...);
|
||||
// Usage: With Attachments
|
||||
// hexagon(r/or, ...) { attachments }
|
||||
// hexagon(r/or, [realign=], <align_tip=|align_side=>, [rounding=], ...) [ATTACHMENTS];
|
||||
// hexagon(d=/od=, ...) [ATTACHMENTS];
|
||||
// hexagon(ir=/id=, ...) [ATTACHMENTS];
|
||||
// hexagon(side=, ...) [ATTACHMENTS];
|
||||
// Usage: As Function
|
||||
// path = hexagon(r/or, ...);
|
||||
// path = hexagon(d=/od=, ...);
|
||||
// path = hexagon(ir=/id=, ...);
|
||||
// path = hexagon(side=, ...);
|
||||
// path = hexagon(...);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: circle(), regular_ngon(), pentagon(), octagon(), ellipse(), star()
|
||||
// Description:
|
||||
|
@ -683,17 +674,12 @@ module hexagon(r, d, or, od, ir, id, side, rounding=0, realign=false, align_tip,
|
|||
|
||||
// Function&Module: octagon()
|
||||
// Usage: As Module
|
||||
// octagon(r/or, [realign=], <align_tip=|align_side=>, [rounding=], ...);
|
||||
// octagon(d=/od=, ...);
|
||||
// octagon(ir=/id=, ...);
|
||||
// octagon(side=, ...);
|
||||
// Usage: With Attachments
|
||||
// octagon(r/or, ...) { attachments }
|
||||
// octagon(r/or, [realign=], [align_tip=|align_side=], [rounding=], ...) [ATTACHMENTS];
|
||||
// octagon(d=/od=, ...) [ATTACHMENTS];
|
||||
// octagon(ir=/id=, ...) [ATTACHMENTS];
|
||||
// octagon(side=, ...) [ATTACHMENTS];
|
||||
// Usage: As Function
|
||||
// path = octagon(r/or, ...);
|
||||
// path = octagon(d=/od=, ...);
|
||||
// path = octagon(ir=/id=, ...);
|
||||
// path = octagon(side=, ...);
|
||||
// path = octagon(...);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: circle(), regular_ngon(), pentagon(), hexagon(), ellipse(), star()
|
||||
// Description:
|
||||
|
@ -746,9 +732,7 @@ module octagon(r, d, or, od, ir, id, side, rounding=0, realign=false, align_tip,
|
|||
|
||||
// Function&Module: right_triangle()
|
||||
// Usage: As Module
|
||||
// right_triangle(size, [center], ...);
|
||||
// Usage: With Attachments
|
||||
// right_triangle(size, [center], ...) { attachments }
|
||||
// right_triangle(size, [center], ...) [ATTACHMENTS];
|
||||
// Usage: As Function
|
||||
// path = right_triangle(size, [center], ...);
|
||||
// Description:
|
||||
|
@ -790,17 +774,12 @@ module right_triangle(size=[1,1], center, anchor, spin=0) {
|
|||
|
||||
// Function&Module: trapezoid()
|
||||
// Usage: As Module
|
||||
// trapezoid(h, w1, w2, [shift=], [rounding=], [chamfer=], ...);
|
||||
// trapezoid(h, w1, angle=, ...);
|
||||
// trapezoid(h, w2, angle=, ...);
|
||||
// trapezoid(w1, w2, angle=, ...);
|
||||
// Usage: With Attachments
|
||||
// trapezoid(h, w1, w2, ...) { attachments }
|
||||
// trapezoid(h, w1, w2, [shift=], [rounding=], [chamfer=], ...) [ATTACHMENTS];
|
||||
// trapezoid(h, w1, angle=, ...) [ATTACHMENTS];
|
||||
// trapezoid(h, w2, angle=, ...) [ATTACHMENTS];
|
||||
// trapezoid(w1, w2, angle=, ...) [ATTACHMENTS];
|
||||
// Usage: As Function
|
||||
// path = trapezoid(h, w1, w2, ...);
|
||||
// path = trapezoid(h, w1, angle=, ...);
|
||||
// path = trapezoid(h, w2=, angle=, ...);
|
||||
// path = trapezoid(w1=, w2=, angle=, ...);
|
||||
// path = trapezoid(...);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: rect(), square()
|
||||
// Description:
|
||||
|
@ -947,10 +926,8 @@ module trapezoid(h, w1, w2, angle, shift=0, chamfer=0, rounding=0, flip=false, a
|
|||
|
||||
// Function&Module: star()
|
||||
// Usage: As Module
|
||||
// star(n, r/or, ir, [realign=], [align_tip=], [align_pit=], ...);
|
||||
// star(n, r/or, step=, ...);
|
||||
// Usage: With Attachments
|
||||
// star(n, r/or, ir, ...) { attachments }
|
||||
// star(n, r/or, ir, [realign=], [align_tip=], [align_pit=], ...) [ATTACHMENTS];
|
||||
// star(n, r/or, step=, ...) [ATTACHMENTS];
|
||||
// Usage: As Function
|
||||
// path = star(n, r/or, ir, [realign=], [align_tip=], [align_pit=], ...);
|
||||
// path = star(n, r/or, step=, ...);
|
||||
|
@ -1132,11 +1109,11 @@ function _path_add_jitter(path, dist=1/512, closed=true) =
|
|||
// linear_extrude(height=h, twist=72, slices=h/quadsize)
|
||||
// jittered_poly(spath);
|
||||
module jittered_poly(path, dist=1/512) {
|
||||
no_children($children);
|
||||
polygon(_path_add_jitter(path, dist, closed=true));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Section: Curved 2D Shapes
|
||||
|
||||
|
||||
|
@ -1146,9 +1123,7 @@ module jittered_poly(path, dist=1/512) {
|
|||
// Makes a 2D teardrop shape. Useful for extruding into 3D printable holes. Uses "intersect" style anchoring.
|
||||
//
|
||||
// Usage: As Module
|
||||
// teardrop2d(r/d=, [ang], [cap_h]);
|
||||
// Usage: With Attachments
|
||||
// teardrop2d(r/d=, [ang], [cap_h], ...) { attachments }
|
||||
// teardrop2d(r/d=, [ang], [cap_h]) [ATTACHMENTS];
|
||||
// Usage: As Function
|
||||
// path = teardrop2d(r/d=, [ang], [cap_h]);
|
||||
//
|
||||
|
@ -1200,9 +1175,9 @@ function teardrop2d(r, ang=45, cap_h, d, anchor=CENTER, spin=0) =
|
|||
|
||||
// Function&Module: egg()
|
||||
// Usage: As Module
|
||||
// egg(length, r1, r2, R);
|
||||
// egg(length, r1|d1=, r2|d2=, R|D=) [ATTACHMENTS];
|
||||
// Usage: As Function
|
||||
// path = egg(length, r1|d2, r2|d2, R|D);
|
||||
// path = egg(length, r1|d1=, r2|d2=, R|D=);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: circle(), ellipse(), glued_circles()
|
||||
// Description:
|
||||
|
@ -1287,11 +1262,9 @@ module egg(length,r1,r2,R,d1,d2,D,anchor=CENTER, spin=0)
|
|||
|
||||
// Function&Module: glued_circles()
|
||||
// Usage: As Module
|
||||
// glued_circles(r/d=, [spread=], [tangent=], ...);
|
||||
// Usage: With Attachments
|
||||
// glued_circles(r/d=, [spread=], [tangent=], ...) { attachments }
|
||||
// glued_circles(r/d=, [spread], [tangent], ...) [ATTACHMENTS];
|
||||
// Usage: As Function
|
||||
// path = glued_circles(r/d=, [spread=], [tangent=], ...);
|
||||
// path = glued_circles(r/d=, [spread], [tangent], ...);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: circle(), ellipse(), egg()
|
||||
// Description:
|
||||
|
@ -1357,11 +1330,9 @@ function _superformula(theta,m1,m2,n1,n2=1,n3=1,a=1,b=1) =
|
|||
|
||||
// Function&Module: supershape()
|
||||
// Usage: As Module
|
||||
// supershape(step, [m1=], [m2=], [n1=], [n2=], [n3=], [a=], [b=], <r=/d=>);
|
||||
// Usage: With Attachments
|
||||
// supershape(step, [m1=], [m2=], [n1=], [n2=], [n3=], [a=], [b=], <r=/d=>) { attachments }
|
||||
// supershape(step, [m1=], [m2=], [n1=], [n2=], [n3=], [a=], [b=], [r=/d=]) [ATTACHMENTS];
|
||||
// Usage: As Function
|
||||
// path = supershape(step, [m1=], [m2=], [n1=], [n2=], [n3=], [a=], [b=], <r=/d=>);
|
||||
// path = supershape(step, [m1=], [m2=], [n1=], [n2=], [n3=], [a=], [b=], [r=/d=]);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: circle(), ellipse()
|
||||
// Description:
|
||||
|
@ -1438,9 +1409,9 @@ module supershape(step=0.5,m1=4,m2=undef,n1,n2=undef,n3=undef,a=1,b=undef, r=und
|
|||
|
||||
// Function&Module: reuleaux_polygon()
|
||||
// Usage: As Module
|
||||
// reuleaux_polygon(n, r|d, ...);
|
||||
// reuleaux_polygon(n, r|d=, ...) [ATTACHMENTS];
|
||||
// Usage: As Function
|
||||
// path = reuleaux_polygon(n, r|d, ...);
|
||||
// path = reuleaux_polygon(n, r|d=, ...);
|
||||
// Topics: Shapes (2D), Paths (2D), Path Generators, Attachable
|
||||
// See Also: regular_ngon(), pentagon(), hexagon(), octagon()
|
||||
// Description:
|
||||
|
@ -1510,7 +1481,7 @@ function reuleaux_polygon(n=3, r, d, anchor=CENTER, spin=0) =
|
|||
// text(text, [size], [font], ...);
|
||||
// Description:
|
||||
// Creates a 3D text block that can be attached to other attachable objects.
|
||||
// NOTE: This cannot have children attached to it.
|
||||
// NOTE: You cannot attach children to this.
|
||||
// Arguments:
|
||||
// text = The text string to instantiate as an object.
|
||||
// size = The font size used to create the text block. Default: 10
|
||||
|
@ -1598,10 +1569,10 @@ module text(text, size=10, font="Helvetica", halign, valign, spacing=1.0, direct
|
|||
|
||||
// Module: round2d()
|
||||
// Usage:
|
||||
// round2d(r) ...
|
||||
// round2d(or) ...
|
||||
// round2d(ir) ...
|
||||
// round2d(or, ir) ...
|
||||
// round2d(r) [ATTACHMENTS];
|
||||
// round2d(or=) [ATTACHMENTS];
|
||||
// round2d(ir=) [ATTACHMENTS];
|
||||
// round2d(or=, ir=) [ATTACHMENTS];
|
||||
// Description:
|
||||
// Rounds arbitrary 2D objects. Giving `r` rounds all concave and convex corners. Giving just `ir`
|
||||
// rounds just concave corners. Giving just `or` rounds convex corners. Giving both `ir` and `or`
|
||||
|
@ -1609,6 +1580,7 @@ module text(text, size=10, font="Helvetica", halign, valign, spacing=1.0, direct
|
|||
// any parts narrower than twice the `or` radius. Such parts will disappear.
|
||||
// Arguments:
|
||||
// r = Radius to round all concave and convex corners to.
|
||||
// ---
|
||||
// or = Radius to round only outside (convex) corners to. Use instead of `r`.
|
||||
// ir = Radius to round only inside (concave) corners to. Use instead of `r`.
|
||||
// Examples(2D):
|
||||
|
@ -1626,7 +1598,7 @@ module round2d(r, or, ir)
|
|||
|
||||
// Module: shell2d()
|
||||
// Usage:
|
||||
// shell2d(thickness, [or], [ir], [fill], [round])
|
||||
// shell2d(thickness, [or], [ir])
|
||||
// Description:
|
||||
// Creates a hollow shell from 2D children, with optional rounding.
|
||||
// Arguments:
|
||||
|
|
14
skin.scad
14
skin.scad
|
@ -19,7 +19,7 @@
|
|||
|
||||
// Function&Module: skin()
|
||||
// Usage: As module:
|
||||
// skin(profiles, slices, [z=], [refine=], [method=], [sampling=], [caps=], [closed=], [style=], [convexity=], [anchor=],[cp=],[spin=],[orient=],[atype=]) {attachments};
|
||||
// skin(profiles, slices, [z=], [refine=], [method=], [sampling=], [caps=], [closed=], [style=], [convexity=], [anchor=],[cp=],[spin=],[orient=],[atype=]) [ATTACHMENTS];
|
||||
// Usage: As function:
|
||||
// vnf = skin(profiles, slices, [z=], [refine=], [method=], [sampling=], [caps=], [closed=], [style=], [anchor=],[cp=],[spin=],[orient=],[atype=]);
|
||||
// Description:
|
||||
|
@ -504,7 +504,7 @@ function skin(profiles, slices, refine=1, method="direct", sampling, caps, close
|
|||
|
||||
// Function&Module: linear_sweep()
|
||||
// Usage:
|
||||
// linear_sweep(region, [height], [center=], [slices=], [twist=], [scale=], [style=], [convexity=]) {attachments};
|
||||
// linear_sweep(region, [height], [center=], [slices=], [twist=], [scale=], [style=], [convexity=]) [ATTACHMENTS];
|
||||
// Description:
|
||||
// If called as a module, creates a polyhedron that is the linear extrusion of the given 2D region or polygon.
|
||||
// If called as a function, returns a VNF that can be used to generate a polyhedron of the linear extrusion
|
||||
|
@ -623,7 +623,7 @@ function linear_sweep(region, height=1, center, twist=0, scale=1, slices,
|
|||
|
||||
// Function&Module: spiral_sweep()
|
||||
// Usage:
|
||||
// spiral_sweep(poly, h, r, turns, [higbee=], [center=], [r1=], [r2=], [d=], [d1=], [d2=], [higbee1=], [higbee2=], [internal=], [anchor=], [spin=], [orient=]){attachments};
|
||||
// spiral_sweep(poly, h, r, turns, [higbee=], [center=], [r1=], [r2=], [d=], [d1=], [d2=], [higbee1=], [higbee2=], [internal=], [anchor=], [spin=], [orient=])[ATTACHMENTS];
|
||||
// vnf = spiral_sweep(poly, h, r, turns, ...);
|
||||
// Description:
|
||||
// Takes a closed 2D polygon path, centered on the XY plane, and sweeps/extrudes it along a 3D spiral path
|
||||
|
@ -731,9 +731,9 @@ module spiral_sweep(poly, h, r, turns=1, higbee, center, r1, r2, d, d1, d2, higb
|
|||
|
||||
// Function&Module: path_sweep()
|
||||
// Usage: As module
|
||||
// path_sweep(shape, path, [method], [normal=], [closed=], [twist=], [twist_by_length=], [symmetry=], [last_normal=], [tangent=], [uniform=], [relaxed=], [caps=], [style=], [convexity=], [anchor=], [cp=], [spin=], [orient=], [atype=]) {attachments};
|
||||
// path_sweep(shape, path, [method], [normal=], [closed=], [twist=], [twist_by_length=], [symmetry=], [last_normal=], [tangent=], [uniform=], [relaxed=], [caps=], [style=], [convexity=], [anchor=], [cp=], [spin=], [orient=], [atype=]) [ATTACHMENTS];
|
||||
// Usage: As function
|
||||
// vnf = path_sweep(shape, path, [method], [normal=], [closed=], [twist=], [twist_by_length=], [symmetry=], [last_normal=], [tangent=], [uniform=], [relaxed=], [caps=], [style=], [transforms=], [anchor=], [cp=], [spin=], [orient=], [atype=]) {attachments};
|
||||
// vnf = path_sweep(shape, path, [method], [normal=], [closed=], [twist=], [twist_by_length=], [symmetry=], [last_normal=], [tangent=], [uniform=], [relaxed=], [caps=], [style=], [transforms=], [anchor=], [cp=], [spin=], [orient=], [atype=]);
|
||||
// Description:
|
||||
// Takes as input `shape`, a 2D polygon path (list of points), and `path`, a 2d or 3d path (also a list of points)
|
||||
// and constructs a polyhedron by sweeping the shape along the path. When run as a module returns the polyhedron geometry.
|
||||
|
@ -1264,7 +1264,7 @@ function path_sweep(shape, path, method="incremental", normal, closed=false, twi
|
|||
|
||||
// Function&Module: path_sweep2d()
|
||||
// Usage: as module
|
||||
// path_sweep2d(shape, path, [closed], [caps], [quality], [style], [convexity=], [anchor=], [spin=], [orient=], [atype=], [cp=]) {attachments};
|
||||
// path_sweep2d(shape, path, [closed], [caps], [quality], [style], [convexity=], [anchor=], [spin=], [orient=], [atype=], [cp=]) [ATTACHMENTS];
|
||||
// Usage: as function
|
||||
// vnf = path_sweep2d(shape, path, [closed], [caps], [quality], [style], [anchor=], [spin=], [orient=], [atype=], [cp=]);
|
||||
// Description:
|
||||
|
@ -1388,7 +1388,7 @@ function _ofs_face_edge(face,firstlen,second=false) =
|
|||
|
||||
// Function&Module: sweep()
|
||||
// Usage: As Module
|
||||
// sweep(shape, transforms, [closed], [caps], [style], [convexity=], [anchor=], [spin=], [orient=], [atype=]) [attachments];
|
||||
// sweep(shape, transforms, [closed], [caps], [style], [convexity=], [anchor=], [spin=], [orient=], [atype=]) [ATTACHMENTS];
|
||||
// Usage: As Function
|
||||
// vnf = sweep(shape, transforms, [closed], [caps], [style], [anchor=], [spin=], [orient=], [atype=]);
|
||||
// Description:
|
||||
|
|
|
@ -75,7 +75,7 @@ _NO_ARG = [true,[123232345],false];
|
|||
// Aliases: translate()
|
||||
//
|
||||
// Usage: As Module
|
||||
// move(v) children;
|
||||
// move(v) CHILDREN;
|
||||
// Usage: As a function to translate points, VNF, or Bezier patch
|
||||
// pts = move(v, p);
|
||||
// pts = move(STRING, p);
|
||||
|
@ -161,7 +161,7 @@ function translate(v=[0,0,0], p=_NO_ARG) = move(v=v, p=p);
|
|||
// Function&Module: left()
|
||||
//
|
||||
// Usage: As Module
|
||||
// left(x) children;
|
||||
// left(x) CHILDREN;
|
||||
// Usage: Translate Points
|
||||
// pts = left(x, p);
|
||||
// Usage: Get Translation Matrix
|
||||
|
@ -204,7 +204,7 @@ function left(x=0, p=_NO_ARG) =
|
|||
// Aliases: xmove()
|
||||
//
|
||||
// Usage: As Module
|
||||
// right(x) children;
|
||||
// right(x) CHILDREN;
|
||||
// Usage: Translate Points
|
||||
// pts = right(x, p);
|
||||
// Usage: Get Translation Matrix
|
||||
|
@ -257,7 +257,7 @@ function xmove(x=0, p=_NO_ARG) =
|
|||
// Function&Module: fwd()
|
||||
//
|
||||
// Usage: As Module
|
||||
// fwd(y) children;
|
||||
// fwd(y) CHILDREN;
|
||||
// Usage: Translate Points
|
||||
// pts = fwd(y, p);
|
||||
// Usage: Get Translation Matrix
|
||||
|
@ -300,7 +300,7 @@ function fwd(y=0, p=_NO_ARG) =
|
|||
// Aliases: ymove()
|
||||
//
|
||||
// Usage: As Module
|
||||
// back(y) children;
|
||||
// back(y) CHILDREN;
|
||||
// Usage: Translate Points
|
||||
// pts = back(y, p);
|
||||
// Usage: Get Translation Matrix
|
||||
|
@ -353,7 +353,7 @@ function ymove(y=0,p=_NO_ARG) =
|
|||
// Function&Module: down()
|
||||
//
|
||||
// Usage: As Module
|
||||
// down(z) children;
|
||||
// down(z) CHILDREN;
|
||||
// Usage: Translate Points
|
||||
// pts = down(z, p);
|
||||
// Usage: Get Translation Matrix
|
||||
|
@ -394,7 +394,7 @@ function down(z=0, p=_NO_ARG) =
|
|||
// Aliases: zmove()
|
||||
//
|
||||
// Usage: As Module
|
||||
// up(z) children;
|
||||
// up(z) CHILDREN;
|
||||
// Usage: Translate Points
|
||||
// pts = up(z, p);
|
||||
// Usage: Get Translation Matrix
|
||||
|
@ -452,10 +452,10 @@ function zmove(z=0, p=_NO_ARG) =
|
|||
// Function&Module: rot()
|
||||
//
|
||||
// Usage: As a Module
|
||||
// rot(a, [cp=], [reverse=]) children;
|
||||
// rot([X,Y,Z], [cp=], [reverse=]) children;
|
||||
// rot(a, v, [cp=], [reverse=]) children;
|
||||
// rot(from=, to=, [a=], [reverse=]) children;
|
||||
// rot(a, [cp=], [reverse=]) CHILDREN;
|
||||
// rot([X,Y,Z], [cp=], [reverse=]) CHILDREN;
|
||||
// rot(a, v, [cp=], [reverse=]) CHILDREN;
|
||||
// rot(from=, to=, [a=], [reverse=]) CHILDREN;
|
||||
// Usage: As a Function to transform data in `p`
|
||||
// pts = rot(a, p=, [cp=], [reverse=]);
|
||||
// pts = rot([X,Y,Z], p=, [cp=], [reverse=]);
|
||||
|
@ -556,7 +556,7 @@ function rot(a=0, v, cp, from, to, reverse=false, p=_NO_ARG, _m) =
|
|||
// Function&Module: xrot()
|
||||
//
|
||||
// Usage: As Module
|
||||
// xrot(a, [cp=]) children;
|
||||
// xrot(a, [cp=]) CHILDREN;
|
||||
// Usage: As a function to rotate points
|
||||
// rotated = xrot(a, p, [cp=]);
|
||||
// Usage: As a function to return rotation matrix
|
||||
|
@ -602,7 +602,7 @@ function xrot(a=0, p=_NO_ARG, cp) = rot([a,0,0], cp=cp, p=p);
|
|||
// Function&Module: yrot()
|
||||
//
|
||||
// Usage: As Module
|
||||
// yrot(a, [cp=]) children;
|
||||
// yrot(a, [cp=]) CHILDREN;
|
||||
// Usage: Rotate Points
|
||||
// rotated = yrot(a, p, [cp=]);
|
||||
// Usage: Get Rotation Matrix
|
||||
|
@ -648,7 +648,7 @@ function yrot(a=0, p=_NO_ARG, cp) = rot([0,a,0], cp=cp, p=p);
|
|||
// Function&Module: zrot()
|
||||
//
|
||||
// Usage: As Module
|
||||
// zrot(a, [cp=]) children;
|
||||
// zrot(a, [cp=]) CHILDREN;
|
||||
// Usage: As Function to rotate points
|
||||
// rotated = zrot(a, p, [cp=]);
|
||||
// Usage: As Function to return rotation matrix
|
||||
|
@ -699,8 +699,8 @@ function zrot(a=0, p=_NO_ARG, cp) = rot(a, cp=cp, p=p);
|
|||
|
||||
// Function&Module: scale()
|
||||
// Usage: As Module
|
||||
// scale(SCALAR) children;
|
||||
// scale([X,Y,Z]) children;
|
||||
// scale(SCALAR) CHILDREN;
|
||||
// scale([X,Y,Z]) CHILDREN;
|
||||
// Usage: Scale Points
|
||||
// pts = scale(v, p, [cp=]);
|
||||
// Usage: Get Scaling Matrix
|
||||
|
@ -750,7 +750,7 @@ function scale(v=1, p=_NO_ARG, cp=[0,0,0]) =
|
|||
//
|
||||
//
|
||||
// Usage: As Module
|
||||
// xscale(x, [cp=]) children;
|
||||
// xscale(x, [cp=]) CHILDREN;
|
||||
// Usage: Scale Points
|
||||
// scaled = xscale(x, p, [cp=]);
|
||||
// Usage: Get Affine Matrix
|
||||
|
@ -804,7 +804,7 @@ function xscale(x=1, p=_NO_ARG, cp=0) =
|
|||
// Function&Module: yscale()
|
||||
//
|
||||
// Usage: As Module
|
||||
// yscale(y, [cp=]) children;
|
||||
// yscale(y, [cp=]) CHILDREN;
|
||||
// Usage: Scale Points
|
||||
// scaled = yscale(y, p, [cp=]);
|
||||
// Usage: Get Affine Matrix
|
||||
|
@ -858,7 +858,7 @@ function yscale(y=1, p=_NO_ARG, cp=0) =
|
|||
// Function&Module: zscale()
|
||||
//
|
||||
// Usage: As Module
|
||||
// zscale(z, [cp=]) children;
|
||||
// zscale(z, [cp=]) CHILDREN;
|
||||
// Usage: Scale Points
|
||||
// scaled = zscale(z, p, [cp=]);
|
||||
// Usage: Get Affine Matrix
|
||||
|
@ -915,7 +915,7 @@ function zscale(z=1, p=_NO_ARG, cp=0) =
|
|||
|
||||
// Function&Module: mirror()
|
||||
// Usage: As Module
|
||||
// mirror(v) children;
|
||||
// mirror(v) CHILDREN;
|
||||
// Usage: As Function
|
||||
// pt = mirror(v, p);
|
||||
// Usage: Get Reflection/Mirror Matrix
|
||||
|
@ -985,7 +985,7 @@ function mirror(v, p=_NO_ARG) =
|
|||
// Function&Module: xflip()
|
||||
//
|
||||
// Usage: As Module
|
||||
// xflip([x=]) children;
|
||||
// xflip([x=]) CHILDREN;
|
||||
// Usage: As Function
|
||||
// pt = xflip(p, [x]);
|
||||
// Usage: Get Affine Matrix
|
||||
|
@ -1039,7 +1039,7 @@ function xflip(p=_NO_ARG, x=0) =
|
|||
// Function&Module: yflip()
|
||||
//
|
||||
// Usage: As Module
|
||||
// yflip([y=]) children;
|
||||
// yflip([y=]) CHILDREN;
|
||||
// Usage: As Function
|
||||
// pt = yflip(p, [y]);
|
||||
// Usage: Get Affine Matrix
|
||||
|
@ -1093,7 +1093,7 @@ function yflip(p=_NO_ARG, y=0) =
|
|||
// Function&Module: zflip()
|
||||
//
|
||||
// Usage: As Module
|
||||
// zflip([z=]) children;
|
||||
// zflip([z=]) CHILDREN;
|
||||
// Usage: As Function
|
||||
// pt = zflip(p, [z]);
|
||||
// Usage: Get Affine Matrix
|
||||
|
@ -1146,7 +1146,7 @@ function zflip(p=_NO_ARG, z=0) =
|
|||
|
||||
// Function&Module: frame_map()
|
||||
// Usage: As module
|
||||
// frame_map(v1, v2, v3, [reverse=]) children;
|
||||
// frame_map(v1, v2, v3, [reverse=]) CHILDREN;
|
||||
// Usage: As function to remap points
|
||||
// transformed = frame_map(v1, v2, v3, p=points, [reverse=]);
|
||||
// Usage: As function to return a transformation matrix:
|
||||
|
@ -1234,7 +1234,7 @@ module frame_map(x,y,z,p,reverse=false)
|
|||
|
||||
// Function&Module: skew()
|
||||
// Usage: As Module
|
||||
// skew([sxy=], [sxz=], [syx=], [syz=], [szx=], [szy=]) children;
|
||||
// skew([sxy=], [sxz=], [syx=], [syz=], [szx=], [szy=]) CHILDREN;
|
||||
// Usage: As Function
|
||||
// pts = skew(p, [sxy=], [sxz=], [syx=], [syz=], [szx=], [szy=]);
|
||||
// Usage: Get Affine Matrix
|
||||
|
|
4
vnf.scad
4
vnf.scad
|
@ -831,8 +831,8 @@ function _slice_3dpolygons(polys, dir, cuts) =
|
|||
|
||||
// Module: vnf_polyhedron()
|
||||
// Usage:
|
||||
// vnf_polyhedron(vnf);
|
||||
// vnf_polyhedron([VNF, VNF, VNF, ...]);
|
||||
// vnf_polyhedron(vnf) [ATTACHMENTS];
|
||||
// vnf_polyhedron([VNF, VNF, VNF, ...]) [ATTACHMENTS];
|
||||
// Description:
|
||||
// Given a VNF structure, or a list of VNF structures, creates a polyhedron from them.
|
||||
// Arguments:
|
||||
|
|
Loading…
Reference in a new issue