@snaptrude/plugin-core 0.1.3 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # @snaptrude/plugin-core
2
+
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 62c32ee: exposed space geometry and get profile api
8
+
9
+ ## 0.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 4d959a4: Exposed new offset and copy APIs for tools
@@ -1,7 +1,7 @@
1
1
  import * as z from "zod";
2
2
  import { PluginApiReturn } from "../../types";
3
3
  /**
4
- * Space (room/mass) management — create, query, and delete spaces.
4
+ * Space (room/mass) management — create, query, update, and delete spaces.
5
5
  *
6
6
  * A **space** is a 3D volume representing a room or mass in the
7
7
  * Snaptrude scene. Spaces live on a particular story and carry
@@ -85,6 +85,56 @@ export declare abstract class PluginSpaceApi {
85
85
  * ```
86
86
  */
87
87
  abstract createFromProfile({ profile, extrudeHeight, position, }: PluginSpaceCreateFromProfileArgs): PluginApiReturn<PluginSpaceCreateFromProfileResult>;
88
+ /**
89
+ * Update a space's BRep and mesh geometry by extruding a 2D profile.
90
+ *
91
+ * The {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.profile profile} is
92
+ * extruded upward (along the Y axis) by
93
+ * {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.extrudeHeight extrudeHeight}
94
+ * and applied to the existing space. The space keeps the same `spaceId`,
95
+ * metadata, department, and transform; only its geometry is replaced.
96
+ *
97
+ * Profile points are interpreted in scene coordinates. Profiles returned by
98
+ * {@linkcode PluginSpaceApi.get} with `"profile"` can be passed back directly;
99
+ * `"planPoints"` can be used to construct line-only profiles in the same X/Z
100
+ * plan coordinate space.
101
+ *
102
+ * Use {@linkcode PluginProfileApi.fromLinePoints} to quickly build a profile
103
+ * from a list of points.
104
+ *
105
+ * @param args - An object containing:
106
+ * - {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.spaceId args.spaceId} —
107
+ * The unique space ID to update
108
+ * - {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.profile args.profile} —
109
+ * A closed {@linkcode PProfile} defining the new floor shape
110
+ * - {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.extrudeHeight
111
+ * args.extrudeHeight} — New extrusion height in Babylon units
112
+ * @returns A {@linkcode PluginSpaceUpdateGeometryFromProfileResult} with the
113
+ * `spaceId` of the updated space
114
+ * @throws If the space does not exist, the component is not a space/mass, the
115
+ * height is not positive, or the profile cannot create valid geometry
116
+ *
117
+ * # Example
118
+ * ```ts
119
+ * const { vec3 } = snaptrude.core.math
120
+ *
121
+ * const profile = await snaptrude.core.geom.profile.fromLinePoints({
122
+ * points: [
123
+ * vec3.new(0, 0, 0),
124
+ * vec3.new(12, 0, 0),
125
+ * vec3.new(12, 0, 6),
126
+ * vec3.new(0, 0, 6),
127
+ * ],
128
+ * })
129
+ *
130
+ * const { spaceId } = await snaptrude.entity.space.updateGeometryFromProfile({
131
+ * spaceId: "some-space-id",
132
+ * profile,
133
+ * extrudeHeight: 4,
134
+ * })
135
+ * ```
136
+ */
137
+ abstract updateGeometryFromProfile({ spaceId, profile, extrudeHeight, }: PluginSpaceUpdateGeometryFromProfileArgs): PluginApiReturn<PluginSpaceUpdateGeometryFromProfileResult>;
88
138
  /**
89
139
  * Get the IDs of all spaces in the current project.
90
140
  *
@@ -272,6 +322,68 @@ export declare const PluginSpaceCreateFromProfileResult: z.ZodObject<{
272
322
  spaceId: z.ZodString;
273
323
  }, z.core.$strip>;
274
324
  export type PluginSpaceCreateFromProfileResult = z.infer<typeof PluginSpaceCreateFromProfileResult>;
325
+ /**
326
+ * Arguments for {@linkcode PluginSpaceApi.updateGeometryFromProfile}.
327
+ *
328
+ * | Property | Type | Description |
329
+ * |---|---|---|
330
+ * | `spaceId` | `string` | Space to update |
331
+ * | `profile` | {@linkcode PProfile} | Closed 2D profile defining the new floor shape |
332
+ * | `extrudeHeight` | `number` | New extrusion height in Babylon units |
333
+ */
334
+ export declare const PluginSpaceUpdateGeometryFromProfileArgs: z.ZodObject<{
335
+ spaceId: z.ZodString;
336
+ profile: z.ZodObject<{
337
+ curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
338
+ curveType: z.ZodLiteral<"Line">;
339
+ startPoint: z.ZodObject<{
340
+ x: z.ZodNumber;
341
+ y: z.ZodNumber;
342
+ z: z.ZodNumber;
343
+ }, z.core.$strip>;
344
+ endPoint: z.ZodObject<{
345
+ x: z.ZodNumber;
346
+ y: z.ZodNumber;
347
+ z: z.ZodNumber;
348
+ }, z.core.$strip>;
349
+ }, z.core.$strip>, z.ZodObject<{
350
+ curveType: z.ZodLiteral<"Arc">;
351
+ startPoint: z.ZodObject<{
352
+ x: z.ZodNumber;
353
+ y: z.ZodNumber;
354
+ z: z.ZodNumber;
355
+ }, z.core.$strip>;
356
+ endPoint: z.ZodObject<{
357
+ x: z.ZodNumber;
358
+ y: z.ZodNumber;
359
+ z: z.ZodNumber;
360
+ }, z.core.$strip>;
361
+ centrePoint: z.ZodObject<{
362
+ x: z.ZodNumber;
363
+ y: z.ZodNumber;
364
+ z: z.ZodNumber;
365
+ }, z.core.$strip>;
366
+ axis: z.ZodObject<{
367
+ x: z.ZodNumber;
368
+ y: z.ZodNumber;
369
+ z: z.ZodNumber;
370
+ }, z.core.$strip>;
371
+ }, z.core.$strip>], "curveType">>;
372
+ }, z.core.$strip>;
373
+ extrudeHeight: z.ZodNumber;
374
+ }, z.core.$strip>;
375
+ export type PluginSpaceUpdateGeometryFromProfileArgs = z.infer<typeof PluginSpaceUpdateGeometryFromProfileArgs>;
376
+ /**
377
+ * Result of {@linkcode PluginSpaceApi.updateGeometryFromProfile}.
378
+ *
379
+ * | Property | Type | Description |
380
+ * |---|---|---|
381
+ * | `spaceId` | `string` | Unique ID of the updated space |
382
+ */
383
+ export declare const PluginSpaceUpdateGeometryFromProfileResult: z.ZodObject<{
384
+ spaceId: z.ZodString;
385
+ }, z.core.$strip>;
386
+ export type PluginSpaceUpdateGeometryFromProfileResult = z.infer<typeof PluginSpaceUpdateGeometryFromProfileResult>;
275
387
  /**
276
388
  * Available properties that can be queried on a space.
277
389
  *
@@ -309,11 +421,13 @@ export type PluginSpaceCreateFromProfileResult = z.infer<typeof PluginSpaceCreat
309
421
  * | Value | Return Type | Description |
310
422
  * |---|---|---|
311
423
  * | `"planPoints"` | {@linkcode PVec3}`[]` | Bottom outer profile points in world space with `y = 0` (2D plan). No closing duplicate point. |
424
+ * | `"profile"` | {@linkcode PProfile} | Bottom outer profile in world space, preserving line/arc curve data. |
312
425
  */
313
426
  export declare const PluginSpaceGetProperty: z.ZodEnum<{
314
427
  name: "name";
315
428
  departmentId: "departmentId";
316
429
  id: "id";
430
+ profile: "profile";
317
431
  position: "position";
318
432
  height: "height";
319
433
  depth: "depth";
@@ -345,6 +459,7 @@ export declare const PluginSpaceGetArgs: z.ZodObject<{
345
459
  name: "name";
346
460
  departmentId: "departmentId";
347
461
  id: "id";
462
+ profile: "profile";
348
463
  position: "position";
349
464
  height: "height";
350
465
  depth: "depth";
@@ -452,6 +567,43 @@ export declare const PluginSpaceGetResult: z.ZodObject<{
452
567
  y: z.ZodNumber;
453
568
  z: z.ZodNumber;
454
569
  }, z.core.$strip>>>;
570
+ profile: z.ZodOptional<z.ZodObject<{
571
+ curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
572
+ curveType: z.ZodLiteral<"Line">;
573
+ startPoint: z.ZodObject<{
574
+ x: z.ZodNumber;
575
+ y: z.ZodNumber;
576
+ z: z.ZodNumber;
577
+ }, z.core.$strip>;
578
+ endPoint: z.ZodObject<{
579
+ x: z.ZodNumber;
580
+ y: z.ZodNumber;
581
+ z: z.ZodNumber;
582
+ }, z.core.$strip>;
583
+ }, z.core.$strip>, z.ZodObject<{
584
+ curveType: z.ZodLiteral<"Arc">;
585
+ startPoint: z.ZodObject<{
586
+ x: z.ZodNumber;
587
+ y: z.ZodNumber;
588
+ z: z.ZodNumber;
589
+ }, z.core.$strip>;
590
+ endPoint: z.ZodObject<{
591
+ x: z.ZodNumber;
592
+ y: z.ZodNumber;
593
+ z: z.ZodNumber;
594
+ }, z.core.$strip>;
595
+ centrePoint: z.ZodObject<{
596
+ x: z.ZodNumber;
597
+ y: z.ZodNumber;
598
+ z: z.ZodNumber;
599
+ }, z.core.$strip>;
600
+ axis: z.ZodObject<{
601
+ x: z.ZodNumber;
602
+ y: z.ZodNumber;
603
+ z: z.ZodNumber;
604
+ }, z.core.$strip>;
605
+ }, z.core.$strip>], "curveType">>;
606
+ }, z.core.$strip>>;
455
607
  }, z.core.$strip>;
456
608
  export type PluginSpaceGetResult = z.infer<typeof PluginSpaceGetResult>;
457
609
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../../src/api/entity/space.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAK7C;;;;;;;;;;;GAWG;AACH,8BAAsB,cAAc;;IAGlC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;aACa,iBAAiB,CAAC,EAChC,QAAQ,EACR,UAAU,GACX,EAAE,gCAAgC,GAAG,eAAe,CAAC,kCAAkC,CAAC;IAEzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;aACa,iBAAiB,CAAC,EAChC,OAAO,EACP,aAAa,EACb,QAAQ,GACT,EAAE,gCAAgC,GAAG,eAAe,CAAC,kCAAkC,CAAC;IAEzF;;;;;;;;;;;;;;OAcG;aACa,MAAM,IAAI,eAAe,CAAC,uBAAuB,CAAC;IAElE;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;aACa,GAAG,CAAC,EAClB,OAAO,EACP,UAAU,GACX,EAAE,kBAAkB,GAAG,eAAe,CAAC,oBAAoB,CAAC;IAE7D;;;;;;;;;;;;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iBA2BrB,CAAA;AAEZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB;;iBAElC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;iBAEhC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,sFAAsF;AACtF,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAA;AAE1C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;EAazB,CAAA;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B;;;;;EAKtC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;eAG7B,CAAA;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQhC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB;;;;;;iBAMlC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
@@ -9,13 +9,13 @@ import { PluginUnitsApi } from "./units";
9
9
  *
10
10
  * - {@linkcode PluginApi.core} — Math and geometry primitives
11
11
  * - {@linkcode PluginApi.entity} — CRUD operations on Snaptrude entities (spaces, stories)
12
- * - {@linkcode PluginApi.tools} — Selection, transform and material tools
12
+ * - {@linkcode PluginApi.tools} — Copy, offset, selection, and transform tools
13
13
  * - {@linkcode PluginApi.units} — Unit conversion utilities
14
14
  */
15
15
  export declare abstract class PluginApi {
16
16
  /** Core math and geometry primitives. See {@linkcode PluginCoreApi}. */
17
17
  abstract core: PluginCoreApi;
18
- /** Selection, transform and material tools. See {@linkcode PluginToolsApi}. */
18
+ /** Copy, offset, selection, and transform tools. See {@linkcode PluginToolsApi}. */
19
19
  abstract tools: PluginToolsApi;
20
20
  /** CRUD operations on Snaptrude entities. See {@linkcode PluginEntityApi}. */
21
21
  abstract entity: PluginEntityApi;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;;;;;GASG;AACH,8BAAsB,SAAS;IAC7B,wEAAwE;IACxE,SAAgB,IAAI,EAAE,aAAa,CAAA;IACnC,+EAA+E;IAC/E,SAAgB,KAAK,EAAE,cAAc,CAAA;IACrC,8EAA8E;IAC9E,SAAgB,MAAM,EAAE,eAAe,CAAA;IACvC,iEAAiE;IACjE,SAAgB,KAAK,EAAE,cAAc,CAAA;;CAGtC;AAED,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;;;;;GASG;AACH,8BAAsB,SAAS;IAC7B,wEAAwE;IACxE,SAAgB,IAAI,EAAE,aAAa,CAAA;IACnC,oFAAoF;IACpF,SAAgB,KAAK,EAAE,cAAc,CAAA;IACrC,8EAA8E;IAC9E,SAAgB,MAAM,EAAE,eAAe,CAAA;IACvC,iEAAiE;IACjE,SAAgB,KAAK,EAAE,cAAc,CAAA;;CAGtC;AAED,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
@@ -0,0 +1,59 @@
1
+ import * as z from "zod";
2
+ import type { ComponentId } from "../../types";
3
+ /**
4
+ * Copy mode for `snaptrude.tools.copy`.
5
+ *
6
+ * | Value | Description |
7
+ * |---|---|
8
+ * | `"instance"` | Create instanced copies where possible |
9
+ * | `"unique"` | Create independent geometry copies |
10
+ */
11
+ export declare const PluginCopyMode: z.ZodEnum<{
12
+ instance: "instance";
13
+ unique: "unique";
14
+ }>;
15
+ export type PluginCopyMode = z.infer<typeof PluginCopyMode>;
16
+ /**
17
+ * Arguments for `snaptrude.tools.copy`.
18
+ *
19
+ * Creates one or more copies for each component in `componentIds`. Copy `i` is
20
+ * offset by `displacement * i`, where `i` starts at `1`. Source positions are
21
+ * preserved. In `"instance"` mode, a unique source mesh can be replaced by an
22
+ * instance at the same position so the source and copied objects remain in the
23
+ * same instance family. The created copy stack becomes the active editor
24
+ * selection, matching the native paste workflow.
25
+ *
26
+ * | Property | Type | Description |
27
+ * |---|---|---|
28
+ * | `componentIds` | `string[]` | Component IDs to copy |
29
+ * | `displacement` | {@linkcode PVec3} | Offset applied to each copy in Babylon units |
30
+ * | `count` | `number` | Number of copies per component. Defaults to `1` |
31
+ * | `copyMode` | {@linkcode PluginCopyMode} | `"instance"` or `"unique"`. Defaults to `"instance"` |
32
+ */
33
+ export declare const PluginCopyArgs: z.ZodObject<{
34
+ componentIds: z.ZodArray<z.ZodString>;
35
+ displacement: z.ZodObject<{
36
+ x: z.ZodNumber;
37
+ y: z.ZodNumber;
38
+ z: z.ZodNumber;
39
+ }, z.core.$strip>;
40
+ count: z.ZodOptional<z.ZodNumber>;
41
+ copyMode: z.ZodOptional<z.ZodEnum<{
42
+ instance: "instance";
43
+ unique: "unique";
44
+ }>>;
45
+ }, z.core.$strip>;
46
+ export type PluginCopyArgs = z.infer<typeof PluginCopyArgs>;
47
+ /**
48
+ * Result of `snaptrude.tools.copy`.
49
+ *
50
+ * Returned IDs are Snaptrude component IDs for the newly created copies, not
51
+ * Babylon mesh IDs.
52
+ */
53
+ export declare const PluginCopyResult: z.ZodObject<{
54
+ copiedIds: z.ZodArray<z.ZodString>;
55
+ }, z.core.$strip>;
56
+ export type PluginCopyResult = {
57
+ copiedIds: ComponentId[];
58
+ };
59
+ //# sourceMappingURL=copy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../../src/api/tools/copy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAG9C;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;EAAiC,CAAA;AAE5D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;iBAKzB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;iBAE3B,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,WAAW,EAAE,CAAA;CACzB,CAAA"}
@@ -1,22 +1,29 @@
1
- import { PluginMaterialApi } from "./material";
2
1
  import { PluginSelectionApi } from "./selection";
3
2
  import { PluginTransformApi } from "./transform";
3
+ import type { PluginApiReturn } from "../../types";
4
+ import type { PluginCopyArgs, PluginCopyResult } from "./copy";
5
+ import type { PluginOffsetArgs, PluginOffsetResult } from "./offset";
4
6
  /**
5
7
  * Snaptrude editor tools for querying and manipulating scene components.
6
8
  *
7
9
  * - {@linkcode PluginToolsApi.selection} — Query the current user selection
8
10
  * - {@linkcode PluginToolsApi.transform} — Move and rotate components
11
+ * - {@linkcode PluginToolsApi.copy} — Copy components
12
+ * - {@linkcode PluginToolsApi.offset} — Offset or split component profiles
9
13
  */
10
14
  export declare abstract class PluginToolsApi {
11
15
  /** Query the current selection. See {@linkcode PluginSelectionApi}. */
12
16
  abstract selection: PluginSelectionApi;
13
17
  /** Move and rotate components. See {@linkcode PluginTransformApi}. */
14
18
  abstract transform: PluginTransformApi;
15
- /** Apply materials to the current user selection in the Snaptrude editor or passed component ids if any. See {@linkcode PluginMaterialApi}. */
16
- abstract material: PluginMaterialApi;
19
+ /** Copy components by ID. See {@linkcode PluginCopyArgs}. */
20
+ abstract copy(args: PluginCopyArgs): PluginApiReturn<PluginCopyResult>;
21
+ /** Offset or split a component profile. See {@linkcode PluginOffsetArgs}. */
22
+ abstract offset(args: PluginOffsetArgs): PluginApiReturn<PluginOffsetResult>;
17
23
  constructor();
18
24
  }
25
+ export * from "./copy";
26
+ export * from "./offset";
19
27
  export * from "./selection";
20
28
  export * from "./transform";
21
- export * from "./material";
22
29
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD;;;;;GAKG;AACH,8BAAsB,cAAc;IAClC,uEAAuE;IACvE,SAAgB,SAAS,EAAE,kBAAkB,CAAA;IAC7C,sEAAsE;IACtE,SAAgB,SAAS,EAAE,kBAAkB,CAAA;IAC7C,+IAA+I;IAC/I,SAAgB,QAAQ,EAAE,iBAAiB,CAAA;;CAG5C;AAED,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAEpE;;;;;;;GAOG;AACH,8BAAsB,cAAc;IAClC,uEAAuE;IACvE,SAAgB,SAAS,EAAE,kBAAkB,CAAA;IAC7C,sEAAsE;IACtE,SAAgB,SAAS,EAAE,kBAAkB,CAAA;IAE7C,6DAA6D;aAC7C,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,eAAe,CAAC,gBAAgB,CAAC;IAE7E,6EAA6E;aAC7D,MAAM,CACpB,IAAI,EAAE,gBAAgB,GACrB,eAAe,CAAC,kBAAkB,CAAC;;CAGvC;AAED,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA"}
@@ -0,0 +1,43 @@
1
+ import * as z from "zod";
2
+ import type { ComponentId } from "../../types";
3
+ /**
4
+ * Arguments for `snaptrude.tools.offset`.
5
+ *
6
+ * Runs Snaptrude's offset/split operation on the top profile of a scene
7
+ * component. A positive distance offsets outward from the selected profile;
8
+ * a negative distance offsets inward. If `profilePickPoint` is omitted, the
9
+ * outer top profile is used. If `profilePickPoint` is provided, the nearest top
10
+ * contour profile to that point is used, matching the interactive offset tool's
11
+ * pick behavior.
12
+ *
13
+ * | Property | Type | Description |
14
+ * |---|---|---|
15
+ * | `componentId` | `string` | Component ID to offset |
16
+ * | `distance` | `number` | Signed offset distance in Snaptrude units |
17
+ * | `profilePickPoint` | {@linkcode PVec3} | Optional point used to choose a top contour profile |
18
+ */
19
+ export declare const PluginOffsetArgs: z.ZodObject<{
20
+ componentId: z.ZodString;
21
+ distance: z.ZodNumber;
22
+ profilePickPoint: z.ZodOptional<z.ZodObject<{
23
+ x: z.ZodNumber;
24
+ y: z.ZodNumber;
25
+ z: z.ZodNumber;
26
+ }, z.core.$strip>>;
27
+ }, z.core.$strip>;
28
+ export type PluginOffsetArgs = z.infer<typeof PluginOffsetArgs>;
29
+ /**
30
+ * Result of `snaptrude.tools.offset`.
31
+ *
32
+ * `createdIds` are the components created by the offset operation. `deletedIds`
33
+ * are components removed by split-style offsets.
34
+ */
35
+ export declare const PluginOffsetResult: z.ZodObject<{
36
+ createdIds: z.ZodArray<z.ZodString>;
37
+ deletedIds: z.ZodArray<z.ZodString>;
38
+ }, z.core.$strip>;
39
+ export type PluginOffsetResult = {
40
+ createdIds: ComponentId[];
41
+ deletedIds: ComponentId[];
42
+ };
43
+ //# sourceMappingURL=offset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offset.d.ts","sourceRoot":"","sources":["../../../src/api/tools/offset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAG9C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;iBAI3B,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,WAAW,EAAE,CAAA;IACzB,UAAU,EAAE,WAAW,EAAE,CAAA;CAC1B,CAAA"}
package/dist/index.cjs CHANGED
@@ -39,6 +39,9 @@ __export(index_exports, {
39
39
  PVec3: () => PVec3,
40
40
  PluginApi: () => PluginApi,
41
41
  PluginArcApi: () => PluginArcApi,
42
+ PluginCopyArgs: () => PluginCopyArgs,
43
+ PluginCopyMode: () => PluginCopyMode,
44
+ PluginCopyResult: () => PluginCopyResult,
42
45
  PluginCoreApi: () => PluginCoreApi,
43
46
  PluginCurveApi: () => PluginCurveApi,
44
47
  PluginDepartmentApi: () => PluginDepartmentApi,
@@ -51,10 +54,10 @@ __export(index_exports, {
51
54
  PluginGeomApi: () => PluginGeomApi,
52
55
  PluginLineApi: () => PluginLineApi,
53
56
  PluginMassType: () => PluginMassType,
54
- PluginMaterialApi: () => PluginMaterialApi,
55
- PluginMaterialArgs: () => PluginMaterialArgs,
56
57
  PluginMathApi: () => PluginMathApi,
57
58
  PluginMoveArgs: () => PluginMoveArgs,
59
+ PluginOffsetArgs: () => PluginOffsetArgs,
60
+ PluginOffsetResult: () => PluginOffsetResult,
58
61
  PluginProfileApi: () => PluginProfileApi,
59
62
  PluginProfileFromLinePointsArgs: () => PluginProfileFromLinePointsArgs,
60
63
  PluginQuatApi: () => PluginQuatApi,
@@ -81,6 +84,8 @@ __export(index_exports, {
81
84
  PluginSpaceGetResult: () => PluginSpaceGetResult,
82
85
  PluginSpaceType: () => PluginSpaceType,
83
86
  PluginSpaceUpdateArgs: () => PluginSpaceUpdateArgs,
87
+ PluginSpaceUpdateGeometryFromProfileArgs: () => PluginSpaceUpdateGeometryFromProfileArgs,
88
+ PluginSpaceUpdateGeometryFromProfileResult: () => PluginSpaceUpdateGeometryFromProfileResult,
84
89
  PluginSpaceUpdateResult: () => PluginSpaceUpdateResult,
85
90
  PluginStoryApi: () => PluginStoryApi,
86
91
  PluginStoryCreateArgs: () => PluginStoryCreateArgs,
@@ -122,8 +127,8 @@ var PluginVec3Api = class {
122
127
  * // { x: 1, y: 2, z: 3 }
123
128
  * ```
124
129
  */
125
- new(x, y, z15) {
126
- return { x, y, z: z15 };
130
+ new(x, y, z16) {
131
+ return { x, y, z: z16 };
127
132
  }
128
133
  /**
129
134
  * Add two vectors component-wise.
@@ -301,8 +306,8 @@ var PluginQuatApi = class {
301
306
  * @param w - The W (scalar) component
302
307
  * @returns A new {@linkcode PQuat}
303
308
  */
304
- new(x, y, z15, w) {
305
- return { x, y, z: z15, w };
309
+ new(x, y, z16, w) {
310
+ return { x, y, z: z16, w };
306
311
  }
307
312
  /**
308
313
  * Create an identity quaternion representing no rotation.
@@ -346,13 +351,13 @@ var PluginQuatApi = class {
346
351
  * @param z - Rotation around Z axis in **radians**
347
352
  * @returns A new {@linkcode PQuat}
348
353
  */
349
- fromEuler(x, y, z15) {
354
+ fromEuler(x, y, z16) {
350
355
  const cx = Math.cos(x / 2);
351
356
  const sx = Math.sin(x / 2);
352
357
  const cy = Math.cos(y / 2);
353
358
  const sy = Math.sin(y / 2);
354
- const cz = Math.cos(z15 / 2);
355
- const sz = Math.sin(z15 / 2);
359
+ const cz = Math.cos(z16 / 2);
360
+ const sz = Math.sin(z16 / 2);
356
361
  return {
357
362
  x: sx * cy * cz + cx * sy * sz,
358
363
  y: cx * sy * cz - sx * cy * sz,
@@ -759,6 +764,14 @@ var PluginSpaceCreateFromProfileArgs = z9.object({
759
764
  var PluginSpaceCreateFromProfileResult = z9.object({
760
765
  spaceId: z9.string()
761
766
  });
767
+ var PluginSpaceUpdateGeometryFromProfileArgs = z9.object({
768
+ spaceId: z9.string(),
769
+ profile: PProfile,
770
+ extrudeHeight: z9.number()
771
+ });
772
+ var PluginSpaceUpdateGeometryFromProfileResult = z9.object({
773
+ spaceId: z9.string()
774
+ });
762
775
  var PluginSpaceGetProperty = z9.enum([
763
776
  // Basic
764
777
  "id",
@@ -782,7 +795,8 @@ var PluginSpaceGetProperty = z9.enum([
782
795
  "rotation",
783
796
  "rotationQuaternion",
784
797
  // Derived from brep
785
- "planPoints"
798
+ "planPoints",
799
+ "profile"
786
800
  ]);
787
801
  var PluginSpaceGetArgs = z9.object({
788
802
  spaceId: z9.string(),
@@ -823,7 +837,8 @@ var PluginSpaceGetResult = z9.object({
823
837
  rotation: PVec3,
824
838
  rotationQuaternion: PQuat.nullable(),
825
839
  // Derived from brep
826
- planPoints: z9.array(PVec3)
840
+ planPoints: z9.array(PVec3),
841
+ profile: PProfile
827
842
  }).partial();
828
843
  var PluginSpaceGetAllResult = z9.object({
829
844
  spacesIds: z9.array(z9.string())
@@ -934,54 +949,58 @@ var PluginEntityApi = class {
934
949
  }
935
950
  };
936
951
 
937
- // src/api/tools/selection.ts
952
+ // src/api/tools/copy.ts
938
953
  var z11 = __toESM(require("zod"), 1);
954
+ var PluginCopyMode = z11.enum(["instance", "unique"]);
955
+ var PluginCopyArgs = z11.object({
956
+ componentIds: z11.array(z11.string()).min(1),
957
+ displacement: PVec3,
958
+ count: z11.number().int().positive().optional(),
959
+ copyMode: PluginCopyMode.optional()
960
+ });
961
+ var PluginCopyResult = z11.object({
962
+ copiedIds: z11.array(z11.string())
963
+ });
964
+
965
+ // src/api/tools/offset.ts
966
+ var z12 = __toESM(require("zod"), 1);
967
+ var PluginOffsetArgs = z12.object({
968
+ componentId: z12.string().min(1),
969
+ distance: z12.number(),
970
+ profilePickPoint: PVec3.optional()
971
+ });
972
+ var PluginOffsetResult = z12.object({
973
+ createdIds: z12.array(z12.string()),
974
+ deletedIds: z12.array(z12.string())
975
+ });
976
+
977
+ // src/api/tools/selection.ts
978
+ var z13 = __toESM(require("zod"), 1);
939
979
  var PluginSelectionApi = class {
940
980
  constructor() {
941
981
  }
942
982
  };
943
- var PluginSelectionGetResult = z11.object({
944
- selected: z11.array(z11.string())
983
+ var PluginSelectionGetResult = z13.object({
984
+ selected: z13.array(z13.string())
945
985
  });
946
986
 
947
987
  // src/api/tools/transform.ts
948
- var z12 = __toESM(require("zod"), 1);
988
+ var z14 = __toESM(require("zod"), 1);
949
989
  var PluginTransformApi = class {
950
990
  constructor() {
951
991
  }
952
992
  };
953
- var PluginMoveArgs = z12.object({
954
- componentIds: z12.array(z12.string()),
993
+ var PluginMoveArgs = z14.object({
994
+ componentIds: z14.array(z14.string()),
955
995
  displacement: PVec3
956
996
  });
957
- var PluginRotateArgs = z12.object({
958
- componentIds: z12.array(z12.string()),
959
- angle: z12.number(),
997
+ var PluginRotateArgs = z14.object({
998
+ componentIds: z14.array(z14.string()),
999
+ angle: z14.number(),
960
1000
  axis: PVec3,
961
1001
  pivot: PVec3
962
1002
  });
963
1003
 
964
- // src/api/tools/material.ts
965
- var z13 = __toESM(require("zod"), 1);
966
- var PluginMaterialApi = class {
967
- constructor() {
968
- }
969
- };
970
- var DEFAULT_MATERIALS = /* @__PURE__ */ ((DEFAULT_MATERIALS2) => {
971
- DEFAULT_MATERIALS2["GLASS"] = "glass";
972
- DEFAULT_MATERIALS2["WOOD"] = "wood";
973
- DEFAULT_MATERIALS2["METAL"] = "metal";
974
- DEFAULT_MATERIALS2["STONE"] = "stone";
975
- DEFAULT_MATERIALS2["TILES"] = "tiles";
976
- DEFAULT_MATERIALS2["CONCRETE"] = "concrete";
977
- DEFAULT_MATERIALS2["BRICK"] = "brick";
978
- return DEFAULT_MATERIALS2;
979
- })(DEFAULT_MATERIALS || {});
980
- var PluginMaterialArgs = z13.object({
981
- materialName: z13.enum(Object.values(DEFAULT_MATERIALS)),
982
- componentIds: z13.array(z13.string())
983
- });
984
-
985
1004
  // src/api/tools/index.ts
986
1005
  var PluginToolsApi = class {
987
1006
  constructor() {
@@ -989,12 +1008,12 @@ var PluginToolsApi = class {
989
1008
  };
990
1009
 
991
1010
  // src/api/units/index.ts
992
- var z14 = __toESM(require("zod"), 1);
1011
+ var z15 = __toESM(require("zod"), 1);
993
1012
  var PluginUnitsApi = class {
994
1013
  constructor() {
995
1014
  }
996
1015
  };
997
- var PUnitType = z14.enum([
1016
+ var PUnitType = z15.enum([
998
1017
  "meters",
999
1018
  "feet-inches",
1000
1019
  "inches",
@@ -1003,21 +1022,21 @@ var PUnitType = z14.enum([
1003
1022
  "kilometers",
1004
1023
  "miles"
1005
1024
  ]);
1006
- var PluginUnitsConvertFromArgs = z14.object({
1025
+ var PluginUnitsConvertFromArgs = z15.object({
1007
1026
  unit: PUnitType,
1008
- value: z14.number(),
1009
- degree: z14.number().int().min(1).max(3).optional()
1027
+ value: z15.number(),
1028
+ degree: z15.number().int().min(1).max(3).optional()
1010
1029
  });
1011
- var PluginUnitsConvertFromResult = z14.object({
1012
- value: z14.number()
1030
+ var PluginUnitsConvertFromResult = z15.object({
1031
+ value: z15.number()
1013
1032
  });
1014
- var PluginUnitsConvertToArgs = z14.object({
1033
+ var PluginUnitsConvertToArgs = z15.object({
1015
1034
  unit: PUnitType,
1016
- value: z14.number(),
1017
- degree: z14.number().int().min(1).max(3).optional()
1035
+ value: z15.number(),
1036
+ degree: z15.number().int().min(1).max(3).optional()
1018
1037
  });
1019
- var PluginUnitsConvertToResult = z14.object({
1020
- value: z14.number()
1038
+ var PluginUnitsConvertToResult = z15.object({
1039
+ value: z15.number()
1021
1040
  });
1022
1041
 
1023
1042
  // src/api/index.ts
@@ -1036,6 +1055,9 @@ var PluginApi = class {
1036
1055
  PVec3,
1037
1056
  PluginApi,
1038
1057
  PluginArcApi,
1058
+ PluginCopyArgs,
1059
+ PluginCopyMode,
1060
+ PluginCopyResult,
1039
1061
  PluginCoreApi,
1040
1062
  PluginCurveApi,
1041
1063
  PluginDepartmentApi,
@@ -1048,10 +1070,10 @@ var PluginApi = class {
1048
1070
  PluginGeomApi,
1049
1071
  PluginLineApi,
1050
1072
  PluginMassType,
1051
- PluginMaterialApi,
1052
- PluginMaterialArgs,
1053
1073
  PluginMathApi,
1054
1074
  PluginMoveArgs,
1075
+ PluginOffsetArgs,
1076
+ PluginOffsetResult,
1055
1077
  PluginProfileApi,
1056
1078
  PluginProfileFromLinePointsArgs,
1057
1079
  PluginQuatApi,
@@ -1078,6 +1100,8 @@ var PluginApi = class {
1078
1100
  PluginSpaceGetResult,
1079
1101
  PluginSpaceType,
1080
1102
  PluginSpaceUpdateArgs,
1103
+ PluginSpaceUpdateGeometryFromProfileArgs,
1104
+ PluginSpaceUpdateGeometryFromProfileResult,
1081
1105
  PluginSpaceUpdateResult,
1082
1106
  PluginStoryApi,
1083
1107
  PluginStoryCreateArgs,