@snaptrude/plugin-core 0.0.0-bimsvg-20260928124803
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/AGENTS.md +231 -0
- package/CHANGELOG.md +341 -0
- package/CLAUDE.md +11 -0
- package/api-manifest.json +9120 -0
- package/dist/api/analysis/daylight.d.ts +603 -0
- package/dist/api/analysis/daylight.d.ts.map +1 -0
- package/dist/api/analysis/heatmaps.d.ts +658 -0
- package/dist/api/analysis/heatmaps.d.ts.map +1 -0
- package/dist/api/analysis/illuminance.d.ts +145 -0
- package/dist/api/analysis/illuminance.d.ts.map +1 -0
- package/dist/api/analysis/index.d.ts +59 -0
- package/dist/api/analysis/index.d.ts.map +1 -0
- package/dist/api/analysis/shadows.d.ts +165 -0
- package/dist/api/analysis/shadows.d.ts.map +1 -0
- package/dist/api/analysis/solar.d.ts +249 -0
- package/dist/api/analysis/solar.d.ts.map +1 -0
- package/dist/api/analysis/sunlightHours.d.ts +208 -0
- package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
- package/dist/api/analysis/sunpath.d.ts +80 -0
- package/dist/api/analysis/sunpath.d.ts.map +1 -0
- package/dist/api/analysis/weather.d.ts +193 -0
- package/dist/api/analysis/weather.d.ts.map +1 -0
- package/dist/api/core/buildings.d.ts +427 -0
- package/dist/api/core/buildings.d.ts.map +1 -0
- package/dist/api/core/camera/index.d.ts +261 -0
- package/dist/api/core/camera/index.d.ts.map +1 -0
- package/dist/api/core/comment/index.d.ts +333 -0
- package/dist/api/core/comment/index.d.ts.map +1 -0
- package/dist/api/core/geom/create/index.d.ts +1073 -0
- package/dist/api/core/geom/create/index.d.ts.map +1 -0
- package/dist/api/core/geom/delete/index.d.ts +78 -0
- package/dist/api/core/geom/delete/index.d.ts.map +1 -0
- package/dist/api/core/geom/index.d.ts +33 -0
- package/dist/api/core/geom/index.d.ts.map +1 -0
- package/dist/api/core/geom/query/arc.d.ts +169 -0
- package/dist/api/core/geom/query/arc.d.ts.map +1 -0
- package/dist/api/core/geom/query/brep.d.ts +514 -0
- package/dist/api/core/geom/query/brep.d.ts.map +1 -0
- package/dist/api/core/geom/query/circle.d.ts +378 -0
- package/dist/api/core/geom/query/circle.d.ts.map +1 -0
- package/dist/api/core/geom/query/contour.d.ts +450 -0
- package/dist/api/core/geom/query/contour.d.ts.map +1 -0
- package/dist/api/core/geom/query/curve.d.ts +918 -0
- package/dist/api/core/geom/query/curve.d.ts.map +1 -0
- package/dist/api/core/geom/query/edge.d.ts +128 -0
- package/dist/api/core/geom/query/edge.d.ts.map +1 -0
- package/dist/api/core/geom/query/face.d.ts +363 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -0
- package/dist/api/core/geom/query/halfedge.d.ts +206 -0
- package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
- package/dist/api/core/geom/query/index.d.ts +61 -0
- package/dist/api/core/geom/query/index.d.ts.map +1 -0
- package/dist/api/core/geom/query/profile.d.ts +410 -0
- package/dist/api/core/geom/query/profile.d.ts.map +1 -0
- package/dist/api/core/geom/query/vertex.d.ts +187 -0
- package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
- package/dist/api/core/geom/update/contour.d.ts +272 -0
- package/dist/api/core/geom/update/contour.d.ts.map +1 -0
- package/dist/api/core/geom/update/curve.d.ts +180 -0
- package/dist/api/core/geom/update/curve.d.ts.map +1 -0
- package/dist/api/core/geom/update/index.d.ts +27 -0
- package/dist/api/core/geom/update/index.d.ts.map +1 -0
- package/dist/api/core/geom/update/profile.d.ts +329 -0
- package/dist/api/core/geom/update/profile.d.ts.map +1 -0
- package/dist/api/core/groups.d.ts +485 -0
- package/dist/api/core/groups.d.ts.map +1 -0
- package/dist/api/core/handles/index.d.ts +210 -0
- package/dist/api/core/handles/index.d.ts.map +1 -0
- package/dist/api/core/history/index.d.ts +78 -0
- package/dist/api/core/history/index.d.ts.map +1 -0
- package/dist/api/core/index.d.ts +97 -0
- package/dist/api/core/index.d.ts.map +1 -0
- package/dist/api/core/io/export/index.d.ts +134 -0
- package/dist/api/core/io/export/index.d.ts.map +1 -0
- package/dist/api/core/io/import/index.d.ts +455 -0
- package/dist/api/core/io/import/index.d.ts.map +1 -0
- package/dist/api/core/io/index.d.ts +40 -0
- package/dist/api/core/io/index.d.ts.map +1 -0
- package/dist/api/core/io/job/index.d.ts +139 -0
- package/dist/api/core/io/job/index.d.ts.map +1 -0
- package/dist/api/core/io/query/index.d.ts +74 -0
- package/dist/api/core/io/query/index.d.ts.map +1 -0
- package/dist/api/core/io/terrain/index.d.ts +341 -0
- package/dist/api/core/io/terrain/index.d.ts.map +1 -0
- package/dist/api/core/io/underlay/index.d.ts +805 -0
- package/dist/api/core/io/underlay/index.d.ts.map +1 -0
- package/dist/api/core/layers.d.ts +402 -0
- package/dist/api/core/layers.d.ts.map +1 -0
- package/dist/api/core/math/index.d.ts +18 -0
- package/dist/api/core/math/index.d.ts.map +1 -0
- package/dist/api/core/math/quat.d.ts +170 -0
- package/dist/api/core/math/quat.d.ts.map +1 -0
- package/dist/api/core/math/vec3.d.ts +174 -0
- package/dist/api/core/math/vec3.d.ts.map +1 -0
- package/dist/api/core/mode/index.d.ts +111 -0
- package/dist/api/core/mode/index.d.ts.map +1 -0
- package/dist/api/core/project/index.d.ts +466 -0
- package/dist/api/core/project/index.d.ts.map +1 -0
- package/dist/api/core/proposals/index.d.ts +531 -0
- package/dist/api/core/proposals/index.d.ts.map +1 -0
- package/dist/api/core/storeys/index.d.ts +265 -0
- package/dist/api/core/storeys/index.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +860 -0
- package/dist/api/core/tags.d.ts.map +1 -0
- package/dist/api/core/units/index.d.ts +175 -0
- package/dist/api/core/units/index.d.ts.map +1 -0
- package/dist/api/core/user.d.ts +44 -0
- package/dist/api/core/user.d.ts.map +1 -0
- package/dist/api/core/zoom/index.d.ts +49 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -0
- package/dist/api/design/boolean/index.d.ts +168 -0
- package/dist/api/design/boolean/index.d.ts.map +1 -0
- 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/grids.d.ts +132 -0
- package/dist/api/design/create/grids.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +1747 -0
- package/dist/api/design/create/index.d.ts.map +1 -0
- 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 +70 -0
- package/dist/api/design/delete/index.d.ts.map +1 -0
- 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 +470 -0
- package/dist/api/design/doors/index.d.ts.map +1 -0
- package/dist/api/design/edit/index.d.ts +49 -0
- package/dist/api/design/edit/index.d.ts.map +1 -0
- package/dist/api/design/erase/index.d.ts +160 -0
- package/dist/api/design/erase/index.d.ts.map +1 -0
- package/dist/api/design/family.d.ts +611 -0
- package/dist/api/design/family.d.ts.map +1 -0
- package/dist/api/design/furniture/index.d.ts +296 -0
- package/dist/api/design/furniture/index.d.ts.map +1 -0
- package/dist/api/design/grids.d.ts +237 -0
- package/dist/api/design/grids.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +260 -0
- package/dist/api/design/index.d.ts.map +1 -0
- package/dist/api/design/lock.d.ts +67 -0
- package/dist/api/design/lock.d.ts.map +1 -0
- package/dist/api/design/materials/index.d.ts +551 -0
- package/dist/api/design/materials/index.d.ts.map +1 -0
- package/dist/api/design/query/geometry/index.d.ts +252 -0
- package/dist/api/design/query/geometry/index.d.ts.map +1 -0
- package/dist/api/design/query/grids.d.ts +287 -0
- package/dist/api/design/query/grids.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +1318 -0
- package/dist/api/design/query/index.d.ts.map +1 -0
- package/dist/api/design/query/referenceLines.d.ts +45 -0
- package/dist/api/design/query/referenceLines.d.ts.map +1 -0
- package/dist/api/design/query/spaces.d.ts +394 -0
- package/dist/api/design/query/spaces.d.ts.map +1 -0
- package/dist/api/design/selection/index.d.ts +282 -0
- package/dist/api/design/selection/index.d.ts.map +1 -0
- package/dist/api/design/shared.d.ts +38 -0
- package/dist/api/design/shared.d.ts.map +1 -0
- package/dist/api/design/transform/index.d.ts +249 -0
- package/dist/api/design/transform/index.d.ts.map +1 -0
- package/dist/api/design/types/index.d.ts +181 -0
- package/dist/api/design/types/index.d.ts.map +1 -0
- package/dist/api/design/update/index.d.ts +803 -0
- package/dist/api/design/update/index.d.ts.map +1 -0
- package/dist/api/design/visibility.d.ts +126 -0
- package/dist/api/design/visibility.d.ts.map +1 -0
- package/dist/api/design/windows/index.d.ts +300 -0
- package/dist/api/design/windows/index.d.ts.map +1 -0
- package/dist/api/entity/buildableEnvelope.d.ts +265 -0
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
- package/dist/api/entity/department.d.ts +1 -0
- package/dist/api/entity/department.d.ts.map +1 -0
- package/dist/api/entity/index.d.ts +28 -0
- package/dist/api/entity/index.d.ts.map +1 -0
- package/dist/api/entity/referenceLine.d.ts +210 -0
- package/dist/api/entity/referenceLine.d.ts.map +1 -0
- package/dist/api/entity/space.d.ts +846 -0
- package/dist/api/entity/space.d.ts.map +1 -0
- package/dist/api/entity/story.d.ts +476 -0
- package/dist/api/entity/story.d.ts.map +1 -0
- package/dist/api/index.d.ts +45 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/presentation/aiInspiration.d.ts +2400 -0
- package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
- package/dist/api/presentation/annotate.d.ts +483 -0
- package/dist/api/presentation/annotate.d.ts.map +1 -0
- package/dist/api/presentation/diagrams.d.ts +184 -0
- package/dist/api/presentation/diagrams.d.ts.map +1 -0
- package/dist/api/presentation/drawings.d.ts +2900 -0
- package/dist/api/presentation/drawings.d.ts.map +1 -0
- package/dist/api/presentation/export.d.ts +126 -0
- package/dist/api/presentation/export.d.ts.map +1 -0
- package/dist/api/presentation/import.d.ts +164 -0
- package/dist/api/presentation/import.d.ts.map +1 -0
- package/dist/api/presentation/index.d.ts +114 -0
- package/dist/api/presentation/index.d.ts.map +1 -0
- package/dist/api/presentation/placedViews.d.ts +1232 -0
- package/dist/api/presentation/placedViews.d.ts.map +1 -0
- package/dist/api/presentation/shapes.d.ts +481 -0
- package/dist/api/presentation/shapes.d.ts.map +1 -0
- package/dist/api/presentation/sheets.d.ts +643 -0
- package/dist/api/presentation/sheets.d.ts.map +1 -0
- package/dist/api/presentation/slideshow.d.ts +125 -0
- package/dist/api/presentation/slideshow.d.ts.map +1 -0
- package/dist/api/presentation/tables.d.ts +81 -0
- package/dist/api/presentation/tables.d.ts.map +1 -0
- package/dist/api/presentation/viewPresets.d.ts +70 -0
- package/dist/api/presentation/viewPresets.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +741 -0
- package/dist/api/presentation/views.d.ts.map +1 -0
- package/dist/api/program/adjacency.d.ts +155 -0
- package/dist/api/program/adjacency.d.ts.map +1 -0
- package/dist/api/program/areas.d.ts +450 -0
- package/dist/api/program/areas.d.ts.map +1 -0
- package/dist/api/program/classification.d.ts +135 -0
- package/dist/api/program/classification.d.ts.map +1 -0
- package/dist/api/program/cores.d.ts +78 -0
- package/dist/api/program/cores.d.ts.map +1 -0
- package/dist/api/program/departments.d.ts +487 -0
- package/dist/api/program/departments.d.ts.map +1 -0
- package/dist/api/program/index.d.ts +71 -0
- package/dist/api/program/index.d.ts.map +1 -0
- package/dist/api/program/labels.d.ts +355 -0
- package/dist/api/program/labels.d.ts.map +1 -0
- package/dist/api/program/layout.d.ts +398 -0
- package/dist/api/program/layout.d.ts.map +1 -0
- package/dist/api/program/metadata.d.ts +328 -0
- package/dist/api/program/metadata.d.ts.map +1 -0
- package/dist/api/program/metrics.d.ts +108 -0
- package/dist/api/program/metrics.d.ts.map +1 -0
- package/dist/api/program/site.d.ts +823 -0
- package/dist/api/program/site.d.ts.map +1 -0
- package/dist/api/program/spreadsheet.d.ts +2628 -0
- package/dist/api/program/spreadsheet.d.ts.map +1 -0
- package/dist/api/workspace/index.d.ts +552 -0
- package/dist/api/workspace/index.d.ts.map +1 -0
- package/dist/errors/codes.d.ts +34 -0
- package/dist/errors/codes.d.ts.map +1 -0
- package/dist/errors/envelope.d.ts +56 -0
- package/dist/errors/envelope.d.ts.map +1 -0
- package/dist/errors/index.d.ts +6 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/plugin-error.d.ts +69 -0
- package/dist/errors/plugin-error.d.ts.map +1 -0
- package/dist/handles.d.ts +229 -0
- package/dist/handles.d.ts.map +1 -0
- package/dist/host-utils.d.ts +47 -0
- package/dist/host-utils.d.ts.map +1 -0
- package/dist/index.cjs +8836 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7568 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +16 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +41 -0
- package/scripts/generate-manifest.mjs +238 -0
- package/scripts/generate-manifest.test.mjs +292 -0
- package/src/api/analysis/daylight.ts +470 -0
- package/src/api/analysis/heatmaps.ts +683 -0
- package/src/api/analysis/illuminance.ts +155 -0
- package/src/api/analysis/index.ts +61 -0
- package/src/api/analysis/shadows.ts +183 -0
- package/src/api/analysis/solar.ts +237 -0
- package/src/api/analysis/sunlightHours.ts +211 -0
- package/src/api/analysis/sunpath.ts +83 -0
- package/src/api/analysis/weather.ts +179 -0
- package/src/api/core/buildings.ts +485 -0
- package/src/api/core/camera/index.ts +268 -0
- package/src/api/core/comment/index.ts +376 -0
- package/src/api/core/geom/create/index.ts +1204 -0
- package/src/api/core/geom/delete/index.ts +84 -0
- package/src/api/core/geom/index.ts +35 -0
- package/src/api/core/geom/query/arc.ts +169 -0
- package/src/api/core/geom/query/brep.ts +563 -0
- package/src/api/core/geom/query/circle.ts +404 -0
- package/src/api/core/geom/query/contour.ts +540 -0
- package/src/api/core/geom/query/curve.ts +1078 -0
- package/src/api/core/geom/query/edge.ts +130 -0
- package/src/api/core/geom/query/face.ts +403 -0
- package/src/api/core/geom/query/halfedge.ts +210 -0
- package/src/api/core/geom/query/index.ts +63 -0
- package/src/api/core/geom/query/profile.ts +473 -0
- package/src/api/core/geom/query/vertex.ts +205 -0
- package/src/api/core/geom/update/contour.ts +315 -0
- package/src/api/core/geom/update/curve.ts +209 -0
- package/src/api/core/geom/update/index.ts +29 -0
- package/src/api/core/geom/update/profile.ts +377 -0
- package/src/api/core/groups.ts +521 -0
- package/src/api/core/handles/index.ts +233 -0
- package/src/api/core/history/index.ts +84 -0
- package/src/api/core/index.ts +99 -0
- package/src/api/core/io/export/index.ts +126 -0
- package/src/api/core/io/import/index.ts +504 -0
- package/src/api/core/io/index.ts +42 -0
- package/src/api/core/io/job/index.ts +140 -0
- package/src/api/core/io/query/index.ts +71 -0
- package/src/api/core/io/terrain/index.ts +360 -0
- package/src/api/core/io/underlay/index.ts +705 -0
- package/src/api/core/layers.ts +333 -0
- package/src/api/core/math/index.ts +20 -0
- package/src/api/core/math/quat.ts +172 -0
- package/src/api/core/math/vec3.ts +179 -0
- package/src/api/core/mode/index.ts +108 -0
- package/src/api/core/project/index.ts +479 -0
- package/src/api/core/proposals/index.ts +569 -0
- package/src/api/core/storeys/index.ts +294 -0
- package/src/api/core/tags.ts +911 -0
- package/src/api/core/units/index.ts +164 -0
- package/src/api/core/user.ts +46 -0
- package/src/api/core/zoom/index.ts +51 -0
- package/src/api/design/boolean/index.ts +179 -0
- package/src/api/design/create/bulk-items.ts +186 -0
- package/src/api/design/create/grids.ts +137 -0
- package/src/api/design/create/index.ts +1954 -0
- package/src/api/design/create/opening-fields.ts +37 -0
- package/src/api/design/delete/index.ts +74 -0
- package/src/api/design/dimensions.ts +453 -0
- package/src/api/design/doors/index.ts +500 -0
- package/src/api/design/edit/index.ts +54 -0
- package/src/api/design/erase/index.ts +151 -0
- package/src/api/design/family.ts +646 -0
- package/src/api/design/furniture/index.ts +319 -0
- package/src/api/design/grids.ts +237 -0
- package/src/api/design/index.ts +274 -0
- package/src/api/design/lock.ts +69 -0
- package/src/api/design/materials/index.ts +608 -0
- package/src/api/design/query/geometry/index.ts +288 -0
- package/src/api/design/query/grids.ts +197 -0
- package/src/api/design/query/index.ts +1176 -0
- package/src/api/design/query/referenceLines.ts +52 -0
- package/src/api/design/query/spaces.ts +275 -0
- package/src/api/design/selection/index.ts +273 -0
- package/src/api/design/shared.ts +40 -0
- package/src/api/design/transform/index.ts +254 -0
- package/src/api/design/types/index.ts +156 -0
- package/src/api/design/update/index.ts +798 -0
- package/src/api/design/visibility.ts +143 -0
- package/src/api/design/windows/index.ts +333 -0
- package/src/api/entity/buildableEnvelope.ts +322 -0
- package/src/api/entity/department.ts +0 -0
- package/src/api/entity/index.ts +30 -0
- package/src/api/entity/referenceLine.ts +235 -0
- package/src/api/entity/space.ts +612 -0
- package/src/api/entity/story.ts +517 -0
- package/src/api/index.ts +47 -0
- package/src/api/presentation/aiInspiration.ts +1116 -0
- package/src/api/presentation/annotate.ts +417 -0
- package/src/api/presentation/diagrams.ts +194 -0
- package/src/api/presentation/drawings.ts +529 -0
- package/src/api/presentation/export.ts +133 -0
- package/src/api/presentation/import.ts +159 -0
- package/src/api/presentation/index.ts +129 -0
- package/src/api/presentation/placedViews.ts +1203 -0
- package/src/api/presentation/shapes.ts +274 -0
- package/src/api/presentation/sheets.ts +616 -0
- package/src/api/presentation/slideshow.ts +134 -0
- package/src/api/presentation/tables.ts +84 -0
- package/src/api/presentation/viewPresets.ts +83 -0
- package/src/api/presentation/views.ts +698 -0
- package/src/api/program/adjacency.ts +164 -0
- package/src/api/program/areas.ts +408 -0
- package/src/api/program/classification.ts +138 -0
- package/src/api/program/cores.ts +83 -0
- package/src/api/program/departments.ts +517 -0
- package/src/api/program/index.ts +73 -0
- package/src/api/program/labels.ts +332 -0
- package/src/api/program/layout.ts +422 -0
- package/src/api/program/metadata.ts +364 -0
- package/src/api/program/metrics.ts +120 -0
- package/src/api/program/site.ts +748 -0
- package/src/api/program/spreadsheet.ts +2698 -0
- package/src/api/workspace/index.ts +612 -0
- package/src/errors/codes.ts +136 -0
- package/src/errors/envelope.ts +75 -0
- package/src/errors/index.ts +21 -0
- package/src/errors/plugin-error.ts +134 -0
- package/src/handles.ts +282 -0
- package/src/host-utils.ts +68 -0
- package/src/index.ts +5 -0
- package/src/types.ts +16 -0
- package/test/errors.test.mjs +184 -0
- package/tsconfig.json +22 -0
- package/tsup.config.ts +12 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../../src/api/core/tags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,8BAAsB,iBAAiB;;IAGrC;;;;;;;;;;;;;;;;OAgBG;aACa,cAAc,IAAI,eAAe,CAAC,kCAAkC,CAAC;IAErF;;;;;;;;;;;;;;;;OAgBG;aACa,WAAW,CACzB,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,+BAA+B,CAAC;IAEnD;;;;;;;;;;;;;;;;OAgBG;aACa,IAAI,CAClB,UAAU,CAAC,EAAE,MAAM,GAClB,eAAe,CAAC,wBAAwB,CAAC;IAE5C;;;;;;;;;;;;;;;;OAgBG;aACa,GAAG,CACjB,KAAK,EAAE,MAAM,GACZ,eAAe,CAAC,uBAAuB,CAAC;IAE3C;;;;;;;;;;;;;;;;;;;;;OAqBG;aACa,mBAAmB,CACjC,WAAW,EAAE,eAAe,GAC3B,eAAe,CAAC,uCAAuC,CAAC;IAE3D;;;;;;;;;;;;;;;;;;;;OAoBG;aACa,gBAAgB,CAC9B,WAAW,EAAE,eAAe,GAC3B,eAAe,CAAC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;;iBAGrC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAA;AAED,+EAA+E;AAC/E,eAAO,MAAM,4BAA4B;;;;;;;;;;iBAA0B,CAAA;AACnE,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Unit-type queries and conversion.
|
|
5
|
+
*
|
|
6
|
+
* Snaptrude stores all geometry in an internal `babylon` unit. These methods
|
|
7
|
+
* read the available unit types, the internal (`babylon`) type, and the current
|
|
8
|
+
* project type; set the current project type; and convert values between any two
|
|
9
|
+
* unit types.
|
|
10
|
+
*
|
|
11
|
+
* Accessed via `snaptrude.core.units`.
|
|
12
|
+
*/
|
|
13
|
+
export declare abstract class PluginUnitsApi {
|
|
14
|
+
constructor();
|
|
15
|
+
/**
|
|
16
|
+
* List the selectable real-world unit types (excludes the internal `babylon`
|
|
17
|
+
* storage type, which is read via {@linkcode PluginUnitsApi.getBabylonType}).
|
|
18
|
+
*
|
|
19
|
+
* @examplePrompt What units can I use in this project?
|
|
20
|
+
* @examplePrompt List all the available measurement units
|
|
21
|
+
* @examplePrompt Which unit systems does Snaptrude support?
|
|
22
|
+
* @examplePrompt Show the unit options I could switch the model to
|
|
23
|
+
*
|
|
24
|
+
* # Example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const types = await snaptrude.core.units.listTypes()
|
|
27
|
+
* console.log(types) // ["meters", "feet-inches", "inches", ...]
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
abstract listTypes(): PluginApiReturn<PUnitType[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Get the internal storage unit type that all geometry is kept in — always
|
|
33
|
+
* `"babylon"` — for use as one side of a {@linkcode PluginUnitsApi.convert} call.
|
|
34
|
+
*
|
|
35
|
+
* @examplePrompt What unit does Snaptrude store geometry in internally?
|
|
36
|
+
* @examplePrompt Get the internal babylon unit type
|
|
37
|
+
* @examplePrompt Which unit are raw model coordinates saved in?
|
|
38
|
+
*
|
|
39
|
+
* # Example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const babylon = await snaptrude.core.units.getBabylonType() // "babylon"
|
|
42
|
+
* const meters = await snaptrude.core.units.convert(10, babylon, "meters")
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
abstract getBabylonType(): PluginApiReturn<PUnitType>;
|
|
46
|
+
/**
|
|
47
|
+
* Get the current project's unit type — the unit lengths are displayed and
|
|
48
|
+
* entered in. Paired with {@linkcode PluginUnitsApi.setType}.
|
|
49
|
+
*
|
|
50
|
+
* @examplePrompt What units is this project using?
|
|
51
|
+
* @examplePrompt Are we working in metric or imperial?
|
|
52
|
+
* @examplePrompt Check the current measurement unit of the model
|
|
53
|
+
* @examplePrompt Is the file set to millimetres or feet and inches?
|
|
54
|
+
*
|
|
55
|
+
* # Example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const type = await snaptrude.core.units.getType()
|
|
58
|
+
* console.log(type) // e.g. "millimeters"
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
abstract getType(): PluginApiReturn<PUnitType>;
|
|
62
|
+
/**
|
|
63
|
+
* Set the current project's unit type. Paired with {@linkcode PluginUnitsApi.getType}.
|
|
64
|
+
*
|
|
65
|
+
* @param type - The unit type to set as the project unit.
|
|
66
|
+
* @returns `true` if applied; `false` if `type` is not a settable project unit
|
|
67
|
+
* (e.g. `kilometers`, `miles`, `babylon`).
|
|
68
|
+
*
|
|
69
|
+
* @examplePrompt Change the project units to millimeters
|
|
70
|
+
* @examplePrompt Switch this model to feet and inches
|
|
71
|
+
* @examplePrompt Set the working units to metric
|
|
72
|
+
* @examplePrompt Make the drawing use centimetres instead of meters
|
|
73
|
+
*
|
|
74
|
+
* # Example
|
|
75
|
+
* ```ts
|
|
76
|
+
* await snaptrude.core.units.setType("meters")
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
abstract setType(type: PUnitType): PluginApiReturn<boolean>;
|
|
80
|
+
/**
|
|
81
|
+
* Convert a value between two unit types.
|
|
82
|
+
*
|
|
83
|
+
* @param value - The numeric value to convert.
|
|
84
|
+
* @param from - Source unit type.
|
|
85
|
+
* @param to - Target unit type.
|
|
86
|
+
* @param degree - (Optional) 1 = length, 2 = area, 3 = volume. Defaults to 1.
|
|
87
|
+
* @returns The converted numeric value.
|
|
88
|
+
*
|
|
89
|
+
* @examplePrompt Convert 5 meters to feet and inches
|
|
90
|
+
* @examplePrompt How many millimetres is 12 feet?
|
|
91
|
+
* @examplePrompt Change this area from internal units to square metres
|
|
92
|
+
* @examplePrompt Turn 2500 mm into meters
|
|
93
|
+
* @examplePrompt Convert a volume value from babylon units to cubic feet
|
|
94
|
+
*
|
|
95
|
+
* # Example
|
|
96
|
+
* ```ts
|
|
97
|
+
* // 5 meters → internal babylon units
|
|
98
|
+
* const b = await snaptrude.core.units.convert(5, "meters", "babylon")
|
|
99
|
+
* // an internal area → square metres
|
|
100
|
+
* const m2 = await snaptrude.core.units.convert(area, "babylon", "meters", 2)
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
abstract convert(value: number, from: PUnitType, to: PUnitType, degree?: number): PluginApiReturn<number>;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Supported unit types. `babylon` is Snaptrude's internal storage unit; the rest
|
|
107
|
+
* are real-world units. Mirrors the engine `Converter.UNITS` vocabulary.
|
|
108
|
+
*/
|
|
109
|
+
export declare const PUnitType: z.ZodEnum<{
|
|
110
|
+
meters: "meters";
|
|
111
|
+
"feet-inches": "feet-inches";
|
|
112
|
+
inches: "inches";
|
|
113
|
+
centimeters: "centimeters";
|
|
114
|
+
millimeters: "millimeters";
|
|
115
|
+
kilometers: "kilometers";
|
|
116
|
+
miles: "miles";
|
|
117
|
+
babylon: "babylon";
|
|
118
|
+
}>;
|
|
119
|
+
export type PUnitType = z.infer<typeof PUnitType>;
|
|
120
|
+
/**
|
|
121
|
+
* Arguments for {@linkcode PluginUnitsApi.setType}.
|
|
122
|
+
*
|
|
123
|
+
* | Property | Type | Description |
|
|
124
|
+
* |---|---|---|
|
|
125
|
+
* | `type` | {@linkcode PUnitType} | The unit type to set as the project unit |
|
|
126
|
+
*/
|
|
127
|
+
export declare const PluginUnitsSetTypeArgs: z.ZodObject<{
|
|
128
|
+
type: z.ZodEnum<{
|
|
129
|
+
meters: "meters";
|
|
130
|
+
"feet-inches": "feet-inches";
|
|
131
|
+
inches: "inches";
|
|
132
|
+
centimeters: "centimeters";
|
|
133
|
+
millimeters: "millimeters";
|
|
134
|
+
kilometers: "kilometers";
|
|
135
|
+
miles: "miles";
|
|
136
|
+
babylon: "babylon";
|
|
137
|
+
}>;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
export type PluginUnitsSetTypeArgs = z.infer<typeof PluginUnitsSetTypeArgs>;
|
|
140
|
+
/**
|
|
141
|
+
* Arguments for {@linkcode PluginUnitsApi.convert}.
|
|
142
|
+
*
|
|
143
|
+
* | Property | Type | Description |
|
|
144
|
+
* |---|---|---|
|
|
145
|
+
* | `value` | `number` | The numeric value to convert |
|
|
146
|
+
* | `from` | {@linkcode PUnitType} | Source unit type |
|
|
147
|
+
* | `to` | {@linkcode PUnitType} | Target unit type |
|
|
148
|
+
* | `degree` | `1 \| 2 \| 3` | (Optional) 1 = length, 2 = area, 3 = volume. Defaults to 1 |
|
|
149
|
+
*/
|
|
150
|
+
export declare const PluginUnitsConvertArgs: z.ZodObject<{
|
|
151
|
+
value: z.ZodNumber;
|
|
152
|
+
from: z.ZodEnum<{
|
|
153
|
+
meters: "meters";
|
|
154
|
+
"feet-inches": "feet-inches";
|
|
155
|
+
inches: "inches";
|
|
156
|
+
centimeters: "centimeters";
|
|
157
|
+
millimeters: "millimeters";
|
|
158
|
+
kilometers: "kilometers";
|
|
159
|
+
miles: "miles";
|
|
160
|
+
babylon: "babylon";
|
|
161
|
+
}>;
|
|
162
|
+
to: z.ZodEnum<{
|
|
163
|
+
meters: "meters";
|
|
164
|
+
"feet-inches": "feet-inches";
|
|
165
|
+
inches: "inches";
|
|
166
|
+
centimeters: "centimeters";
|
|
167
|
+
millimeters: "millimeters";
|
|
168
|
+
kilometers: "kilometers";
|
|
169
|
+
miles: "miles";
|
|
170
|
+
babylon: "babylon";
|
|
171
|
+
}>;
|
|
172
|
+
degree: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
export type PluginUnitsConvertArgs = z.infer<typeof PluginUnitsConvertArgs>;
|
|
175
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/units/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD;;;;;;;;;GASG;AACH,8BAAsB,cAAc;;IAGlC;;;;;;;;;;;;;;OAcG;aACa,SAAS,IAAI,eAAe,CAAC,SAAS,EAAE,CAAC;IAEzD;;;;;;;;;;;;;OAaG;aACa,cAAc,IAAI,eAAe,CAAC,SAAS,CAAC;IAE5D;;;;;;;;;;;;;;OAcG;aACa,OAAO,IAAI,eAAe,CAAC,SAAS,CAAC;IAErD;;;;;;;;;;;;;;;;OAgBG;aACa,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,eAAe,CAAC,OAAO,CAAC;IAElE;;;;;;;;;;;;;;;;;;;;;;OAsBG;aACa,OAAO,CACrB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,SAAS,EACf,EAAE,EAAE,SAAS,EACb,MAAM,CAAC,EAAE,MAAM,GACd,eAAe,CAAC,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS;;;;;;;;;EASpB,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA;AAEjD;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;iBAEjC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;iBAKjC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* User locale.
|
|
5
|
+
*
|
|
6
|
+
* Read the viewer's timezone and language — for date/number formatting and
|
|
7
|
+
* localized labels. This is locale only: NO precise geolocation, no IP, no
|
|
8
|
+
* account identity. Accessed via `snaptrude.core.user`.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class PluginUserApi {
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* Get the viewer's locale: IANA timezone and BCP-47 language tag, resolved
|
|
14
|
+
* from the browser (`Intl.DateTimeFormat().resolvedOptions().timeZone` and
|
|
15
|
+
* `navigator.language`). Locale only — no precise location.
|
|
16
|
+
*
|
|
17
|
+
* @returns `{ timezone, language }` — e.g. `{ timezone: "Asia/Kolkata", language: "en-US" }`.
|
|
18
|
+
*
|
|
19
|
+
* @examplePrompt What timezone is the user in?
|
|
20
|
+
* @examplePrompt Get the viewer's language for localized labels
|
|
21
|
+
* @examplePrompt Format the report date in the user's local timezone
|
|
22
|
+
* @examplePrompt Which locale should I use for this plugin's UI?
|
|
23
|
+
*
|
|
24
|
+
* # Example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const { timezone, language } = await snaptrude.core.user.getLocale()
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
abstract getLocale(): PluginApiReturn<PluginUserLocale>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The viewer's locale.
|
|
33
|
+
*
|
|
34
|
+
* | Property | Type | Description |
|
|
35
|
+
* |---|---|---|
|
|
36
|
+
* | `timezone` | `string` | IANA timezone id (e.g. `"Asia/Kolkata"`) |
|
|
37
|
+
* | `language` | `string` | BCP-47 language tag (e.g. `"en-US"`) |
|
|
38
|
+
*/
|
|
39
|
+
export declare const PluginUserLocale: z.ZodObject<{
|
|
40
|
+
timezone: z.ZodString;
|
|
41
|
+
language: z.ZodString;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export type PluginUserLocale = z.infer<typeof PluginUserLocale>;
|
|
44
|
+
//# sourceMappingURL=user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/api/core/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;GAMG;AACH,8BAAsB,aAAa;;IAGjC;;;;;;;;;;;;;;;;OAgBG;aACa,SAAS,IAAI,eAAe,CAAC,gBAAgB,CAAC;CAC/D;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { PluginApiReturn } from "../../../types";
|
|
2
|
+
/**
|
|
3
|
+
* Camera zoom controls.
|
|
4
|
+
*
|
|
5
|
+
* Frame the viewport camera onto scene geometry — mirrors the canvas zoom menu
|
|
6
|
+
* ("Zoom extents" / "Zoom to selection"). Accessed via `snaptrude.core.zoom`.
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class PluginZoomApi {
|
|
9
|
+
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* Zoom (fit) the camera to all geometry in the scene — the "zoom extents" action.
|
|
12
|
+
*
|
|
13
|
+
* @returns `true` once the camera has been framed to the scene.
|
|
14
|
+
*
|
|
15
|
+
* @examplePrompt Zoom out so I can see the whole model
|
|
16
|
+
* @examplePrompt Fit everything in the view
|
|
17
|
+
* @examplePrompt Frame the entire building in the viewport
|
|
18
|
+
* @examplePrompt Do a zoom extents on the canvas
|
|
19
|
+
* @examplePrompt Show me the full scene
|
|
20
|
+
*
|
|
21
|
+
* # Example
|
|
22
|
+
* ```ts
|
|
23
|
+
* await snaptrude.core.zoom.extents()
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @deprecated Use `core.camera.zoomExtents`
|
|
27
|
+
*/
|
|
28
|
+
abstract extents(): PluginApiReturn<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* Zoom (fit) the camera to the current selection.
|
|
31
|
+
*
|
|
32
|
+
* @returns `true` if there was a selection to frame; `false` if nothing is
|
|
33
|
+
* selected (no-op).
|
|
34
|
+
*
|
|
35
|
+
* @examplePrompt Zoom in on what I have selected
|
|
36
|
+
* @examplePrompt Frame the selected walls in the view
|
|
37
|
+
* @examplePrompt Focus the camera on my current selection
|
|
38
|
+
* @examplePrompt Fit the view to the selected room
|
|
39
|
+
*
|
|
40
|
+
* # Example
|
|
41
|
+
* ```ts
|
|
42
|
+
* await snaptrude.core.zoom.selection()
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @deprecated Use `core.camera.zoomSelection`
|
|
46
|
+
*/
|
|
47
|
+
abstract selection(): PluginApiReturn<boolean>;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/zoom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD;;;;;GAKG;AACH,8BAAsB,aAAa;;IAGjC;;;;;;;;;;;;;;;;;OAiBG;aACa,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC;IAEnD;;;;;;;;;;;;;;;;;OAiBG;aACa,SAAS,IAAI,eAAe,CAAC,OAAO,CAAC;CACtD"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../../types";
|
|
3
|
+
import { ComponentHandle } from "../../../handles";
|
|
4
|
+
import { BooleanOutcome } from "../shared";
|
|
5
|
+
/**
|
|
6
|
+
* `snaptrude.design.boolean` — OpenCascade CSG on scene masses/spaces.
|
|
7
|
+
*
|
|
8
|
+
* Every method **commits** the operation as one undoable step (engine `run()`
|
|
9
|
+
* queues create/delete/group/dimension commands, `execute()` runs them through
|
|
10
|
+
* `CommandManager`) and returns the committed {@linkcode BooleanOutcome}. Failures
|
|
11
|
+
* **throw** (RPC rejects) — no `Result<>` monad crosses the boundary.
|
|
12
|
+
*
|
|
13
|
+
* Eligibility (all inputs): a `Mass` that is a room OR a DEPARTMENT, has a brep, is
|
|
14
|
+
* unlocked (mesh + bucket), visible, and NOT in a parametric-copy group; the whole
|
|
15
|
+
* set must be all-planar OR all-non-planar; **≥2** components; all inputs share one
|
|
16
|
+
* group or are ungrouped; inputs must be adjacent/overlapping.
|
|
17
|
+
*
|
|
18
|
+
* `design.boolean.subtract` is a **CSG geometry delete** — distinct from
|
|
19
|
+
* `design.delete.entities` (hard entity removal) and `design.erase.edge`
|
|
20
|
+
* (adjacency-edge topology op).
|
|
21
|
+
*
|
|
22
|
+
* TRANSPORT: positional args per method.
|
|
23
|
+
*/
|
|
24
|
+
export declare abstract class PluginDesignBooleanApi {
|
|
25
|
+
constructor();
|
|
26
|
+
/**
|
|
27
|
+
* Fuse two or more masses into a single combined mass (`A ∪ B ∪ …`) — a boolean
|
|
28
|
+
* (CSG) union that merges the adjacent or overlapping inputs into one solid,
|
|
29
|
+
* committed as a single undoable step. Order-independent.
|
|
30
|
+
* @param components - The ≥2 entities to fuse (order-independent)
|
|
31
|
+
* @param options - Optional output offset — {@linkcode BooleanOptions}
|
|
32
|
+
* @returns The committed CSG delta — {@linkcode BooleanOutcome}
|
|
33
|
+
* @throws if inputs are ineligible, disjoint, non-manifold when joined, span
|
|
34
|
+
* different groups, or the CSG yields no / invalid geometry.
|
|
35
|
+
*
|
|
36
|
+
* @examplePrompt Merge these two masses into one
|
|
37
|
+
* @examplePrompt Union the selected volumes into a single mass
|
|
38
|
+
* @examplePrompt Combine the overlapping rooms into one shape
|
|
39
|
+
* @examplePrompt Join the tower and podium blocks together
|
|
40
|
+
* @examplePrompt Fuse all the selected massing blocks into a single solid
|
|
41
|
+
*
|
|
42
|
+
* # Example
|
|
43
|
+
* ```ts
|
|
44
|
+
* // Fuse the overlapping massing blocks on the ground storey into one solid
|
|
45
|
+
* const masses = await snaptrude.design.query.listMasses({ storeys: [1] })
|
|
46
|
+
* const { created, deleted } = await snaptrude.design.boolean.union(masses)
|
|
47
|
+
* console.log("created", created.length, "mass; consumed", deleted.length)
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
abstract union(components: ComponentHandle[], options?: BooleanOptions): PluginApiReturn<BooleanOutcome>;
|
|
51
|
+
/**
|
|
52
|
+
* Cut one or more tool masses out of a target mass (`target − ⋃tools`) — a
|
|
53
|
+
* boolean (CSG) subtraction that carves the tools' volume out of the target and
|
|
54
|
+
* commits the remainder as a single undoable step.
|
|
55
|
+
*
|
|
56
|
+
* ORDER-SENSITIVE: the host seeds `[target, ...tools]`; index 0 is the arg brep,
|
|
57
|
+
* the rest are tool breps. `deleted` includes the target AND every tool;
|
|
58
|
+
* `created` is the remainder mass(es).
|
|
59
|
+
* @param target - The entity subtracted FROM (arg brep)
|
|
60
|
+
* @param tools - The ≥1 entities subtracted (tool breps)
|
|
61
|
+
* @param options - Optional output offset — {@linkcode BooleanOptions}
|
|
62
|
+
* @returns The committed CSG delta — {@linkcode BooleanOutcome}
|
|
63
|
+
* @throws as {@linkcode union}; a `NoResult` here carries the "select the target
|
|
64
|
+
* object first" hint from the engine.
|
|
65
|
+
*
|
|
66
|
+
* @examplePrompt Cut this shape out of the bigger mass
|
|
67
|
+
* @examplePrompt Subtract the cylinder from the building volume
|
|
68
|
+
* @examplePrompt Punch an opening through this block using the small box
|
|
69
|
+
* @examplePrompt Carve the courtyard volume out of the main massing
|
|
70
|
+
* @examplePrompt Remove the overlapping part of mass B from mass A
|
|
71
|
+
*
|
|
72
|
+
* # Example
|
|
73
|
+
* ```ts
|
|
74
|
+
* // Order matters: the first arg is the target, the array holds the tools
|
|
75
|
+
* const [building, courtyard] = await snaptrude.design.selection.get()
|
|
76
|
+
* const { created, deleted } = await snaptrude.design.boolean.subtract(building, [courtyard])
|
|
77
|
+
* // deleted includes the target AND every tool; created is the remainder
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
abstract subtract(target: ComponentHandle, tools: ComponentHandle[], options?: BooleanOptions): PluginApiReturn<BooleanOutcome>;
|
|
81
|
+
/**
|
|
82
|
+
* Keep only the overlapping volume of exactly two masses (`A ∩ B`) — a boolean
|
|
83
|
+
* (CSG) intersection that discards everything outside the shared region and
|
|
84
|
+
* commits the overlap as a single undoable step. Order-independent.
|
|
85
|
+
*
|
|
86
|
+
* HARD constraint: **EXACTLY 2** components (schema `.length(2)`; the engine
|
|
87
|
+
* also throws `MoreThan2ComponentsForIntersect` on >2).
|
|
88
|
+
* @param components - **EXACTLY 2** entities to intersect (order-independent)
|
|
89
|
+
* @param options - Optional output offset — {@linkcode BooleanOptions}
|
|
90
|
+
* @returns The committed CSG delta — {@linkcode BooleanOutcome}
|
|
91
|
+
* @throws as {@linkcode union}, plus `MoreThan2ComponentsForIntersect` on >2.
|
|
92
|
+
*
|
|
93
|
+
* @examplePrompt Keep only the part where these two masses overlap
|
|
94
|
+
* @examplePrompt Intersect the two selected volumes
|
|
95
|
+
* @examplePrompt Give me the common volume between the tower and the zoning envelope
|
|
96
|
+
* @examplePrompt Trim this mass down to just its overlap with the other one
|
|
97
|
+
*
|
|
98
|
+
* # Example
|
|
99
|
+
* ```ts
|
|
100
|
+
* // Keep only the overlap of the tower and the zoning envelope (EXACTLY 2 inputs),
|
|
101
|
+
* // shifting the result mass 10 units in x via the optional offset
|
|
102
|
+
* const [tower, envelope] = await snaptrude.design.query.listMasses()
|
|
103
|
+
* const offset = await snaptrude.core.math.vec3.new(10, 0, 0)
|
|
104
|
+
* const { created } = await snaptrude.design.boolean.intersect([tower, envelope], { offset })
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
abstract intersect(components: ComponentHandle[], options?: BooleanOptions): PluginApiReturn<BooleanOutcome>;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Optional knobs shared by all boolean ops. The only safe one is a world-space
|
|
111
|
+
* translation applied to the output mass(es) — maps to `Boolean3dOperation.offset`.
|
|
112
|
+
*
|
|
113
|
+
* | Property | Type | Description |
|
|
114
|
+
* |---|---|---|
|
|
115
|
+
* | `offset` | {@linkcode Vec3Handle} | Translation added to the created result mass(es) (default: none) |
|
|
116
|
+
*/
|
|
117
|
+
export declare const BooleanOptions: z.ZodObject<{
|
|
118
|
+
offset: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
export type BooleanOptions = z.infer<typeof BooleanOptions>;
|
|
121
|
+
/**
|
|
122
|
+
* Arguments for {@linkcode PluginDesignBooleanApi.union}.
|
|
123
|
+
*
|
|
124
|
+
* | Property | Type | Description |
|
|
125
|
+
* |---|---|---|
|
|
126
|
+
* | `components` | {@linkcode ComponentHandle}`[]` | The ≥2 entities to fuse (order-independent) |
|
|
127
|
+
* | `options` | {@linkcode BooleanOptions} | Optional output offset |
|
|
128
|
+
*/
|
|
129
|
+
export declare const PluginDesignBooleanUnionArgs: z.ZodObject<{
|
|
130
|
+
components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
131
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
132
|
+
offset: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
133
|
+
}, z.core.$strip>>;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
export type PluginDesignBooleanUnionArgs = z.infer<typeof PluginDesignBooleanUnionArgs>;
|
|
136
|
+
/**
|
|
137
|
+
* Arguments for {@linkcode PluginDesignBooleanApi.subtract}.
|
|
138
|
+
*
|
|
139
|
+
* | Property | Type | Description |
|
|
140
|
+
* |---|---|---|
|
|
141
|
+
* | `target` | {@linkcode ComponentHandle} | The entity subtracted FROM (arg brep) |
|
|
142
|
+
* | `tools` | {@linkcode ComponentHandle}`[]` | The ≥1 entities subtracted (tool breps) |
|
|
143
|
+
* | `options` | {@linkcode BooleanOptions} | Optional output offset |
|
|
144
|
+
*/
|
|
145
|
+
export declare const PluginDesignBooleanSubtractArgs: z.ZodObject<{
|
|
146
|
+
target: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
147
|
+
tools: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
148
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
offset: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
150
|
+
}, z.core.$strip>>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
export type PluginDesignBooleanSubtractArgs = z.infer<typeof PluginDesignBooleanSubtractArgs>;
|
|
153
|
+
/**
|
|
154
|
+
* Arguments for {@linkcode PluginDesignBooleanApi.intersect}.
|
|
155
|
+
*
|
|
156
|
+
* | Property | Type | Description |
|
|
157
|
+
* |---|---|---|
|
|
158
|
+
* | `components` | {@linkcode ComponentHandle}`[]` | **EXACTLY 2** entities to intersect (order-independent) |
|
|
159
|
+
* | `options` | {@linkcode BooleanOptions} | Optional output offset |
|
|
160
|
+
*/
|
|
161
|
+
export declare const PluginDesignBooleanIntersectArgs: z.ZodObject<{
|
|
162
|
+
components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
163
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
164
|
+
offset: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
165
|
+
}, z.core.$strip>>;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
export type PluginDesignBooleanIntersectArgs = z.infer<typeof PluginDesignBooleanIntersectArgs>;
|
|
168
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/boolean/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAc,MAAM,kBAAkB,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C;;;;;;;;;;;;;;;;;;GAkBG;AACH,8BAAsB,sBAAsB;;IAG1C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;aACa,KAAK,CACnB,UAAU,EAAE,eAAe,EAAE,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,eAAe,CAAC,cAAc,CAAC;IAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;aACa,QAAQ,CACtB,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,eAAe,EAAE,EACxB,OAAO,CAAC,EAAE,cAAc,GACvB,eAAe,CAAC,cAAc,CAAC;IAElC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;aACa,SAAS,CACvB,UAAU,EAAE,eAAe,EAAE,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,eAAe,CAAC,cAAc,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;iBAEzB,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B;;;;;iBAGvC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEvF;;;;;;;;GAQG;AACH,eAAO,MAAM,+BAA+B;;;;;;iBAI1C,CAAA;AACF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE7F;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC;;;;;iBAG3C,CAAA;AACF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,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
|