@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,252 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../../../types";
|
|
3
|
+
import { ComponentHandle, BrepHandle, ContourHandle, CurveHandle } from "../../../../handles";
|
|
4
|
+
/**
|
|
5
|
+
* `snaptrude.design.query.geometry` — read the geometry of scene BIM entities.
|
|
6
|
+
*
|
|
7
|
+
* This is the bridge from the BIM/scene layer (`design.*`, keyed by
|
|
8
|
+
* {@linkcode ComponentHandle}) into the geometry kernel (`core.geom.query.*`,
|
|
9
|
+
* keyed by value/topology handles). {@linkcode PluginDesignQueryGeometryApi.getBrep}
|
|
10
|
+
* mints a {@linkcode BrepHandle} for a component's boundary-representation mesh;
|
|
11
|
+
* {@linkcode PluginDesignQueryGeometryApi.getBottomContour} mints a
|
|
12
|
+
* {@linkcode ContourHandle} for its footprint outline;
|
|
13
|
+
* {@linkcode PluginDesignQueryGeometryApi.getCenterline} mints a
|
|
14
|
+
* {@linkcode CurveHandle} for a wall's core curve.
|
|
15
|
+
* {@linkcode PluginDesignQueryGeometryApi.getTriangulatedMeshes} is the
|
|
16
|
+
* handle-free exception: it returns the triangulated render meshes as plain
|
|
17
|
+
* world-space arrays.
|
|
18
|
+
*
|
|
19
|
+
* Returned handles are session-ephemeral and go stale on undo/redo/re-topologize
|
|
20
|
+
* — re-fetch a fresh one after edits.
|
|
21
|
+
*/
|
|
22
|
+
export declare abstract class PluginDesignQueryGeometryApi {
|
|
23
|
+
constructor();
|
|
24
|
+
/**
|
|
25
|
+
* Get the boundary representation (B-rep) of a scene component — the solid
|
|
26
|
+
* geometry (faces, edges, vertices) behind a wall, slab, room or any other
|
|
27
|
+
* scene entity, as a reusable {@linkcode BrepHandle} for the
|
|
28
|
+
* `core.geom.query.brep.*` reads.
|
|
29
|
+
*
|
|
30
|
+
* @param component - The scene component to read
|
|
31
|
+
* @returns The brep as a {@linkcode BrepHandle}, or `null` if the component has no brep geometry
|
|
32
|
+
*
|
|
33
|
+
* @examplePrompt Get the 3D solid geometry of the selected wall
|
|
34
|
+
* @examplePrompt How many faces does this mass have?
|
|
35
|
+
* @examplePrompt Inspect the mesh of this slab so I can look at its faces and edges
|
|
36
|
+
* @examplePrompt Read the vertices of the selected column's geometry
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const brep = await snaptrude.design.query.geometry.getBrep(component)
|
|
41
|
+
* if (brep) {
|
|
42
|
+
* const faces = await snaptrude.core.geom.query.brep.listFaces(brep)
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
abstract getBrep(component: ComponentHandle): PluginApiReturn<BrepHandle | null>;
|
|
47
|
+
/**
|
|
48
|
+
* Get the **bottom-face contour** of a component — the footprint outline (outer
|
|
49
|
+
* profile + holes) of its lowest horizontal face, as a reusable
|
|
50
|
+
* {@linkcode ContourHandle}.
|
|
51
|
+
*
|
|
52
|
+
* Extracted from the component's B-rep; robust to inverted face normals. Read
|
|
53
|
+
* its geometry via `snaptrude.core.geom.query.contour.*`, or feed it back into
|
|
54
|
+
* `design.create.*` / `core.geom.*`.
|
|
55
|
+
*
|
|
56
|
+
* @param component - The scene component to read
|
|
57
|
+
* @returns the footprint {@linkcode ContourHandle}, or `null` if the component
|
|
58
|
+
* has no extractable bottom face (e.g. it carries no B-rep)
|
|
59
|
+
*
|
|
60
|
+
* @examplePrompt Get the footprint of the selected mass
|
|
61
|
+
* @examplePrompt What is the plan outline of this building volume?
|
|
62
|
+
* @examplePrompt Trace the base profile of this wall
|
|
63
|
+
* @examplePrompt Find the ground-level outline of the slab, including any openings
|
|
64
|
+
* @examplePrompt Work out the footprint area of the selected component
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const [wall] = await snaptrude.design.query.listWalls()
|
|
69
|
+
* const contour = await snaptrude.design.query.geometry.getBottomContour(wall)
|
|
70
|
+
* if (contour) {
|
|
71
|
+
* const area = await snaptrude.core.geom.query.contour.getArea(contour)
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
abstract getBottomContour(component: ComponentHandle): PluginApiReturn<ContourHandle | null>;
|
|
76
|
+
/**
|
|
77
|
+
* Get the **centerline** (core curve) of a wall — the single curve running
|
|
78
|
+
* down the middle of the wall, as a reusable {@linkcode CurveHandle}
|
|
79
|
+
* (a `Line` for a straight wall, an `Arc` for a curved wall).
|
|
80
|
+
*
|
|
81
|
+
* For a parametric wall this is its stored core curve; otherwise it is
|
|
82
|
+
* derived from the wall's B-rep bottom face. Read its geometry via
|
|
83
|
+
* `snaptrude.core.geom.query.curve.*`, or feed it into `design.create.*`.
|
|
84
|
+
*
|
|
85
|
+
* Only walls have a centerline. As with all `get*` reads it never throws:
|
|
86
|
+
* a non-wall component, or a wall with no derivable centerline, yields `null`.
|
|
87
|
+
*
|
|
88
|
+
* @param component - The scene component to read (only walls yield a centerline)
|
|
89
|
+
* @returns the centerline {@linkcode CurveHandle}, or `null` if the component
|
|
90
|
+
* is not a wall or the wall has no derivable centerline (e.g. it carries no
|
|
91
|
+
* B-rep or has an unsupported profile)
|
|
92
|
+
*
|
|
93
|
+
* @examplePrompt Get the centerline of the selected wall
|
|
94
|
+
* @examplePrompt How long is this wall along its centre line?
|
|
95
|
+
* @examplePrompt Find the axis running down the middle of this wall
|
|
96
|
+
* @examplePrompt Give me the core curve of that curved wall
|
|
97
|
+
* @examplePrompt Where does the wall's centreline start and end?
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* const [wall] = await snaptrude.design.query.listWalls()
|
|
102
|
+
* const centerline = await snaptrude.design.query.geometry.getCenterline(wall)
|
|
103
|
+
* if (centerline) {
|
|
104
|
+
* const length = await snaptrude.core.geom.query.curve.getLength(centerline)
|
|
105
|
+
* }
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
abstract getCenterline(component: ComponentHandle): PluginApiReturn<CurveHandle | null>;
|
|
109
|
+
/**
|
|
110
|
+
* Get the **triangulated render meshes** of scene components as plain,
|
|
111
|
+
* serializable arrays — flat world-space vertex `positions` (`[x0, y0, z0,
|
|
112
|
+
* x1, …]`) and triangle `indices` (three per triangle), one record per
|
|
113
|
+
* requested component.
|
|
114
|
+
*
|
|
115
|
+
* Unlike the other `geometry.*` reads this does NOT mint kernel handles — the
|
|
116
|
+
* raw arrays cross the boundary directly, ready for export, custom analysis,
|
|
117
|
+
* or feeding an external renderer. Positions are **always world-space**
|
|
118
|
+
* (instance/transform baked in; there is no local-coordinates mode) in plan
|
|
119
|
+
* units — no conversion needed. Raw doubles, unrounded.
|
|
120
|
+
*
|
|
121
|
+
* With `includeMaterialIds: true` each record also carries `materialIds`: one
|
|
122
|
+
* entry **per triangle** (`indices.length / 3` entries), the material *name*
|
|
123
|
+
* painted on that triangle, or `null` for unpainted/default faces.
|
|
124
|
+
*
|
|
125
|
+
* With `includeFaceIndices: true` each record also carries `faceIds`: one
|
|
126
|
+
* entry **per triangle** (input order), the B-rep face index owning that
|
|
127
|
+
* triangle (same ids as {@linkcode getBrep} faces), or `null` where there is
|
|
128
|
+
* no provenance. Non-B-rep meshes (Revit imports, generic models, furniture)
|
|
129
|
+
* yield all-`null` rather than an error.
|
|
130
|
+
*
|
|
131
|
+
* A resolvable component with no readable mesh geometry yields
|
|
132
|
+
* `{ id, positions: [], indices: [] }` — nothing is silently omitted.
|
|
133
|
+
*
|
|
134
|
+
* The call is capped at **500 000 triangles total**; over the cap it throws a
|
|
135
|
+
* `VALIDATION` error whose message includes the actual total — split the
|
|
136
|
+
* component list into smaller batches and call again.
|
|
137
|
+
*
|
|
138
|
+
* @param components - The scene components to triangulate
|
|
139
|
+
* @param options - `includeMaterialIds` adds the per-triangle material names;
|
|
140
|
+
* `includeFaceIndices` adds the per-triangle B-rep face indices
|
|
141
|
+
* @returns `{ meshes }` — one {@linkcode PluginTriangulatedMesh} per requested
|
|
142
|
+
* component, in input order
|
|
143
|
+
* @throws `HANDLE_INVALID` if any component handle is gone/forged;
|
|
144
|
+
* `VALIDATION` if the combined mesh exceeds 500 000 triangles
|
|
145
|
+
*
|
|
146
|
+
* @examplePrompt Export the selected masses as a triangle mesh
|
|
147
|
+
* @examplePrompt Get the raw vertices and triangles of this wall in world coordinates
|
|
148
|
+
* @examplePrompt Give me the triangulated geometry of every space with its materials
|
|
149
|
+
* @examplePrompt Compute the surface area of this roof from its triangles
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```ts
|
|
153
|
+
* const spaces = await snaptrude.design.query.listSpaces()
|
|
154
|
+
* const { meshes } = await snaptrude.design.query.geometry.getTriangulatedMeshes(spaces, {
|
|
155
|
+
* includeMaterialIds: true,
|
|
156
|
+
* })
|
|
157
|
+
* for (const mesh of meshes) {
|
|
158
|
+
* const triangleCount = mesh.indices.length / 3
|
|
159
|
+
* console.log(mesh.id, triangleCount, mesh.materialIds?.[0])
|
|
160
|
+
* }
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
abstract getTriangulatedMeshes(components: ComponentHandle[], options?: PluginDesignQueryGeometryGetTriangulatedMeshesArgs["options"]): PluginApiReturn<PluginDesignQueryGeometryGetTriangulatedMeshesResult>;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Arguments for {@linkcode PluginDesignQueryGeometryApi.getBrep}.
|
|
167
|
+
*
|
|
168
|
+
* | Property | Type | Description |
|
|
169
|
+
* |---|---|---|
|
|
170
|
+
* | `component` | {@linkcode ComponentHandle} | The scene component to read |
|
|
171
|
+
*/
|
|
172
|
+
export declare const PluginDesignQueryGeometryGetBrepArgs: z.ZodObject<{
|
|
173
|
+
component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
export type PluginDesignQueryGeometryGetBrepArgs = z.infer<typeof PluginDesignQueryGeometryGetBrepArgs>;
|
|
176
|
+
/**
|
|
177
|
+
* Arguments for {@linkcode PluginDesignQueryGeometryApi.getBottomContour}.
|
|
178
|
+
*
|
|
179
|
+
* | Property | Type | Description |
|
|
180
|
+
* |---|---|---|
|
|
181
|
+
* | `component` | {@linkcode ComponentHandle} | The scene component to read |
|
|
182
|
+
*/
|
|
183
|
+
export declare const PluginDesignQueryGeometryGetBottomContourArgs: z.ZodObject<{
|
|
184
|
+
component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
export type PluginDesignQueryGeometryGetBottomContourArgs = z.infer<typeof PluginDesignQueryGeometryGetBottomContourArgs>;
|
|
187
|
+
/**
|
|
188
|
+
* Arguments for {@linkcode PluginDesignQueryGeometryApi.getCenterline}.
|
|
189
|
+
*
|
|
190
|
+
* | Property | Type | Description |
|
|
191
|
+
* |---|---|---|
|
|
192
|
+
* | `component` | {@linkcode ComponentHandle} | The scene component to read |
|
|
193
|
+
*/
|
|
194
|
+
export declare const PluginDesignQueryGeometryGetCenterlineArgs: z.ZodObject<{
|
|
195
|
+
component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
export type PluginDesignQueryGeometryGetCenterlineArgs = z.infer<typeof PluginDesignQueryGeometryGetCenterlineArgs>;
|
|
198
|
+
/**
|
|
199
|
+
* One component's triangulated world-space mesh, as plain serializable arrays
|
|
200
|
+
* (no handles).
|
|
201
|
+
*
|
|
202
|
+
* | Property | Type | Description |
|
|
203
|
+
* |---|---|---|
|
|
204
|
+
* | `id` | `string` | The component's id (its {@linkcode ComponentHandle} token) |
|
|
205
|
+
* | `positions` | `number[]` | Flat world-space vertex coordinates `[x0, y0, z0, x1, …]`, plan units, raw doubles |
|
|
206
|
+
* | `indices` | `number[]` | Triangle vertex indices, three per triangle, into `positions / 3` |
|
|
207
|
+
* | `materialIds` | `(string \| null)[]` _(optional)_ | One entry per triangle: the painted material's name, `null` for unpainted/default faces. Present only when requested via `includeMaterialIds` |
|
|
208
|
+
* | `faceIds` | `(number \| null)[]` _(optional)_ | One entry per triangle: the B-rep face index owning it (same ids as {@linkcode PluginDesignQueryGeometryApi.getBrep} faces), `null` where there is no provenance (non-B-rep mesh). Present only when requested via `includeFaceIndices` |
|
|
209
|
+
*/
|
|
210
|
+
export declare const PluginTriangulatedMesh: z.ZodObject<{
|
|
211
|
+
id: z.ZodString;
|
|
212
|
+
positions: z.ZodArray<z.ZodNumber>;
|
|
213
|
+
indices: z.ZodArray<z.ZodNumber>;
|
|
214
|
+
materialIds: z.ZodOptional<z.ZodArray<z.ZodNullable<z.ZodString>>>;
|
|
215
|
+
faceIds: z.ZodOptional<z.ZodArray<z.ZodNullable<z.ZodNumber>>>;
|
|
216
|
+
}, z.core.$strip>;
|
|
217
|
+
export type PluginTriangulatedMesh = z.infer<typeof PluginTriangulatedMesh>;
|
|
218
|
+
/**
|
|
219
|
+
* Arguments for {@linkcode PluginDesignQueryGeometryApi.getTriangulatedMeshes}.
|
|
220
|
+
*
|
|
221
|
+
* | Property | Type | Description |
|
|
222
|
+
* |---|---|---|
|
|
223
|
+
* | `components` | {@linkcode ComponentHandle}`[]` | The scene components to triangulate |
|
|
224
|
+
* | `options.includeMaterialIds` | `boolean` _(optional)_ | Also return the per-triangle material names |
|
|
225
|
+
* | `options.includeFaceIndices` | `boolean` _(optional)_ | Also return the per-triangle B-rep face indices |
|
|
226
|
+
*/
|
|
227
|
+
export declare const PluginDesignQueryGeometryGetTriangulatedMeshesArgs: z.ZodObject<{
|
|
228
|
+
components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
229
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
230
|
+
includeMaterialIds: z.ZodOptional<z.ZodBoolean>;
|
|
231
|
+
includeFaceIndices: z.ZodOptional<z.ZodBoolean>;
|
|
232
|
+
}, z.core.$strip>>;
|
|
233
|
+
}, z.core.$strip>;
|
|
234
|
+
export type PluginDesignQueryGeometryGetTriangulatedMeshesArgs = z.infer<typeof PluginDesignQueryGeometryGetTriangulatedMeshesArgs>;
|
|
235
|
+
/**
|
|
236
|
+
* Result of {@linkcode PluginDesignQueryGeometryApi.getTriangulatedMeshes}.
|
|
237
|
+
*
|
|
238
|
+
* | Property | Type | Description |
|
|
239
|
+
* |---|---|---|
|
|
240
|
+
* | `meshes` | {@linkcode PluginTriangulatedMesh}`[]` | One record per requested component, in input order |
|
|
241
|
+
*/
|
|
242
|
+
export declare const PluginDesignQueryGeometryGetTriangulatedMeshesResult: z.ZodObject<{
|
|
243
|
+
meshes: z.ZodArray<z.ZodObject<{
|
|
244
|
+
id: z.ZodString;
|
|
245
|
+
positions: z.ZodArray<z.ZodNumber>;
|
|
246
|
+
indices: z.ZodArray<z.ZodNumber>;
|
|
247
|
+
materialIds: z.ZodOptional<z.ZodArray<z.ZodNullable<z.ZodString>>>;
|
|
248
|
+
faceIds: z.ZodOptional<z.ZodArray<z.ZodNullable<z.ZodNumber>>>;
|
|
249
|
+
}, z.core.$strip>>;
|
|
250
|
+
}, z.core.$strip>;
|
|
251
|
+
export type PluginDesignQueryGeometryGetTriangulatedMeshesResult = z.infer<typeof PluginDesignQueryGeometryGetTriangulatedMeshesResult>;
|
|
252
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/design/query/geometry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,eAAe,EACf,UAAU,EACV,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAAsB,4BAA4B;;IAGhD;;;;;;;;;;;;;;;;;;;;;OAqBG;aACa,OAAO,CACrB,SAAS,EAAE,eAAe,GACzB,eAAe,CAAC,UAAU,GAAG,IAAI,CAAC;IAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;aACa,gBAAgB,CAC9B,SAAS,EAAE,eAAe,GACzB,eAAe,CAAC,aAAa,GAAG,IAAI,CAAC;IAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;aACa,aAAa,CAC3B,SAAS,EAAE,eAAe,GACzB,eAAe,CAAC,WAAW,GAAG,IAAI,CAAC;IAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqDG;aACa,qBAAqB,CACnC,UAAU,EAAE,eAAe,EAAE,EAC7B,OAAO,CAAC,EAAE,kDAAkD,CAAC,SAAS,CAAC,GACtE,eAAe,CAAC,oDAAoD,CAAC;CACzE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oCAAoC;;iBAE/C,CAAA;AAEF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,oCAAoC,CAC5C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,6CAA6C;;iBAExD,CAAA;AAEF,MAAM,MAAM,6CAA6C,GAAG,CAAC,CAAC,KAAK,CACjE,OAAO,6CAA6C,CACrD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,0CAA0C;;iBAErD,CAAA;AAEF,MAAM,MAAM,0CAA0C,GAAG,CAAC,CAAC,KAAK,CAC9D,OAAO,0CAA0C,CAClD,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB;;;;;;iBAMjC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;;;;;GAQG;AACH,eAAO,MAAM,kDAAkD;;;;;;iBAQ7D,CAAA;AAEF,MAAM,MAAM,kDAAkD,GAAG,CAAC,CAAC,KAAK,CACtE,OAAO,kDAAkD,CAC1D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oDAAoD;;;;;;;;iBAE/D,CAAA;AAEF,MAAM,MAAM,oDAAoD,GAAG,CAAC,CAAC,KAAK,CACxE,OAAO,oDAAoD,CAC5D,CAAA"}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Visual properties of grid lines — the group's defaults and any per-line
|
|
5
|
+
* overrides share this shape (values mirror the engine's `GridLineProps`).
|
|
6
|
+
*
|
|
7
|
+
* | Property | Type | Description |
|
|
8
|
+
* |---|---|---|
|
|
9
|
+
* | `style` | {@linkcode PluginReferenceLineStyle} | Line style (`"SOLID"` \| `"DASHED"` \| `"DOT_DASH"`) |
|
|
10
|
+
* | `weight` | `number` | Line weight |
|
|
11
|
+
* | `color` | `string` | Line color as a `#rrggbb` hex string |
|
|
12
|
+
* | `showStart` | `boolean` | Whether the start-end tag bubble is shown |
|
|
13
|
+
* | `showEnd` | `boolean` | Whether the end-end tag bubble is shown |
|
|
14
|
+
*/
|
|
15
|
+
export declare const PluginGridLineProps: z.ZodObject<{
|
|
16
|
+
style: z.ZodEnum<{
|
|
17
|
+
SOLID: "SOLID";
|
|
18
|
+
DASHED: "DASHED";
|
|
19
|
+
DOT_DASH: "DOT_DASH";
|
|
20
|
+
}>;
|
|
21
|
+
weight: z.ZodNumber;
|
|
22
|
+
color: z.ZodString;
|
|
23
|
+
showStart: z.ZodBoolean;
|
|
24
|
+
showEnd: z.ZodBoolean;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type PluginGridLineProps = z.infer<typeof PluginGridLineProps>;
|
|
27
|
+
/**
|
|
28
|
+
* One grid line within a wing.
|
|
29
|
+
*
|
|
30
|
+
* | Property | Type | Description |
|
|
31
|
+
* |---|---|---|
|
|
32
|
+
* | `curve` | {@linkcode CurveHandle} | The line's geometry in **world space** (a line or arc; read coordinates via `core.geom.curve`) |
|
|
33
|
+
* | `tag` | `string` | The line's grid tag (e.g. `"A"`, `"3"`) |
|
|
34
|
+
* | `visible` | `boolean` | Persisted per-line visibility |
|
|
35
|
+
* | `props` | {@linkcode PluginGridLineProps} | **Effective** visual properties (group defaults merged with this line's overrides) |
|
|
36
|
+
* | `overrides` | `Partial<`{@linkcode PluginGridLineProps}`>`? | This line's raw overrides, when any exist |
|
|
37
|
+
*/
|
|
38
|
+
export declare const PluginGridLineRecord: z.ZodObject<{
|
|
39
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"arc">, string>>]>;
|
|
40
|
+
tag: z.ZodString;
|
|
41
|
+
visible: z.ZodBoolean;
|
|
42
|
+
props: z.ZodObject<{
|
|
43
|
+
style: z.ZodEnum<{
|
|
44
|
+
SOLID: "SOLID";
|
|
45
|
+
DASHED: "DASHED";
|
|
46
|
+
DOT_DASH: "DOT_DASH";
|
|
47
|
+
}>;
|
|
48
|
+
weight: z.ZodNumber;
|
|
49
|
+
color: z.ZodString;
|
|
50
|
+
showStart: z.ZodBoolean;
|
|
51
|
+
showEnd: z.ZodBoolean;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
overrides: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
SOLID: "SOLID";
|
|
56
|
+
DASHED: "DASHED";
|
|
57
|
+
DOT_DASH: "DOT_DASH";
|
|
58
|
+
}>>;
|
|
59
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
color: z.ZodOptional<z.ZodString>;
|
|
61
|
+
showStart: z.ZodOptional<z.ZodBoolean>;
|
|
62
|
+
showEnd: z.ZodOptional<z.ZodBoolean>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
export type PluginGridLineRecord = z.infer<typeof PluginGridLineRecord>;
|
|
66
|
+
/**
|
|
67
|
+
* One wing of a grid — a family of parallel lines sharing a local frame.
|
|
68
|
+
* `spacing` and `span` are measured along the wing's local axes in
|
|
69
|
+
* Snaptrude units; line addresses used by mutating APIs are
|
|
70
|
+
* `{ wing, line }` index pairs into these arrays.
|
|
71
|
+
*
|
|
72
|
+
* | Property | Type | Description |
|
|
73
|
+
* |---|---|---|
|
|
74
|
+
* | `spacing` | `number` | Nominal spacing between adjacent lines (Snaptrude units) |
|
|
75
|
+
* | `tagStart` | `string` | First tag of the wing's deterministic tag sequence |
|
|
76
|
+
* | `span` | `{ min: number; max: number }`? | Explicit family length along the wing's line axis, when baked |
|
|
77
|
+
* | `lines` | {@linkcode PluginGridLineRecord}`[]` | The wing's lines, in wing order (index = the `line` address) |
|
|
78
|
+
*/
|
|
79
|
+
export declare const PluginGridWingRecord: z.ZodObject<{
|
|
80
|
+
spacing: z.ZodNumber;
|
|
81
|
+
tagStart: z.ZodString;
|
|
82
|
+
span: z.ZodOptional<z.ZodObject<{
|
|
83
|
+
min: z.ZodNumber;
|
|
84
|
+
max: z.ZodNumber;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
87
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"arc">, string>>]>;
|
|
88
|
+
tag: z.ZodString;
|
|
89
|
+
visible: z.ZodBoolean;
|
|
90
|
+
props: z.ZodObject<{
|
|
91
|
+
style: z.ZodEnum<{
|
|
92
|
+
SOLID: "SOLID";
|
|
93
|
+
DASHED: "DASHED";
|
|
94
|
+
DOT_DASH: "DOT_DASH";
|
|
95
|
+
}>;
|
|
96
|
+
weight: z.ZodNumber;
|
|
97
|
+
color: z.ZodString;
|
|
98
|
+
showStart: z.ZodBoolean;
|
|
99
|
+
showEnd: z.ZodBoolean;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
overrides: z.ZodOptional<z.ZodObject<{
|
|
102
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
103
|
+
SOLID: "SOLID";
|
|
104
|
+
DASHED: "DASHED";
|
|
105
|
+
DOT_DASH: "DOT_DASH";
|
|
106
|
+
}>>;
|
|
107
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
color: z.ZodOptional<z.ZodString>;
|
|
109
|
+
showStart: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
showEnd: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
}, z.core.$strip>>;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
export type PluginGridWingRecord = z.infer<typeof PluginGridWingRecord>;
|
|
115
|
+
/**
|
|
116
|
+
* Per-storey 2D-plan visibility of a grid.
|
|
117
|
+
*
|
|
118
|
+
* | Property | Type | Description |
|
|
119
|
+
* |---|---|---|
|
|
120
|
+
* | `activeStorey` | `number` | The storey the grid belongs to |
|
|
121
|
+
* | `disabledOnStoreys` | `number[]` | Storeys on whose 2D plan the grid is hidden |
|
|
122
|
+
*/
|
|
123
|
+
export declare const PluginGridStoreyVisibility: z.ZodObject<{
|
|
124
|
+
activeStorey: z.ZodNumber;
|
|
125
|
+
disabledOnStoreys: z.ZodArray<z.ZodNumber>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
export type PluginGridStoreyVisibility = z.infer<typeof PluginGridStoreyVisibility>;
|
|
128
|
+
/**
|
|
129
|
+
* Property names readable via {@linkcode PluginDesignQueryGridsApi.get}.
|
|
130
|
+
*
|
|
131
|
+
* | Value | Description |
|
|
132
|
+
* |---|---|
|
|
133
|
+
* | `"angle"` | World rotation about +Y, in **degrees** |
|
|
134
|
+
* | `"props"` | Group-level default line properties |
|
|
135
|
+
* | `"storeyVisibility"` | Active storey + storeys where the grid is hidden in 2D |
|
|
136
|
+
* | `"wings"` | Full wing/line structure with world-space curve handles |
|
|
137
|
+
* | `"bounds"` | World-space axis-aligned bounding box of the grid geometry |
|
|
138
|
+
*/
|
|
139
|
+
export declare const PluginGridGetProperty: z.ZodEnum<{
|
|
140
|
+
angle: "angle";
|
|
141
|
+
props: "props";
|
|
142
|
+
storeyVisibility: "storeyVisibility";
|
|
143
|
+
wings: "wings";
|
|
144
|
+
bounds: "bounds";
|
|
145
|
+
}>;
|
|
146
|
+
export type PluginGridGetProperty = z.infer<typeof PluginGridGetProperty>;
|
|
147
|
+
/**
|
|
148
|
+
* Arguments for {@linkcode PluginDesignQueryGridsApi.get}.
|
|
149
|
+
*
|
|
150
|
+
* | Property | Type | Description |
|
|
151
|
+
* |---|---|---|
|
|
152
|
+
* | `gridId` | `string` | The grid group ID to query |
|
|
153
|
+
* | `properties` | {@linkcode PluginGridGetProperty}`[]` | Properties to retrieve |
|
|
154
|
+
*/
|
|
155
|
+
export declare const PluginGridGetArgs: z.ZodObject<{
|
|
156
|
+
gridId: z.ZodString;
|
|
157
|
+
properties: z.ZodArray<z.ZodEnum<{
|
|
158
|
+
angle: "angle";
|
|
159
|
+
props: "props";
|
|
160
|
+
storeyVisibility: "storeyVisibility";
|
|
161
|
+
wings: "wings";
|
|
162
|
+
bounds: "bounds";
|
|
163
|
+
}>>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export type PluginGridGetArgs = z.infer<typeof PluginGridGetArgs>;
|
|
166
|
+
/**
|
|
167
|
+
* Result of {@linkcode PluginDesignQueryGridsApi.get} — only the requested
|
|
168
|
+
* properties are present.
|
|
169
|
+
*/
|
|
170
|
+
export declare const PluginGridGetResult: z.ZodObject<{
|
|
171
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
props: z.ZodOptional<z.ZodObject<{
|
|
173
|
+
style: z.ZodEnum<{
|
|
174
|
+
SOLID: "SOLID";
|
|
175
|
+
DASHED: "DASHED";
|
|
176
|
+
DOT_DASH: "DOT_DASH";
|
|
177
|
+
}>;
|
|
178
|
+
weight: z.ZodNumber;
|
|
179
|
+
color: z.ZodString;
|
|
180
|
+
showStart: z.ZodBoolean;
|
|
181
|
+
showEnd: z.ZodBoolean;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
storeyVisibility: z.ZodOptional<z.ZodObject<{
|
|
184
|
+
activeStorey: z.ZodNumber;
|
|
185
|
+
disabledOnStoreys: z.ZodArray<z.ZodNumber>;
|
|
186
|
+
}, z.core.$strip>>;
|
|
187
|
+
wings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
188
|
+
spacing: z.ZodNumber;
|
|
189
|
+
tagStart: z.ZodString;
|
|
190
|
+
span: z.ZodOptional<z.ZodObject<{
|
|
191
|
+
min: z.ZodNumber;
|
|
192
|
+
max: z.ZodNumber;
|
|
193
|
+
}, z.core.$strip>>;
|
|
194
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
195
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"arc">, string>>]>;
|
|
196
|
+
tag: z.ZodString;
|
|
197
|
+
visible: z.ZodBoolean;
|
|
198
|
+
props: z.ZodObject<{
|
|
199
|
+
style: z.ZodEnum<{
|
|
200
|
+
SOLID: "SOLID";
|
|
201
|
+
DASHED: "DASHED";
|
|
202
|
+
DOT_DASH: "DOT_DASH";
|
|
203
|
+
}>;
|
|
204
|
+
weight: z.ZodNumber;
|
|
205
|
+
color: z.ZodString;
|
|
206
|
+
showStart: z.ZodBoolean;
|
|
207
|
+
showEnd: z.ZodBoolean;
|
|
208
|
+
}, z.core.$strip>;
|
|
209
|
+
overrides: z.ZodOptional<z.ZodObject<{
|
|
210
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
211
|
+
SOLID: "SOLID";
|
|
212
|
+
DASHED: "DASHED";
|
|
213
|
+
DOT_DASH: "DOT_DASH";
|
|
214
|
+
}>>;
|
|
215
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
color: z.ZodOptional<z.ZodString>;
|
|
217
|
+
showStart: z.ZodOptional<z.ZodBoolean>;
|
|
218
|
+
showEnd: z.ZodOptional<z.ZodBoolean>;
|
|
219
|
+
}, z.core.$strip>>;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
}, z.core.$strip>>>;
|
|
222
|
+
bounds: z.ZodOptional<z.ZodObject<{
|
|
223
|
+
min: z.ZodObject<{
|
|
224
|
+
x: z.ZodNumber;
|
|
225
|
+
y: z.ZodNumber;
|
|
226
|
+
z: z.ZodNumber;
|
|
227
|
+
}, z.core.$strip>;
|
|
228
|
+
max: z.ZodObject<{
|
|
229
|
+
x: z.ZodNumber;
|
|
230
|
+
y: z.ZodNumber;
|
|
231
|
+
z: z.ZodNumber;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
}, z.core.$strip>>;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
export type PluginGridGetResult = z.infer<typeof PluginGridGetResult>;
|
|
236
|
+
/**
|
|
237
|
+
* `design.query.grids.*` — structural-grid-specific reads.
|
|
238
|
+
*
|
|
239
|
+
* A **grid** (grid group) is a structural/documentation grid: one or more
|
|
240
|
+
* *wings* (families of parallel lines with a shared local frame), each holding
|
|
241
|
+
* tagged grid *lines* (straight lines, or a lone arc). Enumerate grids with
|
|
242
|
+
* `design.query.listGrids`; read an individual grid's structure here.
|
|
243
|
+
*
|
|
244
|
+
* Lines have no stable identity of their own — mutating APIs address them
|
|
245
|
+
* positionally as `{ wing, line }` index pairs into the `wings` arrays
|
|
246
|
+
* returned by {@linkcode get}. Structural edits (adding/removing lines,
|
|
247
|
+
* count changes) re-index lines; re-query after mutating.
|
|
248
|
+
*
|
|
249
|
+
* Accessed via `snaptrude.design.query.grids`.
|
|
250
|
+
*/
|
|
251
|
+
export declare abstract class PluginDesignQueryGridsApi {
|
|
252
|
+
constructor();
|
|
253
|
+
/**
|
|
254
|
+
* Get properties of a grid by its ID.
|
|
255
|
+
*
|
|
256
|
+
* Only the properties listed in `properties` are returned — unlisted
|
|
257
|
+
* properties will be `undefined` in the result. `wings` is the heavy
|
|
258
|
+
* read (it registers a world-space {@linkcode CurveHandle} per line);
|
|
259
|
+
* request it only when the geometry is needed.
|
|
260
|
+
*
|
|
261
|
+
* Units: `angle` is in **degrees** (positive = CCW about +Y); `spacing`,
|
|
262
|
+
* `span`, `bounds`, and curve coordinates are in **Snaptrude units**,
|
|
263
|
+
* world space.
|
|
264
|
+
*
|
|
265
|
+
* @param gridId - The unique grid group ID
|
|
266
|
+
* @param properties - Array of property names to retrieve. See
|
|
267
|
+
* {@linkcode PluginGridGetProperty}.
|
|
268
|
+
* @returns A partial {@linkcode PluginGridGetResult} containing only the
|
|
269
|
+
* requested properties
|
|
270
|
+
* @throws If the grid does not exist
|
|
271
|
+
*
|
|
272
|
+
* @examplePrompt What is the spacing of this grid?
|
|
273
|
+
* @examplePrompt Read the grid line tags on this structural grid
|
|
274
|
+
* @examplePrompt Get the geometry of every line in this grid
|
|
275
|
+
* @examplePrompt Which storeys is this grid hidden on?
|
|
276
|
+
*
|
|
277
|
+
* # Example
|
|
278
|
+
* ```ts
|
|
279
|
+
* const [grid] = await snaptrude.design.query.listGrids()
|
|
280
|
+
* const { wings } = await snaptrude.design.query.grids.get(grid, ["wings"])
|
|
281
|
+
* // wings[0].lines[0].curve is an opaque CurveHandle in world space;
|
|
282
|
+
* // read its coordinates via `snaptrude.core.geom.curve`.
|
|
283
|
+
* ```
|
|
284
|
+
*/
|
|
285
|
+
abstract get(gridId: string, properties: z.infer<typeof PluginGridGetProperty>[]): PluginApiReturn<PluginGridGetResult>;
|
|
286
|
+
}
|
|
287
|
+
//# sourceMappingURL=grids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grids.d.ts","sourceRoot":"","sources":["../../../../src/api/design/query/grids.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAQhD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;iBAM9B,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM/B,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK/B,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;;;iBAGrC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAMnF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB;;;;;;EAMhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;iBAG5B,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEjE;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQpB,CAAA;AACZ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAMrE;;;;;;;;;;;;;;GAcG;AACH,8BAAsB,yBAAyB;;IAG7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;aACa,GAAG,CACjB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,EAAE,GAClD,eAAe,CAAC,mBAAmB,CAAC;CACxC"}
|