diff --git a/markdown/dev/reference/api/en.md b/markdown/dev/reference/api/en.md index cd20531cb22..43a128eeb1b 100644 --- a/markdown/dev/reference/api/en.md +++ b/markdown/dev/reference/api/en.md @@ -65,12 +65,10 @@ The following named exports are **uitility methods**: | `beamsIntersect` | See the [beamsIntersect](/reference/api/utils/beamsintersect) documentation | | `capitalize` | See the [capitalize](/reference/api/utils/capitalize) documentation | | `circlesIntersect` | See the [circlesIntersect](/reference/api/utils/circlesintersect) documentation | -| `curveEdge` | See the [curveEdge](/reference/api/utils/curveedge) documentation | | `curveIntersectsX` | See the [curveIntersectsX](/reference/api/utils/curveintersectsx) documentation | | `curveIntersectsY` | See the [curveIntersectsY](/reference/api/utils/curveintersectsy) documentation | | `curvesIntersect` | See the [curvesIntersect](/reference/api/utils/curvesintersect) documentation | | `deg2rad` | See the [deg2rad](/reference/api/utils/deg2rad) documentation | -| `generateStackTransform` | see the [generateStackTransform](/reference/api/utils/generateStackTransform) documentation | | `lineIntersectsCircle` | See the [lineIntersectsCircle](/reference/api/utils/lineintersectscircle) documentation | | `lineIntersectsCurve` | See the [lineIntersectsCurve](/reference/api/utils/lineintersectscurve) documentation | | `linesIntersect` | See the [linesIntersect](/reference/api/utils/linesintersect) documentation | diff --git a/markdown/dev/reference/api/part/draft/en.md b/markdown/dev/reference/api/part/draft/en.md index fcbb575dda6..bd790e078c7 100644 --- a/markdown/dev/reference/api/part/draft/en.md +++ b/markdown/dev/reference/api/part/draft/en.md @@ -32,15 +32,16 @@ access the following properties: | `sa` | Access to `settings.sa` | | `scale` | Access to `settings.scale` | || **_Access to utilities_** | -| `getId` | See [the getId documentation](/refence/api/part/draft/getid) | -| `hide` | See [the hide documentation](/refence/api/part/draft/hide) | -| `log` | See [the logging documentation](referenec/api/store/logs) | +| `getId` | See [the getId documentation](/reference/api/part/getid) | +| `hide` | See [the hide documentation](/reference/api/part/hide) | +| `log` | See [the logging documentation](reference/api/store/logs) | | `macro` | See [the macros documentation](/reference/macros/) | -| `setHidden` | See [the setHidden documentation](/refence/api/part/draft/sethidden) | +| `setHidden` | See [the setHidden documentation](/reference/api/part/sethidden) | | `store` | See [the store documentation](/reference/api/store) | -| `unhide` | See [the unhide documentation](/refence/api/part/draft/unhide) | -| `units` | See [the units documentation](/refence/api/part/draft/units) | +| `unhide` | See [the unhide documentation](/reference/api/part/unhide) | +| `units` | A version of [`utils.units()`](/reference/api/utils/units) that is preconfigured with the user's chosenunits | | `utils` | See [the utils documentation](/reference/api/utils) | || **_Return value_** | | `part` | Your draft method **must** return this | + diff --git a/markdown/dev/reference/api/part/draft/hide/en.md b/markdown/dev/reference/api/part/draft/hide/en.md deleted file mode 100644 index 47533e905a6..00000000000 --- a/markdown/dev/reference/api/part/draft/hide/en.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: hide() ---- - -Calling `hide()` in a part's draft method will mark the part as hidden. - -This method returns the `part` object, so it's chainable - - - -The [unhide](/reference/api/part/draft/unhide) and -[setHidden](/reference/api/part/draft/sethidden) methods also control a -part's visibility - - - -## hide() example - -```js -cont part = { - name: 'examples.hide', - draft: ({ hide, part }) => part.hide() -} -``` diff --git a/markdown/dev/reference/api/part/draft/sethidden/en.md b/markdown/dev/reference/api/part/draft/sethidden/en.md deleted file mode 100644 index f42ec1a9b5b..00000000000 --- a/markdown/dev/reference/api/part/draft/sethidden/en.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: setHidden() ---- - -Calling `setHidden()` in a part's draft method will mark the part either hidden -or not, depending on whether you: - -- Pass a *truthy* value: part will be hidden -- Pass a *falsy* value: part will be unhidden/revealed - -This method returns the `part` object, so it's chainable - - - -The [hide](/reference/api/part/draft/hide) and -[unhide](/reference/api/part/draft/unhide) also control a -part's visibility - - - -## setHidden() example - -```js -cont part = { - name: 'examples.hide', - draft: ({ setHidden, part }) => part.setHidden(true) -} -``` diff --git a/markdown/dev/reference/api/part/draft/unhide/en.md b/markdown/dev/reference/api/part/draft/unhide/en.md deleted file mode 100644 index 6ffbd6b74ad..00000000000 --- a/markdown/dev/reference/api/part/draft/unhide/en.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: unhide() ---- - -Calling `unhide()` in a part's draft method will mark the part as not hidden. - -This method returns the `part` object, so it's chainable - - - -The [hide](/reference/api/part/draft/hide) and -[setHidden](/reference/api/part/draft/sethidden) methods also control a -part's visibility - - - -## unhide() example - -```js -cont part = { - name: 'examples.hide', - draft: ({ unhide, part }) => part.unhide() -} -``` diff --git a/markdown/dev/reference/api/part/draft/units/en.md b/markdown/dev/reference/api/part/draft/units/en.md deleted file mode 100644 index 1e229ed8d92..00000000000 --- a/markdown/dev/reference/api/part/draft/units/en.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: units() ---- - -Calling `units()` in a part's draft method will format a float you pass it -- - which should represent a value in mm -- into the units requested by the user. - -The returned value is to be used in presentation only, as it will be -a string that includes the user's units. - -## units() example - -```js -cont part = { - name: 'examples.units', - draft: ({ log, measurements, part }) => { - log.info(`Pattern drafted for a ${units(measurements.chest)} chest`) - - return part - } -} -``` diff --git a/markdown/dev/reference/api/part/draft/getid/en.md b/markdown/dev/reference/api/part/getid/en.md similarity index 68% rename from markdown/dev/reference/api/part/draft/getid/en.md rename to markdown/dev/reference/api/part/getid/en.md index dac9cbc37d3..eac785a6187 100644 --- a/markdown/dev/reference/api/part/draft/getid/en.md +++ b/markdown/dev/reference/api/part/getid/en.md @@ -1,13 +1,19 @@ --- -title: getId() +title: Part.getId() --- -Calling `getId()` in a part's draft method will return an integer the can be used as an +The `Part.getId()` methid will return an integer the can be used as an for ID Points/Paths/Snippets. This method will ensure the ID is unique by keeping an internal incremental counter of the IDs that have been used. It is typically used when programatically adding points, paths, or snippets. -## getId() signature + +This method can be destructured as `getID` +in [a part's draft method](/reference/api/part/draft). + + + +## Part.getId() signature ```js int|string getId(prefix='') @@ -15,7 +21,7 @@ int|string getId(prefix='') This methiod takes an optional parameter that will be used as a prefix for the ID. -## getId() example +## Part.getId() example ```js cont part = { diff --git a/markdown/dev/reference/api/part/hide/en.md b/markdown/dev/reference/api/part/hide/en.md new file mode 100644 index 00000000000..f3acd9566e2 --- /dev/null +++ b/markdown/dev/reference/api/part/hide/en.md @@ -0,0 +1,28 @@ +--- +title: Part.hide() +--- + +The `Part.hide()` method will mark the part as hidden. +This method returns the `part` object, so it's chainable. + + +This method can be destructured as `hidden` +in [a part's draft method](/reference/api/part/draft). + + + + +The [unhide](/reference/api/part/unhide) and +[setHidden](/reference/api/part/sethidden) methods also control a +part's visibility + + + +## Part.hide() example + +```js +cont part = { + name: 'examples.hide', + draft: ({ hide, part }) => part.hide() +} +``` diff --git a/markdown/dev/reference/api/part/sethidden/en.md b/markdown/dev/reference/api/part/sethidden/en.md new file mode 100644 index 00000000000..caaffad1582 --- /dev/null +++ b/markdown/dev/reference/api/part/sethidden/en.md @@ -0,0 +1,32 @@ +--- +title: Part.setHidden() +--- + +The `Part.setHidden()` method will mark the part either hidden +or not, depending on the value you pass it. +This method returns the `part` object, so it's chainable + +- Pass a *truthy* value: The part will be hidden +- Pass a *falsy* value: The part will be unhidden/revealed + + +This method can be destructured as `setHidden` +in [a part's draft method](/reference/api/part/draft). + + + + +The [hide](/reference/api/part/hide) and +[unhide](/reference/api/part/unhide) also control a +part's visibility + + + +## Part.setHidden() example + +```js +cont part = { + name: 'examples.hide', + draft: ({ setHidden, part }) => part.setHidden(true) +} +``` diff --git a/markdown/dev/reference/api/part/unhide/en.md b/markdown/dev/reference/api/part/unhide/en.md new file mode 100644 index 00000000000..7eb69b64a57 --- /dev/null +++ b/markdown/dev/reference/api/part/unhide/en.md @@ -0,0 +1,28 @@ +--- +title: Part.unhide() +--- + +The `Part.unhide()` method will mark the part as not hidden. +This method returns the `part` object, so it's chainable. + + +This method can be destructured as `inhide` +in [a part's draft method](/reference/api/part/draft). + + + + +The [hide](/reference/api/part/hide) and +[setHidden](/reference/api/part/sethidden) methods also control a +part's visibility + + + +## Part.unhide() example + +```js +cont part = { + name: 'examples.hide', + draft: ({ unhide, part }) => part.unhide() +} +```