From 7ccd7eb45070306cb67cdfe8d8777eeaa0818410 Mon Sep 17 00:00:00 2001 From: Adrian Mariano Date: Thu, 17 Feb 2022 16:46:45 -0500 Subject: [PATCH] vnf doc tweaks, add sweep example --- skin.scad | 6 ++++++ vnf.scad | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/skin.scad b/skin.scad index dd48a10..ee37489 100644 --- a/skin.scad +++ b/skin.scad @@ -1391,6 +1391,12 @@ function _ofs_face_edge(face,firstlen,second=false) = // orient = Vector to rotate top towards after spin (module only) // atype = Select "hull" or "intersect" anchor types. Default: "hull" // cp = Centerpoint for determining "intersect" anchors or centering the shape. Determintes the base of the anchor vector. Can be "centroid", "mean", "box" or a 3D point. Default: "centroid" +// Example(VPR=[45,0.74]): A bent object that also changes shape along its length. +// radius = 75; +// angle = 40; +// shape = circle(r=5,$fn=32); +// T = [for(i=[0:25]) xrot(-angle*i/25,cp=[0,radius,0])*scale([1+i/25, 2-i/25,1])]; +// sweep(shape,T); // Example: This is the "sweep-drop" example from list-comprehension-demos. // function drop(t) = 100 * 0.5 * (1 - cos(180 * t)) * sin(180 * t) + 1; // function path(t) = [0, 0, 80 + 80 * cos(180 * t)]; diff --git a/vnf.scad b/vnf.scad index b4835e2..8f01c43 100644 --- a/vnf.scad +++ b/vnf.scad @@ -296,6 +296,21 @@ function vnf_tri_array(points, row_wrap=false, reverse=false) = // All the points in the input VNFs will appear in the output, even if they are // duplicates of each other. It is valid to repeat points in a VNF, but if you // with to remove the duplicates that will occur along joined edges, use {{vnf_merge_points()}}. +// . +// Note that this is a tool for manipulating polyhedron data. It is for +// building up a full polyhedron from partial polyhedra. +// It is *not* a union operator for VNFs. The VNFs to be joined must not intersect each other, +// except at edges, or the result will be an invalid polyhedron. Similarly the +// result must not have any other illegal polyhedron characteristics, such as creating +// more than two faces sharing the same edge. +// If you want a valid result it is your responsibility to ensure that the polyhedron +// has no holes, no intersecting faces or edges, and obeys all the requirements +// that CGAL expects. +// . +// For example, if you combine two pyramids to try to make an octahedron, the result will +// be invalid because of the two internal faces created by the pyramid bases. A valid +// use would be to build a cube missing one face and a pyramid missing its base and +// then join them into a cube with a point. // Arguments: // vnfs = a list of the VNFs to joint into one VNF. function vnf_join(vnfs) =