mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
fix usage messages
This commit is contained in:
parent
dff0cb6a0b
commit
c5ea11df87
2 changed files with 26 additions and 20 deletions
|
@ -592,7 +592,7 @@ function _rounding_offsets(edgespec,z_dir=1) =
|
||||||
|
|
||||||
// Function: smooth_path()
|
// Function: smooth_path()
|
||||||
// Usage:
|
// Usage:
|
||||||
// smoothed = smooth_path(path, [tangents], <size=|relsize=>, [splinesteps=], [closed=], [uniform=]);
|
// smoothed = smooth_path(path, [tangents], [size=|relsize=], [splinesteps=], [closed=], [uniform=]);
|
||||||
// Description:
|
// Description:
|
||||||
// Smooths the input path using a cubic spline. Every segment of the path will be replaced by a cubic curve
|
// Smooths the input path using a cubic spline. Every segment of the path will be replaced by a cubic curve
|
||||||
// with `splinesteps` points. The cubic interpolation will pass through every input point on the path
|
// with `splinesteps` points. The cubic interpolation will pass through every input point on the path
|
||||||
|
@ -1240,9 +1240,9 @@ module offset_stroke(path, width=1, rounded=true, start, end, check_valid=true,
|
||||||
|
|
||||||
// Function&Module: offset_sweep()
|
// Function&Module: offset_sweep()
|
||||||
// Usage: most common module arguments. See Arguments list below for more.
|
// Usage: most common module arguments. See Arguments list below for more.
|
||||||
// offset_sweep(path, <height|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.
|
// Usage: most common function arguments. See Arguments list below for more.
|
||||||
// vnf = offset_sweep(path, <height|h|l>, [bottom], [top], [offset=], ...)
|
// vnf = offset_sweep(path, [height|h|l|length], [bottom], [top], [offset=], ...);
|
||||||
// Description:
|
// Description:
|
||||||
// Takes a 2d path as input and extrudes it upwards and/or downward. Each layer in the extrusion is produced using `offset()` to expand or shrink the previous layer. When invoked as a function returns a VNF; when invoked as a module produces geometry.
|
// Takes a 2d path as input and extrudes it upwards and/or downward. Each layer in the extrusion is produced using `offset()` to expand or shrink the previous layer. When invoked as a function returns a VNF; when invoked as a module produces geometry.
|
||||||
// Using the `top` and/or `bottom` arguments you can specify a sequence of offsets values, or you can use several built-in offset profiles that
|
// Using the `top` and/or `bottom` arguments you can specify a sequence of offsets values, or you can use several built-in offset profiles that
|
||||||
|
@ -1507,7 +1507,7 @@ function _struct_valid(spec, func, name) =
|
||||||
function offset_sweep(
|
function offset_sweep(
|
||||||
path, height,
|
path, height,
|
||||||
bottom=[], top=[],
|
bottom=[], top=[],
|
||||||
h, l,
|
h, l, length,
|
||||||
offset="round", r=0, steps=16,
|
offset="round", r=0, steps=16,
|
||||||
quality=1, check_valid=true,
|
quality=1, check_valid=true,
|
||||||
extra=0,
|
extra=0,
|
||||||
|
@ -1560,7 +1560,7 @@ function offset_sweep(
|
||||||
bottom_height = len(offsets_bot)==0 ? 0 : abs(last(offsets_bot)[1]) - struct_val(bottom,"extra"),
|
bottom_height = len(offsets_bot)==0 ? 0 : abs(last(offsets_bot)[1]) - struct_val(bottom,"extra"),
|
||||||
top_height = len(offsets_top)==0 ? 0 : abs(last(offsets_top)[1]) - struct_val(top,"extra"),
|
top_height = len(offsets_top)==0 ? 0 : abs(last(offsets_top)[1]) - struct_val(top,"extra"),
|
||||||
|
|
||||||
height = one_defined([l,h,height], "l,h,height", dflt=u_add(bottom_height,top_height)),
|
height = one_defined([l,h,height,length], "l,h,height,length", dflt=u_add(bottom_height,top_height)),
|
||||||
middle = height-bottom_height-top_height
|
middle = height-bottom_height-top_height
|
||||||
)
|
)
|
||||||
assert(height>0, "Height must be positive")
|
assert(height>0, "Height must be positive")
|
||||||
|
@ -1705,7 +1705,8 @@ function os_mask(mask, out=false, extra,check_valid, quality, offset) =
|
||||||
|
|
||||||
|
|
||||||
// Module: convex_offset_extrude()
|
// Module: convex_offset_extrude()
|
||||||
//
|
// Usage: Basic usage. See below for full options
|
||||||
|
// convex_offset_extrude(height, [bottom], [top], ...) {2D children};
|
||||||
// Description:
|
// Description:
|
||||||
// Extrudes 2d children with layers formed from the convex hull of the offset of each child according to a sequence of offset values.
|
// 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
|
// Like `offset_sweep` this module can use built-in offset profiles to provide treatments such as roundovers or chamfers but unlike `offset_sweep()` it
|
||||||
|
@ -1762,9 +1763,10 @@ function os_mask(mask, out=false, extra,check_valid, quality, offset) =
|
||||||
// number of vertices or lead to any special complications.
|
// number of vertices or lead to any special complications.
|
||||||
//
|
//
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// height / l / h = total height (including rounded portions, but not extra sections) of the output. Default: combined height of top and bottom end treatments.
|
// height / length / l / h = total height (including rounded portions, but not extra sections) of the output. Default: combined height of top and bottom end treatments.
|
||||||
// top = rounding spec for the top end.
|
|
||||||
// bottom = rounding spec for the bottom end
|
// bottom = rounding spec for the bottom end
|
||||||
|
// top = rounding spec for the top end.
|
||||||
|
// ---
|
||||||
// offset = default offset, `"round"`, `"delta"`, or `"chamfer"`. Default: `"round"`
|
// offset = default offset, `"round"`, `"delta"`, or `"chamfer"`. Default: `"round"`
|
||||||
// steps = default step count. Default: 16
|
// steps = default step count. Default: 16
|
||||||
// extra = default extra height. Default: 0
|
// extra = default extra height. Default: 0
|
||||||
|
@ -1789,8 +1791,9 @@ function os_mask(mask, out=false, extra,check_valid, quality, offset) =
|
||||||
// top=os_chamfer(height=1), height=7, $fn=32)
|
// top=os_chamfer(height=1), height=7, $fn=32)
|
||||||
// star(5,r=22,ir=13);
|
// star(5,r=22,ir=13);
|
||||||
function convex_offset_extrude(
|
function convex_offset_extrude(
|
||||||
height, h, l,
|
height,
|
||||||
top=[], bottom=[],
|
bottom=[], top=[],
|
||||||
|
h, l, length,
|
||||||
offset="round", r=0, steps=16,
|
offset="round", r=0, steps=16,
|
||||||
extra=0,
|
extra=0,
|
||||||
cut=undef, chamfer_width=undef, chamfer_height=undef,
|
cut=undef, chamfer_width=undef, chamfer_height=undef,
|
||||||
|
@ -1798,8 +1801,10 @@ function convex_offset_extrude(
|
||||||
convexity=10, thickness = 1/1024
|
convexity=10, thickness = 1/1024
|
||||||
) = no_function("convex_offset_extrude");
|
) = no_function("convex_offset_extrude");
|
||||||
module convex_offset_extrude(
|
module convex_offset_extrude(
|
||||||
height, h, l,
|
height,
|
||||||
top=[], bottom=[],
|
bottom=[],
|
||||||
|
top=[],
|
||||||
|
h, l, length,
|
||||||
offset="round", r=0, steps=16,
|
offset="round", r=0, steps=16,
|
||||||
extra=0,
|
extra=0,
|
||||||
cut=undef, chamfer_width=undef, chamfer_height=undef,
|
cut=undef, chamfer_width=undef, chamfer_height=undef,
|
||||||
|
@ -1831,7 +1836,7 @@ module convex_offset_extrude(
|
||||||
bottom_height = len(offsets_bot)==0 ? 0 : abs(last(offsets_bot)[1]) - struct_val(bottom,"extra");
|
bottom_height = len(offsets_bot)==0 ? 0 : abs(last(offsets_bot)[1]) - struct_val(bottom,"extra");
|
||||||
top_height = len(offsets_top)==0 ? 0 : abs(last(offsets_top)[1]) - struct_val(top,"extra");
|
top_height = len(offsets_top)==0 ? 0 : abs(last(offsets_top)[1]) - struct_val(top,"extra");
|
||||||
|
|
||||||
height = one_defined([l,h,height], "l,h,height", dflt=u_add(bottom_height,top_height));
|
height = one_defined([l,h,height,length], "l,h,height,length", dflt=u_add(bottom_height,top_height));
|
||||||
assert(height>=0, "Height must be nonnegative");
|
assert(height>=0, "Height must be nonnegative");
|
||||||
|
|
||||||
middle = height-bottom_height-top_height;
|
middle = height-bottom_height-top_height;
|
||||||
|
@ -1932,9 +1937,9 @@ function _rp_compute_patches(top, bot, rtop, rsides, ktop, ksides, concave) =
|
||||||
|
|
||||||
// Function&Module: rounded_prism()
|
// Function&Module: rounded_prism()
|
||||||
// Usage: as a module
|
// 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
|
// 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=]);
|
// 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:
|
// Description:
|
||||||
// Construct a generalized prism with continuous curvature rounding. You supply the polygons for the top and bottom of the prism. The only
|
// Construct a generalized prism with continuous curvature rounding. You supply the polygons for the top and bottom of the prism. The only
|
||||||
// limitation is that joining the edges must produce a valid polyhedron with coplanar side faces. You specify the rounding by giving
|
// limitation is that joining the edges must produce a valid polyhedron with coplanar side faces. You specify the rounding by giving
|
||||||
|
@ -2469,8 +2474,8 @@ Access to the derivative smoothing parameter?
|
||||||
|
|
||||||
// Function&Module: join_prism()
|
// Function&Module: join_prism()
|
||||||
// Usage: The two main forms with most common options
|
// 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], ...) { ... }
|
// 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], ...) { ... }
|
// join_prism(polygon, base, aux=, fillet=, [base_T=], [aux_T=], [scale=], [prism_end_T=], [short=], ...) {attachments};
|
||||||
// Usage: As function
|
// Usage: As function
|
||||||
// vnf = join_prism( ... );
|
// vnf = join_prism( ... );
|
||||||
// Description:
|
// Description:
|
||||||
|
|
|
@ -504,7 +504,7 @@ function skin(profiles, slices, refine=1, method="direct", sampling, caps, close
|
||||||
|
|
||||||
// Function&Module: linear_sweep()
|
// Function&Module: linear_sweep()
|
||||||
// Usage:
|
// Usage:
|
||||||
// linear_sweep(region, height, [center], [slices], [twist], [scale], [style], [convexity]) {attachments};
|
// linear_sweep(region, [height], [center=], [slices=], [twist=], [scale=], [style=], [convexity=]) {attachments};
|
||||||
// Description:
|
// 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 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
|
// If called as a function, returns a VNF that can be used to generate a polyhedron of the linear extrusion
|
||||||
|
@ -518,6 +518,7 @@ function skin(profiles, slices, refine=1, method="direct", sampling, caps, close
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// region = The 2D [Region](regions.scad) or polygon that is to be extruded.
|
// region = The 2D [Region](regions.scad) or polygon that is to be extruded.
|
||||||
// height = The height to extrude the region. Default: 1
|
// height = The height to extrude the region. Default: 1
|
||||||
|
// ---
|
||||||
// center = If true, the created polyhedron will be vertically centered. If false, it will be extruded upwards from the XY plane. Default: `false`
|
// center = If true, the created polyhedron will be vertically centered. If false, it will be extruded upwards from the XY plane. Default: `false`
|
||||||
// slices = The number of slices to divide the shape into along the Z axis, to allow refinement of detail, especially when working with a twist. Default: `twist/5`
|
// slices = The number of slices to divide the shape into along the Z axis, to allow refinement of detail, especially when working with a twist. Default: `twist/5`
|
||||||
// maxseg = If given, then any long segments of the region will be subdivided to be shorter than this length. This can refine twisting flat faces a lot. Default: `undef` (no subsampling)
|
// maxseg = If given, then any long segments of the region will be subdivided to be shorter than this length. This can refine twisting flat faces a lot. Default: `undef` (no subsampling)
|
||||||
|
@ -622,7 +623,7 @@ function linear_sweep(region, height=1, center, twist=0, scale=1, slices,
|
||||||
|
|
||||||
// Function&Module: spiral_sweep()
|
// Function&Module: spiral_sweep()
|
||||||
// Usage:
|
// Usage:
|
||||||
// spiral_sweep(poly, h, r, turns, [higbee], [center], [r1], [r2], [d], [d1], [d2], [higbee1], [higbee2], [internal], [anchor], [spin], [orient]);
|
// 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, ...);
|
// vnf = spiral_sweep(poly, h, r, turns, ...);
|
||||||
// Description:
|
// Description:
|
||||||
// Takes a closed 2D polygon path, centered on the XY plane, and sweeps/extrudes it along a 3D spiral path
|
// Takes a closed 2D polygon path, centered on the XY plane, and sweeps/extrudes it along a 3D spiral path
|
||||||
|
@ -1574,7 +1575,7 @@ function _smooth(data,len,closed=false,angle=false) =
|
||||||
|
|
||||||
// Function: rot_resample()
|
// Function: rot_resample()
|
||||||
// Usage:
|
// Usage:
|
||||||
// rlist = rot_resample(rotlist, n, [method], [twist], [scale], [smoothlen], [long], [turns], [closed])
|
// rlist = rot_resample(rotlist, n, [method=], [twist=], [scale=], [smoothlen=], [long=], [turns=], [closed=])
|
||||||
// Description:
|
// Description:
|
||||||
// Takes as input a list of rotation matrices in 3d. Produces as output a resampled
|
// Takes as input a list of rotation matrices in 3d. Produces as output a resampled
|
||||||
// list of rotation operators (4x4 matrixes) suitable for use with sweep(). You can optionally apply twist to
|
// list of rotation operators (4x4 matrixes) suitable for use with sweep(). You can optionally apply twist to
|
||||||
|
|
Loading…
Reference in a new issue