@snaptrude/plugin-core 0.9.6 → 0.9.8
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/CHANGELOG.md +24 -0
- package/api-manifest.full.json +8443 -0
- package/api-manifest.json +167 -10
- package/dist/api/core/io/import/index.d.ts +3 -1
- package/dist/api/core/io/import/index.d.ts.map +1 -1
- package/dist/api/design/create/bulk-items.d.ts +185 -0
- package/dist/api/design/create/bulk-items.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +310 -22
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +37 -0
- package/dist/api/design/create/opening-fields.d.ts.map +1 -0
- package/dist/api/design/delete/index.d.ts +4 -0
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/dimensions.d.ts +427 -0
- package/dist/api/design/dimensions.d.ts.map +1 -0
- package/dist/api/design/doors/index.d.ts +20 -13
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +5 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/presentation/annotate.d.ts +2 -2
- package/dist/api/presentation/shapes.d.ts +2 -2
- package/dist/handles.d.ts +19 -0
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +2011 -1869
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1988 -1869
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/core/io/import/index.ts +11 -3
- package/src/api/design/create/bulk-items.ts +186 -0
- package/src/api/design/create/index.ts +335 -38
- package/src/api/design/create/opening-fields.ts +37 -0
- package/src/api/design/delete/index.ts +4 -0
- package/src/api/design/dimensions.ts +453 -0
- package/src/api/design/doors/index.ts +20 -13
- package/src/api/design/index.ts +5 -0
- package/src/handles.ts +24 -0
package/api-manifest.json
CHANGED
|
@@ -4299,10 +4299,27 @@
|
|
|
4299
4299
|
"Put a door from the catalog at this point on the wall",
|
|
4300
4300
|
"Insert the entrance door into this wall",
|
|
4301
4301
|
"Add a door to the wall and call it Entry-01",
|
|
4302
|
-
"Add a door that opens into the living room
|
|
4302
|
+
"Add a door that opens into the living room",
|
|
4303
|
+
"Put a door here hinged on the north jamb\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ isSelected: true })\nconst [entry] = await snaptrude.design.doors.listCatalog()\nconst door = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Entry-01\" },\n)\n// …facing a specific side of the wall (pass a point inside that room):\nconst intoKitchen = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\nundefined,\nawait snaptrude.core.math.vec3.new(3, 0, 9),\n)\n// …and hinged on the jamb nearest a point (here the +x end of the opening):\nconst hingedRight = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ hinge: await snaptrude.core.math.vec3.new(3.5, 0, 5) },\nawait snaptrude.core.math.vec3.new(3, 0, 9),\n)\n```"
|
|
4303
4304
|
],
|
|
4304
4305
|
"argsType": "string",
|
|
4305
|
-
"resultType": "ComponentHandle"
|
|
4306
|
+
"resultType": "ComponentHandle",
|
|
4307
|
+
"performance": "For MORE THAN ONE door, call `design.create.doors(items[])` — one host round-trip and ONE undo entry, with each host wall re-cut once per opening inside that single call. Looping this single-door creator is N round-trips."
|
|
4308
|
+
},
|
|
4309
|
+
{
|
|
4310
|
+
"path": "design.create.doors",
|
|
4311
|
+
"namespace": "design.create",
|
|
4312
|
+
"summary": "Place **many doors** into host walls in one undoable operation (bulk plural of {@linkcode door}). Each item carries its own catalog id, host wall, world position, and optional `facing`, `label`, `width` and `height` — the same fields as a `\"door\"` {@linkcode PluginDesignCreateOpeningOptions}. Validate-all-or-throw; one command.",
|
|
4313
|
+
"examplePrompts": [
|
|
4314
|
+
"Add doors to all of these walls at once",
|
|
4315
|
+
"Place a door in every room in one operation",
|
|
4316
|
+
"Bulk add the entrance doors from this schedule",
|
|
4317
|
+
"Put three doors on this wall in a single undo step",
|
|
4318
|
+
"Add all the doors for this floor plan together"
|
|
4319
|
+
],
|
|
4320
|
+
"argsType": "PluginCreateDoorItem[]",
|
|
4321
|
+
"resultType": "ComponentHandle[]",
|
|
4322
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.door` in a loop: build the full `items[]` array first (all host walls and points up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [wall] = await snaptrude.design.query.listWalls({ isSelected: true }) const [entry] = await snaptrude.design.doors.listCatalog() const [front, side] = await snaptrude.design.create.doors([ { catalogId: entry.id, hostWall: wall, position: await v.new(2, 0, 5), label: \"D-01\" }, { catalogId: entry.id, hostWall: wall, position: await v.new(6, 0, 5), width: 1.2 }, ]) // `wall` was re-cut twice and no longer resolves — ask the opening for its host: const currentWall = await snaptrude.design.query.getHost(front) ```"
|
|
4306
4323
|
},
|
|
4307
4324
|
{
|
|
4308
4325
|
"path": "design.create.floor",
|
|
@@ -4315,7 +4332,23 @@
|
|
|
4315
4332
|
"Put a floor at this position with 150mm thickness\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(5, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst floor = await snaptrude.design.create.floor(contour, 0.1)\n```"
|
|
4316
4333
|
],
|
|
4317
4334
|
"argsType": "ContourHandle",
|
|
4318
|
-
"resultType": "ComponentHandle"
|
|
4335
|
+
"resultType": "ComponentHandle",
|
|
4336
|
+
"performance": "For MORE THAN ONE floor, call `design.create.floors(items[])` — one host round-trip and ONE undo entry for the whole batch. Looping this single-floor creator is N round-trips and N undo entries."
|
|
4337
|
+
},
|
|
4338
|
+
{
|
|
4339
|
+
"path": "design.create.floors",
|
|
4340
|
+
"namespace": "design.create",
|
|
4341
|
+
"summary": "Create **many floors** in one undoable operation (bulk plural of {@linkcode floor}). Each item extrudes its own footprint contour (outer profile + holes) upward by its own `thickness`, at its own optional position offset. Validate-all-or-throw; one command.",
|
|
4342
|
+
"examplePrompts": [
|
|
4343
|
+
"Create floors for all these room outlines at once",
|
|
4344
|
+
"Add a floor to every space in one operation",
|
|
4345
|
+
"Bulk create the floor plates for this building",
|
|
4346
|
+
"Lay 100mm floors across these five footprints in one undo step",
|
|
4347
|
+
"Create the ground and first floor slabs together"
|
|
4348
|
+
],
|
|
4349
|
+
"argsType": "PluginCreateFloorItem[]",
|
|
4350
|
+
"resultType": "ComponentHandle[]",
|
|
4351
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry. Always prefer this over calling `design.create.floor` in a loop: build the full `items[]` array first (all contours and offsets up front), then make one call. # Example ```ts const rect = await snaptrude.core.geom.create.profileRect(5, 4) const contour = await snaptrude.core.geom.create.contourFromProfile(rect) const [ground, upper] = await snaptrude.design.create.floors([ { contour, thickness: 0.1 }, { contour, thickness: 0.1, position: await snaptrude.core.math.vec3.new(0, 3, 0) }, ]) ```"
|
|
4319
4352
|
},
|
|
4320
4353
|
{
|
|
4321
4354
|
"path": "design.create.furniture",
|
|
@@ -4330,7 +4363,23 @@
|
|
|
4330
4363
|
"Place a chair here rotated 90 degrees\n\n# Example\n```ts\nconst chair = await snaptrude.design.create.furniture(\n\"6620f1a…\", // from design.furniture.listCatalog()\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Chair-01\" },\n)\n// …placed already turned 90° about the vertical axis:\nconst turned = await snaptrude.design.create.furniture(\n\"6620f1a…\",\nawait snaptrude.core.math.vec3.new(3, 0, 5),\nundefined,\n90,\n)\n```"
|
|
4331
4364
|
],
|
|
4332
4365
|
"argsType": "string",
|
|
4333
|
-
"resultType": "ComponentHandle"
|
|
4366
|
+
"resultType": "ComponentHandle",
|
|
4367
|
+
"performance": "For MORE THAN ONE item, call `design.create.furnitureItems(items[])` — one host round-trip and ONE undo entry, and a catalog source shared by several items is fetched once. Looping this single-item creator is N round-trips."
|
|
4368
|
+
},
|
|
4369
|
+
{
|
|
4370
|
+
"path": "design.create.furnitureItems",
|
|
4371
|
+
"namespace": "design.create",
|
|
4372
|
+
"summary": "Place **many furniture items** in one undoable operation (bulk plural of {@linkcode furniture}). Each item names a catalog id and an absolute world position (`position.y` is the REST elevation — the same grounding contract as the singular creator), with optional label and rotation. A catalog source shared by several items is fetched and recorded once for the whole batch, so the host — not the caller — owns source persistence (there is no per-item `createNewSourceMesh`). Validate-all-or-throw; one command.",
|
|
4373
|
+
"examplePrompts": [
|
|
4374
|
+
"Place all the desks for this office at once",
|
|
4375
|
+
"Furnish every bedroom in one operation",
|
|
4376
|
+
"Bulk place these chairs around the table",
|
|
4377
|
+
"Add the whole furniture layout in a single undo step",
|
|
4378
|
+
"Drop twenty copies of this chair at these positions"
|
|
4379
|
+
],
|
|
4380
|
+
"argsType": "PluginCreateFurnitureItem[]",
|
|
4381
|
+
"resultType": "ComponentHandle[]",
|
|
4382
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.furniture` in a loop: build the full `items[]` array first (all positions and angles up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [chair] = await snaptrude.design.furniture.listCatalog() const placed = await snaptrude.design.create.furnitureItems([ { catalogId: chair.id, position: await v.new(3, 0, 5), label: \"Chair-01\" }, { catalogId: chair.id, position: await v.new(4, 0, 5), angleInDegrees: 90 }, { catalogId: chair.id, position: await v.new(5, 0, 5), angleInDegrees: 180 }, ]) ```"
|
|
4334
4383
|
},
|
|
4335
4384
|
{
|
|
4336
4385
|
"path": "design.create.mass",
|
|
@@ -4367,7 +4416,7 @@
|
|
|
4367
4416
|
],
|
|
4368
4417
|
"argsType": "PluginDesignCreateOpeningOptions",
|
|
4369
4418
|
"resultType": "ComponentHandle",
|
|
4370
|
-
"performance": "Single-opening creator — use it for one hosted opening.
|
|
4419
|
+
"performance": "Single-opening creator — use it for one hosted opening. For MORE THAN ONE, call `design.create.doors(items[])` / `design.create.windows(items[])`: the same per-item fields, one host round-trip, ONE undo entry. # Example ```ts const opening = await snaptrude.design.create.opening({ kind: \"window\", catalogId: windowType.id, hostWall: wall, position: await snaptrude.core.math.vec3.new(3, 0, 5), width: 1.2, height: 1.5, sillHeight: 0.9, }) ```"
|
|
4371
4420
|
},
|
|
4372
4421
|
{
|
|
4373
4422
|
"path": "design.create.referenceLines",
|
|
@@ -4469,6 +4518,21 @@
|
|
|
4469
4518
|
"argsType": "PluginStaircasePreset",
|
|
4470
4519
|
"resultType": "ComponentHandle"
|
|
4471
4520
|
},
|
|
4521
|
+
{
|
|
4522
|
+
"path": "design.create.wallRuns",
|
|
4523
|
+
"namespace": "design.create",
|
|
4524
|
+
"summary": "Create **many wall runs** in one undoable operation (bulk plural of {@linkcode walls}). Each item is one full run — a wall per curve in that item's profile chain, mitred at shared endpoints. Junctions resolve within a run, not between runs. Each item carries its own dimensions, `wallType` and `storey`, so a single call can build a whole floor plate or several storeys at once. Validate-all-or-throw; one command.",
|
|
4525
|
+
"examplePrompts": [
|
|
4526
|
+
"Draw all the walls of this floor plan at once",
|
|
4527
|
+
"Build every room's perimeter in one operation",
|
|
4528
|
+
"Bulk create wall runs from these centerlines",
|
|
4529
|
+
"Create the walls for both storeys in a single undo step",
|
|
4530
|
+
"Turn these polylines into 200mm brick walls together"
|
|
4531
|
+
],
|
|
4532
|
+
"argsType": "PluginCreateWallRunItem[]",
|
|
4533
|
+
"resultType": "ComponentHandle[][]",
|
|
4534
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry. Always prefer this over calling `design.create.walls` in a loop: build the full `items[]` array first (all profiles up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const ground = await snaptrude.core.geom.create.profileFromLinePoints([ await v.new(0, 0, 0), await v.new(8, 0, 0), await v.new(8, 0, 6), ]) const upper = await snaptrude.core.geom.create.profileFromLinePoints([ await v.new(0, 0, 0), await v.new(8, 0, 0), ]) const [groundWalls, upperWalls] = await snaptrude.design.create.wallRuns([ { profile: ground, height: 3, thickness: 0.2 }, { profile: upper, height: 3, storey: 2 }, ]) console.log(groundWalls.length, \"walls on the ground floor\") ```"
|
|
4535
|
+
},
|
|
4472
4536
|
{
|
|
4473
4537
|
"path": "design.create.walls",
|
|
4474
4538
|
"namespace": "design.create",
|
|
@@ -4483,7 +4547,8 @@
|
|
|
4483
4547
|
"Build the perimeter in exposed concrete walls\n\n# Example\n```ts\nconst v = snaptrude.core.math.vec3\nconst centerlines = await snaptrude.core.geom.create.profileFromLinePoints([\nawait v.new(0, 0, 0),\nawait v.new(8, 0, 0),\nawait v.new(8, 0, 6),\n])\nconst walls = await snaptrude.design.create.walls(centerlines, 3, 0.2)\n// …built as a specific wall type (layers/material/thickness from the type):\nconst [brick] = await snaptrude.design.types.list(\"wall\")\nconst brickWalls = await snaptrude.design.create.walls(\ncenterlines, 3, undefined, brick.label,\n)\n```"
|
|
4484
4548
|
],
|
|
4485
4549
|
"argsType": "ProfileHandle",
|
|
4486
|
-
"resultType": "ComponentHandle[]"
|
|
4550
|
+
"resultType": "ComponentHandle[]",
|
|
4551
|
+
"performance": "For MORE THAN ONE run, call `design.create.wallRuns(items[])` — one host round-trip and ONE undo entry for every run in the batch. Looping this single-run creator is N round-trips and N undo entries."
|
|
4487
4552
|
},
|
|
4488
4553
|
{
|
|
4489
4554
|
"path": "design.create.window",
|
|
@@ -4498,7 +4563,23 @@
|
|
|
4498
4563
|
"Add a casement window opening toward the garden side\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ isSelected: true })\nconst [entry] = await snaptrude.design.windows.listCatalog()\nconst window = await snaptrude.design.create.window(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Win-01\" },\n)\n```"
|
|
4499
4564
|
],
|
|
4500
4565
|
"argsType": "string",
|
|
4501
|
-
"resultType": "ComponentHandle"
|
|
4566
|
+
"resultType": "ComponentHandle",
|
|
4567
|
+
"performance": "For MORE THAN ONE window, call `design.create.windows(items[])` — one host round-trip and ONE undo entry, with each host wall re-cut once per opening inside that single call. Looping this single-window creator is N round-trips."
|
|
4568
|
+
},
|
|
4569
|
+
{
|
|
4570
|
+
"path": "design.create.windows",
|
|
4571
|
+
"namespace": "design.create",
|
|
4572
|
+
"summary": "Place **many windows** into host walls in one undoable operation (bulk plural of {@linkcode window}). Each item carries its own catalog id, host wall, world position, and optional `facing`, `label`, `width`, `height` and `sillHeight` — the same fields as a `\"window\"` {@linkcode PluginDesignCreateOpeningOptions}. `sillHeight` is measured from the host wall base to the BOTTOM of the window. Validate-all-or-throw; one command.",
|
|
4573
|
+
"examplePrompts": [
|
|
4574
|
+
"Add windows along this whole facade at once",
|
|
4575
|
+
"Place a window in every bedroom in one operation",
|
|
4576
|
+
"Bulk add the windows from this schedule",
|
|
4577
|
+
"Put four windows on this wall in a single undo step",
|
|
4578
|
+
"Add all the windows with a 0.9m sill height together"
|
|
4579
|
+
],
|
|
4580
|
+
"argsType": "PluginCreateWindowItem[]",
|
|
4581
|
+
"resultType": "ComponentHandle[]",
|
|
4582
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.window` in a loop: build the full `items[]` array first (all host walls and points up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [wall] = await snaptrude.design.query.listWalls({ isSelected: true }) const [casement] = await snaptrude.design.windows.listCatalog() const placed = await snaptrude.design.create.windows([ { catalogId: casement.id, hostWall: wall, position: await v.new(2, 0, 5), sillHeight: 0.9 }, { catalogId: casement.id, hostWall: wall, position: await v.new(5, 0, 5), sillHeight: 0.9 }, ]) const currentWall = await snaptrude.design.query.getHost(placed[0]) ```"
|
|
4502
4583
|
},
|
|
4503
4584
|
{
|
|
4504
4585
|
"path": "design.delete.entities",
|
|
@@ -4515,6 +4596,82 @@
|
|
|
4515
4596
|
"resultType": "PluginDesignChangeResult",
|
|
4516
4597
|
"performance": "Array delete — pass every target in one call (one host round-trip). There is no per-item delete; collect the whole set and never loop this per entity. # Example ```ts // Hard-delete every furniture item on storey 2 (a single undo entry) const furniture = await snaptrude.design.query.listFurniture({ storeys: [2] }) if (furniture.length > 0) { const { affected } = await snaptrude.design.delete.entities(furniture) } ```"
|
|
4517
4598
|
},
|
|
4599
|
+
{
|
|
4600
|
+
"path": "design.dimensions.create",
|
|
4601
|
+
"namespace": "design.dimensions",
|
|
4602
|
+
"summary": "Draw one dimension line between two world points, anchored to a component.",
|
|
4603
|
+
"examplePrompts": [
|
|
4604
|
+
"Dimension every wall on level 2",
|
|
4605
|
+
"Add a dimension line along this wall",
|
|
4606
|
+
"Measure the width of this room and label it on the plan\n\n# Example\n```ts\nconst { design, core } = snaptrude\nconst v = core.math.vec3\nconst curve = core.geom.query.curve\nfor (const wall of await design.query.listWalls({ storeys: [2] })) {\nconst cl = await design.query.geometry.getCenterline(wall)\nif (!cl) continue\nconst a = await curve.getStartPoint(cl)\nconst b = await curve.getEndPoint(cl)\nawait design.dimensions.create(\nawait v.new(a.x, a.y, a.z),\nawait v.new(b.x, b.y, b.z),\nwall,\n)\n}\n```"
|
|
4607
|
+
],
|
|
4608
|
+
"argsType": "Vec3Handle",
|
|
4609
|
+
"resultType": "DimensionHandle"
|
|
4610
|
+
},
|
|
4611
|
+
{
|
|
4612
|
+
"path": "design.dimensions.delete",
|
|
4613
|
+
"namespace": "design.dimensions",
|
|
4614
|
+
"summary": "Delete dimension lines — the same hard removal as selecting them and pressing Delete. Undoable as a **single** entry for the whole batch.",
|
|
4615
|
+
"examplePrompts": [
|
|
4616
|
+
"Remove all dimension lines",
|
|
4617
|
+
"Delete the dimensions on this wall",
|
|
4618
|
+
"Clear the measurements I added to level 2"
|
|
4619
|
+
],
|
|
4620
|
+
"argsType": "DimensionHandle[]",
|
|
4621
|
+
"resultType": "PluginDimensionsChangeResult",
|
|
4622
|
+
"performance": "Array API — pass the whole set in one call (one host round-trip, one undo entry). Never loop this per dimension. # Example ```ts const dims = snaptrude.design.dimensions const onWall = await dims.list({ anchors: [wall] }) if (onWall.length > 0) await dims.delete(onWall.map((d) => d.id)) ```"
|
|
4623
|
+
},
|
|
4624
|
+
{
|
|
4625
|
+
"path": "design.dimensions.get",
|
|
4626
|
+
"namespace": "design.dimensions",
|
|
4627
|
+
"summary": "Read one dimension line by handle.",
|
|
4628
|
+
"examplePrompts": [
|
|
4629
|
+
"Read the dimension line I just created",
|
|
4630
|
+
"How long is this dimension and what does its label say?",
|
|
4631
|
+
"Check whether that dimension line still exists\n\n# Example\n```ts\nconst dim = await snaptrude.design.dimensions.get(handle)\nif (dim) console.log(dim.label, dim.length, dim.storey)\n```"
|
|
4632
|
+
],
|
|
4633
|
+
"argsType": "DimensionHandle",
|
|
4634
|
+
"resultType": "PluginDimensionLine | null"
|
|
4635
|
+
},
|
|
4636
|
+
{
|
|
4637
|
+
"path": "design.dimensions.hide",
|
|
4638
|
+
"namespace": "design.dimensions",
|
|
4639
|
+
"summary": "Hide dimension lines from the viewport — the same as the right-click \"Hide\" action (it sets the user Hide flag, `isHidden`). Undoable. Already-hidden dimensions are skipped and are not reported in `affected`.",
|
|
4640
|
+
"examplePrompts": [
|
|
4641
|
+
"Hide the dimensions on this storey",
|
|
4642
|
+
"Hide every dimension line while I present",
|
|
4643
|
+
"Temporarily hide the measurements on level 3"
|
|
4644
|
+
],
|
|
4645
|
+
"argsType": "DimensionHandle[]",
|
|
4646
|
+
"resultType": "PluginDimensionsChangeResult",
|
|
4647
|
+
"performance": "Array API — one host round-trip and one undo entry for the whole set. # Example ```ts const dims = snaptrude.design.dimensions const onLevel3 = await dims.list({ storeys: [3] }) const { affected } = await dims.hide(onLevel3.map((d) => d.id)) ```"
|
|
4648
|
+
},
|
|
4649
|
+
{
|
|
4650
|
+
"path": "design.dimensions.list",
|
|
4651
|
+
"namespace": "design.dimensions",
|
|
4652
|
+
"summary": "List the dimension lines in the project as full records.",
|
|
4653
|
+
"examplePrompts": [
|
|
4654
|
+
"List all the dimension lines in this model",
|
|
4655
|
+
"Which dimensions are on level 3?",
|
|
4656
|
+
"Flag any dimension line shorter than 600 mm"
|
|
4657
|
+
],
|
|
4658
|
+
"argsType": "{\n storeys?: number[]\n anchors?: ComponentHandle[]\n isHidden?: boolean\n }",
|
|
4659
|
+
"resultType": "PluginDimensionLine[]",
|
|
4660
|
+
"performance": "Array read — one host round-trip returns every record. Filter in one call rather than calling `get` per dimension. # Example ```ts const units = snaptrude.core.units const min = await units.convert(600, \"millimeters\", await units.getBabylonType()) const short = (await snaptrude.design.dimensions.list()).filter( (d) => d.length < min, ) console.log(short.map((d) => `${d.label} on storey ${d.storey}`)) ```"
|
|
4661
|
+
},
|
|
4662
|
+
{
|
|
4663
|
+
"path": "design.dimensions.show",
|
|
4664
|
+
"namespace": "design.dimensions",
|
|
4665
|
+
"summary": "Reveal hidden dimension lines — clear the user Hide flag, the inverse of {@linkcode PluginDesignDimensionsApi.hide}. Undoable. Already-visible dimensions are skipped and are not reported in `affected`.",
|
|
4666
|
+
"examplePrompts": [
|
|
4667
|
+
"Show the dimension lines again",
|
|
4668
|
+
"Unhide all the hidden dimensions",
|
|
4669
|
+
"Bring back the measurements I hid on this storey"
|
|
4670
|
+
],
|
|
4671
|
+
"argsType": "DimensionHandle[]",
|
|
4672
|
+
"resultType": "PluginDimensionsChangeResult",
|
|
4673
|
+
"performance": "Array API — one host round-trip and one undo entry for the whole set. # Example ```ts const dims = snaptrude.design.dimensions const hidden = await dims.list({ isHidden: true }) await dims.show(hidden.map((d) => d.id)) ```"
|
|
4674
|
+
},
|
|
4518
4675
|
{
|
|
4519
4676
|
"path": "design.doors.exists",
|
|
4520
4677
|
"namespace": "design.doors",
|
|
@@ -4596,7 +4753,7 @@
|
|
|
4596
4753
|
{
|
|
4597
4754
|
"path": "design.doors.getSwingDirection",
|
|
4598
4755
|
"namespace": "design.doors",
|
|
4599
|
-
"summary": "Get a door's swing (hinge) handedness
|
|
4756
|
+
"summary": "Get a door's swing (hinge) handedness. Stand on the side the door swings open to, facing the door: `'left'` when the hinged jamb is on your left, `'right'` when it is on your right. Derived from the placed mesh's orientation (the same reflection `mirror` and the `hinge` placement option apply), not a persisted field.",
|
|
4600
4757
|
"examplePrompts": [
|
|
4601
4758
|
"Which way does this door swing?",
|
|
4602
4759
|
"Is the selected door left-handed or right-handed?",
|
|
@@ -4661,13 +4818,13 @@
|
|
|
4661
4818
|
{
|
|
4662
4819
|
"path": "design.doors.mirror",
|
|
4663
4820
|
"namespace": "design.doors",
|
|
4664
|
-
"summary": "Mirror a door
|
|
4821
|
+
"summary": "Mirror a door about its own axes. `'x'` (default) flips the swing side — the door opens to the other side of the wall; `'z'` swaps the hinged jamb (left-hand ↔ right-hand, same swing side); `'y'` turns it upside down. Undoable as a single command.",
|
|
4665
4822
|
"examplePrompts": [
|
|
4666
4823
|
"Flip this door's swing",
|
|
4667
4824
|
"Mirror the selected door",
|
|
4668
4825
|
"Make this door open the other way",
|
|
4669
4826
|
"Reverse the hinge side of the entrance door",
|
|
4670
|
-
"Change the door to swing from the other side\n\n# Example\n```ts\n// Flip the selected door's swing — axis defaults to \"x\"
|
|
4827
|
+
"Change the door to swing from the other side\n\n# Example\n```ts\n// Flip the selected door's swing side — axis defaults to \"x\"\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst { affected } = await snaptrude.design.doors.mirror(door)\n// …or swap the hinged jamb instead (keeps the swing side)\nawait snaptrude.design.doors.mirror(door, \"z\")\n```"
|
|
4671
4828
|
],
|
|
4672
4829
|
"argsType": "ComponentHandle",
|
|
4673
4830
|
"resultType": "PluginDesignChangeResult"
|
|
@@ -209,7 +209,9 @@ export declare abstract class PluginCoreIoImportApi {
|
|
|
209
209
|
* @returns the placed {@linkcode ComponentHandle}.
|
|
210
210
|
* @throws if writes are disabled, the source can't be loaded, the format is
|
|
211
211
|
* unsupported, conversion/placement fails, or the converted model cannot be
|
|
212
|
-
* found in the library after upload
|
|
212
|
+
* found in the library after upload; `PRECONDITION_FAILED`
|
|
213
|
+
* (`details.engineCode: "TOOL_ACTIVE"`) while the interactive furniture tool is
|
|
214
|
+
* active — finish or cancel it first.
|
|
213
215
|
*
|
|
214
216
|
* @examplePrompt Import this SketchUp model onto storey 1
|
|
215
217
|
* @examplePrompt Bring in this OBJ file and place it at the origin
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/io/import/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,UAAU,EACV,cAAc,EACd,aAAa,EACb,eAAe,EACf,eAAe,EAChB,MAAM,qBAAqB,CAAA;AAE5B;;;;GAIG;AACH,eAAO,MAAM,YAAY,aAKrB,CAAA;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,8BAAsB,qBAAqB;;IAGzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;aACa,KAAK,CACnB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,MAAM,GACb,eAAe,CAAC,cAAc,CAAC;IAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;aACa,GAAG,CACjB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,MAAM,GACf,eAAe,CAAC,cAAc,CAAC;IAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;aACa,GAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/io/import/index.ts"],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AAC,CAAA;AAErE,2DAA2D;AAC3D,eAAO,MAAM,uBAAuB;;;;;;iBAGlC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;iBAMhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;iBASlC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;iBAE9B,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Maximum items per bulk `design.create.*` call. A bounded request keeps
|
|
4
|
+
* validation, command capture and rollback work finite; split a larger import
|
|
5
|
+
* into separate awaited batches, each with its own undo entry.
|
|
6
|
+
*/
|
|
7
|
+
export declare const PLUGIN_CREATE_BATCH_LIMIT = 1000;
|
|
8
|
+
/**
|
|
9
|
+
* One wall run to create via {@linkcode PluginDesignCreateApi.wallRuns} — the
|
|
10
|
+
* same inputs as {@linkcode PluginDesignCreateApi.walls}, one run per item.
|
|
11
|
+
*
|
|
12
|
+
* | Property | Type | Description |
|
|
13
|
+
* |---|---|---|
|
|
14
|
+
* | `profile` | {@linkcode ProfileHandle} | Ordered curve chain (wall centerlines) |
|
|
15
|
+
* | `height` | `number`? | Wall height (Snaptrude units, > 0; default engine default) |
|
|
16
|
+
* | `thickness` | `number`? | Wall thickness (Snaptrude units, > 0; default: `wallType`'s total layer thickness when given, else engine default) |
|
|
17
|
+
* | `wallType` | `string`? | Wall type name from `design.types.list("wall")` — layers/material/thickness defaults (default generic) |
|
|
18
|
+
* | `storey` | `number`? (int) | Target storey (must exist) — the run's walls are assigned + lifted to its base in the same undo entry (default: geometry-derived) |
|
|
19
|
+
*/
|
|
20
|
+
export declare const PluginCreateWallRunItem: z.ZodObject<{
|
|
21
|
+
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
|
|
22
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
thickness: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
wallType: z.ZodOptional<z.ZodString>;
|
|
25
|
+
storey: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type PluginCreateWallRunItem = z.infer<typeof PluginCreateWallRunItem>;
|
|
28
|
+
/** The `items` array of {@linkcode PluginDesignCreateApi.wallRuns} (1…1000). */
|
|
29
|
+
export declare const PluginCreateWallRunItems: z.ZodArray<z.ZodObject<{
|
|
30
|
+
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
|
|
31
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
thickness: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
wallType: z.ZodOptional<z.ZodString>;
|
|
34
|
+
storey: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
export type PluginCreateWallRunItems = z.infer<typeof PluginCreateWallRunItems>;
|
|
37
|
+
/**
|
|
38
|
+
* One floor to create via {@linkcode PluginDesignCreateApi.floors} — the same
|
|
39
|
+
* footprint-extrude inputs as {@linkcode PluginDesignCreateApi.floor}.
|
|
40
|
+
*
|
|
41
|
+
* | Property | Type | Description |
|
|
42
|
+
* |---|---|---|
|
|
43
|
+
* | `contour` | {@linkcode ContourHandle} | Footprint (outer profile + holes) |
|
|
44
|
+
* | `thickness` | `number` | Floor thickness (Snaptrude units, > 0) |
|
|
45
|
+
* | `position` | {@linkcode Vec3Handle}? | Offset from origin (default origin) |
|
|
46
|
+
*/
|
|
47
|
+
export declare const PluginCreateFloorItem: z.ZodObject<{
|
|
48
|
+
contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
|
|
49
|
+
thickness: z.ZodNumber;
|
|
50
|
+
position: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
export type PluginCreateFloorItem = z.infer<typeof PluginCreateFloorItem>;
|
|
53
|
+
/** The `items` array of {@linkcode PluginDesignCreateApi.floors} (1…1000). */
|
|
54
|
+
export declare const PluginCreateFloorItems: z.ZodArray<z.ZodObject<{
|
|
55
|
+
contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
|
|
56
|
+
thickness: z.ZodNumber;
|
|
57
|
+
position: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
export type PluginCreateFloorItems = z.infer<typeof PluginCreateFloorItems>;
|
|
60
|
+
/**
|
|
61
|
+
* One door to place via {@linkcode PluginDesignCreateApi.doors} — the same
|
|
62
|
+
* fields as a `"door"` {@linkcode PluginDesignCreateOpeningOptions}, so the
|
|
63
|
+
* size overrides singular {@linkcode PluginDesignCreateApi.door} lacks are
|
|
64
|
+
* available per item. `facing` and `hinge` are WORLD POINTS, not directions:
|
|
65
|
+
* `facing` on the side of the wall the door swings open to, `hinge` near the
|
|
66
|
+
* jamb it is hinged on. Rejects unknown fields.
|
|
67
|
+
*
|
|
68
|
+
* | Property | Type | Description |
|
|
69
|
+
* |---|---|---|
|
|
70
|
+
* | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
|
|
71
|
+
* | `hostWall` | {@linkcode ComponentHandle} | The wall to host the door |
|
|
72
|
+
* | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
|
|
73
|
+
* | `facing` | {@linkcode Vec3Handle}? | World point on the side the door swings open to (default engine-chosen) |
|
|
74
|
+
* | `hinge` | {@linkcode Vec3Handle}? | World point near the jamb the door is hinged on (default the catalog item's authored side) |
|
|
75
|
+
* | `label` | `string`? | Instance name (optional) |
|
|
76
|
+
* | `width` | `number`? | Width override (Snaptrude units, > 0; default the catalog item's) |
|
|
77
|
+
* | `height` | `number`? | Height override (Snaptrude units, > 0; default the catalog item's) |
|
|
78
|
+
*/
|
|
79
|
+
export declare const PluginCreateDoorItem: z.ZodObject<{
|
|
80
|
+
catalogId: z.ZodString;
|
|
81
|
+
hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").ComponentHandle, string>>;
|
|
82
|
+
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
83
|
+
facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
84
|
+
hinge: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
85
|
+
label: z.ZodOptional<z.ZodString>;
|
|
86
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
}, z.core.$strict>;
|
|
89
|
+
export type PluginCreateDoorItem = z.infer<typeof PluginCreateDoorItem>;
|
|
90
|
+
/** The `items` array of {@linkcode PluginDesignCreateApi.doors} (1…1000). */
|
|
91
|
+
export declare const PluginCreateDoorItems: z.ZodArray<z.ZodObject<{
|
|
92
|
+
catalogId: z.ZodString;
|
|
93
|
+
hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").ComponentHandle, string>>;
|
|
94
|
+
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
95
|
+
facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
96
|
+
hinge: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
97
|
+
label: z.ZodOptional<z.ZodString>;
|
|
98
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
}, z.core.$strict>>;
|
|
101
|
+
export type PluginCreateDoorItems = z.infer<typeof PluginCreateDoorItems>;
|
|
102
|
+
/**
|
|
103
|
+
* One window to place via {@linkcode PluginDesignCreateApi.windows} — the same
|
|
104
|
+
* fields as a `"window"` {@linkcode PluginDesignCreateOpeningOptions}.
|
|
105
|
+
* `sillHeight` is a nonnegative Snaptrude-unit distance from the host wall's
|
|
106
|
+
* base to the BOTTOM of the window, not to its center. `facing` and `hinge`
|
|
107
|
+
* are WORLD POINTS, not directions: `facing` on the side of the wall the
|
|
108
|
+
* window opens to, `hinge` near the jamb it is hinged on. Rejects unknown
|
|
109
|
+
* fields.
|
|
110
|
+
*
|
|
111
|
+
* | Property | Type | Description |
|
|
112
|
+
* |---|---|---|
|
|
113
|
+
* | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
|
|
114
|
+
* | `hostWall` | {@linkcode ComponentHandle} | The wall to host the window |
|
|
115
|
+
* | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
|
|
116
|
+
* | `facing` | {@linkcode Vec3Handle}? | World point on the side the window opens to (default engine-chosen) |
|
|
117
|
+
* | `hinge` | {@linkcode Vec3Handle}? | World point near the jamb the window is hinged on (default the catalog item's authored side) |
|
|
118
|
+
* | `label` | `string`? | Instance name (optional) |
|
|
119
|
+
* | `width` | `number`? | Width override (Snaptrude units, > 0; default the catalog item's) |
|
|
120
|
+
* | `height` | `number`? | Height override (Snaptrude units, > 0; default the catalog item's) |
|
|
121
|
+
* | `sillHeight` | `number`? | Wall base to window bottom (Snaptrude units, ≥ 0; default the catalog item's) |
|
|
122
|
+
*/
|
|
123
|
+
export declare const PluginCreateWindowItem: z.ZodObject<{
|
|
124
|
+
sillHeight: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
catalogId: z.ZodString;
|
|
126
|
+
hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").ComponentHandle, string>>;
|
|
127
|
+
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
128
|
+
facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
129
|
+
hinge: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
130
|
+
label: z.ZodOptional<z.ZodString>;
|
|
131
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
}, z.core.$strict>;
|
|
134
|
+
export type PluginCreateWindowItem = z.infer<typeof PluginCreateWindowItem>;
|
|
135
|
+
/** The `items` array of {@linkcode PluginDesignCreateApi.windows} (1…1000). */
|
|
136
|
+
export declare const PluginCreateWindowItems: z.ZodArray<z.ZodObject<{
|
|
137
|
+
sillHeight: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
catalogId: z.ZodString;
|
|
139
|
+
hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").ComponentHandle, string>>;
|
|
140
|
+
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
141
|
+
facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
142
|
+
hinge: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
143
|
+
label: z.ZodOptional<z.ZodString>;
|
|
144
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
145
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
146
|
+
}, z.core.$strict>>;
|
|
147
|
+
export type PluginCreateWindowItems = z.infer<typeof PluginCreateWindowItems>;
|
|
148
|
+
/**
|
|
149
|
+
* One furniture instance to place via
|
|
150
|
+
* {@linkcode PluginDesignCreateApi.furnitureItems} — the same inputs as
|
|
151
|
+
* {@linkcode PluginDesignCreateApi.furniture} minus `createNewSourceMesh`: in a
|
|
152
|
+
* batch the host owns source-mesh persistence (a source is recorded once per
|
|
153
|
+
* call, however many items reuse it).
|
|
154
|
+
*
|
|
155
|
+
* `position.y` is the REST elevation: the item is grounded so its bounding-box
|
|
156
|
+
* base sits exactly at `position.y` (the same surface-flush contract as
|
|
157
|
+
* interactive drag-drop) — pass the floor/storey elevation to stand furniture
|
|
158
|
+
* on it; never add half the item's height yourself.
|
|
159
|
+
*
|
|
160
|
+
* | Property | Type | Description |
|
|
161
|
+
* |---|---|---|
|
|
162
|
+
* | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
|
|
163
|
+
* | `position` | {@linkcode Vec3Handle} | Absolute world placement point (`y` = rest elevation) |
|
|
164
|
+
* | `label` | `string`? | Instance name and readable label (default auto `${name}Ins${n}`) |
|
|
165
|
+
* | `angleInDegrees` | `number`? | Rotation about the vertical axis, in degrees (default unrotated) |
|
|
166
|
+
*/
|
|
167
|
+
export declare const PluginCreateFurnitureItem: z.ZodObject<{
|
|
168
|
+
catalogId: z.ZodString;
|
|
169
|
+
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
170
|
+
label: z.ZodOptional<z.ZodString>;
|
|
171
|
+
angleInDegrees: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
}, z.core.$strip>;
|
|
173
|
+
export type PluginCreateFurnitureItem = z.infer<typeof PluginCreateFurnitureItem>;
|
|
174
|
+
/**
|
|
175
|
+
* The `items` array of {@linkcode PluginDesignCreateApi.furnitureItems}
|
|
176
|
+
* (1…1000).
|
|
177
|
+
*/
|
|
178
|
+
export declare const PluginCreateFurnitureItems: z.ZodArray<z.ZodObject<{
|
|
179
|
+
catalogId: z.ZodString;
|
|
180
|
+
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
181
|
+
label: z.ZodOptional<z.ZodString>;
|
|
182
|
+
angleInDegrees: z.ZodOptional<z.ZodNumber>;
|
|
183
|
+
}, z.core.$strip>>;
|
|
184
|
+
export type PluginCreateFurnitureItems = z.infer<typeof PluginCreateFurnitureItems>;
|
|
185
|
+
//# sourceMappingURL=bulk-items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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