From 81ee147f51d2e632dad0f0045052b74e6ad01d23 Mon Sep 17 00:00:00 2001 From: Tobbe Lundberg Date: Fri, 7 May 2021 14:56:01 +0200 Subject: [PATCH 1/2] the-basics.mdx: Fix punctuation formatting --- docs/docs/definitive-beginners/the-basics.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/definitive-beginners/the-basics.mdx b/docs/docs/definitive-beginners/the-basics.mdx index 4504184..d412028 100644 --- a/docs/docs/definitive-beginners/the-basics.mdx +++ b/docs/docs/definitive-beginners/the-basics.mdx @@ -23,7 +23,7 @@ circle(5); square([15,3]); ``` -`circle(5);` gives us a circle with a radius of `5` and `square` is the 2d version of `cube` . Here we've given it dimensions of 15 and 2 for x and y respectively (or width and height if you prefer) . +`circle(5);` gives us a circle with a radius of `5` and `square` is the 2d version of `cube`. Here we've given it dimensions of 15 and 2 for x and y respectively (or width and height if you prefer). From 277dc6c008a23f5ca7f109cc1252199c3a3a071a Mon Sep 17 00:00:00 2001 From: Tobbe Lundberg Date: Fri, 7 May 2021 15:08:59 +0200 Subject: [PATCH 2/2] the-basics.mdx: Small updates to the Translate section --- docs/docs/definitive-beginners/the-basics.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/definitive-beginners/the-basics.mdx b/docs/docs/definitive-beginners/the-basics.mdx index 4504184..c87a5b0 100644 --- a/docs/docs/definitive-beginners/the-basics.mdx +++ b/docs/docs/definitive-beginners/the-basics.mdx @@ -29,7 +29,7 @@ square([15,3]); ## Translate -It's a start but we need to shift things around a little (I've colored these so we can tell them apart). The cross-hairs represent the origin of the environment and we can see that lines up with the circle's center the corner of the square. Since `5` is the radius of the circle, if want the circle to sit on top of the origin we need to shift it up by the same amount, we do that with `translate` like so: +It's a start but we need to shift things around a little (I've colored these so we can tell them apart). The cross-hairs represent the origin of the environment and we can see that lines up with the circle's center and the corner of the square. Since `5` is the radius of the circle, if we want the circle to sit on top of the origin we need to shift it up by the same amount. We do that with `translate` like so: ```cpp // highlight-next-line @@ -41,9 +41,9 @@ square([15,3]); -`translate` is little different to the modules we've see so far is instead of ending with a semicolon `;` it ends with `{ children }` in the case above it has one child, the `circle`. `translate` shifts its children around, we're using it to shift it up by `5`. We put `5` in the second position in the square braces because we want to shift it along the Y axis, if you're ever not sure which axis you need to shift something, just try each until you find the one you're after. +`translate` is a little different to the modules we've seen so far in that instead of ending with a semicolon `;` it ends with `{ children }`. In the case above it has one child, the `circle`. `translate` shifts its children around, we're using it to shift it up by `5`. We put `5` in the second position in the square braces because we want to shift it along the Y axis. If you're ever not sure which axis you need to shift something, just try each until you find the one you're after. -We also don't want to have the undercut where the circle meets the square, we can fix that with another square so that there's a nice 90 degree transition. Also for reasons we'll get to later, we don't actually want any overlap between these two squares so it will need shift with translate as well. Here's what we're left with: +We also don't want to have the undercut where the circle meets the square, we can fix that with another square so that there's a nice 90 degree transition. Also for reasons we'll get to later, we don't actually want any overlap between these two squares so it will need a shift with translate as well. Here's what we're left with: ```cpp translate([0,5,0]){