doc fixes

This commit is contained in:
Adrian Mariano 2023-01-20 16:55:56 -05:00
parent 554d197976
commit 3f4d5e65f7
3 changed files with 12 additions and 12 deletions

View file

@ -1211,7 +1211,7 @@ module jittered_poly(path, dist=1/512) {
//
// Arguments:
// r = radius of circular part of teardrop. (Default: 1)
// ang = angle of hat walls from the Y axis. (Default: 45 degrees)
// ang = angle of hat walls from the Y axis (half the angle of the peak). (Default: 45 degrees)
// cap_h = if given, height above center where the shape will be truncated.
// ---
// d = diameter of circular portion of bottom. (Use instead of r)

View file

@ -572,13 +572,13 @@ case.
```openscad-3D
include <BOSL2/std.scad>
cube(50,center=true)
attach(RIGHT)cylinder(d1=30,d2=15,l=25);
attach(RIGHT)cylinder(d1=30,d2=15,h=25);
```
```openscad-3D
include <BOSL2/std.scad>
cube(50,center=true)
attach(RIGHT+TOP)cylinder(d1=30,d2=15,l=25);
attach(RIGHT+TOP)cylinder(d1=30,d2=15,h=25);
```
In the second example, the child object points diagonally away

View file

@ -9,7 +9,7 @@ Firstoff, include the BOSL2 library, then make a starting module that just has a
```openscad-3D
include <BOSL2/std.scad>
module tree(l=1500, sc=0.7)
cylinder(l=l, d1=l/5, d2=l/5*sc);
cylinder(h=l, d1=l/5, d2=l/5*sc);
tree();
```
@ -20,9 +20,9 @@ You can attach a branch to the top of the trunk by using `attach()` as a child o
```openscad-3D
include <BOSL2/std.scad>
module tree(l=1500, sc=0.7)
cylinder(l=l, d1=l/5, d2=l/5*sc)
cylinder(h=l, d1=l/5, d2=l/5*sc)
attach(TOP)
yrot(30) cylinder(l=l*sc, d1=l/5*sc, d2=l/5*sc*sc);
yrot(30) cylinder(h=l*sc, d1=l/5*sc, d2=l/5*sc*sc);
tree();
```
@ -33,10 +33,10 @@ Instead of attaching each branch individually, you can make multiple copies of o
```openscad-3D
include <BOSL2/std.scad>
module tree(l=1500, sc=0.7)
cylinder(l=l, d1=l/5, d2=l/5*sc)
cylinder(h=l, d1=l/5, d2=l/5*sc)
attach(TOP)
zrot_copies(n=2) // Replicate that branch
yrot(30) cylinder(l=l*sc, d1=l/5*sc, d2=l/5*sc*sc);
yrot(30) cylinder(h=l*sc, d1=l/5*sc, d2=l/5*sc*sc);
tree();
```
@ -47,7 +47,7 @@ Since branches look much like the main trunk, we can make the tree recursive. Do
```openscad-Med
include <BOSL2/std.scad>
module tree(l=1500, sc=0.7, depth=10)
cylinder(l=l, d1=l/5, d2=l/5*sc)
cylinder(h=l, d1=l/5, d2=l/5*sc)
attach(TOP)
if (depth>0) { // Important!
zrot_copies(n=2)
@ -63,7 +63,7 @@ A flat planar tree isn't what we want, so lets bush it out a bit by rotating eac
```openscad-Med
include <BOSL2/std.scad>
module tree(l=1500, sc=0.7, depth=10)
cylinder(l=l, d1=l/5, d2=l/5*sc)
cylinder(h=l, d1=l/5, d2=l/5*sc)
attach(TOP)
if (depth>0) {
zrot(90) // Bush it out
@ -80,7 +80,7 @@ Let's add leaves. They look much like squashed versions of the standard teardrop
```openscad-Big
include <BOSL2/std.scad>
module tree(l=1500, sc=0.7, depth=10)
cylinder(l=l, d1=l/5, d2=l/5*sc)
cylinder(h=l, d1=l/5, d2=l/5*sc)
attach(TOP)
if (depth>0) {
zrot(90)
@ -104,7 +104,7 @@ nested `recolor()`.
include <BOSL2/std.scad>
module tree(l=1500, sc=0.7, depth=10)
recolor("lightgray")
cylinder(l=l, d1=l/5, d2=l/5*sc)
cylinder(h=l, d1=l/5, d2=l/5*sc)
attach(TOP)
if (depth>0) {
zrot(90)