diff --git a/regions.scad b/regions.scad index 378576c..3355bb3 100644 --- a/regions.scad +++ b/regions.scad @@ -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); diff --git a/transforms.scad b/transforms.scad index d3bcdfb..2056aae 100644 --- a/transforms.scad +++ b/transforms.scad @@ -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 ////////////////////////////////////////////////////////////////////// @@ -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) ...