Cleaned up grid2d() complex example.

This commit is contained in:
Revar Desmera 2020-03-25 20:14:33 -07:00
parent 38d7e0dad6
commit eaddb81e7c
2 changed files with 9 additions and 9 deletions

View file

@ -439,11 +439,11 @@ module zdistribute(spacing=10, sizes=undef, l=undef)
// Example: // Example:
// // Makes a grid of hexagon pillars whose tops are all // // Makes a grid of hexagon pillars whose tops are all
// // angled to reflect light at [0,0,50], if they were shiny. // // angled to reflect light at [0,0,50], if they were shiny.
// hexregion = [for (a = [0:60:359.9]) 50.01*[cos(a), sin(a)]]; // hexregion = circle(r=50.01,$fn=6);
// grid2d(spacing=10, stagger=true, in_poly=hexregion) { // grid2d(spacing=10, stagger=true, in_poly=hexregion) union() {
// // Note: You must use for(var=[val]) or let(var=val) // // Note: The union() is needed or else $pos will be
// // to set vars from $pos or other special vars in this scope. // // inexplicably unreadable.
// let (ref_v = (unit([0,0,50]-point3d($pos)) + UP)/2) // ref_v = (unit([0,0,50]-point3d($pos)) + UP)/2;
// half_of(v=-ref_v, cp=[0,0,5]) // half_of(v=-ref_v, cp=[0,0,5])
// zrot(180/6) // zrot(180/6)
// cylinder(h=20, d=10/cos(180/6)+0.01, $fn=6); // cylinder(h=20, d=10/cos(180/6)+0.01, $fn=6);

View file

@ -8,7 +8,7 @@
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
BOSL_VERSION = [2,0,231]; BOSL_VERSION = [2,0,232];
// Section: BOSL Library Version Functions // Section: BOSL Library Version Functions