Added section to transforms.scad and new top text.

Error trap in offset() for repeated points
This commit is contained in:
Adrian Mariano 2021-09-06 10:48:37 -04:00
parent 2f4875f92f
commit 4fee72f517
2 changed files with 6 additions and 1 deletions

View file

@ -482,6 +482,7 @@ function _offset_chamfer(center, points, delta) =
function _shift_segment(segment, d) =
assert(!approx(segment[0],segment[1]),"Path has repeated points")
move(d*line_normal(segment),segment);

View file

@ -1,6 +1,6 @@
//////////////////////////////////////////////////////////////////////
// LibFile: transforms.scad
// Functions and modules for translation, rotation, reflection and skewing.
// Functions and modules that provide shortcuts for translation, rotation, mirror and skew operations. The shortcuts can act on geometry, like the usual OpenSCAD rotate() and translate(). They also work as functions that operate on lists of points in various forms: paths, VNFS and bezier patches. Lastly, the function form of the shortcuts can return a matrix representing the operation the shortcut performs. The rotation and scaling shortcuts accept an optional centerpoint for the rotation or scaling operation.
// Includes:
// include <BOSL2/std.scad>
//////////////////////////////////////////////////////////////////////
@ -1011,6 +1011,10 @@ function zscale(z=1, p, cp=0) =
scale([1,1,z], cp=cp, p=p);
//////////////////////////////////////////////////////////////////////
// Section: Reflection (Mirroring)
//////////////////////////////////////////////////////////////////////
// Function&Module: mirror()
// Usage: As Module
// mirror(v) ...