@bitbybit-dev/mcp 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/guides.generated.d.ts +1 -1
- package/dist/guides.generated.js +3 -3
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/guides.generated.ts +3 -3
- package/src/guides.test.ts +1 -1
|
@@ -3,7 +3,7 @@ import type { GuideSection } from "./guides-split.js";
|
|
|
3
3
|
export declare const GUIDE_PAGE_URL = "https://learn.bitbybit.dev/learn/using-ai-with-bitbybit/agentic-cad";
|
|
4
4
|
/**
|
|
5
5
|
* The sections of the public guides, generated by scripts/sync-guides.mjs from
|
|
6
|
-
*
|
|
6
|
+
* guides/agentic-cad.md, guides/cad-geometry.md, guides/design-documents.md, guides/ifc-models.md.
|
|
7
7
|
* Do not edit: run `npm run sync:guides`.
|
|
8
8
|
*/
|
|
9
9
|
export declare const GUIDES: readonly GuideSection[];
|
package/dist/guides.generated.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export const GUIDE_PAGE_URL = "https://learn.bitbybit.dev/learn/using-ai-with-bitbybit/agentic-cad";
|
|
3
3
|
/**
|
|
4
4
|
* The sections of the public guides, generated by scripts/sync-guides.mjs from
|
|
5
|
-
*
|
|
5
|
+
* guides/agentic-cad.md, guides/cad-geometry.md, guides/design-documents.md, guides/ifc-models.md.
|
|
6
6
|
* Do not edit: run `npm run sync:guides`.
|
|
7
7
|
*/
|
|
8
8
|
export const GUIDES = [
|
|
@@ -199,7 +199,7 @@ export const GUIDES = [
|
|
|
199
199
|
"id": "a-first-document",
|
|
200
200
|
"title": "A first document",
|
|
201
201
|
"level": 2,
|
|
202
|
-
"body": "A plate with two holes and rounded top edges, made of aluminium, with a part number written from its size:\n\n```json title=\"bracket.design.json\"\n{\n \"$schema\": \"https://git-cdn.bitbybit.dev/v1.6.
|
|
202
|
+
"body": "A plate with two holes and rounded top edges, made of aluminium, with a part number written from its size:\n\n```json title=\"bracket.design.json\"\n{\n \"$schema\": \"https://git-cdn.bitbybit.dev/v1.6.1/schemas/design-document/experimental.json\",\n \"schemaVersion\": 1,\n \"id\": \"3f1c2a7e-8b4d-4c1a-9e2f-5d6b7a8c9e01\",\n \"meta\": { \"name\": \"Bracket\" },\n \"parameters\": {\n \"width\": { \"value\": 60, \"min\": 30, \"unit\": \"mm\" },\n \"depth\": { \"value\": 40, \"min\": 20, \"unit\": \"mm\" },\n \"thickness\": { \"value\": 6, \"min\": 2, \"unit\": \"mm\" },\n \"hole\": { \"value\": 6, \"min\": 2, \"max\": 12, \"unit\": \"mm\" }\n },\n \"features\": [\n {\n \"id\": \"base\", \"type\": \"sketch\", \"on\": { \"plane\": \"XY\" }, \"start\": [0, 0],\n \"pen\": [\n { \"type\": \"hLine\", \"id\": \"south\", \"length\": \"width\" },\n { \"type\": \"vLine\", \"id\": \"east\", \"length\": \"depth\" },\n { \"type\": \"hLine\", \"id\": \"north\", \"length\": \"-width\" },\n { \"type\": \"close\", \"id\": \"west\" }\n ]\n },\n { \"id\": \"plate\", \"type\": \"extrude\", \"profile\": \"base\", \"distance\": \"thickness\" },\n {\n \"id\": \"holes\", \"type\": \"hole\", \"body\": \"plate\",\n \"on\": { \"of\": \"plate\", \"role\": \"end\", \"count\": 1 },\n \"at\": [{ \"id\": \"left\", \"x\": 10, \"y\": \"depth / 2\" }, { \"id\": \"right\", \"x\": \"width - 10\", \"y\": \"depth / 2\" }],\n \"diameter\": \"hole\"\n },\n {\n \"id\": \"round\", \"type\": \"fillet\", \"body\": \"plate\", \"radius\": 2,\n \"edges\": { \"between\": [{ \"of\": \"plate\", \"role\": \"end\" }, { \"of\": \"plate\", \"role\": \"side\" }], \"count\": 4 }\n }\n ],\n \"materials\": [\n { \"id\": \"aluminium\", \"density\": 2700, \"appearance\": { \"color\": \"#b0b4b8\", \"metallic\": 0.8, \"roughness\": 0.4 } }\n ],\n \"parts\": [\n {\n \"id\": \"bracket\", \"name\": \"Bracket\", \"body\": \"plate\", \"material\": \"aluminium\",\n \"properties\": { \"partNumber\": \"BRK-{width}x{depth}\" },\n \"connectors\": [\n { \"id\": \"pivotTop\", \"on\": { \"of\": \"plate\", \"role\": \"end\", \"count\": 1 }, \"axis\": { \"of\": \"holes\", \"role\": \"wall\", \"from\": \"left\" } },\n { \"id\": \"pivotBottom\", \"on\": { \"of\": \"plate\", \"role\": \"start\", \"count\": 1 }, \"axis\": { \"of\": \"holes\", \"role\": \"wall\", \"from\": \"left\" } }\n ]\n }\n ]\n}\n```\n\n- The sketch draws a rectangle with a pen: each command moves from where the last one ended, and `close` returns to `start`. The command ids name the four side faces the extrude sweeps from them.\n- The extrude starts a body named `plate`. Its bottom face is `start`, its top `end` and its walls `side`.\n- The holes are placed on the face the reference `{ \"of\": \"plate\", \"role\": \"end\", \"count\": 1 }` names, at x and y on that face. Each position has an id, so a later reference can name one hole's wall.\n- The fillet rounds the edges between the top and the walls: exactly 4, or the build reports otherwise.\n- The connectors are frames where an assembly fastens the part: on the top and the bottom face, at the left hole's axis.",
|
|
203
203
|
"page": "https://learn.bitbybit.dev/learn/using-ai-with-bitbybit/design-documents"
|
|
204
204
|
},
|
|
205
205
|
{
|
|
@@ -248,7 +248,7 @@ export const GUIDES = [
|
|
|
248
248
|
"id": "assemblies",
|
|
249
249
|
"title": "Assemblies",
|
|
250
250
|
"level": 2,
|
|
251
|
-
"body": "An assembly places parts of other documents. The documents are given to the build beside it, keyed by their `id`; the runner fetches nothing.\n\n```json title=\"hinge.design.json\"\n{\n \"$schema\": \"https://git-cdn.bitbybit.dev/v1.6.
|
|
251
|
+
"body": "An assembly places parts of other documents. The documents are given to the build beside it, keyed by their `id`; the runner fetches nothing.\n\n```json title=\"hinge.design.json\"\n{\n \"$schema\": \"https://git-cdn.bitbybit.dev/v1.6.1/schemas/design-document/experimental.json\",\n \"schemaVersion\": 1,\n \"kind\": \"assembly\",\n \"meta\": { \"name\": \"Swivel pair\" },\n \"parameters\": {\n \"swing\": { \"value\": 30, \"min\": 0, \"max\": 90, \"unit\": \"deg\" }\n },\n \"components\": [\n { \"id\": \"lower\", \"source\": { \"document\": \"3f1c2a7e-8b4d-4c1a-9e2f-5d6b7a8c9e01\", \"part\": \"bracket\" } },\n { \"id\": \"upper\", \"source\": { \"document\": \"3f1c2a7e-8b4d-4c1a-9e2f-5d6b7a8c9e01\", \"part\": \"bracket\", \"parameters\": { \"width\": 80 } } }\n ],\n \"joints\": [\n {\n \"id\": \"pivot\", \"type\": \"revolute\", \"component\": \"upper\", \"connector\": \"pivotBottom\",\n \"to\": { \"component\": \"lower\", \"connector\": \"pivotTop\" },\n \"angle\": \"swing\", \"limits\": { \"angle\": [0, 90] }\n }\n ]\n}\n```\n\n- Build it with the documents it places: `build({ document: hinge, documents: [bracket] })`. The result has the parts, every placed occurrence with its matrix, the bill of materials, and the structure that `assembly.manager.buildAssemblyDocument` exports to STEP and glTF.\n- **Joints** put a component's connector against another's, faces meeting and facing each other: `fastened` moves nothing, `revolute` turns by `angle` about the shared axis, `slider` moves by `offset` along it, `cylindrical` does both. `flip` makes the faces face the same way, `limits` bound what may move, and joints form a tree.\n- **`replicate`** places a component on every member of a connector set, such as a bolt in every hole of a flange: `\"replicate\": { \"connector\": \"seat\", \"to\": { \"component\": \"flange\", \"connector\": \"bolts\" } }`.\n- **`pattern`** places copies of a component where it is placed, turned about an axis or stepped along a direction, such as the blades of a fan: `\"pattern\": { \"polar\": { \"axis\": { \"origin\": [0, 0, 0], \"direction\": [1, 0, 0] }, \"count\": \"blades\" } }`, or `{ \"linear\": { \"direction\": [1, 0, 0], \"spacing\": 25, \"count\": 4 } }`. A polar pattern spaces its copies as the `polarPattern` feature does: a whole turn shared out, a part of one (`angle`) with both ends included, the first turned by `start`. Each copy is an occurrence of its own, `blade.1`, `blade.2` and so on, counted in the bill of materials. A patterned component is not moved by a joint or joined to; to turn a row of blades, pattern them inside a sub-assembly and join that.\n- A component's `source.parameters` drive the placed document's values from the assembly's own, so one parameter can size several parts.\n- **A gear pair** is one gear part document placed twice: its `module`, `teeth`, `width`, `bore` and `backlash` parameters feed a `gear` loop and a `circle` bore, an extrude, and a connector `{ \"id\": \"axis\", \"on\": { \"of\": \"gear\", \"role\": \"start\" } }`. Each component sets its `teeth` in `source.parameters`, and a revolute joint per gear holds its `axis` against a frame or a plate, `module * (teeth + otherTeeth) / 2` apart. Drive both angles from one parameter: `\"turn\"` on the first, `\"180 / 30 - turn * 20 / 30\"` on a 30-tooth second for a 20-tooth first, so the teeth fall into each other's gaps; `design.clashes` at a few values of `turn` through one tooth of the first proves they mesh.\n- **A standard part document** is one `operation` feature of `occt.parts` sized by its parameters, such as `{ \"id\": \"screw\", \"type\": \"operation\", \"operation\": \"occt.parts.mechanical.fasteners.iso.socketHeadCapScrew\", \"params\": { \"size\": { \"expr\": \"size\" }, \"length\": { \"expr\": \"length\" } } }` with `size` a choice parameter of `\"M3\"`, `\"M4\"` and so on (`fasteners.ansi` takes `\"#10\"`, `\"1/4\"` and a `series`), built in the document's unit, and connectors on the roles it names: a screw's `{ \"on\": { \"of\": \"screw\", \"role\": \"seat\" }, \"axis\": { \"of\": \"screw\", \"role\": \"thread\" } }`, a nut's or a washer's `seat` and `top`, a bearing's `innerStart` or `outerStart` with the `bore` or `outside` axis, a spring's `bottom` and `top`. Each component sets its own size, so one document places every screw of an assembly, and `replicate` puts one in every hole of a set.\n- An assembly may publish `connectors` of its components, so a larger assembly can join it as one unit.\n- **From a STEP file:** `occt.design.fromStep({ step, name })` writes an assembly document per assembly and a part document per part, placed `at` the file's frames, with names and colours, every part importing one shapes file by `child`. The documents are in `unit`, millimetres unless you choose centimetres, metres or inches, the shapes and placements scaled from the file's own. Store `assets[0].data` at its `uri`, then build the `root` document with `documents` and `assets: { [assets[0].id]: assets[0].data }`; `report.notes` says what changed on the way, such as a mirrored placement built into a part of its own.\n- **Section a build:** `occt.design.section({ build, frame })` cuts what `build` returned with the plane of a frame, taking away what lies on the side its normal points to, and gives a cap for each part the plane passes through, the faces it cuts with their `area`. With `cut: true` the pieces behind the plane and the parts wholly behind it come too, each with its `volume`. The result is placed like the build's parts, so `draw.drawAnyAsync({ entity: section })` draws it, and the same frame given to `operations.hiddenLines` looks at the cut.",
|
|
252
252
|
"page": "https://learn.bitbybit.dev/learn/using-ai-with-bitbybit/design-documents"
|
|
253
253
|
},
|
|
254
254
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitbybit-dev/mcp",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "MCP server for the Bitbybit 3D CAD API: version-exact lookups of every function, its parameters, defaults and examples, for AI coding agents",
|
|
5
5
|
"author": "Bit By Bit Developers",
|
|
6
6
|
"license": "MIT",
|
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "dev.bitbybit/cad",
|
|
4
4
|
"title": "Bitbybit CAD MCP",
|
|
5
5
|
"description": "Bitbybit 3D parametric CAD API, version-exact, for coding agents: search, describe, examples, guide",
|
|
6
|
-
"version": "1.6.
|
|
6
|
+
"version": "1.6.1",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "https://github.com/bitbybit-dev/bitbybit",
|
|
9
9
|
"source": "github",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
20
20
|
"identifier": "@bitbybit-dev/mcp",
|
|
21
21
|
"runtimeHint": "npx",
|
|
22
|
-
"version": "1.6.
|
|
22
|
+
"version": "1.6.1",
|
|
23
23
|
"transport": {
|
|
24
24
|
"type": "stdio"
|
|
25
25
|
}
|
package/src/guides.generated.ts
CHANGED
|
@@ -5,7 +5,7 @@ export const GUIDE_PAGE_URL = "https://learn.bitbybit.dev/learn/using-ai-with-bi
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The sections of the public guides, generated by scripts/sync-guides.mjs from
|
|
8
|
-
*
|
|
8
|
+
* guides/agentic-cad.md, guides/cad-geometry.md, guides/design-documents.md, guides/ifc-models.md.
|
|
9
9
|
* Do not edit: run `npm run sync:guides`.
|
|
10
10
|
*/
|
|
11
11
|
export const GUIDES: readonly GuideSection[] = [
|
|
@@ -202,7 +202,7 @@ export const GUIDES: readonly GuideSection[] = [
|
|
|
202
202
|
"id": "a-first-document",
|
|
203
203
|
"title": "A first document",
|
|
204
204
|
"level": 2,
|
|
205
|
-
"body": "A plate with two holes and rounded top edges, made of aluminium, with a part number written from its size:\n\n```json title=\"bracket.design.json\"\n{\n \"$schema\": \"https://git-cdn.bitbybit.dev/v1.6.
|
|
205
|
+
"body": "A plate with two holes and rounded top edges, made of aluminium, with a part number written from its size:\n\n```json title=\"bracket.design.json\"\n{\n \"$schema\": \"https://git-cdn.bitbybit.dev/v1.6.1/schemas/design-document/experimental.json\",\n \"schemaVersion\": 1,\n \"id\": \"3f1c2a7e-8b4d-4c1a-9e2f-5d6b7a8c9e01\",\n \"meta\": { \"name\": \"Bracket\" },\n \"parameters\": {\n \"width\": { \"value\": 60, \"min\": 30, \"unit\": \"mm\" },\n \"depth\": { \"value\": 40, \"min\": 20, \"unit\": \"mm\" },\n \"thickness\": { \"value\": 6, \"min\": 2, \"unit\": \"mm\" },\n \"hole\": { \"value\": 6, \"min\": 2, \"max\": 12, \"unit\": \"mm\" }\n },\n \"features\": [\n {\n \"id\": \"base\", \"type\": \"sketch\", \"on\": { \"plane\": \"XY\" }, \"start\": [0, 0],\n \"pen\": [\n { \"type\": \"hLine\", \"id\": \"south\", \"length\": \"width\" },\n { \"type\": \"vLine\", \"id\": \"east\", \"length\": \"depth\" },\n { \"type\": \"hLine\", \"id\": \"north\", \"length\": \"-width\" },\n { \"type\": \"close\", \"id\": \"west\" }\n ]\n },\n { \"id\": \"plate\", \"type\": \"extrude\", \"profile\": \"base\", \"distance\": \"thickness\" },\n {\n \"id\": \"holes\", \"type\": \"hole\", \"body\": \"plate\",\n \"on\": { \"of\": \"plate\", \"role\": \"end\", \"count\": 1 },\n \"at\": [{ \"id\": \"left\", \"x\": 10, \"y\": \"depth / 2\" }, { \"id\": \"right\", \"x\": \"width - 10\", \"y\": \"depth / 2\" }],\n \"diameter\": \"hole\"\n },\n {\n \"id\": \"round\", \"type\": \"fillet\", \"body\": \"plate\", \"radius\": 2,\n \"edges\": { \"between\": [{ \"of\": \"plate\", \"role\": \"end\" }, { \"of\": \"plate\", \"role\": \"side\" }], \"count\": 4 }\n }\n ],\n \"materials\": [\n { \"id\": \"aluminium\", \"density\": 2700, \"appearance\": { \"color\": \"#b0b4b8\", \"metallic\": 0.8, \"roughness\": 0.4 } }\n ],\n \"parts\": [\n {\n \"id\": \"bracket\", \"name\": \"Bracket\", \"body\": \"plate\", \"material\": \"aluminium\",\n \"properties\": { \"partNumber\": \"BRK-{width}x{depth}\" },\n \"connectors\": [\n { \"id\": \"pivotTop\", \"on\": { \"of\": \"plate\", \"role\": \"end\", \"count\": 1 }, \"axis\": { \"of\": \"holes\", \"role\": \"wall\", \"from\": \"left\" } },\n { \"id\": \"pivotBottom\", \"on\": { \"of\": \"plate\", \"role\": \"start\", \"count\": 1 }, \"axis\": { \"of\": \"holes\", \"role\": \"wall\", \"from\": \"left\" } }\n ]\n }\n ]\n}\n```\n\n- The sketch draws a rectangle with a pen: each command moves from where the last one ended, and `close` returns to `start`. The command ids name the four side faces the extrude sweeps from them.\n- The extrude starts a body named `plate`. Its bottom face is `start`, its top `end` and its walls `side`.\n- The holes are placed on the face the reference `{ \"of\": \"plate\", \"role\": \"end\", \"count\": 1 }` names, at x and y on that face. Each position has an id, so a later reference can name one hole's wall.\n- The fillet rounds the edges between the top and the walls: exactly 4, or the build reports otherwise.\n- The connectors are frames where an assembly fastens the part: on the top and the bottom face, at the left hole's axis.",
|
|
206
206
|
"page": "https://learn.bitbybit.dev/learn/using-ai-with-bitbybit/design-documents"
|
|
207
207
|
},
|
|
208
208
|
{
|
|
@@ -251,7 +251,7 @@ export const GUIDES: readonly GuideSection[] = [
|
|
|
251
251
|
"id": "assemblies",
|
|
252
252
|
"title": "Assemblies",
|
|
253
253
|
"level": 2,
|
|
254
|
-
"body": "An assembly places parts of other documents. The documents are given to the build beside it, keyed by their `id`; the runner fetches nothing.\n\n```json title=\"hinge.design.json\"\n{\n \"$schema\": \"https://git-cdn.bitbybit.dev/v1.6.
|
|
254
|
+
"body": "An assembly places parts of other documents. The documents are given to the build beside it, keyed by their `id`; the runner fetches nothing.\n\n```json title=\"hinge.design.json\"\n{\n \"$schema\": \"https://git-cdn.bitbybit.dev/v1.6.1/schemas/design-document/experimental.json\",\n \"schemaVersion\": 1,\n \"kind\": \"assembly\",\n \"meta\": { \"name\": \"Swivel pair\" },\n \"parameters\": {\n \"swing\": { \"value\": 30, \"min\": 0, \"max\": 90, \"unit\": \"deg\" }\n },\n \"components\": [\n { \"id\": \"lower\", \"source\": { \"document\": \"3f1c2a7e-8b4d-4c1a-9e2f-5d6b7a8c9e01\", \"part\": \"bracket\" } },\n { \"id\": \"upper\", \"source\": { \"document\": \"3f1c2a7e-8b4d-4c1a-9e2f-5d6b7a8c9e01\", \"part\": \"bracket\", \"parameters\": { \"width\": 80 } } }\n ],\n \"joints\": [\n {\n \"id\": \"pivot\", \"type\": \"revolute\", \"component\": \"upper\", \"connector\": \"pivotBottom\",\n \"to\": { \"component\": \"lower\", \"connector\": \"pivotTop\" },\n \"angle\": \"swing\", \"limits\": { \"angle\": [0, 90] }\n }\n ]\n}\n```\n\n- Build it with the documents it places: `build({ document: hinge, documents: [bracket] })`. The result has the parts, every placed occurrence with its matrix, the bill of materials, and the structure that `assembly.manager.buildAssemblyDocument` exports to STEP and glTF.\n- **Joints** put a component's connector against another's, faces meeting and facing each other: `fastened` moves nothing, `revolute` turns by `angle` about the shared axis, `slider` moves by `offset` along it, `cylindrical` does both. `flip` makes the faces face the same way, `limits` bound what may move, and joints form a tree.\n- **`replicate`** places a component on every member of a connector set, such as a bolt in every hole of a flange: `\"replicate\": { \"connector\": \"seat\", \"to\": { \"component\": \"flange\", \"connector\": \"bolts\" } }`.\n- **`pattern`** places copies of a component where it is placed, turned about an axis or stepped along a direction, such as the blades of a fan: `\"pattern\": { \"polar\": { \"axis\": { \"origin\": [0, 0, 0], \"direction\": [1, 0, 0] }, \"count\": \"blades\" } }`, or `{ \"linear\": { \"direction\": [1, 0, 0], \"spacing\": 25, \"count\": 4 } }`. A polar pattern spaces its copies as the `polarPattern` feature does: a whole turn shared out, a part of one (`angle`) with both ends included, the first turned by `start`. Each copy is an occurrence of its own, `blade.1`, `blade.2` and so on, counted in the bill of materials. A patterned component is not moved by a joint or joined to; to turn a row of blades, pattern them inside a sub-assembly and join that.\n- A component's `source.parameters` drive the placed document's values from the assembly's own, so one parameter can size several parts.\n- **A gear pair** is one gear part document placed twice: its `module`, `teeth`, `width`, `bore` and `backlash` parameters feed a `gear` loop and a `circle` bore, an extrude, and a connector `{ \"id\": \"axis\", \"on\": { \"of\": \"gear\", \"role\": \"start\" } }`. Each component sets its `teeth` in `source.parameters`, and a revolute joint per gear holds its `axis` against a frame or a plate, `module * (teeth + otherTeeth) / 2` apart. Drive both angles from one parameter: `\"turn\"` on the first, `\"180 / 30 - turn * 20 / 30\"` on a 30-tooth second for a 20-tooth first, so the teeth fall into each other's gaps; `design.clashes` at a few values of `turn` through one tooth of the first proves they mesh.\n- **A standard part document** is one `operation` feature of `occt.parts` sized by its parameters, such as `{ \"id\": \"screw\", \"type\": \"operation\", \"operation\": \"occt.parts.mechanical.fasteners.iso.socketHeadCapScrew\", \"params\": { \"size\": { \"expr\": \"size\" }, \"length\": { \"expr\": \"length\" } } }` with `size` a choice parameter of `\"M3\"`, `\"M4\"` and so on (`fasteners.ansi` takes `\"#10\"`, `\"1/4\"` and a `series`), built in the document's unit, and connectors on the roles it names: a screw's `{ \"on\": { \"of\": \"screw\", \"role\": \"seat\" }, \"axis\": { \"of\": \"screw\", \"role\": \"thread\" } }`, a nut's or a washer's `seat` and `top`, a bearing's `innerStart` or `outerStart` with the `bore` or `outside` axis, a spring's `bottom` and `top`. Each component sets its own size, so one document places every screw of an assembly, and `replicate` puts one in every hole of a set.\n- An assembly may publish `connectors` of its components, so a larger assembly can join it as one unit.\n- **From a STEP file:** `occt.design.fromStep({ step, name })` writes an assembly document per assembly and a part document per part, placed `at` the file's frames, with names and colours, every part importing one shapes file by `child`. The documents are in `unit`, millimetres unless you choose centimetres, metres or inches, the shapes and placements scaled from the file's own. Store `assets[0].data` at its `uri`, then build the `root` document with `documents` and `assets: { [assets[0].id]: assets[0].data }`; `report.notes` says what changed on the way, such as a mirrored placement built into a part of its own.\n- **Section a build:** `occt.design.section({ build, frame })` cuts what `build` returned with the plane of a frame, taking away what lies on the side its normal points to, and gives a cap for each part the plane passes through, the faces it cuts with their `area`. With `cut: true` the pieces behind the plane and the parts wholly behind it come too, each with its `volume`. The result is placed like the build's parts, so `draw.drawAnyAsync({ entity: section })` draws it, and the same frame given to `operations.hiddenLines` looks at the cut.",
|
|
255
255
|
"page": "https://learn.bitbybit.dev/learn/using-ai-with-bitbybit/design-documents"
|
|
256
256
|
},
|
|
257
257
|
{
|
package/src/guides.test.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { GUIDE_ALIASES } from "./tools/get-guide.js";
|
|
|
6
6
|
|
|
7
7
|
const LEARN = "https://learn.bitbybit.dev/learn/using-ai-with-bitbybit";
|
|
8
8
|
|
|
9
|
-
const page = (name: string): string => readFileSync(new URL(`../../../../
|
|
9
|
+
const page = (name: string): string => readFileSync(new URL(`../../../../guides/${name}.md`, import.meta.url), "utf8");
|
|
10
10
|
|
|
11
11
|
describe("splitGuides", () => {
|
|
12
12
|
it("drops the frontmatter and the text before the first heading", () => {
|