@bitbybit-dev/manifold 1.4.1 → 1.5.0

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.
Files changed (40) hide show
  1. package/lib/api/dto-registry.js +13 -4
  2. package/lib/api/inputs/manifold-inputs.d.ts +249 -8
  3. package/lib/api/inputs/manifold-inputs.js +237 -10
  4. package/lib/api/manifold-service.d.ts +16 -9
  5. package/lib/api/manifold-service.js +21 -8
  6. package/lib/api/resolved-inputs/index.d.ts +9 -2
  7. package/lib/api/services/cross-section/cross-section-booleans.d.ts +2 -2
  8. package/lib/api/services/cross-section/cross-section-evaluate.d.ts +2 -2
  9. package/lib/api/services/cross-section/cross-section-operations.d.ts +41 -3
  10. package/lib/api/services/cross-section/cross-section-operations.js +85 -3
  11. package/lib/api/services/cross-section/cross-section-shapes.d.ts +1 -1
  12. package/lib/api/services/cross-section/cross-section-transforms.d.ts +1 -1
  13. package/lib/api/services/cross-section/cross-section.constants.d.ts +6 -0
  14. package/lib/api/services/cross-section/cross-section.constants.js +5 -0
  15. package/lib/api/services/cross-section/cross-section.d.ts +2 -2
  16. package/lib/api/services/manifold/manifold-booleans.d.ts +1 -1
  17. package/lib/api/services/manifold/manifold-evaluate.d.ts +1 -1
  18. package/lib/api/services/manifold/manifold-operations.d.ts +1 -1
  19. package/lib/api/services/manifold/manifold-shapes.d.ts +1 -1
  20. package/lib/api/services/manifold/manifold-shapes.js +2 -17
  21. package/lib/api/services/manifold/manifold-transforms.d.ts +1 -1
  22. package/lib/api/services/manifold/manifold.d.ts +2 -2
  23. package/lib/api/services/mesh/mesh-evaluate.d.ts +1 -1
  24. package/lib/api/services/mesh/mesh-operations.d.ts +2 -2
  25. package/lib/api/services/mesh/mesh.d.ts +1 -1
  26. package/lib/api/services/mesh-data.d.ts +4 -0
  27. package/lib/api/services/mesh-data.js +23 -0
  28. package/lib/api/services/recipes/recipe-executor.d.ts +5 -0
  29. package/lib/api/services/recipes/recipe-executor.js +339 -0
  30. package/lib/api/services/recipes/recipe-loft.d.ts +3 -0
  31. package/lib/api/services/recipes/recipe-loft.js +85 -0
  32. package/lib/api/services/recipes/recipe-meshes.d.ts +5 -0
  33. package/lib/api/services/recipes/recipe-meshes.js +46 -0
  34. package/lib/api/services/recipes/recipe-types.d.ts +4 -0
  35. package/lib/api/services/recipes/recipe-types.js +1 -0
  36. package/lib/api/services/recipes/recipes.constants.d.ts +3 -0
  37. package/lib/api/services/recipes/recipes.constants.js +3 -0
  38. package/lib/api/services/recipes/recipes.d.ts +71 -0
  39. package/lib/api/services/recipes/recipes.js +104 -0
  40. package/package.json +2 -2
@@ -1,7 +1,8 @@
1
- // GENERATED by scripts/gen-dto-meta.mjs from the ManifoldService surface - do not edit.
2
- // Regenerate with `npm run gen:dto-meta` at the repository root.
1
+ // GENERATED by scripts/gen-dto-meta.mjs from the ManifoldService surface - do not edit; regenerate with `npm run gen:dto-meta`.
3
2
  import { constraintKinds as k } from "@bitbybit-dev/base";
4
3
  import * as Inputs from "./inputs";
4
+ const Manifold_BuildRecipeDto = { recipe: k.required(k.opaque), circularSegments: k.between(k.number, { min: 3 }), adjustZtoY: k.boolean, emptyWhenFailed: k.boolean };
5
+ const Manifold_BuildRecipeMeshesDto = { recipe: k.required(k.opaque), circularSegments: k.between(k.number, { min: 3 }), adjustZtoY: k.boolean, emptyWhenFailed: k.boolean, minSharpAngle: k.between(k.number, { min: 0, max: 180 }) };
5
6
  const Manifold_CalculateCurvatureDto = { manifold: k.required(k.opaque), gaussianIdx: k.between(k.number, { min: 0 }), meanIdx: k.between(k.number, { min: 0 }) };
6
7
  const Manifold_CalculateNormalsDto = { manifold: k.required(k.opaque), normalIdx: k.between(k.number, { min: 0 }), minSharpAngle: k.between(k.number, { min: 0 }) };
7
8
  const Manifold_CircleDto = { radius: k.between(k.number, { min: 0 }), circularSegments: k.between(k.number, { min: 0 }) };
@@ -16,11 +17,12 @@ const Manifold_CrossSectionsDto = { crossSections: k.required(k.list(k.opaque))
16
17
  const Manifold_CrossSectionWarpDto = { crossSection: k.required(k.opaque), warpFunc: k.required(k.opaque) };
17
18
  const Manifold_CubeDto = { center: k.boolean, size: k.between(k.number, { min: 0 }) };
18
19
  const Manifold_CylinderDto = { height: k.between(k.number, { min: 0 }), radiusLow: k.between(k.number, { min: 0 }), radiusHigh: k.between(k.number, { min: 0 }), circularSegments: k.between(k.number, { min: 0 }), center: k.boolean };
19
- const Manifold_DecomposeManifoldOrCrossSectionDto = { manifoldOrCrossSection: k.required(k.opaque), normalIdx: k.number };
20
- const Manifold_DecomposeManifoldsOrCrossSectionsDto = { manifoldsOrCrossSections: k.required(k.list(k.opaque)), normalIdx: k.list(k.number) };
20
+ const Manifold_DecomposeManifoldOrCrossSectionDto = { manifoldOrCrossSection: k.required(k.opaque), normalIdx: k.number, minSharpAngle: k.between(k.number, { min: 0, max: 180 }) };
21
+ const Manifold_DecomposeManifoldsOrCrossSectionsDto = { manifoldsOrCrossSections: k.required(k.list(k.opaque)), normalIdx: k.list(k.number), minSharpAngle: k.between(k.number, { min: 0, max: 180 }) };
21
22
  const Manifold_ExtrudeDto = { crossSection: k.required(k.opaque), height: k.between(k.number, { min: 0 }), nDivisions: k.between(k.number, { min: 0 }), twistDegrees: k.number, scaleTopX: k.between(k.number, { min: 0 }), scaleTopY: k.between(k.number, { min: 0 }), center: k.boolean };
22
23
  const Manifold_FromPolygonPointsDto = { polygonPoints: k.required(k.list(k.list(k.point3))) };
23
24
  const Manifold_HullPointsDto = { points: k.required(k.opaque) };
25
+ const Manifold_LoftDto = { crossSections: k.required(k.list(k.opaque)), frames: k.required(k.list(k.opaque)) };
24
26
  const Manifold_ManifoldDto = { manifold: k.required(k.opaque) };
25
27
  const Manifold_ManifoldRefineDto = { manifold: k.required(k.opaque), number: k.between(k.number, { min: 0 }) };
26
28
  const Manifold_ManifoldRefineLengthDto = { manifold: k.required(k.opaque), length: k.between(k.number, { min: 0 }) };
@@ -43,6 +45,7 @@ const Manifold_MirrorCrossSectionDto = { crossSection: k.required(k.opaque), nor
43
45
  const Manifold_MirrorDto = { manifold: k.required(k.opaque), normal: k.vector3 };
44
46
  const Manifold_OffsetDto = { crossSection: k.required(k.opaque), delta: k.number, joinType: k.oneOf(["Square", "Round", "Miter", "Bevel"]), miterLimit: k.between(k.number, { min: 2 }), circularSegments: k.between(k.number, { min: 0 }) };
45
47
  const Manifold_RayCastDto = { manifold: k.required(k.opaque), origin: k.point3, endpoint: k.point3 };
48
+ const Manifold_RecipeSurfaceMeshesDto = { recipe: k.required(k.opaque), roots: k.list(k.number), adjustZtoY: k.boolean };
46
49
  const Manifold_RectangleDto = { length: k.between(k.number, { min: 0 }), height: k.between(k.number, { min: 0 }), center: k.boolean };
47
50
  const Manifold_RevolveDto = { crossSection: k.required(k.opaque), revolveDegrees: k.between(k.number, { min: 0, exclusiveMin: true }), matchProfile: k.boolean, circularSegments: k.between(k.number, { min: 0 }) };
48
51
  const Manifold_RotateCrossSectionDto = { crossSection: k.required(k.opaque), degrees: k.number };
@@ -58,6 +61,7 @@ const Manifold_SplitByPlaneDto = { manifold: k.required(k.opaque), normal: k.vec
58
61
  const Manifold_SplitByPlaneOnOffsetsDto = { manifold: k.required(k.opaque), normal: k.vector3, originOffsets: k.list(k.number) };
59
62
  const Manifold_SplitManifoldsDto = { manifoldToSplit: k.required(k.opaque), manifoldCutter: k.required(k.opaque) };
60
63
  const Manifold_SquareDto = { center: k.boolean, size: k.between(k.number, { min: 0 }) };
64
+ const Manifold_SweepDto = { crossSection: k.required(k.opaque), path: k.required(k.list(k.point3)), cornerRadius: k.between(k.number, { min: 0 }), circularSegments: k.between(k.number, { min: 3 }), xDirection: k.vector3 };
61
65
  const Manifold_TransformCrossSectionDto = { crossSection: k.required(k.opaque), transform: k.required(k.opaque) };
62
66
  const Manifold_TransformDto = { manifold: k.required(k.opaque), transform: k.required(k.opaque) };
63
67
  const Manifold_TransformsDto = { manifold: k.required(k.opaque), transforms: k.required(k.opaque) };
@@ -102,9 +106,11 @@ export const manifoldDtoRegistry = {
102
106
  "crossSection.operations.decompose": { dto: Inputs.Manifold.CrossSectionDto, constraints: Manifold_CrossSectionDto },
103
107
  "crossSection.operations.extrude": { dto: Inputs.Manifold.ExtrudeDto, constraints: Manifold_ExtrudeDto },
104
108
  "crossSection.operations.hull": { dto: Inputs.Manifold.CrossSectionDto, constraints: Manifold_CrossSectionDto },
109
+ "crossSection.operations.loft": { dto: Inputs.Manifold.LoftDto, constraints: Manifold_LoftDto },
105
110
  "crossSection.operations.offset": { dto: Inputs.Manifold.OffsetDto, constraints: Manifold_OffsetDto },
106
111
  "crossSection.operations.revolve": { dto: Inputs.Manifold.RevolveDto, constraints: Manifold_RevolveDto },
107
112
  "crossSection.operations.simplify": { dto: Inputs.Manifold.SimplifyDto, constraints: Manifold_SimplifyDto },
113
+ "crossSection.operations.sweep": { dto: Inputs.Manifold.SweepDto, constraints: Manifold_SweepDto },
108
114
  "crossSection.shapes.circle": { dto: Inputs.Manifold.CircleDto, constraints: Manifold_CircleDto },
109
115
  "crossSection.shapes.create": { dto: Inputs.Manifold.CreateContourSectionDto, constraints: Manifold_CreateContourSectionDto },
110
116
  "crossSection.shapes.rectangle": { dto: Inputs.Manifold.RectangleDto, constraints: Manifold_RectangleDto },
@@ -198,5 +204,8 @@ export const manifoldDtoRegistry = {
198
204
  "mesh.evaluate.transform": { dto: Inputs.Manifold.MeshTriangleRunIndexDto, constraints: Manifold_MeshTriangleRunIndexDto },
199
205
  "mesh.evaluate.verts": { dto: Inputs.Manifold.MeshTriangleIndexDto, constraints: Manifold_MeshTriangleIndexDto },
200
206
  "mesh.operations.merge": { dto: Inputs.Manifold.MeshDto, constraints: Manifold_MeshDto },
207
+ "recipes.build": { dto: Inputs.Manifold.BuildRecipeDto, constraints: Manifold_BuildRecipeDto },
208
+ "recipes.meshes": { dto: Inputs.Manifold.BuildRecipeMeshesDto, constraints: Manifold_BuildRecipeMeshesDto },
209
+ "recipes.surfaceMeshes": { dto: Inputs.Manifold.RecipeSurfaceMeshesDto, constraints: Manifold_RecipeSurfaceMeshesDto },
201
210
  "toPolygonPoints": { dto: Inputs.Manifold.ManifoldDto, constraints: Manifold_ManifoldDto },
202
211
  };
@@ -125,7 +125,7 @@ export declare namespace Manifold {
125
125
  /**
126
126
  * Provide options without default values
127
127
  */
128
- constructor(manifoldOrCrossSection?: T, faceOpacity?: number, faceMaterial?: M, faceColour?: Base.Color, crossSectionColour?: Base.Color, crossSectionWidth?: number, crossSectionOpacity?: number, computeNormals?: boolean, drawTwoSided?: boolean, backFaceColour?: Base.Color, backFaceOpacity?: number);
128
+ constructor(manifoldOrCrossSection?: T, faceOpacity?: number, faceMaterial?: M, faceColour?: Base.Color, crossSectionColour?: Base.Color, crossSectionWidth?: number, crossSectionOpacity?: number, computeNormals?: boolean, drawTwoSided?: boolean, backFaceColour?: Base.Color, backFaceOpacity?: number, minSharpAngle?: number);
129
129
  /**
130
130
  * The solid or cross-section to draw.
131
131
  * @default undefined
@@ -170,10 +170,20 @@ export declare namespace Manifold {
170
170
  */
171
171
  crossSectionOpacity?: number | undefined;
172
172
  /**
173
- * When true, normals are computed for the mesh so it shades smoothly.
174
- * @default false
173
+ * When true, solids shade smoothly across edges flatter than `minSharpAngle` and keep sharper
174
+ * ones crisp; when false, every face is shaded flat.
175
+ * @default true
175
176
  */
176
177
  computeNormals?: boolean | undefined;
178
+ /**
179
+ * The angle between two faces, in degrees, above which their shared edge is drawn sharp when
180
+ * `computeNormals` is true.
181
+ * @default 40
182
+ * @minimum 0
183
+ * @maximum 180
184
+ * @step 5
185
+ */
186
+ minSharpAngle?: number | undefined;
177
187
  /**
178
188
  * When true, the back of each face is drawn in its own color, which shows which way faces
179
189
  * point.
@@ -202,7 +212,7 @@ export declare namespace Manifold {
202
212
  /**
203
213
  * Provide options without default values
204
214
  */
205
- constructor(manifoldsOrCrossSections?: T[], faceOpacity?: number, faceMaterial?: M, faceColour?: Base.Color, crossSectionColour?: Base.Color, crossSectionWidth?: number, crossSectionOpacity?: number, computeNormals?: boolean, drawTwoSided?: boolean, backFaceColour?: Base.Color, backFaceOpacity?: number);
215
+ constructor(manifoldsOrCrossSections?: T[], faceOpacity?: number, faceMaterial?: M, faceColour?: Base.Color, crossSectionColour?: Base.Color, crossSectionWidth?: number, crossSectionOpacity?: number, computeNormals?: boolean, drawTwoSided?: boolean, backFaceColour?: Base.Color, backFaceOpacity?: number, minSharpAngle?: number);
206
216
  /**
207
217
  * The solids or cross-sections to draw with the same options.
208
218
  * @default undefined
@@ -247,10 +257,20 @@ export declare namespace Manifold {
247
257
  */
248
258
  crossSectionOpacity?: number | undefined;
249
259
  /**
250
- * When true, normals are computed for the meshes so they shade smoothly.
251
- * @default false
260
+ * When true, solids shade smoothly across edges flatter than `minSharpAngle` and keep sharper
261
+ * ones crisp; when false, every face is shaded flat.
262
+ * @default true
252
263
  */
253
264
  computeNormals?: boolean | undefined;
265
+ /**
266
+ * The angle between two faces, in degrees, above which their shared edge is drawn sharp when
267
+ * `computeNormals` is true.
268
+ * @default 40
269
+ * @minimum 0
270
+ * @maximum 180
271
+ * @step 5
272
+ */
273
+ minSharpAngle?: number | undefined;
254
274
  /**
255
275
  * When true, the back of each face is drawn in its own color, which shows which way faces
256
276
  * point.
@@ -1019,6 +1039,62 @@ export declare namespace Manifold {
1019
1039
  */
1020
1040
  circularSegments?: number | undefined;
1021
1041
  }
1042
+ /**
1043
+ * Cross-sections and the frames that place them for `crossSection.operations.loft`, which joins them
1044
+ * in order into a solid.
1045
+ */
1046
+ class LoftDto<T> {
1047
+ constructor(crossSections?: T[], frames?: Base.TransformMatrix[]);
1048
+ /**
1049
+ * One cross-section, placed by every frame, or one for each frame. Cross-sections that differ
1050
+ * need as many loops with as many corners each, as a moved or scaled copy has.
1051
+ */
1052
+ crossSections: T[];
1053
+ /**
1054
+ * Where each section stands, at least two: sixteen numbers in column-major order that place the
1055
+ * cross-section's XY plane, with 0, 0, 0, 1 as the bottom row.
1056
+ */
1057
+ frames: Base.TransformMatrix[];
1058
+ }
1059
+ /**
1060
+ * A cross-section, a path and the corner settings for `crossSection.operations.sweep`, which
1061
+ * carries the cross-section along the path into a solid.
1062
+ */
1063
+ class SweepDto<T> {
1064
+ constructor(crossSection?: T, path?: Base.Point3[], cornerRadius?: number, circularSegments?: number, xDirection?: Base.Vector3);
1065
+ /**
1066
+ * The profile to carry, drawn around the origin of its XY plane, which follows the path.
1067
+ */
1068
+ crossSection: T;
1069
+ /**
1070
+ * The points the path runs through, at least two.
1071
+ */
1072
+ path: Base.Point3[];
1073
+ /**
1074
+ * How much the path's corners are rounded; 0 keeps them sharp, mitred so the solid keeps its
1075
+ * width.
1076
+ * @default 0
1077
+ * @minimum 0
1078
+ * @maximum Infinity
1079
+ * @step 0.1
1080
+ */
1081
+ cornerRadius?: number | undefined;
1082
+ /**
1083
+ * How many segments a whole turn of a rounded corner is divided into; more is rounder.
1084
+ * @default 32
1085
+ * @minimum 3
1086
+ * @maximum Infinity
1087
+ * @step 1
1088
+ */
1089
+ circularSegments?: number | undefined;
1090
+ /**
1091
+ * Where the profile's X axis points at the start of the path, turned square to it; left out,
1092
+ * one is chosen. The profile then follows the path's turns without twisting.
1093
+ * @default undefined
1094
+ * @optional true
1095
+ */
1096
+ xDirection?: Base.Vector3 | undefined;
1097
+ }
1022
1098
  /**
1023
1099
  * A cross-section and the offset settings for `crossSection.operations.offset`.
1024
1100
  */
@@ -1586,7 +1662,7 @@ export declare namespace Manifold {
1586
1662
  * A solid or cross-section and an optional normal channel for `decomposeManifoldOrCrossSection`.
1587
1663
  */
1588
1664
  class DecomposeManifoldOrCrossSectionDto<T> {
1589
- constructor(manifoldOrCrossSection?: T, normalIdx?: number);
1665
+ constructor(manifoldOrCrossSection?: T, normalIdx?: number, minSharpAngle?: number);
1590
1666
  /**
1591
1667
  * The solid or cross-section to turn into plain data.
1592
1668
  */
@@ -1596,6 +1672,16 @@ export declare namespace Manifold {
1596
1672
  * @optional true
1597
1673
  */
1598
1674
  normalIdx?: number | undefined;
1675
+ /**
1676
+ * When given, a solid's mesh carries normals after its positions, and edges sharper than this,
1677
+ * in degrees, keep a normal on each side; 0 shades every face flat.
1678
+ * @default undefined
1679
+ * @optional true
1680
+ * @minimum 0
1681
+ * @maximum 180
1682
+ * @step 5
1683
+ */
1684
+ minSharpAngle?: number | undefined;
1599
1685
  }
1600
1686
  /**
1601
1687
  * One solid or cross-section for the methods that accept either.
@@ -1622,7 +1708,7 @@ export declare namespace Manifold {
1622
1708
  * `decomposeManifoldsOrCrossSections`.
1623
1709
  */
1624
1710
  class DecomposeManifoldsOrCrossSectionsDto<T> {
1625
- constructor(manifoldsOrCrossSections?: T[], normalIdx?: number[]);
1711
+ constructor(manifoldsOrCrossSections?: T[], normalIdx?: number[], minSharpAngle?: number);
1626
1712
  /**
1627
1713
  * The solids or cross-sections to turn into plain data, one result each.
1628
1714
  */
@@ -1632,5 +1718,160 @@ export declare namespace Manifold {
1632
1718
  * @optional true
1633
1719
  */
1634
1720
  normalIdx?: number[] | undefined;
1721
+ /**
1722
+ * When given, each solid's mesh carries normals after its positions, and edges sharper than
1723
+ * this, in degrees, keep a normal on each side; 0 shades every face flat.
1724
+ * @default undefined
1725
+ * @optional true
1726
+ * @minimum 0
1727
+ * @maximum 180
1728
+ * @step 5
1729
+ */
1730
+ minSharpAngle?: number | undefined;
1731
+ }
1732
+ /**
1733
+ * A recipe for `recipes.build`, which builds each of its roots as a solid, with how finely circles
1734
+ * are divided and whether Z turns into Y. Experimental: the recipe format may still change.
1735
+ * @beta
1736
+ */
1737
+ class BuildRecipeDto {
1738
+ constructor(recipe?: Base.Recipe, circularSegments?: number, adjustZtoY?: boolean, emptyWhenFailed?: boolean);
1739
+ /**
1740
+ * The recipe: steps such as polygons, extrusions and cuts, and the roots to build from them, as
1741
+ * a package that describes geometry as data writes it.
1742
+ * @default undefined
1743
+ */
1744
+ recipe: Base.Recipe;
1745
+ /**
1746
+ * How many flat sides each circle of the recipe is divided into; more is rounder. The recipe
1747
+ * leaves this to the kernel, so it is chosen here.
1748
+ * @default 32
1749
+ * @minimum 3
1750
+ * @maximum Infinity
1751
+ * @step 1
1752
+ */
1753
+ circularSegments?: number | undefined;
1754
+ /**
1755
+ * When true, each solid turns a quarter turn about X so the recipe's Z points along Y, which is
1756
+ * up when drawn: `(x, y, z)` becomes `(x, z, -y)`.
1757
+ * @default false
1758
+ */
1759
+ adjustZtoY?: boolean | undefined;
1760
+ /**
1761
+ * When true, a root that cannot be built, such as an open mesh, comes back empty, and an
1762
+ * opening that cannot is left uncut; when false, both stop the build.
1763
+ * @default false
1764
+ */
1765
+ emptyWhenFailed?: boolean | undefined;
1766
+ }
1767
+ /**
1768
+ * A recipe for `recipes.surfaceMeshes`, which gives the roots made of triangle meshes alone as
1769
+ * meshes, with which roots to read and whether Z turns into Y. Experimental: the recipe format may
1770
+ * still change.
1771
+ * @beta
1772
+ */
1773
+ class RecipeSurfaceMeshesDto {
1774
+ constructor(recipe?: Base.Recipe, roots?: number[], adjustZtoY?: boolean);
1775
+ /**
1776
+ * The recipe: steps such as polygons, extrusions and triangle meshes, and the roots to build
1777
+ * from them, as a package that describes geometry as data writes it.
1778
+ * @default undefined
1779
+ */
1780
+ recipe: Base.Recipe;
1781
+ /**
1782
+ * The positions of the roots to read, such as the ones `recipes.build` gave back empty; every
1783
+ * root when left out.
1784
+ * @default undefined
1785
+ * @optional true
1786
+ */
1787
+ roots?: number[] | undefined;
1788
+ /**
1789
+ * When true, each mesh turns a quarter turn about X so the recipe's Z points along Y, as
1790
+ * `recipes.build` turns its solids: `(x, y, z)` becomes `(x, z, -y)`.
1791
+ * @default false
1792
+ */
1793
+ adjustZtoY?: boolean | undefined;
1794
+ }
1795
+ /**
1796
+ * A recipe for `recipes.meshes`, which gives the meshes its roots draw, with how finely circles are
1797
+ * divided, whether Z turns into Y, whether failures are skipped and where normals split.
1798
+ * Experimental: the recipe format may still change.
1799
+ * @beta
1800
+ */
1801
+ class BuildRecipeMeshesDto {
1802
+ constructor(recipe?: Base.Recipe, circularSegments?: number, adjustZtoY?: boolean, emptyWhenFailed?: boolean, minSharpAngle?: number);
1803
+ /**
1804
+ * The recipe: steps such as polygons, extrusions and cuts, and the roots to draw from them, as
1805
+ * a package that describes geometry as data writes it.
1806
+ * @default undefined
1807
+ */
1808
+ recipe: Base.Recipe;
1809
+ /**
1810
+ * How many flat sides each circle of the recipe is divided into; more is rounder.
1811
+ * @default 32
1812
+ * @minimum 3
1813
+ * @maximum Infinity
1814
+ * @step 1
1815
+ */
1816
+ circularSegments?: number | undefined;
1817
+ /**
1818
+ * When true, every placement turns a quarter turn about X so the recipe's Z points along Y,
1819
+ * which is up when drawn: `(x, y, z)` becomes `(x, z, -y)`.
1820
+ * @default false
1821
+ */
1822
+ adjustZtoY?: boolean | undefined;
1823
+ /**
1824
+ * When true, a root that cannot be built draws as its surface if it is triangles alone, else
1825
+ * draws nothing; when false, it stops the build.
1826
+ * @default false
1827
+ */
1828
+ emptyWhenFailed?: boolean | undefined;
1829
+ /**
1830
+ * Edges sharper than this, in degrees, keep a normal on each side; 0 shades every face flat.
1831
+ * @default 40
1832
+ * @minimum 0
1833
+ * @maximum 180
1834
+ * @step 5
1835
+ */
1836
+ minSharpAngle?: number | undefined;
1837
+ }
1838
+ /**
1839
+ * Where one recipe root draws: which mesh, placed by which matrix, with the root's tag and group.
1840
+ * Experimental: the recipe format may still change.
1841
+ * @beta
1842
+ */
1843
+ class RecipeMeshPlacementDto {
1844
+ /**
1845
+ * The index of the root's mesh among the meshes, or -1 when the root gives nothing to draw.
1846
+ */
1847
+ mesh: number;
1848
+ /**
1849
+ * The column-major 4 x 4 matrix taking the mesh's coordinates to where the root draws it.
1850
+ */
1851
+ matrix: Base.TransformMatrix;
1852
+ /**
1853
+ * The root's tag, as the recipe gives it.
1854
+ */
1855
+ tag: Record<string, Base.RecipeTagValue>;
1856
+ /**
1857
+ * The root's group, a position in the recipe's groups.
1858
+ * @optional true
1859
+ */
1860
+ group?: number | undefined;
1861
+ }
1862
+ /**
1863
+ * The meshes a recipe draws, each shared one once, and one placement per root, in root order.
1864
+ * Experimental: the recipe format may still change.
1865
+ * @beta
1866
+ */
1867
+ class RecipeMeshesDto {
1868
+ /**
1869
+ * The meshes, positions and normals per vertex, each in its own coordinates.
1870
+ */
1871
+ meshes: DecomposedManifoldMeshDto[];
1872
+ /**
1873
+ * Where each root draws, in root order.
1874
+ */
1875
+ placements: RecipeMeshPlacementDto[];
1635
1876
  }
1636
1877
  }