Proof read docs
This commit is contained in:
@@ -13,11 +13,13 @@ In order to maximise our learning we're actually going to tackle 3 things, that
|
||||
|
||||
We're going to learn:
|
||||
|
||||
1. The basics programming and the OpenSCAD syntax
|
||||
1. Some basic programming and the OpenSCAD syntax
|
||||
2. Some best practices so that you can read your own code a couple days after you wrote it
|
||||
3. Get practise designing a real thing with tolerances and all so that you're well equiped to make your next thing
|
||||
|
||||
We're going to achieve that by making this cute print-in-place hinge, print in place means that there will be no assembly step, both parts of the hinge will be printed pre-assembled.
|
||||
<p className="mt-8">
|
||||
We're going to achieve that by making this cute print-in-place hinge, print in place means that there will be no assembly step, both parts of the hinge will be printed pre-assembled.
|
||||
</p>
|
||||
|
||||
<Image img={hinge} className="mb-8 bg-contain rounded-md overflow-hidden" />
|
||||
|
||||
@@ -29,7 +31,7 @@ If you came from elsewhere, open the OpenSCAD desktop app or go to our [online e
|
||||
|
||||
<Image img={plainCube} className="mb-8 bg-contain rounded-md overflow-hidden" />
|
||||
|
||||
OpenSCAD has a number of modules available that allow us to make shapes and cube is one of them.
|
||||
OpenSCAD has a number of modules available that allow us to make shapes and `cube` is one of them.
|
||||
Modules take the form `moduleName(moduleParameters);` or `moduleName(moduleParameters){children}`.
|
||||
Using the `cube` as an example, it take the first form where the moduleName is `cube` and it takes one parameter, though that parameter is an array denoted by the square brackets `[]`, which is basically a series of values.
|
||||
|
||||
@@ -41,11 +43,11 @@ That's because the `[10,10,20]` is giving the cube's dimensions in each axis, th
|
||||
|
||||
Before we go any further, now is a good time to mention a couple of principles that you should always keep in mind for OpenSCAD and programming in general
|
||||
|
||||
1. Computers are incredibly stupid, but do exactly what you tell them to do, which means if there's even a small part of code that's incorrect, then OpenSCAD will display errors, it's normal for this to happen often and bears no reflection on your ability to program keep at it! which leads to the next point.
|
||||
1. Computers are incredibly stupid, but do exactly what you tell them to do, which means if there's even a small part of code that's incorrect, then OpenSCAD will display errors, it's normal for this to happen often and bears no reflection on your ability to program, keep at it! which leads to the next point.
|
||||
2. Never get intimidated, if you don't understand a part of the syntax or code try changing the parameters, see what happens. Playing with the code in this manner is one of the best ways to learn.
|
||||
3. The [OpenSCAD](https://www.openscad.org/cheatsheet/) cheatsheet is very useful as a reference. You should always have it open in a tab.
|
||||
4. There are multiple ways to call these modules, i.e. `cube([10,10,10]); cube(size=[10,10,10]); cube([10,10,10], false);` all have the same result, it depends on if you prefer shorthand or not, to avoid confusion, for this tutorial we'll longhand `argumentName=value` in circumstances where we're using more than one argument, and shorthand if it's only one, i.e. `cube([10,10,10]);` (`[10,10,10]` is considered one value because it a single array).
|
||||
4. There are multiple ways to call these modules, i.e. `cube([10,10,10]); cube(size=[10,10,10]); cube([10,10,10], false);` all have the same result, it depends on if you prefer shorthand or not, to avoid confusion, for this tutorial we'll use longhand `argumentName=value` in circumstances where we're using more than one argument, and shorthand if it's only one, i.e. `cube([10,10,10]);` (`[10,10,10]` is considered one value because it a single array).
|
||||
5. Don't worry about units. nominally the units are in the metric millimetre, since that is the standard global engineering unit, but because it exists in virtual space they are effectively unit-less and can be scaled later.
|
||||
6. If you code isn't working, 9 out of 10 times it's because you are missing a semi-colon `;`, all lines apart from ones with curly brace `}` need to end with a semi-colon.
|
||||
6. If your code isn't working, 9 out of 10 times it's because you are missing a semi-colon `;`, Generally speaking most lines apart from ones with a curly brace `}` need to end with a semi-colon.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user