From 4cb59d988e09bc74493d1323efb10994a518cc5e Mon Sep 17 00:00:00 2001 From: Garth Minette <revarbat@gmail.com> Date: Mon, 6 Dec 2021 14:28:36 -0800 Subject: [PATCH] Tutorial fixes. --- tutorials/Attachments.md | 2 +- tutorials/Paths.md | 2 +- tutorials/Shapes2d.md | 28 ++++++++++++++-------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tutorials/Attachments.md b/tutorials/Attachments.md index 53cfa04..38ba93e 100644 --- a/tutorials/Attachments.md +++ b/tutorials/Attachments.md @@ -958,7 +958,7 @@ stellate_cube() show_anchors(50); ```openscad-3D $fn=32; R = difference(circle(10), right(2, circle(9))); -linear_sweep(R,height=10,anchor_isect=true) +linear_sweep(R,height=10,atype="hull") attach(RIGHT) anchor_arrow(); ``` diff --git a/tutorials/Paths.md b/tutorials/Paths.md index bcba35c..2f640a8 100644 --- a/tutorials/Paths.md +++ b/tutorials/Paths.md @@ -151,7 +151,7 @@ stroke(path, closed=true, endcap2="arrow2"); ``` ```openscad-2D -path = oval(d=[50,30]); +path = ellipse(d=[50,30]); stroke(path, closed=true, endcap2="arrow2"); ``` diff --git a/tutorials/Shapes2d.md b/tutorials/Shapes2d.md index 122f103..d53b843 100644 --- a/tutorials/Shapes2d.md +++ b/tutorials/Shapes2d.md @@ -164,7 +164,7 @@ circle(d=100); circle(d=100, $fn=8); ``` -The BOSL2 library also provides an enhanced equivalent of `circle()` called `oval()`. +The BOSL2 library also provides an enhanced equivalent of `circle()` called `ellipse()`. You can use it in the same way you use `circle()`, but it also provides extended functionality. For example, it allows more control over its size and orientation. @@ -172,22 +172,22 @@ Since a circle in OpenSCAD can only be approximated by a regular polygon with a number of straight sides, this can lead to size and shape inaccuracies. To counter this, the `realign=` and `circum=` arguments are also provided. -The `realign=` argument, if set `true`, rotates the `oval()` by half the angle +The `realign=` argument, if set `true`, rotates the `ellipse()` by half the angle between the sides: ```openscad-2D -oval(d=100, $fn=8, realign=true); +ellipse(d=100, $fn=8, realign=true); ``` The `circum=` argument, if true, makes it so that the polygon forming the -`oval()` circumscribes the ideal circle instead of inscribing it. +`ellipse()` circumscribes the ideal circle instead of inscribing it. Inscribing the ideal circle: ```openscad-2D difference() { circle(d=100, $fn=360); - oval(d=100, $fn=8); + ellipse(d=100, $fn=8); } ``` @@ -195,39 +195,39 @@ Circumscribing the ideal circle: ```openscad-2D difference() { - oval(d=100, $fn=8, circum=true); + ellipse(d=100, $fn=8, circum=true); circle(d=100, $fn=360); } ``` -The `oval()` module, as its name suggests, can be given separate X and Y radii +The `ellipse()` module, as its name suggests, can be given separate X and Y radii or diameters. To do this, just give `r=` or `d=` with a list of two radii or diameters: ```openscad-2D -oval(r=[30,20]); +ellipse(r=[30,20]); ``` ```openscad-2D -oval(d=[60,40]); +ellipse(d=[60,40]); ``` -Another way that `oval()` is enhanced over `circle()`, is that you can anchor, +Another way that `ellipse()` is enhanced over `circle()`, is that you can anchor, spin and attach it. ```openscad-2D -oval(r=50, anchor=BACK); +ellipse(r=50, anchor=BACK); ``` ```openscad-2D -oval(r=50, anchor=FRONT+RIGHT); +ellipse(r=50, anchor=FRONT+RIGHT); ``` Using spin on a circle may not make initial sense, until you remember that anchoring is performed before spin: ```openscad-2D -oval(r=50, anchor=FRONT, spin=-30); +ellipse(r=50, anchor=FRONT, spin=-30); ``` @@ -349,7 +349,7 @@ They also have somewhat different attachment behavior: ```openscad-2D color("green") stroke(circle(d=50), closed=true); -oval(d=50,$fn=5) +ellipse(d=50,$fn=5) attach(LEFT) color("blue") anchor_arrow2d(); ```