chore: Port FreeSewing.dev to docusaurus
The replaces the NextJS site powering FreeSewing.dev with a Docusaurus setup. It's part of my efforts to simplify FreeSewing's setup so we can focus on our core value proposition.
This commit is contained in:
parent
497633d1d3
commit
ab3204f9f1
692 changed files with 11037 additions and 20674 deletions
46
sites/dev/docs/reference/api/point/sitsroughlyon/readme.mdx
Normal file
46
sites/dev/docs/reference/api/point/sitsroughlyon/readme.mdx
Normal file
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
title: Point.sitsRoughlyOn()
|
||||
---
|
||||
|
||||
The `Point.sitsRoughlyOn()` method returns `true` if this point has roughly
|
||||
(rounded to the nearest millimeter) the same coordinates as the one you pass to
|
||||
it.
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
bool point.sitsRoughlyOn(Point check)
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
<Example caption="An example of the Point.sitsRoughlyOn() method">
|
||||
```js
|
||||
({ Point, points, Path, paths, Snippet, snippets, part }) => {
|
||||
|
||||
let s
|
||||
for (let i = 0; i < 10; i++) {
|
||||
points[`a${i}`] = new Point(i * 10, 40)
|
||||
points[`b${i}`] = new Point(i * 10, i * 8)
|
||||
if (points[`a${i}`].sitsRoughlyOn(points[`b${i}`])) s = "notch"
|
||||
else s = "bnotch"
|
||||
snippets[`b${i}`] = new Snippet(s, points[`b${i}`])
|
||||
snippets[`a${i}`] = new Snippet(s, points[`a${i}`])
|
||||
}
|
||||
|
||||
// Prevent clipping
|
||||
paths.diag = new Path()
|
||||
.move(new Point(0,0))
|
||||
.move(new Point(90,70))
|
||||
|
||||
return part
|
||||
}
|
||||
```
|
||||
</Example>
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
The difference between this method and
|
||||
[`Point.sitsOn()`](/reference/api/point/sitson/) is that this one rounds things
|
||||
down to the nearest integer (thus mm) before checking.
|
Loading…
Add table
Add a link
Reference in a new issue