Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grammar etc #81

Merged
merged 4 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/replicad-app-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This is a basic integration that aims to show how the different pieces can
stick together:

- The replicad code can be just a javascript function
- It should live, with the opencascade loading in a webworker (indeally with
- It should live, with the opencascade loading in a webworker (ideally with
functions exposed via comlink).
- Your main app can be just a react app (with react-three-fiber for instance)
- The `replicad-three-helper` helps you synchronise the data out of a meshed
Expand Down
2 changes: 1 addition & 1 deletion packages/replicad-docs/docs/advanced-topics/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Typescript autocompletion
replicad is build with Typescript. The main advantage to the user is that it
offers nice autocompletion and inline documentation.

How can one benefit from these while using the visulaliser?
How can one benefit from these while using the visualiser?

Initialise a node package somewhere on your disk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import CodeBlock from '@theme/CodeBlock';
import {iframePath} from '../../examples/helpers.js';
import MyComponentSource from '!!raw-loader!../../examples/birdhouse.js';

This is the birdhouse use to [demonstrate many different code cad tools](https://github.com/Irev-Dev/curated-code-cad).
This is the birdhouse used to [demonstrate many different code cad tools](https://github.com/Irev-Dev/curated-code-cad).

We can have a look at the rendered shape.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import CodeBlock from '@theme/CodeBlock';
import {iframePath} from '../../examples/helpers.js';
import MyComponentSource from '!!raw-loader!../../examples/watering-can.js';

Note that this model is inspired by by [Robert Bronwasser](https://www.robertbronwasser.com/project/spring) watering can. The original implementation [comes from our community](https://github.com/sgenoud/replicad/discussions/35). You can have step by step explanation on
Note that this model is inspired by [Robert Bronwasser's](https://www.robertbronwasser.com/project/spring) watering can. The original implementation [comes from our community](https://github.com/sgenoud/replicad/discussions/35). You can see step by step explanation on
[how to build it here](/docs/tutorial-making-a-watering-can/intro)

<iframe allow="fullscreen" src={iframePath("watering-can.js")}></iframe>
Expand Down
6 changes: 3 additions & 3 deletions packages/replicad-docs/docs/examples/projections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ title: Orthographic Projections
import CodeBlock from "@theme/CodeBlock";
import MyComponentSource from "!!raw-loader!../../examples/projections.js";

Historically technical drawing consisted in a lot of orthographic projections.
Historically technical drawing consisted of a lot of orthographic projections.
In some cases it still is a great method of communication for 3D models.

Replicad support projetions into a drawing (and therefore a projection as
a SVG). This code follow the [first angle
Replicad support projections into a drawing (and therefore a projection as
an SVG). This code follows the [first angle
convention](https://en.wikipedia.org/wiki/Multiview_orthographic_projection#First-angle_projection).

And here is what the code looks like.
Expand Down
2 changes: 1 addition & 1 deletion packages/replicad-docs/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ tutorial](/docs/tutorial-overview/using-the-workbench)

## Integrating replicad in your web application

If you want to use replicad to build your own application, an editor
If you want to use replicad to build your own application, an editor,
a generative 3D design, you can have a look at the [sample app](https://sample-app.replicad.xyz) and read the [documentation that is related to it](/docs/use-as-a-library)
2 changes: 1 addition & 1 deletion packages/replicad-docs/docs/recipes/fuse-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sidebar_position: 10
title: Fuse All
---

You might find yourself in a situation where you have an array of shape (2D or
You might find yourself in a situation where you have an array of shapes (2D or
3D) and you just want to fuse (or intersect) them all together. The following
snippet just does this

Expand Down
7 changes: 3 additions & 4 deletions packages/replicad-docs/docs/recipes/sweeped-profile-box.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
sidebar_position: 5
title: Sweeped profile box
title: Swept profile box
---

Let's say you want to start designing with a box. Simple extrusion is good if
you do not have a complex profile. A way to work with more more complex shape
you do not have a complex profile. A way to work with a more complex shape
is to draw the profile in 2D, and then sweep it along a base sketch.

```js
Expand Down Expand Up @@ -44,8 +44,7 @@ This code assumes some things about its input:

- the input profile is a single open line
- the base is a single closed line

* there is only one profile point at the coordinate of the end of the profile
- there is only one profile point at the coordinate of the end of the profile

The box will have its base in the `XY` plane.

Expand Down
8 changes: 4 additions & 4 deletions packages/replicad-docs/docs/recipes/why-recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ title: Why recipes?
---

There are some operations using replicad (or any CAD tool) that are at the same
time very common - but have many different configuration and edge cases.
time very common - but have many different configurations and edge cases.

In tools with a UI this translates to very complex configuration boxes with
In tools with a UI, this translates to very complex configuration boxes with
multiple options that do not work well together most of the time.

In a code CAD tool like replicad this would translate in a function with a very
In a code CAD tool like replicad, this would translate to a function with a very
complex signature.

In some cases - the basic logic behind this functionality is fairly simple
– but the different tweaks possible add the complexity.

Instead of offering these as a standard library with a complex interface,
I propose a recipe book of code that can be easily copies and tweaked to the
I propose a recipe book of code that can be easily copied and tweaked to your
particular needs.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const main = () => {
};
```

Once we have found the edge we are concerned about using the finder API, we can
Once we have found the edges we are concerned about using the finder API, we can
fillet them like this:

```js {28} withWorkbench
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ We now have the basic drawing to create our 3D shapes:

### Creation of a cylinder

We have two different approach we could take to create a cylinder:
We have two different approaches we could take to create a cylinder:

- draw a circle and extrude it
- creating the cylinder with a direct function

#### Extrusion

To create a cylinder we can draw a circle, sketch in 3D space and then
To create a cylinder we can draw a circle, sketch it in 3D space, and then
a extrude it.

```js withWorkbench
Expand All @@ -66,13 +66,13 @@ const main = () => {

### Positioning the shape

In the case of a circle that we extrude we could place the plane to sketch on
In the case of a circle that we extrude, we could place the plane to sketch on
and then position it.

We have seen how to position a plane in 3D space. But we might want to position
We have seen how to position a plane in 3D space, but we might want to position
a 3D shape.

The operations are similar for a shape than for a plane. First, translations
The operations are similar for a shape as for a plane. First, translations
are identical.

```js withWorkbench
Expand All @@ -83,7 +83,7 @@ const main = () => {
```

Rotations are similar to pivots for planes - but as shapes do not have an
origin point by default we need to specify it.
origin point by default, we need to specify it.

```js withWorkbench
const { makeCylinder } = replicad;
Expand All @@ -92,7 +92,7 @@ const main = () => {
};
```

In order to make things more readable we might want to rotate before we
In order to make things more readable, we might want to rotate before we
translate (with a different origin).

## The can body
Expand Down Expand Up @@ -122,7 +122,7 @@ After extrusion and revolution, the filler uses a third method of 3D shape
creation: lofting. We can create shapes by defining sections through which an
object will pass trough.

We have defined our three circles and create a shape that pass through them
We have defined our three circles and now we create a shape that passes through them
all.

```js withWorkbench
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ const main = () => {
};
```

We drew a simple shape following the profile, by using only straight lines. We
We drew a simple shape following the profile using only straight lines. We
generally went for **relative** positioning. For instance with `hLine(20)` which
draws an horizontal line of 20mm of length). An `line(10, 5)` which draws
a line by going `10` horizontally and `5` vertically. But we also used
`lineTo([8, 100])` which moves us to the point `[8, 100]` - this is using
**absolute** coordinates.

## Filletings angles
## Filleting angles

The bottom of the can is rounded. We could use different methods for that.
First, we will use round the corners of the previous shape (using filleting)
Expand All @@ -72,7 +72,7 @@ const main = () => {

## Arcs of circles

We can also draw arcs of circle directly.
We can also draw arcs of a circle directly.

```js withWorkbench
const { draw } = replicad;
Expand Down Expand Up @@ -102,7 +102,7 @@ const main = () => {
};
```

We reoriented the drawing to start from the top (and not have to compute the
We reoriented the drawing to start from the top (and to not have to compute the
direction of the end tangent ourselves). By varying the `startFactor` we can
reach a shape that we like.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ title: Introduction

import {iframePath} from '../../examples/helpers.js';

Do you like to follow step to learn? This tutorial is for you - it allows you
Do you like to follow steps to learn? This tutorial is for you - it allows you
to build this plunge watering can by using the replicad APIs.

<iframe allow="fullscreen" src={iframePath("watering-can.js")}></iframe>

Note that this model is inspired by by [Robert
Bronwasser](https://www.robertbronwasser.com/project/spring/) watering can. The
Note that this model is inspired by [Robert
Bronwasser's](https://www.robertbronwasser.com/project/spring/) watering can. The
original implementation [comes from our
community](https://github.com/sgenoud/replicad/discussions/35).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ A translation changes the origin point of a plane (not its orientation).
## Plane pivots

What if you want a plane that is not parallel to one of the standard ones? You
can pivot it on it origin following a direction.
can pivot it on it's origin following a direction.

```js withWorkbench
const { drawCircle, makePlane } = replicad;
Expand All @@ -74,11 +74,11 @@ const main = () => {
};
```

The circle is not drawn with an angle of 20 degrees along the Y axis.
The circle is drawn with an angle of 20 degrees along the Y axis.

## Putting it all together to build the filler

With the filler we want 3 circles some of the pivoted, we put it all together
With the filler we want 3 circles, some of them pivoted. We put it all together
like this:

```js withWorkbench
Expand All @@ -101,4 +101,4 @@ const main = () => {
};
```

We will want to rely all this circles with a "loft" operation later on.
We will want to use all these circles with a "loft" operation later on.
6 changes: 3 additions & 3 deletions packages/replicad-docs/docs/tutorial-overview/adding-depth.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can find the detailed API documentation
![The sketch extruded](/img/tutorial/adding-depth-1.png)

The simplest way to "add depth" is to take the face that we have and add
thickness, to extrude it in other ways.
thickness, to extrude it in other words.

```js withWorkbench
const { draw } = replicad;
Expand All @@ -33,7 +33,7 @@ This is exactly what we have done, but added a depth of 10mm.

### Variations on the extrusion

We can play a bit with the extrusion as well, in addition to the extruction
We can play a bit with the extrusion as well, in addition to the extrusion
length we can change:

- the direction of the extrusion (by default normal to the sketching plane),
Expand Down Expand Up @@ -65,7 +65,7 @@ const main = () => {
![A loft between two sketches](/img/tutorial/adding-depth-3.png)

With a loft we make a smooth transition between two sketches (simple ones,
different from the one we had before.
different from the one we had before).

```js withWorkbench
const { drawRoundedRectangle, drawCircle } = replicad;
Expand Down
6 changes: 3 additions & 3 deletions packages/replicad-docs/docs/tutorial-overview/combinations.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ const main = () => {
};
```

![the cylinder cut in the box](/img/tutorial/combinations-2.png)
![the cylinder cut into the box](/img/tutorial/combinations-2.png)

## Intersecting two shapes

For the intersection we will intersect the cylinder with itself you create
For the intersection we will intersect the cylinder with itself. This creates
a fun shape:

```js withWorkbench
Expand All @@ -55,4 +55,4 @@ const main = () => {
};
```

![the cylinder intersecting iself](/img/tutorial/combinations-3.png)
![the cylinder intersecting itself](/img/tutorial/combinations-3.png)
14 changes: 7 additions & 7 deletions packages/replicad-docs/docs/tutorial-overview/drawing.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Let's start with the powerful `draw` API.

## The `draw` function and the Drawing API

With the drawing API you can draw a set of segment of curve. It currently supports:
With the drawing API you can draw straight lines and several types of curves. It currently supports:

- straight lines
- arcs of circles
Expand Down Expand Up @@ -58,11 +58,11 @@ What have we done?

- We start drawing (at the origin, for instance `draw([10, 10])` would start at
another point.
- We then draw an horizontal line of 25 milimeters of length.
- Then, we then draw an half ellipse, from the last point of the line, moving,
by `0` horizontally and by `40` vertically - but drawing an arc of ellipse of
`5` of axis length.
- We go back of 25 horizonally
- We then draw an horizontal line of 25 millimeters of length.
- Then, we draw an half ellipse, from the last point of the line, moving,
by `0` horizontally and by `40` vertically - but drawing an arc of an ellipse with
an axis length of `5`.
- We then go back of 25 horizontally
- We finally close the drawing, going from the current last point to the first
point with a straight line.

Expand All @@ -72,7 +72,7 @@ To understand what the different parameters do, let's play with them:

- close with a mirror instead of a straight line with `.closeWithMirror`
instead of `close`
- replace the second horizontal line by a sagitta line (an arc or circle) as
- replace the second horizontal line by a sagitta line (an arc or circle)
`.hSagittaArc(-25, 10)`
- change the origin to another point (with `draw([10, 10])` for instance).

Expand Down
10 changes: 5 additions & 5 deletions packages/replicad-docs/docs/tutorial-overview/finders.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ When using a visual interface to draw in 3D, selecting a face or an edge is
trivial - the user just needs to click it.

In the case of code CAD, this is a more complicated operation - we need to find
theses feature. This is what finders are for.
these as features. This is what finders are for.

For this tutorial we will use this relatively complex shape (a simple house):

Expand Down Expand Up @@ -62,7 +62,7 @@ const main = () => {
```

This was fairly easy, the door is the face parallel to the plane `XZ`, at
the coordiante `35`.
the coordinate `35`.

There are many different types of filters like `inPlane` that allow you to
specify precisely which face you are interested in. For instance you can look
Expand Down Expand Up @@ -115,7 +115,7 @@ the back of the house:

If you only use one of the filters you will see more edges highlighted.

### Combinating with an `either` conditions
### Combinating with an `either` condition

In some cases you might want to combine elements with an OR condition, to find
faces that fit either one condition or the other. For instance if we want to
Expand All @@ -140,14 +140,14 @@ house.

## Finding faces and edges

We have created finders so far and used them to hightlight faces and edges
We have created finders so far and used them to highlight faces and edges

- but what are they really useful for.

This will be mostly clear in the next chapter with modifications that can make
a lot of use of finders.

But you can also need to find a specific face. For instance, we might want to
You can also find a specific face. For instance, we might want to
have only the front face of the house. For this you will need to use the
`FaceFinder` and `EdgeFinder` objects directly (instead of within a function
that already declared it).
Expand Down
Loading