@bitbybit-dev/cad-cloud-sdk 1.6.1 → 1.7.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.
@@ -1,6 +1,6 @@
1
1
  // ---------------------------------------------------------------------------
2
2
  // AUTO-GENERATED by generate-pipeline-types.ts — do not edit manually.
3
- // Generated from operation-catalog.json v1.6.1
3
+ // Generated from operation-catalog.json v1.7.0
4
4
  // ---------------------------------------------------------------------------
5
5
 
6
6
  /* eslint-disable @typescript-eslint/no-empty-object-type */
@@ -12,7 +12,9 @@ export type OperationPath =
12
12
  | "color.getRedParam"
13
13
  | "color.hexColor"
14
14
  | "color.hexToRgb"
15
+ | "color.hexToRgba"
15
16
  | "color.hexToRgbMapped"
17
+ | "color.hslToHex"
16
18
  | "color.invert"
17
19
  | "color.linearToSrgb"
18
20
  | "color.rgb1Color"
@@ -38,6 +40,29 @@ export type OperationPath =
38
40
  | "csv.parseToJsonWithHeaders"
39
41
  | "csv.queryColumn"
40
42
  | "csv.queryRowsByValue"
43
+ | "io.drawing.arcSegment"
44
+ | "io.drawing.circleSegment"
45
+ | "io.drawing.dxfToSvg"
46
+ | "io.drawing.ellipseSegment"
47
+ | "io.drawing.lineSegment"
48
+ | "io.drawing.part"
49
+ | "io.drawing.path"
50
+ | "io.drawing.polylineSegment"
51
+ | "io.drawing.splineSegment"
52
+ | "io.drawing.svgToDxf"
53
+ | "io.dxf.arcSegment"
54
+ | "io.dxf.circleSegment"
55
+ | "io.dxf.dxfCreate"
56
+ | "io.dxf.dxfRead"
57
+ | "io.dxf.ellipseSegment"
58
+ | "io.dxf.lineSegment"
59
+ | "io.dxf.path"
60
+ | "io.dxf.pathsPart"
61
+ | "io.dxf.polylineSegment"
62
+ | "io.dxf.splineSegment"
63
+ | "io.svg.pathData"
64
+ | "io.svg.svgCreate"
65
+ | "io.svg.svgRead"
41
66
  | "jscad.booleans.intersect"
42
67
  | "jscad.booleans.intersectTwo"
43
68
  | "jscad.booleans.minkowskiSum"
@@ -118,6 +143,7 @@ export type OperationPath =
118
143
  | "json.stringify"
119
144
  | "line.create"
120
145
  | "line.createSegment"
146
+ | "line.distanceToPoint"
121
147
  | "line.getEndPoint"
122
148
  | "line.getPointOnLine"
123
149
  | "line.getStartPoint"
@@ -335,6 +361,7 @@ export type OperationPath =
335
361
  | "math.moveTowards"
336
362
  | "math.multiply"
337
363
  | "math.negate"
364
+ | "math.niceStep"
338
365
  | "math.number"
339
366
  | "math.oneNrOperation"
340
367
  | "math.pi"
@@ -348,6 +375,7 @@ export type OperationPath =
348
375
  | "math.round"
349
376
  | "math.roundAndRemoveTrailingZeros"
350
377
  | "math.roundToDecimals"
378
+ | "math.shortestAngle"
351
379
  | "math.sign"
352
380
  | "math.sin"
353
381
  | "math.smoothstep"
@@ -530,6 +558,8 @@ export type OperationPath =
530
558
  | "occt.io.fileLengthUnit"
531
559
  | "occt.io.loadBrep"
532
560
  | "occt.io.loadBrepBinary"
561
+ | "occt.io.loadDxf"
562
+ | "occt.io.loadDxfStructured"
533
563
  | "occt.io.loadSTEPorIGES"
534
564
  | "occt.io.loadStl"
535
565
  | "occt.io.parseStepToJson"
@@ -537,6 +567,8 @@ export type OperationPath =
537
567
  | "occt.io.saveShapeBrepAndReturn"
538
568
  | "occt.io.saveShapeBrepBinary"
539
569
  | "occt.io.saveShapeBrepBinaryAndReturn"
570
+ | "occt.io.saveShapeDxf"
571
+ | "occt.io.saveShapeDxfAndReturn"
540
572
  | "occt.io.saveShapeObj"
541
573
  | "occt.io.saveShapeObjAndReturn"
542
574
  | "occt.io.saveShapePly"
@@ -548,6 +580,8 @@ export type OperationPath =
548
580
  | "occt.io.saveShapeSvg"
549
581
  | "occt.io.saveShapeSvgAndReturn"
550
582
  | "occt.io.shapeToDxfPaths"
583
+ | "occt.io.svgCreate"
584
+ | "occt.io.svgLayer"
551
585
  | "occt.operations.boundingBoxCenterOfShape"
552
586
  | "occt.operations.boundingBoxMaxOfShape"
553
587
  | "occt.operations.boundingBoxMinOfShape"
@@ -1090,6 +1124,8 @@ export type OperationPath =
1090
1124
  | "occt.transforms.translate"
1091
1125
  | "occt.transforms.translateShapes"
1092
1126
  | "occt.transforms.translationToMatrix"
1127
+ | "occtPro.nesting.inspect"
1128
+ | "occtPro.nesting.nest"
1093
1129
  | "occtPro.sheetMetal.unfoldFaceReport"
1094
1130
  | "occtPro.sheetMetal.unfoldFaceToFlat"
1095
1131
  | "occtPro.sheetMetal.unfoldSolidReport"
@@ -1277,19 +1313,35 @@ export interface OperationParams {
1277
1313
  * Example: '#FF5733' -> '#FF5733'
1278
1314
  */
1279
1315
  "color.hexColor": {
1280
- /** The color as a hex text such as `#ff5733`, with or without the `#`. */
1316
+ /** The color as a hex text such as `#ff5733` or `#f53`, with or without the `#`. */
1281
1317
  color?: unknown | PipelineRef;
1282
1318
  };
1283
1319
  /**
1284
1320
  * Reads a hex color into an `{ r, g, b }` object with channels from 0 to 255.
1285
1321
  *
1286
- * The text may start with or without `#`; anything else than six hex digits throws an error.
1287
- * Example: '#FF5733' -> { r: 255, g: 87, b: 51 }
1322
+ * The text holds six hex digits or three, each standing for a pair, with or without `#`;
1323
+ * anything else throws an error.
1324
+ * Example: '#FF5733' -> { r: 255, g: 87, b: 51 }, '#f53' -> { r: 255, g: 85, b: 51 }
1288
1325
  */
1289
1326
  "color.hexToRgb": {
1290
- /** The color as a hex text such as `#ff5733`, with or without the `#`. */
1327
+ /** The color as a hex text such as `#ff5733` or `#f53`, with or without the `#`. */
1291
1328
  color?: unknown | PipelineRef;
1292
1329
  };
1330
+ /**
1331
+ * Writes a hex color with an opacity as a CSS `rgba()` color, for a style that needs to see
1332
+ * through.
1333
+ *
1334
+ * Example: '#ff5733' with alpha 0.5 -> 'rgba(255, 87, 51, 0.5)'
1335
+ */
1336
+ "color.hexToRgba": {
1337
+ /** The color as a hex text such as `#ff5733` or `#f53`, with or without the `#`. */
1338
+ color?: unknown | PipelineRef;
1339
+ /**
1340
+ * How opaque the color is, from 0 for fully transparent to 1 for solid; a value outside that is held
1341
+ * at the nearer end.
1342
+ */
1343
+ alpha?: number | PipelineRef;
1344
+ };
1293
1345
  /**
1294
1346
  * Reads a hex color into an `{ r, g, b }` object with the channels remapped to a range of your
1295
1347
  * choice.
@@ -1304,6 +1356,30 @@ export interface OperationParams {
1304
1356
  /** The value a channel of 255 maps to; 1 gives channels from 0 to 1. */
1305
1357
  to?: number | PipelineRef;
1306
1358
  };
1359
+ /**
1360
+ * Writes a color given by hue, saturation and lightness as a hex color: a way to pick colors
1361
+ * that differ by hue alone, such as a palette spread round the wheel.
1362
+ *
1363
+ * The hue wraps round; saturation and lightness are held between 0 and 1.
1364
+ * Example: hue 0, saturation 1, lightness 0.5 -> '#ff0000'; hue 210, 0.6, 0.5 -> '#3380cc'
1365
+ */
1366
+ "color.hslToHex": {
1367
+ /**
1368
+ * The hue in degrees round the color wheel: 0 red, 120 green, 240 blue; any angle is taken
1369
+ * whole turns aside.
1370
+ */
1371
+ hue?: number | PipelineRef;
1372
+ /**
1373
+ * How strong the color is, from 0 for grey to 1 for the purest hue; a value outside that is held at
1374
+ * the nearer end.
1375
+ */
1376
+ saturation?: number | PipelineRef;
1377
+ /**
1378
+ * How light the color is, from 0 for black through 0.5 for the full hue to 1 for white; a value
1379
+ * outside that is held at the nearer end.
1380
+ */
1381
+ lightness?: number | PipelineRef;
1382
+ };
1307
1383
  /**
1308
1384
  * Inverts a hex color, turning each channel into its opposite: 255 minus the value.
1309
1385
  *
@@ -1768,6 +1844,468 @@ export interface OperationParams {
1768
1844
  /** Header names whose cells are parsed as numbers, in the result and in the comparison */
1769
1845
  numberColumns?: unknown[] | PipelineRef;
1770
1846
  };
1847
+ /**
1848
+ * Makes a circular arc of a drawing path, running counterclockwise about its `center` from
1849
+ * `startAngle` to `endAngle`, in degrees, in the XY plane unless a `normal` tilts it.
1850
+ */
1851
+ "io.drawing.arcSegment": {
1852
+ /** The center of the arc's circle. */
1853
+ center: [number, number, number] | PipelineRef;
1854
+ /** Distance from the center to the arc, in drawing units. */
1855
+ radius: number | PipelineRef;
1856
+ /**
1857
+ * Where the arc starts, in degrees counterclockwise from the X axis (the X axis CAD programs
1858
+ * derive from the `normal` when one is given).
1859
+ */
1860
+ startAngle: number | PipelineRef;
1861
+ /**
1862
+ * Where the arc ends, in degrees; the arc runs counterclockwise from the start, through 0
1863
+ * when the end is below the start.
1864
+ */
1865
+ endAngle: number | PipelineRef;
1866
+ /**
1867
+ * The direction the arc's plane faces, counterclockwise seen from its tip. Leave it out for an
1868
+ * arc in the XY plane facing +Z.
1869
+ */
1870
+ normal?: [number, number, number] | PipelineRef;
1871
+ };
1872
+ /**
1873
+ * Makes a whole circle of a drawing path from its `center` and `radius`, in the XY plane unless a
1874
+ * `normal` tilts it.
1875
+ */
1876
+ "io.drawing.circleSegment": {
1877
+ /** Where the circle's center lies; without a Z it lies at Z 0. */
1878
+ center: [number, number, number] | PipelineRef;
1879
+ /** Distance from the center to the circle, in drawing units. */
1880
+ radius: number | PipelineRef;
1881
+ /** The direction the circle's plane faces. Leave it out for a circle in the XY plane. */
1882
+ normal?: [number, number, number] | PipelineRef;
1883
+ };
1884
+ /**
1885
+ * Converts a DXF file into an SVG file, reading it as `io.dxf.dxfRead` does and writing it as
1886
+ * `io.svg.svgCreate` does.
1887
+ *
1888
+ * Layers become Inkscape layers and the SVG takes its true size from the unit the DXF states.
1889
+ * Splines given only by fit points are left out and named in `warnings`; a drawing too large to
1890
+ * write throws.
1891
+ */
1892
+ "io.drawing.dxfToSvg": {
1893
+ /**
1894
+ * An ASCII DXF file from R12 on, as text or bytes; older bytes not in UTF-8 are read in the
1895
+ * header's code page, or as Windows-1252.
1896
+ */
1897
+ dxf: unknown | PipelineRef;
1898
+ /** When true, layers the file has switched off or frozen are written as well. */
1899
+ includeHiddenLayers?: boolean | PipelineRef;
1900
+ /**
1901
+ * How wide the lines are, in drawing units. Left out, a five-hundredth of the drawing's larger
1902
+ * side.
1903
+ */
1904
+ strokeWidth?: number | PipelineRef;
1905
+ /**
1906
+ * The empty border around the drawing, in drawing units. Left out, a fortieth of the
1907
+ * drawing's larger side.
1908
+ */
1909
+ margin?: number | PipelineRef;
1910
+ /**
1911
+ * The largest distance, in drawing units, between a curve SVG cannot draw exactly (a rational
1912
+ * or higher degree spline) and the cubic curves that stand in for it.
1913
+ */
1914
+ tolerance?: number | PipelineRef;
1915
+ };
1916
+ /**
1917
+ * Makes an ellipse, or an arc of one, for a drawing path.
1918
+ *
1919
+ * The ellipse is given by its center, the vector to the end of its major axis and the minor to
1920
+ * major ratio; parameters in radians pick the arc, running counterclockwise about the normal.
1921
+ */
1922
+ "io.drawing.ellipseSegment": {
1923
+ /** Where the ellipse's center lies; without a Z it lies at Z 0. */
1924
+ center: [number, number, number] | PipelineRef;
1925
+ /**
1926
+ * The vector from the center to one end of the major axis; its length is the major radius,
1927
+ * in drawing units.
1928
+ */
1929
+ majorAxis: [number, number, number] | PipelineRef;
1930
+ /** The minor radius divided by the major radius. */
1931
+ ratio: number | PipelineRef;
1932
+ /**
1933
+ * Where the arc starts, as the ellipse's parameter t in radians (the point center +
1934
+ * cos(t) `majorAxis` + sin(t) minor axis), the angle only when `ratio` is 1.
1935
+ */
1936
+ startParameter?: number | PipelineRef;
1937
+ /**
1938
+ * Where the arc ends, as the same parameter in radians; the arc runs counterclockwise from the
1939
+ * start, through 0 when the end is below the start.
1940
+ */
1941
+ endParameter?: number | PipelineRef;
1942
+ /**
1943
+ * The direction the ellipse's plane faces, perpendicular to `majorAxis`. Leave it out for an
1944
+ * ellipse in the XY plane facing +Z.
1945
+ */
1946
+ normal?: [number, number, number] | PipelineRef;
1947
+ };
1948
+ /** Makes a straight segment of a drawing path, from `start` to `end`. */
1949
+ "io.drawing.lineSegment": {
1950
+ /** Where the line starts. */
1951
+ start: [number, number, number] | PipelineRef;
1952
+ /** Where the line ends. */
1953
+ end: [number, number, number] | PipelineRef;
1954
+ };
1955
+ /**
1956
+ * Puts paths on a named layer with a color and a line type, making one part of a drawing.
1957
+ *
1958
+ * A drawing may hold several parts; `io.dxf.dxfCreate` writes them as DXF and `io.svg.svgCreate`
1959
+ * as SVG.
1960
+ */
1961
+ "io.drawing.part": {
1962
+ /** The paths of the part, each a run of segments. */
1963
+ paths: unknown[] | PipelineRef;
1964
+ /**
1965
+ * The layer the paths go on. Parts may share a layer, which takes the first part's color and
1966
+ * line type; every part's paths keep their own.
1967
+ */
1968
+ layer?: string | PipelineRef;
1969
+ /** The color of every path in the part, as a hex string such as `#000000`. */
1970
+ color?: unknown | PipelineRef;
1971
+ /** Whether the lines are whole or dashed, such as `hidden` for edges a view cannot see. */
1972
+ lineType?: "continuous" | "dashed" | "hidden" | "center" | "dotted" | PipelineRef;
1973
+ };
1974
+ /**
1975
+ * Joins segments into one path, drawn in order like the edges of a wire; segments that meet
1976
+ * are drawn as one stroke in SVG.
1977
+ */
1978
+ "io.drawing.path": {
1979
+ /**
1980
+ * The segments of the path, in order; where one ends at the next one's start, SVG draws them
1981
+ * as one stroke.
1982
+ */
1983
+ segments: unknown[] | PipelineRef;
1984
+ };
1985
+ /**
1986
+ * Makes connected straight segments through `points`, which `bulges` can bend into arcs;
1987
+ * `closed` joins the last point back to the first.
1988
+ */
1989
+ "io.drawing.polylineSegment": {
1990
+ /**
1991
+ * The vertices, in order. A last point equal to the first closes the polyline as `closed`
1992
+ * does.
1993
+ */
1994
+ points: [number, number, number][] | PipelineRef;
1995
+ /** Whether a segment joins the last vertex back to the first. */
1996
+ closed?: boolean | PipelineRef;
1997
+ /**
1998
+ * One per vertex, bending the segment after it into an arc: the tangent of a quarter of its
1999
+ * turn, 0 for straight, positive counterclockwise. Left out, every segment is straight.
2000
+ */
2001
+ bulges?: number[] | PipelineRef;
2002
+ };
2003
+ /**
2004
+ * Makes a B-spline or NURBS curve of a drawing path from its control points and degree, with
2005
+ * its knots and weights when they are given.
2006
+ */
2007
+ "io.drawing.splineSegment": {
2008
+ /**
2009
+ * The control points the curve is pulled towards; there must be more of them than the
2010
+ * degree.
2011
+ */
2012
+ controlPoints: [number, number, number][] | PipelineRef;
2013
+ /** The degree of the curve: 1 draws the control polygon, 2 and 3 smooth curves. */
2014
+ degree?: number | PipelineRef;
2015
+ /**
2016
+ * Without `knots`, whether the curve wraps around its control points into a smooth closed
2017
+ * loop. With `knots`, the knots decide, and this is ignored.
2018
+ */
2019
+ closed?: boolean | PipelineRef;
2020
+ /**
2021
+ * The full knot vector: never decreasing, one more value than the control points and the
2022
+ * degree together. Left out, the curve starts and ends at its end points.
2023
+ */
2024
+ knots?: number[] | PipelineRef;
2025
+ /**
2026
+ * One positive weight per control point, which makes the curve rational (a NURBS curve). Leave
2027
+ * it out for a weight of 1 everywhere.
2028
+ */
2029
+ weights?: number[] | PipelineRef;
2030
+ };
2031
+ /**
2032
+ * Converts an SVG file into a DXF file, reading it as `io.svg.svgRead` does and writing it as
2033
+ * `io.dxf.dxfCreate` does.
2034
+ *
2035
+ * Inkscape layers, stroke colors and dash patterns become DXF layers, colors and line types, and
2036
+ * curves stay exact. With `unit` the drawing is read at true size and the DXF states that unit. A
2037
+ * drawing too large to write throws.
2038
+ */
2039
+ "io.drawing.svgToDxf": {
2040
+ /** The whole text of an SVG file. */
2041
+ svg: string | PipelineRef;
2042
+ /**
2043
+ * The unit to read the drawing in at true size, also stated in the DXF (`AC1015` only). Left
2044
+ * out, user units are written and no unit is stated.
2045
+ */
2046
+ unit?: "mm" | "cm" | "m" | "in" | PipelineRef;
2047
+ /** When true, elements hidden by `display` or `visibility` are written as well. */
2048
+ includeInvisible?: boolean | PipelineRef;
2049
+ /**
2050
+ * How colors are written: `aci`, the nearest of AutoCAD's 255 index colors, or `truecolor`,
2051
+ * the exact color beside that index (`AC1015` only; `AC1009` writes the index).
2052
+ */
2053
+ colorFormat?: unknown | PipelineRef;
2054
+ /**
2055
+ * The DXF version: `AC1015` (AutoCAD 2000), which keeps splines and ellipses exact, or `AC1009`
2056
+ * (AutoCAD R12) for old software, where they become polylines within `curveTolerance`.
2057
+ */
2058
+ acadVersion?: unknown | PipelineRef;
2059
+ /**
2060
+ * The largest distance, in drawing units, between a curve and the polyline that stands in for
2061
+ * it where the version cannot hold the curve exactly.
2062
+ */
2063
+ curveTolerance?: number | PipelineRef;
2064
+ };
2065
+ /** Makes a circular arc for a drawing, under its former DXF name. */
2066
+ "io.dxf.arcSegment": {
2067
+ /** The center of the arc's circle. */
2068
+ center: [number, number, number] | PipelineRef;
2069
+ /** Distance from the center to the arc, in drawing units. */
2070
+ radius: number | PipelineRef;
2071
+ /**
2072
+ * Where the arc starts, in degrees counterclockwise from the X axis (the X axis CAD programs
2073
+ * derive from the `normal` when one is given).
2074
+ */
2075
+ startAngle: number | PipelineRef;
2076
+ /**
2077
+ * Where the arc ends, in degrees; the arc runs counterclockwise from the start, through 0
2078
+ * when the end is below the start.
2079
+ */
2080
+ endAngle: number | PipelineRef;
2081
+ /**
2082
+ * The direction the arc's plane faces, counterclockwise seen from its tip. Leave it out for an
2083
+ * arc in the XY plane facing +Z.
2084
+ */
2085
+ normal?: [number, number, number] | PipelineRef;
2086
+ };
2087
+ /** Makes a whole circle for a drawing, under its former DXF name. */
2088
+ "io.dxf.circleSegment": {
2089
+ /** Where the circle's center lies; without a Z it lies at Z 0. */
2090
+ center: [number, number, number] | PipelineRef;
2091
+ /** Distance from the center to the circle, in drawing units. */
2092
+ radius: number | PipelineRef;
2093
+ /** The direction the circle's plane faces. Leave it out for a circle in the XY plane. */
2094
+ normal?: [number, number, number] | PipelineRef;
2095
+ };
2096
+ /**
2097
+ * Writes a DXF file from path parts, each on its layer with its color and line type.
2098
+ *
2099
+ * `AC1015` keeps every curve exact. `AC1009` (R12) writes splines and ellipses as polylines
2100
+ * within `curveTolerance`, never finer than a millionth of the drawing. Points off one Z make a
2101
+ * 3D polyline; a drawing too large to write throws.
2102
+ */
2103
+ "io.dxf.dxfCreate": {
2104
+ /** Array of path parts, each containing paths with segments */
2105
+ dxfPathsParts: unknown[] | PipelineRef;
2106
+ /**
2107
+ * How colors are written: `aci`, the nearest of AutoCAD's 255 index colors, or `truecolor`,
2108
+ * the exact color beside that index (`AC1015` only; `AC1009` writes the index).
2109
+ */
2110
+ colorFormat?: unknown | PipelineRef;
2111
+ /**
2112
+ * The DXF version: `AC1015` (AutoCAD 2000), which keeps splines and ellipses exact, or `AC1009`
2113
+ * (AutoCAD R12) for old software, where they become polylines within `curveTolerance`.
2114
+ */
2115
+ acadVersion?: unknown | PipelineRef;
2116
+ /**
2117
+ * The unit the drawing is in, written into its header so CAD programs open it at true size;
2118
+ * `AC1015` only. Left out, no unit is stated.
2119
+ */
2120
+ unit?: "mm" | "cm" | "m" | "in" | PipelineRef;
2121
+ /**
2122
+ * The largest distance, in drawing units, between a curve and the polyline that stands in for
2123
+ * it where the version cannot hold the curve exactly.
2124
+ */
2125
+ curveTolerance?: number | PipelineRef;
2126
+ };
2127
+ /**
2128
+ * Reads a DXF file into path parts by layer, color and line type, the model `dxfCreate` writes.
2129
+ *
2130
+ * Lines, arcs, circles, ellipses, polylines and splines are read exactly in the file's
2131
+ * coordinates, block inserts expanded. Text, dimensions and hatches are left out and named in
2132
+ * `warnings`; splines given only by fit points are read by `occt.io.loadDxf`.
2133
+ */
2134
+ "io.dxf.dxfRead": {
2135
+ /**
2136
+ * An ASCII DXF file from R12 on, as text or bytes; older bytes not in UTF-8 are read in the
2137
+ * header's code page, or as Windows-1252.
2138
+ */
2139
+ dxf: unknown | PipelineRef;
2140
+ /** When true, layers the file has switched off or frozen are read as well. */
2141
+ includeHiddenLayers?: boolean | PipelineRef;
2142
+ };
2143
+ /** Makes an ellipse or an arc of one for a drawing, under its former DXF name. */
2144
+ "io.dxf.ellipseSegment": {
2145
+ /** Where the ellipse's center lies; without a Z it lies at Z 0. */
2146
+ center: [number, number, number] | PipelineRef;
2147
+ /**
2148
+ * The vector from the center to one end of the major axis; its length is the major radius,
2149
+ * in drawing units.
2150
+ */
2151
+ majorAxis: [number, number, number] | PipelineRef;
2152
+ /** The minor radius divided by the major radius. */
2153
+ ratio: number | PipelineRef;
2154
+ /**
2155
+ * Where the arc starts, as the ellipse's parameter t in radians (the point center +
2156
+ * cos(t) `majorAxis` + sin(t) minor axis), the angle only when `ratio` is 1.
2157
+ */
2158
+ startParameter?: number | PipelineRef;
2159
+ /**
2160
+ * Where the arc ends, as the same parameter in radians; the arc runs counterclockwise from the
2161
+ * start, through 0 when the end is below the start.
2162
+ */
2163
+ endParameter?: number | PipelineRef;
2164
+ /**
2165
+ * The direction the ellipse's plane faces, perpendicular to `majorAxis`. Leave it out for an
2166
+ * ellipse in the XY plane facing +Z.
2167
+ */
2168
+ normal?: [number, number, number] | PipelineRef;
2169
+ };
2170
+ /** Makes a straight segment for a drawing, under its former DXF name. */
2171
+ "io.dxf.lineSegment": {
2172
+ /** Where the line starts. */
2173
+ start: [number, number, number] | PipelineRef;
2174
+ /** Where the line ends. */
2175
+ end: [number, number, number] | PipelineRef;
2176
+ };
2177
+ /** Makes a path joined from segments for a drawing, under its former DXF name. */
2178
+ "io.dxf.path": {
2179
+ /**
2180
+ * The segments of the path, in order; where one ends at the next one's start, SVG draws them
2181
+ * as one stroke.
2182
+ */
2183
+ segments: unknown[] | PipelineRef;
2184
+ };
2185
+ /** Makes a part of a drawing on one layer for a drawing, under its former DXF name. */
2186
+ "io.dxf.pathsPart": {
2187
+ /** The paths of the part, each a run of segments. */
2188
+ paths: unknown[] | PipelineRef;
2189
+ /**
2190
+ * The layer the paths go on. Parts may share a layer, which takes the first part's color and
2191
+ * line type; every part's paths keep their own.
2192
+ */
2193
+ layer?: string | PipelineRef;
2194
+ /** The color of every path in the part, as a hex string such as `#000000`. */
2195
+ color?: unknown | PipelineRef;
2196
+ /** Whether the lines are whole or dashed, such as `hidden` for edges a view cannot see. */
2197
+ lineType?: "continuous" | "dashed" | "hidden" | "center" | "dotted" | PipelineRef;
2198
+ };
2199
+ /** Makes connected straight segments for a drawing, under its former DXF name. */
2200
+ "io.dxf.polylineSegment": {
2201
+ /**
2202
+ * The vertices, in order. A last point equal to the first closes the polyline as `closed`
2203
+ * does.
2204
+ */
2205
+ points: [number, number, number][] | PipelineRef;
2206
+ /** Whether a segment joins the last vertex back to the first. */
2207
+ closed?: boolean | PipelineRef;
2208
+ /**
2209
+ * One per vertex, bending the segment after it into an arc: the tangent of a quarter of its
2210
+ * turn, 0 for straight, positive counterclockwise. Left out, every segment is straight.
2211
+ */
2212
+ bulges?: number[] | PipelineRef;
2213
+ };
2214
+ /** Makes a B-spline or NURBS curve for a drawing, under its former DXF name. */
2215
+ "io.dxf.splineSegment": {
2216
+ /**
2217
+ * The control points the curve is pulled towards; there must be more of them than the
2218
+ * degree.
2219
+ */
2220
+ controlPoints: [number, number, number][] | PipelineRef;
2221
+ /** The degree of the curve: 1 draws the control polygon, 2 and 3 smooth curves. */
2222
+ degree?: number | PipelineRef;
2223
+ /**
2224
+ * Without `knots`, whether the curve wraps around its control points into a smooth closed
2225
+ * loop. With `knots`, the knots decide, and this is ignored.
2226
+ */
2227
+ closed?: boolean | PipelineRef;
2228
+ /**
2229
+ * The full knot vector: never decreasing, one more value than the control points and the
2230
+ * degree together. Left out, the curve starts and ends at its end points.
2231
+ */
2232
+ knots?: number[] | PipelineRef;
2233
+ /**
2234
+ * One positive weight per control point, which makes the curve rational (a NURBS curve). Leave
2235
+ * it out for a weight of 1 everywhere.
2236
+ */
2237
+ weights?: number[] | PipelineRef;
2238
+ };
2239
+ /**
2240
+ * Writes one drawing path as SVG path data, the text of a `path` element's `d` attribute.
2241
+ *
2242
+ * Segments that meet are drawn as one stroke, reversed where a segment ends where the stroke is,
2243
+ * and a stroke that returns to its start is closed. Curves are kept exact as `svgCreate` keeps
2244
+ * them.
2245
+ */
2246
+ "io.svg.pathData": {
2247
+ /** The path to write as SVG path data. */
2248
+ path: unknown | PipelineRef;
2249
+ /**
2250
+ * Whether Y is negated, as an SVG file needs (its Y runs down); leave it off for data drawn
2251
+ * inside a group that flips Y itself.
2252
+ */
2253
+ flipY?: boolean | PipelineRef;
2254
+ /**
2255
+ * The largest distance, in drawing units, between a curve SVG cannot draw exactly and the
2256
+ * cubic curves that stand in for it.
2257
+ */
2258
+ tolerance?: number | PipelineRef;
2259
+ };
2260
+ /**
2261
+ * Writes an SVG file from path parts, each layer an Inkscape layer.
2262
+ *
2263
+ * Arcs, circles, ellipses and bulges stay exact arcs, unweighted splines up to degree 3 exact
2264
+ * Beziers, others cubics within `tolerance` (at least a millionth of the drawing). Y points up, Z
2265
+ * is dropped and `unit` gives the true size. A drawing too large to write throws.
2266
+ */
2267
+ "io.svg.svgCreate": {
2268
+ /** The parts of the drawing; each layer becomes a group that Inkscape reads as a layer. */
2269
+ parts: unknown[] | PipelineRef;
2270
+ /**
2271
+ * The unit the drawing is in, which gives the file its true width and height. Left out, the
2272
+ * file states no size and viewers fit it to the window.
2273
+ */
2274
+ unit?: "mm" | "cm" | "m" | "in" | PipelineRef;
2275
+ /**
2276
+ * How wide the lines are, in drawing units. Left out, a five-hundredth of the drawing's larger
2277
+ * side.
2278
+ */
2279
+ strokeWidth?: number | PipelineRef;
2280
+ /**
2281
+ * The empty border around the drawing, in drawing units. Left out, a fortieth of the
2282
+ * drawing's larger side.
2283
+ */
2284
+ margin?: number | PipelineRef;
2285
+ /**
2286
+ * The largest distance, in drawing units, between a curve SVG cannot draw exactly (a rational
2287
+ * or higher degree spline) and the cubic curves that stand in for it.
2288
+ */
2289
+ tolerance?: number | PipelineRef;
2290
+ };
2291
+ /**
2292
+ * Reads an SVG file into path parts by layer, color and line type, the model `svgCreate` writes.
2293
+ *
2294
+ * Lines, arcs and Bezier curves are read exactly, transforms applied and Y turned up. Inkscape
2295
+ * layers are layers, each stroke color (else fill) a color, each dash pattern a line type. Text
2296
+ * and images are left out and named in `warnings`.
2297
+ */
2298
+ "io.svg.svgRead": {
2299
+ /** The whole text of an SVG file. */
2300
+ svg: string | PipelineRef;
2301
+ /**
2302
+ * The unit to read the drawing in at its true size, with the page's top left corner at the
2303
+ * origin. Left out, coordinates stay in the file's own user units.
2304
+ */
2305
+ unit?: "mm" | "cm" | "m" | "in" | PipelineRef;
2306
+ /** When true, elements hidden by `display` or `visibility` are read as well. */
2307
+ includeInvisible?: boolean | PipelineRef;
2308
+ };
1771
2309
  /**
1772
2310
  * Keeps only the volume or area that all the inputs share, dropping everything else.
1773
2311
  *
@@ -3033,6 +3571,18 @@ export interface OperationParams {
3033
3571
  /** The second point of the line, where it finishes; the direction runs from start to end. */
3034
3572
  end: [number, number, number] | PipelineRef;
3035
3573
  };
3574
+ /**
3575
+ * Measures how far a point lies from a line, to the nearest point between its start and end.
3576
+ *
3577
+ * A point beside the line is measured square to it, and one past either end to that end. A line
3578
+ * whose ends meet is measured to that one point.
3579
+ */
3580
+ "line.distanceToPoint": {
3581
+ /** The line to measure to; nothing past its start or its end counts. */
3582
+ line: unknown | PipelineRef;
3583
+ /** The point to measure from. */
3584
+ point: [number, number, number] | PipelineRef;
3585
+ };
3036
3586
  /**
3037
3587
  * Reads the end point of a line.
3038
3588
  *
@@ -5268,9 +5818,9 @@ export interface OperationParams {
5268
5818
  /**
5269
5819
  * Builds each root of a recipe as a solid placed by its matrix, in root order.
5270
5820
  *
5271
- * Shared nodes are built once. An invalid recipe throws; a root the kernel cannot build, such as
5272
- * an open mesh, throws unless `emptyWhenFailed` is set. A cut within `tolerance` of a side of the
5273
- * box of what it cuts goes through it.
5821
+ * Shared nodes are built once. An invalid recipe throws; a root the kernel cannot build throws
5822
+ * unless `emptyWhenFailed` is set. A cut ending within `tolerance` of a side of the bounding box,
5823
+ * or of a face its end lies wholly on, goes through.
5274
5824
  */
5275
5825
  "manifold.recipes.build": {
5276
5826
  /**
@@ -5634,6 +6184,19 @@ export interface OperationParams {
5634
6184
  /** The number the method works on; for the trigonometric methods an angle in radians. */
5635
6185
  number?: number | PipelineRef;
5636
6186
  };
6187
+ /**
6188
+ * Rounds a positive number to a step on the 1, 2, 5 scale - 0.1, 0.2, 0.5, 1, 2, 5, 10 - the
6189
+ * sizes a grid, a ruler or a slider reads well in.
6190
+ *
6191
+ * A number within a billionth of a step counts as that step.
6192
+ * Example: 0.37 up -> 0.5, down -> 0.2, nearest -> 0.5
6193
+ */
6194
+ "math.niceStep": {
6195
+ /** The rough size to turn into a step, such as a span divided by the number of ticks wanted. */
6196
+ number?: number | PipelineRef;
6197
+ /** Whether the step may be larger than `number`, smaller, or whichever is closer. */
6198
+ direction?: "up" | "down" | "nearest" | PipelineRef;
6199
+ };
5637
6200
  /**
5638
6201
  * Passes a number through unchanged, so a value can be given a name and reused.
5639
6202
  *
@@ -5770,6 +6333,7 @@ export interface OperationParams {
5770
6333
  /**
5771
6334
  * Rounds a number to a given number of decimal places.
5772
6335
  *
6336
+ * A small negative number rounds to 0, never to -0.
5773
6337
  * Example: 1.32156 to 3 places -> 1.322
5774
6338
  */
5775
6339
  "math.roundToDecimals": {
@@ -5778,6 +6342,24 @@ export interface OperationParams {
5778
6342
  /** How many digits to keep after the decimal point; 0 rounds to a whole number. */
5779
6343
  decimalPlaces?: number | PipelineRef;
5780
6344
  };
6345
+ /**
6346
+ * Gives the angle that `to` names, whole turns aside, nearest to `from`, so going from `from` to
6347
+ * it is the short way round.
6348
+ *
6349
+ * Animating an angle toward the result never spins the long way. `fullTurn` sets the unit.
6350
+ * Example: 10 to 350 in degrees -> -10, 350 to 10 -> 370
6351
+ */
6352
+ "math.shortestAngle": {
6353
+ /** The angle the turn starts from, in the unit `fullTurn` sets. */
6354
+ from?: number | PipelineRef;
6355
+ /**
6356
+ * The angle to arrive at, in the same unit as `from`; any number of whole turns may be added
6357
+ * to it without changing the answer.
6358
+ */
6359
+ to?: number | PipelineRef;
6360
+ /** How large a whole turn is in the unit the angles use: 360 for degrees, two pi for radians. */
6361
+ fullTurn?: number | PipelineRef;
6362
+ };
5781
6363
  /**
5782
6364
  * Tells the sign of a number: -1 when negative, 0 when zero, 1 when positive.
5783
6365
  *
@@ -7584,8 +8166,8 @@ export interface OperationParams {
7584
8166
  */
7585
8167
  relativeDeflection?: boolean | PipelineRef;
7586
8168
  /**
7587
- * When true, the mesh is turned so this library's Y-up becomes Z-up, for tools that treat Z as
7588
- * up.
8169
+ * When true, the mesh is made Z-up for tools that treat Z as up: turned a quarter about X under
8170
+ * right-handed conventions, with Y and Z swapped otherwise.
7589
8171
  */
7590
8172
  adjustYtoZ?: boolean | PipelineRef;
7591
8173
  /**
@@ -7635,8 +8217,8 @@ export interface OperationParams {
7635
8217
  */
7636
8218
  relativeDeflection?: boolean | PipelineRef;
7637
8219
  /**
7638
- * When true, the meshes are turned so this library's Y-up becomes Z-up, for tools that treat Z
7639
- * as up.
8220
+ * When true, the meshes are made Z-up for tools that treat Z as up: turned a quarter about X under
8221
+ * right-handed conventions, with Y and Z swapped otherwise.
7640
8222
  */
7641
8223
  adjustYtoZ?: boolean | PipelineRef;
7642
8224
  /**
@@ -9017,8 +9599,8 @@ export interface OperationParams {
9017
9599
  /**
9018
9600
  * Rounds several edges of a shape, each with the same radius profile that changes along it.
9019
9601
  *
9020
- * `paramsU` are positions along each edge as fractions from 0 to 1 and `radiusList` the radius
9021
- * at each; the lists must have the same length, or an error is thrown.
9602
+ * `radiusList` holds the radius at each `paramsU` position on every edge, read as
9603
+ * `filletEdgeVariableRadius` reads them. The lists must be equally long, or an error is thrown.
9022
9604
  */
9023
9605
  "occt.fillets.filletEdgesSameVariableRadius": {
9024
9606
  /** The shape the edges belong to. */
@@ -9027,7 +9609,10 @@ export interface OperationParams {
9027
9609
  edges: unknown[] | PipelineRef;
9028
9610
  /** The radius in model units at each position in `paramsU`; the lists must have the same length. */
9029
9611
  radiusList: number[] | PipelineRef;
9030
- /** Positions along each edge as fractions from 0 at its start to 1 at its end, one per radius. */
9612
+ /**
9613
+ * Where each radius applies on every edge, read as for `filletEdgeVariableRadius`: first and
9614
+ * last positions at the curve's ends, those between along its parameter.
9615
+ */
9031
9616
  paramsU: number[] | PipelineRef;
9032
9617
  };
9033
9618
  /**
@@ -9041,15 +9626,18 @@ export interface OperationParams {
9041
9626
  edges: unknown[] | PipelineRef;
9042
9627
  /** The radius in model units at each position in `paramsU`; the lists must have the same length. */
9043
9628
  radiusList: number[] | PipelineRef;
9044
- /** Positions along each edge as fractions from 0 at its start to 1 at its end, one per radius. */
9629
+ /**
9630
+ * Where each radius applies on every edge, read as for `filletEdgeVariableRadius`: first and
9631
+ * last positions at the curve's ends, those between along its parameter.
9632
+ */
9045
9633
  paramsU: number[] | PipelineRef;
9046
9634
  };
9047
9635
  /**
9048
9636
  * Rounds several edges of a shape, each with its own radius profile that changes along it.
9049
9637
  *
9050
9638
  * `radiusLists` and `paramsULists` hold one list per edge, in edge order; within each pair the
9051
- * positions are fractions from 0 to 1 along the edge and the radii apply there. All three lists
9052
- * must have the same length, or an error is thrown.
9639
+ * radii apply at the positions as `filletEdgeVariableRadius` reads them. All three lists must
9640
+ * have the same length, or an error is thrown.
9053
9641
  */
9054
9642
  "occt.fillets.filletEdgesVariableRadius": {
9055
9643
  /** The shape the edges belong to. */
@@ -9062,8 +9650,8 @@ export interface OperationParams {
9062
9650
  */
9063
9651
  radiusLists: unknown[] | PipelineRef;
9064
9652
  /**
9065
- * One list per edge of positions as fractions from 0 to 1 along it, each pairing with the
9066
- * matching list in `radiusLists`.
9653
+ * One list per edge of positions, read as in `filletEdgeVariableRadius` (first and last at the
9654
+ * ends of the edge's curve), each pairing with the matching list in `radiusLists`.
9067
9655
  */
9068
9656
  paramsULists: unknown[] | PipelineRef;
9069
9657
  };
@@ -9082,8 +9670,8 @@ export interface OperationParams {
9082
9670
  */
9083
9671
  radiusLists: unknown[] | PipelineRef;
9084
9672
  /**
9085
- * One list per edge of positions as fractions from 0 to 1 along it, each pairing with the
9086
- * matching list in `radiusLists`.
9673
+ * One list per edge of positions, read as in `filletEdgeVariableRadius` (first and last at the
9674
+ * ends of the edge's curve), each pairing with the matching list in `radiusLists`.
9087
9675
  */
9088
9676
  paramsULists: unknown[] | PipelineRef;
9089
9677
  };
@@ -9114,9 +9702,9 @@ export interface OperationParams {
9114
9702
  /**
9115
9703
  * Rounds one edge of a shape with a radius that changes along it.
9116
9704
  *
9117
- * `paramsU` are positions along the edge as fractions from 0 at its start to 1 at its end, and
9118
- * `radiusList` gives the radius at each; the kernel blends smoothly between them. The two lists
9119
- * must have the same length, or an error is thrown.
9705
+ * `radiusList` holds the radius at each `paramsU` position; the first and last stand for the
9706
+ * start and end of the edge's curve, whatever its orientation, and the radius may overshoot
9707
+ * between positions. The lists must be equally long, or an error is thrown.
9120
9708
  */
9121
9709
  "occt.fillets.filletEdgeVariableRadius": {
9122
9710
  /** The shape the edge belongs to. */
@@ -9125,7 +9713,10 @@ export interface OperationParams {
9125
9713
  edge: unknown | PipelineRef;
9126
9714
  /** The radius in model units at each position in `paramsU`; the lists must have the same length. */
9127
9715
  radiusList: number[] | PipelineRef;
9128
- /** Positions along the edge as fractions from 0 at its start to 1 at its end, one per radius. */
9716
+ /**
9717
+ * Where each radius applies: the first position is the curve's start, the last its end, those
9718
+ * between fractions of its parameter, which match its length only on lines and arcs.
9719
+ */
9129
9720
  paramsU: number[] | PipelineRef;
9130
9721
  };
9131
9722
  /**
@@ -9139,7 +9730,10 @@ export interface OperationParams {
9139
9730
  edge: unknown | PipelineRef;
9140
9731
  /** The radius in model units at each position in `paramsU`; the lists must have the same length. */
9141
9732
  radiusList: number[] | PipelineRef;
9142
- /** Positions along the edge as fractions from 0 at its start to 1 at its end, one per radius. */
9733
+ /**
9734
+ * Where each radius applies: the first position is the curve's start, the last its end, those
9735
+ * between fractions of its parameter, which match its length only on lines and arcs.
9736
+ */
9143
9737
  paramsU: number[] | PipelineRef;
9144
9738
  };
9145
9739
  /**
@@ -9562,19 +10156,30 @@ export interface OperationParams {
9562
10156
  dracoUnifiedQuantization?: boolean | PipelineRef;
9563
10157
  };
9564
10158
  /**
9565
- * Writes DXF parts into one DXF file and returns its text.
10159
+ * Writes drawing parts into one DXF file and returns its text.
9566
10160
  *
9567
- * `colorFormat` chooses AutoCAD's indexed colors or true color, `acadVersion` the DXF version:
9568
- * AC1009 is R12, the most widely readable, AC1015 is 2000, which can also state the drawing's
9569
- * `unit`. `fileName` and `tryDownload` matter only where a browser download can be started.
10161
+ * `acadVersion` AC1015 (AutoCAD 2000) keeps every curve exact and can state the drawing's `unit`;
10162
+ * AC1009 (R12) suits old software and writes splines and ellipses as polylines within
10163
+ * `curveTolerance`. `fileName` and `tryDownload` matter only where a browser download can start.
9570
10164
  */
9571
10165
  "occt.io.dxfCreate": {
9572
10166
  /** The parts from `io.dxfPathsWithLayer`, each with its own layer and color. */
9573
10167
  pathsParts: unknown[] | PipelineRef;
9574
- /** How colors are written: `aci` as AutoCAD's indexed colors, `truecolor` as RGB. */
10168
+ /**
10169
+ * How colors are written: `aci`, the nearest of AutoCAD's 255 indexed colors, or `truecolor`,
10170
+ * the exact color beside that index (`AC1015` only).
10171
+ */
9575
10172
  colorFormat?: "aci" | "truecolor" | PipelineRef;
9576
- /** The DXF version to write: `AC1009` is R12, the most widely readable, `AC1015` is 2000. */
10173
+ /**
10174
+ * The DXF version: `AC1015` (AutoCAD 2000) keeps splines and ellipses exact; `AC1009` (R12), for
10175
+ * old software, writes them as polylines within `curveTolerance`.
10176
+ */
9577
10177
  acadVersion?: "AC1009" | "AC1015" | PipelineRef;
10178
+ /**
10179
+ * The largest distance, in model units, between a curve and the polyline that stands in for it
10180
+ * where the version cannot hold the curve exactly.
10181
+ */
10182
+ curveTolerance?: number | PipelineRef;
9578
10183
  /**
9579
10184
  * The unit the drawing is in, written into its header so CAD programs open it at true size;
9580
10185
  * `AC1015` only. Left out, no unit is stated.
@@ -9589,10 +10194,10 @@ export interface OperationParams {
9589
10194
  tryDownload?: boolean | PipelineRef;
9590
10195
  };
9591
10196
  /**
9592
- * Puts DXF paths on a named layer with a color, making one part of a DXF drawing.
10197
+ * Puts drawing paths on a named layer with a color and a line type, making one part of a drawing.
9593
10198
  *
9594
- * A drawing may hold several parts, each with its own layer and color; `dxfCreate` writes them
9595
- * into one file.
10199
+ * A drawing may hold several parts, each with its own layer, color and line type; `dxfCreate`
10200
+ * writes them into one file.
9596
10201
  */
9597
10202
  "occt.io.dxfPathsWithLayer": {
9598
10203
  /** The paths from `io.shapeToDxfPaths`. */
@@ -9601,6 +10206,8 @@ export interface OperationParams {
9601
10206
  layer?: string | PipelineRef;
9602
10207
  /** The color of the paths as a hex string such as `#000000`. */
9603
10208
  color?: unknown | PipelineRef;
10209
+ /** Whether the lines are whole or dashed, such as `hidden` for edges a view cannot see. */
10210
+ lineType?: "continuous" | "dashed" | "hidden" | "center" | "dotted" | PipelineRef;
9604
10211
  };
9605
10212
  /**
9606
10213
  * Reads the unit a STEP or IGES file writes its lengths in, without building its geometry.
@@ -9639,6 +10246,69 @@ export interface OperationParams {
9639
10246
  /** The binary BREP file's bytes, or a File or Blob that holds them. */
9640
10247
  brepData: unknown | PipelineRef;
9641
10248
  };
10249
+ /**
10250
+ * Reads a DXF file into one compound of exact wires, fit-point splines interpolated and block
10251
+ * inserts expanded.
10252
+ *
10253
+ * It lies on the ground, Y along Z (-Z under right-handed conventions) and elevations along Y.
10254
+ * Ends within `joinTolerance` join; `makeFaces` makes faces with holes. A very large file is
10255
+ * read up to its limits; `loadDxfStructured` lists what was left out.
10256
+ */
10257
+ "occt.io.loadDxf": {
10258
+ /**
10259
+ * The DXF file's text, or a File or Blob holding it (ASCII DXF, R12 or later). Older bytes not
10260
+ * in UTF-8 are read in the header's code page, or Windows-1252.
10261
+ */
10262
+ dxf: unknown | PipelineRef;
10263
+ /**
10264
+ * When true, closed outlines that lie flat in the drawing become faces, an outline inside
10265
+ * another cutting a hole in it as an even-odd fill does; open outlines stay wires.
10266
+ */
10267
+ makeFaces?: boolean | PipelineRef;
10268
+ /**
10269
+ * How far apart, in file units, two entities' ends may lie and still join into one wire: at most
10270
+ * 0.001 or a hundredth of the drawing's span, whichever is larger.
10271
+ */
10272
+ joinTolerance?: number | PipelineRef;
10273
+ /** When true, entities on frozen and switched-off layers are read too. */
10274
+ includeHiddenLayers?: boolean | PipelineRef;
10275
+ /**
10276
+ * The unit to give the shapes in, scaled from the unit the file states; a file stating none is
10277
+ * read as drawn. Left out, the numbers stay as drawn.
10278
+ */
10279
+ unit?: "mm" | "cm" | "m" | "in" | PipelineRef;
10280
+ };
10281
+ /**
10282
+ * Reads a DXF file as `loadDxf` does, into one shape per layer, color and line type, each with
10283
+ * its layer name, color and line type, plus the file's unit, its version and what was left out.
10284
+ *
10285
+ * Use it to treat the layers apart, such as outlines to cut on one layer and lines to engrave on
10286
+ * another.
10287
+ */
10288
+ "occt.io.loadDxfStructured": {
10289
+ /**
10290
+ * The DXF file's text, or a File or Blob holding it (ASCII DXF, R12 or later). Older bytes not
10291
+ * in UTF-8 are read in the header's code page, or Windows-1252.
10292
+ */
10293
+ dxf: unknown | PipelineRef;
10294
+ /**
10295
+ * When true, closed outlines that lie flat in the drawing become faces, an outline inside
10296
+ * another cutting a hole in it as an even-odd fill does; open outlines stay wires.
10297
+ */
10298
+ makeFaces?: boolean | PipelineRef;
10299
+ /**
10300
+ * How far apart, in file units, two entities' ends may lie and still join into one wire: at most
10301
+ * 0.001 or a hundredth of the drawing's span, whichever is larger.
10302
+ */
10303
+ joinTolerance?: number | PipelineRef;
10304
+ /** When true, entities on frozen and switched-off layers are read too. */
10305
+ includeHiddenLayers?: boolean | PipelineRef;
10306
+ /**
10307
+ * The unit to give the shapes in, scaled from the unit the file states; a file stating none is
10308
+ * read as drawn. Left out, the numbers stay as drawn.
10309
+ */
10310
+ unit?: "mm" | "cm" | "m" | "in" | PipelineRef;
10311
+ };
9642
10312
  /** Loads a STEP or IGES file into an OCCT shape. Pass file content as text (for .step/.stp/.iges/.igs) or ArrayBuffer (for .stpz/.igz). */
9643
10313
  "occt.io.loadSTEPorIGES": {
9644
10314
  /** File content: string for plain text files (.step, .stp, .iges, .igs), or base64-encoded ArrayBuffer for compressed files (.stpz, .igz). */
@@ -9779,13 +10449,99 @@ export interface OperationParams {
9779
10449
  */
9780
10450
  withTriangulation?: boolean | PipelineRef;
9781
10451
  };
10452
+ /**
10453
+ * Draws the edges a view of a shape sees as a DXF drawing, hidden ones on their own layer when
10454
+ * asked, and starts a browser download of the file.
10455
+ *
10456
+ * The drawing shows the view from the frame's normal side, x along its direction, with every
10457
+ * curve exact. `saveShapeDxfAndReturn` gives the text instead.
10458
+ */
10459
+ "occt.io.saveShapeDxf": {
10460
+ /** The shape to draw. */
10461
+ shape: unknown | PipelineRef;
10462
+ /**
10463
+ * The view, as in `operations.hiddenLines`: the eye sits on the side the normal points to and
10464
+ * looks back along it, and the drawing's x runs along the direction.
10465
+ */
10466
+ frame: unknown | PipelineRef;
10467
+ /**
10468
+ * When true, the edges other faces cover are drawn too, on the layer `hidden` with the
10469
+ * `HIDDEN` line type.
10470
+ */
10471
+ drawHidden?: boolean | PipelineRef;
10472
+ /**
10473
+ * How far the view may stray from the shape, in model units: the tolerance of the hidden-line
10474
+ * removal, and of the polylines that stand in for curves in `AC1009`.
10475
+ */
10476
+ precision?: number | PipelineRef;
10477
+ /**
10478
+ * The unit the shape is modelled in, written into the file so CAD programs open it at true
10479
+ * size; `AC1015` only.
10480
+ */
10481
+ unit?: "mm" | "cm" | "m" | "in" | PipelineRef;
10482
+ /**
10483
+ * The DXF version: `AC1015` (AutoCAD 2000) keeps every curve exact; `AC1009` (R12) writes
10484
+ * splines and ellipses as polylines.
10485
+ */
10486
+ acadVersion?: "AC1009" | "AC1015" | PipelineRef;
10487
+ /** The name the downloaded file gets. */
10488
+ fileName?: string | PipelineRef;
10489
+ /**
10490
+ * When true, a browser download of the file is started where that is possible; the kernel
10491
+ * itself only returns the text.
10492
+ */
10493
+ tryDownload?: boolean | PipelineRef;
10494
+ };
10495
+ /**
10496
+ * Draws the edges a view of a shape sees as DXF, hidden ones on their own layer when asked, and
10497
+ * returns the file's text.
10498
+ *
10499
+ * The view looks from the frame's normal side, x along the frame's direction. Curves stay exact;
10500
+ * hidden edges go on the layer `hidden` with the `HIDDEN` line type.
10501
+ */
10502
+ "occt.io.saveShapeDxfAndReturn": {
10503
+ /** The shape to draw. */
10504
+ shape: unknown | PipelineRef;
10505
+ /**
10506
+ * The view, as in `operations.hiddenLines`: the eye sits on the side the normal points to and
10507
+ * looks back along it, and the drawing's x runs along the direction.
10508
+ */
10509
+ frame: unknown | PipelineRef;
10510
+ /**
10511
+ * When true, the edges other faces cover are drawn too, on the layer `hidden` with the
10512
+ * `HIDDEN` line type.
10513
+ */
10514
+ drawHidden?: boolean | PipelineRef;
10515
+ /**
10516
+ * How far the view may stray from the shape, in model units: the tolerance of the hidden-line
10517
+ * removal, and of the polylines that stand in for curves in `AC1009`.
10518
+ */
10519
+ precision?: number | PipelineRef;
10520
+ /**
10521
+ * The unit the shape is modelled in, written into the file so CAD programs open it at true
10522
+ * size; `AC1015` only.
10523
+ */
10524
+ unit?: "mm" | "cm" | "m" | "in" | PipelineRef;
10525
+ /**
10526
+ * The DXF version: `AC1015` (AutoCAD 2000) keeps every curve exact; `AC1009` (R12) writes
10527
+ * splines and ellipses as polylines.
10528
+ */
10529
+ acadVersion?: "AC1009" | "AC1015" | PipelineRef;
10530
+ /** The name the downloaded file gets. */
10531
+ fileName?: string | PipelineRef;
10532
+ /**
10533
+ * When true, a browser download of the file is started where that is possible; the kernel
10534
+ * itself only returns the text.
10535
+ */
10536
+ tryDownload?: boolean | PipelineRef;
10537
+ };
9782
10538
  /**
9783
10539
  * Triangulates a shape, writes it as OBJ, the mesh format most 3D programs read, and starts a
9784
10540
  * browser download of the file.
9785
10541
  *
9786
- * `precision` is the meshing tolerance in model units and `adjustYtoZ` swaps Y and Z, which
9787
- * mirrors the shape. The file name may hold no spaces or slashes; `tryDownload` false skips the
9788
- * download, and `saveShapeObjAndReturn` gives the text instead.
10542
+ * `precision` is the meshing tolerance in model units. With the conventions set the file shows
10543
+ * what the screen shows, Z-up with `adjustYtoZ`. The file name may hold no spaces or slashes;
10544
+ * `saveShapeObjAndReturn` gives the text instead.
9789
10545
  */
9790
10546
  "occt.io.saveShapeObj": {
9791
10547
  /** The shape written to the file. */
@@ -9801,8 +10557,8 @@ export interface OperationParams {
9801
10557
  */
9802
10558
  precision?: number | PipelineRef;
9803
10559
  /**
9804
- * When true, Y and Z swap so Y-up becomes Z-up, which mirrors the shape. To keep it as built,
9805
- * turn it 90 degrees about X with `transforms.rotate` instead.
10560
+ * When true, the file is written Z-up for CAD programs. With the conventions set, the file shows
10561
+ * what the screen shows either way; without them this swaps Y and Z.
9806
10562
  */
9807
10563
  adjustYtoZ?: boolean | PipelineRef;
9808
10564
  /**
@@ -9815,9 +10571,10 @@ export interface OperationParams {
9815
10571
  * Triangulates a shape and writes it as OBJ, the mesh format most 3D programs read, returning
9816
10572
  * the file's text.
9817
10573
  *
9818
- * `precision` is the meshing tolerance in model units, `adjustYtoZ` swaps Y and Z, which
9819
- * mirrors the shape, and coordinates keep six decimals. `mtl` stays empty, since a shape
9820
- * carries no colors; `assembly.manager.exportDocumentToObj` writes colored parts.
10574
+ * `precision` is the meshing tolerance in model units and coordinates keep six decimals. With
10575
+ * the conventions set the file shows what the screen shows, Z-up with `adjustYtoZ`. `mtl` stays
10576
+ * empty, since a shape carries no colors; `assembly.manager.exportDocumentToObj` writes colored
10577
+ * parts.
9821
10578
  */
9822
10579
  "occt.io.saveShapeObjAndReturn": {
9823
10580
  /** The shape written to the file. */
@@ -9833,8 +10590,8 @@ export interface OperationParams {
9833
10590
  */
9834
10591
  precision?: number | PipelineRef;
9835
10592
  /**
9836
- * When true, Y and Z swap so Y-up becomes Z-up, which mirrors the shape. To keep it as built,
9837
- * turn it 90 degrees about X with `transforms.rotate` instead.
10593
+ * When true, the file is written Z-up for CAD programs. With the conventions set, the file shows
10594
+ * what the screen shows either way; without them this swaps Y and Z.
9838
10595
  */
9839
10596
  adjustYtoZ?: boolean | PipelineRef;
9840
10597
  /**
@@ -9847,9 +10604,9 @@ export interface OperationParams {
9847
10604
  * Triangulates a shape, writes it as ASCII PLY with a normal per vertex, and starts a browser
9848
10605
  * download of the file.
9849
10606
  *
9850
- * `precision` is the meshing tolerance in model units and `adjustYtoZ` swaps Y and Z, which
9851
- * mirrors the shape. `fileName` names the download and `tryDownload` false skips it;
9852
- * `saveShapePlyAndReturn` gives the text instead.
10607
+ * `precision` is the meshing tolerance in model units. With the conventions set the file shows
10608
+ * what the screen shows, Z-up with `adjustYtoZ`. `fileName` names the download and
10609
+ * `tryDownload` false skips it; `saveShapePlyAndReturn` gives the text instead.
9853
10610
  */
9854
10611
  "occt.io.saveShapePly": {
9855
10612
  /** The shape written to the file. */
@@ -9862,8 +10619,8 @@ export interface OperationParams {
9862
10619
  */
9863
10620
  precision?: number | PipelineRef;
9864
10621
  /**
9865
- * When true, Y and Z swap so Y-up becomes Z-up, which mirrors the shape. To keep it as built,
9866
- * turn it 90 degrees about X with `transforms.rotate` instead.
10622
+ * When true, the file is written Z-up for CAD programs. With the conventions set, the file shows
10623
+ * what the screen shows either way; without them this swaps Y and Z.
9867
10624
  */
9868
10625
  adjustYtoZ?: boolean | PipelineRef;
9869
10626
  /**
@@ -9877,8 +10634,8 @@ export interface OperationParams {
9877
10634
  * scanning tools read, returning the file's text.
9878
10635
  *
9879
10636
  * Coordinates keep six significant digits, so past 1000 units they keep two decimals.
9880
- * `precision` is the meshing tolerance in model units and `adjustYtoZ` swaps Y and Z, which
9881
- * mirrors the shape.
10637
+ * `precision` is the meshing tolerance in model units. With the conventions set the file shows
10638
+ * what the screen shows, Z-up with `adjustYtoZ`.
9882
10639
  */
9883
10640
  "occt.io.saveShapePlyAndReturn": {
9884
10641
  /** The shape written to the file. */
@@ -9891,8 +10648,8 @@ export interface OperationParams {
9891
10648
  */
9892
10649
  precision?: number | PipelineRef;
9893
10650
  /**
9894
- * When true, Y and Z swap so Y-up becomes Z-up, which mirrors the shape. To keep it as built,
9895
- * turn it 90 degrees about X with `transforms.rotate` instead.
10651
+ * When true, the file is written Z-up for CAD programs. With the conventions set, the file shows
10652
+ * what the screen shows either way; without them this swaps Y and Z.
9896
10653
  */
9897
10654
  adjustYtoZ?: boolean | PipelineRef;
9898
10655
  /**
@@ -9905,9 +10662,9 @@ export interface OperationParams {
9905
10662
  * Writes a shape as STEP, the exchange format for exact CAD geometry, and starts a browser
9906
10663
  * download of the file.
9907
10664
  *
9908
- * With `adjustYtoZ` true, Y and Z swap, mirroring the shape; turn it 90 degrees about X with
9909
- * `transforms.rotate` first to keep it as built. The file is in millimetres, another `unit`
9910
- * scaled to them; `saveShapeSTEPAndReturn` returns the text.
10665
+ * With `adjustYtoZ` true the file is Z-up: with the conventions set it shows what the screen
10666
+ * shows, without them Y and Z are swapped. The file is in millimetres;
10667
+ * `saveShapeSTEPAndReturn` returns the text.
9911
10668
  */
9912
10669
  "occt.io.saveShapeSTEP": {
9913
10670
  /** The shape written to the file. */
@@ -9915,13 +10672,13 @@ export interface OperationParams {
9915
10672
  /** The name the downloaded file gets; `.step` is appended when missing. */
9916
10673
  fileName?: string | PipelineRef;
9917
10674
  /**
9918
- * When true, Y and Z swap so Y-up becomes STEP's Z-up, which mirrors the shape. To keep it as
9919
- * built, turn it 90 degrees about X with `transforms.rotate` instead.
10675
+ * When true, the file is written Z-up for CAD programs. With the conventions set, the file shows
10676
+ * what the screen shows either way; without them this swaps Y and Z.
9920
10677
  */
9921
10678
  adjustYtoZ?: boolean | PipelineRef;
9922
10679
  /**
9923
- * When true, the swap of `adjustYtoZ` becomes a turn of -90 degrees about X: the shape is not
9924
- * mirrored but stands upside down in a Z-up tool.
10680
+ * When true, `adjustYtoZ` turns the shape 90 degrees about X instead of swapping, for a
10681
+ * right-handed scene.
9925
10682
  */
9926
10683
  fromRightHanded?: boolean | PipelineRef;
9927
10684
  /**
@@ -9938,8 +10695,8 @@ export interface OperationParams {
9938
10695
  /**
9939
10696
  * Writes a shape as STEP, the exchange format for exact CAD geometry, and returns its text.
9940
10697
  *
9941
- * With `adjustYtoZ` true, Y and Z swap so Y-up becomes STEP's Z-up, mirroring the shape; turn it
9942
- * 90 degrees about X with `transforms.rotate` first to keep it as built. The file is in
10698
+ * With `adjustYtoZ` true the file is Z-up, as CAD programs expect: with the conventions set it
10699
+ * shows what the screen shows, and without them Y and Z are swapped. The file is in
9943
10700
  * millimetres, a shape in another `unit` scaled to them.
9944
10701
  */
9945
10702
  "occt.io.saveShapeSTEPAndReturn": {
@@ -9948,13 +10705,13 @@ export interface OperationParams {
9948
10705
  /** The name the downloaded file gets; `.step` is appended when missing. */
9949
10706
  fileName?: string | PipelineRef;
9950
10707
  /**
9951
- * When true, Y and Z swap so Y-up becomes STEP's Z-up, which mirrors the shape. To keep it as
9952
- * built, turn it 90 degrees about X with `transforms.rotate` instead.
10708
+ * When true, the file is written Z-up for CAD programs. With the conventions set, the file shows
10709
+ * what the screen shows either way; without them this swaps Y and Z.
9953
10710
  */
9954
10711
  adjustYtoZ?: boolean | PipelineRef;
9955
10712
  /**
9956
- * When true, the swap of `adjustYtoZ` becomes a turn of -90 degrees about X: the shape is not
9957
- * mirrored but stands upside down in a Z-up tool.
10713
+ * When true, `adjustYtoZ` turns the shape 90 degrees about X instead of swapping, for a
10714
+ * right-handed scene.
9958
10715
  */
9959
10716
  fromRightHanded?: boolean | PipelineRef;
9960
10717
  /**
@@ -9972,9 +10729,9 @@ export interface OperationParams {
9972
10729
  * Triangulates a shape, writes it as STL, the mesh format 3D printers read, and starts a browser
9973
10730
  * download of the file.
9974
10731
  *
9975
- * `precision` is the meshing tolerance in model units, `adjustYtoZ` swaps Y and Z, which
9976
- * mirrors the shape, and `binary` writes the smaller binary form. `fileName` names the
9977
- * download, `tryDownload` false skips it. `saveShapeStlAndReturn` gives the file instead.
10732
+ * `precision` is the meshing tolerance in model units and `binary` writes the smaller binary
10733
+ * form. With the conventions set the file shows what the screen shows, Z-up with `adjustYtoZ`.
10734
+ * `saveShapeStlAndReturn` gives the file instead.
9978
10735
  */
9979
10736
  "occt.io.saveShapeStl": {
9980
10737
  /** The shape written to the file. */
@@ -9987,8 +10744,8 @@ export interface OperationParams {
9987
10744
  */
9988
10745
  precision?: number | PipelineRef;
9989
10746
  /**
9990
- * When true, Y and Z swap so Y-up becomes Z-up, which mirrors the shape. To keep it as built,
9991
- * turn it 90 degrees about X with `transforms.rotate` instead.
10747
+ * When true, the file is written Z-up for CAD programs. With the conventions set, the file shows
10748
+ * what the screen shows either way; without them this swaps Y and Z.
9992
10749
  */
9993
10750
  adjustYtoZ?: boolean | PipelineRef;
9994
10751
  /**
@@ -10003,12 +10760,12 @@ export interface OperationParams {
10003
10760
  binary?: boolean | PipelineRef;
10004
10761
  };
10005
10762
  /**
10006
- * Triangulates a shape and writes it as STL, the mesh format 3D printers and slicers read,
10007
- * returning the file's text, or its bytes when `binary` is true.
10763
+ * Triangulates a shape and writes it as STL, the mesh format 3D printers read, returning its
10764
+ * text, or its bytes when `binary` is true.
10008
10765
  *
10009
- * `precision` is the meshing tolerance in model units; smaller values follow curved surfaces
10010
- * more closely. `adjustYtoZ` swaps Y and Z, which mirrors the shape. `fileName` and
10011
- * `tryDownload` matter only for a download.
10766
+ * `precision` is the meshing tolerance in model units, smaller following curves more closely.
10767
+ * With the conventions set the file shows what the screen shows, Z-up with `adjustYtoZ`.
10768
+ * `fileName` and `tryDownload` matter only for a download.
10012
10769
  */
10013
10770
  "occt.io.saveShapeStlAndReturn": {
10014
10771
  /** The shape written to the file. */
@@ -10021,8 +10778,8 @@ export interface OperationParams {
10021
10778
  */
10022
10779
  precision?: number | PipelineRef;
10023
10780
  /**
10024
- * When true, Y and Z swap so Y-up becomes Z-up, which mirrors the shape. To keep it as built,
10025
- * turn it 90 degrees about X with `transforms.rotate` instead.
10781
+ * When true, the file is written Z-up for CAD programs. With the conventions set, the file shows
10782
+ * what the screen shows either way; without them this swaps Y and Z.
10026
10783
  */
10027
10784
  adjustYtoZ?: boolean | PipelineRef;
10028
10785
  /**
@@ -10040,8 +10797,8 @@ export interface OperationParams {
10040
10797
  * Draws the edges a view of a shape sees as an SVG drawing, with the hidden edges dashed when
10041
10798
  * asked, and starts a browser download of the file.
10042
10799
  *
10043
- * The drawing shows the view from the frame's normal side, x along its direction; with the shape's
10044
- * `unit`, it states its true width and height. `saveShapeSvgAndReturn` gives the text instead.
10800
+ * The drawing shows the view from the frame's normal side, x along its direction; curves stay
10801
+ * exact where SVG can draw them. `saveShapeSvgAndReturn` gives the text instead.
10045
10802
  */
10046
10803
  "occt.io.saveShapeSvg": {
10047
10804
  /** The shape to draw. */
@@ -10054,8 +10811,8 @@ export interface OperationParams {
10054
10811
  /** When true, the edges other faces cover are drawn too, dashed. */
10055
10812
  drawHidden?: boolean | PipelineRef;
10056
10813
  /**
10057
- * How far the straight segments that trace a curved edge may stray from it, in model units;
10058
- * a smaller value follows curves more closely and makes a bigger file.
10814
+ * How far the view may stray from the shape, in model units: the tolerance of hidden-line
10815
+ * removal and of the cubics that stand in for curves SVG cannot draw.
10059
10816
  */
10060
10817
  precision?: number | PipelineRef;
10061
10818
  /**
@@ -10075,9 +10832,9 @@ export interface OperationParams {
10075
10832
  * Draws the edges a view of a shape sees as SVG, hidden ones dashed when asked, and returns the
10076
10833
  * file's text.
10077
10834
  *
10078
- * The view looks from the frame's normal side, x along the frame's direction and y up, so each
10079
- * point is written as x and minus y. With the shape's `unit`, it states its true width and
10080
- * height.
10835
+ * The view looks from the frame's normal side, x along the frame's direction. Curves stay exact
10836
+ * where SVG can draw them, others become cubics within `precision`; with the shape's `unit`, the
10837
+ * file states its true size.
10081
10838
  */
10082
10839
  "occt.io.saveShapeSvgAndReturn": {
10083
10840
  /** The shape to draw. */
@@ -10090,8 +10847,8 @@ export interface OperationParams {
10090
10847
  /** When true, the edges other faces cover are drawn too, dashed. */
10091
10848
  drawHidden?: boolean | PipelineRef;
10092
10849
  /**
10093
- * How far the straight segments that trace a curved edge may stray from it, in model units;
10094
- * a smaller value follows curves more closely and makes a bigger file.
10850
+ * How far the view may stray from the shape, in model units: the tolerance of hidden-line
10851
+ * removal and of the cubics that stand in for curves SVG cannot draw.
10095
10852
  */
10096
10853
  precision?: number | PipelineRef;
10097
10854
  /**
@@ -10108,14 +10865,17 @@ export interface OperationParams {
10108
10865
  tryDownload?: boolean | PipelineRef;
10109
10866
  };
10110
10867
  /**
10111
- * Turns the wires of a shape into DXF path records, the first step of a 2D DXF export.
10868
+ * Turns the wires of a shape into drawing paths, the first step of a 2D DXF export.
10112
10869
  *
10113
- * The shape must lie flat on the XZ ground plane, since DXF drawings are two-dimensional. The
10114
- * deflection settings say how closely curved edges are followed. Give the paths a layer with
10115
- * `dxfPathsWithLayer` and write the file with `dxfCreate`.
10870
+ * The shape is seen along Y: X stays X and Z becomes the drawing's Y (-Z under right-handed
10871
+ * conventions). Curves stay exact unless `exactCurves` is off. Give the paths a layer with
10872
+ * `dxfPathsWithLayer` and write them with `dxfCreate`.
10116
10873
  */
10117
10874
  "occt.io.shapeToDxfPaths": {
10118
- /** The shape whose wires are traced; it must lie flat on the XZ ground plane. */
10875
+ /**
10876
+ * The shape whose wires are traced, seen along Y: X stays X and Z becomes the drawing's Y (-Z
10877
+ * under right-handed conventions), so a flat shape keeps its size.
10878
+ */
10119
10879
  shape: unknown | PipelineRef;
10120
10880
  /**
10121
10881
  * The largest angle, in radians, the traced polyline may turn between two points; smaller
@@ -10133,6 +10893,64 @@ export interface OperationParams {
10133
10893
  uTolerance?: number | PipelineRef;
10134
10894
  /** Edges shorter than this, in model units, are traced with the minimum number of points. */
10135
10895
  minimumLength?: number | PipelineRef;
10896
+ /**
10897
+ * When true, ellipses and splines stay exact, and other curves become cubic splines within
10898
+ * `curvatureDeflection`; when false, curves other than lines and circles are traced as points.
10899
+ */
10900
+ exactCurves?: boolean | PipelineRef;
10901
+ };
10902
+ /**
10903
+ * Draws layers of shapes into one SVG file and returns its text.
10904
+ *
10905
+ * Each layer becomes an Inkscape layer. The shapes are seen along Y: X stays X and Z becomes the
10906
+ * drawing's Y (-Z under right-handed conventions). Curves stay exact where SVG can draw them and
10907
+ * become cubics within `tolerance` elsewhere; with `unit` the file has its true size.
10908
+ */
10909
+ "occt.io.svgCreate": {
10910
+ /** The layers from `io.svgLayer`; each becomes a group Inkscape reads as a layer. */
10911
+ layers: unknown[] | PipelineRef;
10912
+ /**
10913
+ * The unit the shapes are modelled in, which gives the file its true width and height. Left out,
10914
+ * the file states no size and viewers fit it to the window.
10915
+ */
10916
+ unit?: "mm" | "cm" | "m" | "in" | PipelineRef;
10917
+ /**
10918
+ * How wide the lines are, in model units. Left out, a five-hundredth of the drawing's larger
10919
+ * side.
10920
+ */
10921
+ strokeWidth?: number | PipelineRef;
10922
+ /**
10923
+ * The empty border around the drawing, in model units. Left out, a fortieth of the drawing's
10924
+ * larger side.
10925
+ */
10926
+ margin?: number | PipelineRef;
10927
+ /**
10928
+ * The largest distance, in model units, between a curve SVG cannot draw exactly and the cubic
10929
+ * curves that stand in for it.
10930
+ */
10931
+ tolerance?: number | PipelineRef;
10932
+ /** The name the downloaded file gets. */
10933
+ fileName?: string | PipelineRef;
10934
+ /**
10935
+ * When true, a browser download of the file is started where that is possible; the kernel
10936
+ * itself only returns the text.
10937
+ */
10938
+ tryDownload?: boolean | PipelineRef;
10939
+ };
10940
+ /**
10941
+ * Puts shapes on a named layer with a color and a line type, making one layer of an SVG drawing.
10942
+ *
10943
+ * The shapes are kept as they are; `svgCreate` draws their wires when it writes the file.
10944
+ */
10945
+ "occt.io.svgLayer": {
10946
+ /** The shapes whose wires are drawn on this layer. */
10947
+ shapes: unknown[] | PipelineRef;
10948
+ /** The name of the layer, the group Inkscape shows for it. */
10949
+ layer?: string | PipelineRef;
10950
+ /** The color of the lines as a hex string such as `#000000`. */
10951
+ color?: unknown | PipelineRef;
10952
+ /** Whether the lines are whole or dashed, such as `hidden` for edges a view cannot see. */
10953
+ lineType?: "continuous" | "dashed" | "hidden" | "center" | "dotted" | PipelineRef;
10136
10954
  };
10137
10955
  /**
10138
10956
  * Reads the center of a shape's axis-aligned bounding box, halfway between its two corners.
@@ -14081,8 +14899,8 @@ export interface OperationParams {
14081
14899
  * faces.
14082
14900
  *
14083
14901
  * `precision` is the meshing tolerance in model units: smaller values follow curved surfaces
14084
- * more closely and give more triangles. `adjustYtoZ` swaps the Y and Z axes for tools that
14085
- * treat Z as up, and `reversedPoints` flips the winding of each triangle.
14902
+ * more closely and give more triangles. `adjustYtoZ` makes the points Z-up for tools that treat
14903
+ * Z as up, and `reversedPoints` flips the winding of each triangle.
14086
14904
  */
14087
14905
  "occt.shapeFacesToPolygonPoints": {
14088
14906
  /** The shape to triangulate. */
@@ -14093,8 +14911,8 @@ export interface OperationParams {
14093
14911
  */
14094
14912
  precision?: number | PipelineRef;
14095
14913
  /**
14096
- * When true, the points are turned so this library's Y-up becomes Z-up, for tools that treat Z
14097
- * as up.
14914
+ * When true, the points are made Z-up for tools that treat Z as up: turned a quarter about X under
14915
+ * right-handed conventions, with Y and Z swapped otherwise.
14098
14916
  */
14099
14917
  adjustYtoZ?: boolean | PipelineRef;
14100
14918
  /**
@@ -19224,8 +20042,8 @@ export interface OperationParams {
19224
20042
  */
19225
20043
  precisionShare?: number | PipelineRef;
19226
20044
  /**
19227
- * When true, the meshes are turned so this library's Y-up becomes Z-up, for tools that treat Z
19228
- * as up.
20045
+ * When true, the meshes are made Z-up for tools that treat Z as up: turned a quarter about X under
20046
+ * right-handed conventions, with Y and Z swapped otherwise.
19229
20047
  */
19230
20048
  adjustYtoZ?: boolean | PipelineRef;
19231
20049
  /**
@@ -19315,8 +20133,8 @@ export interface OperationParams {
19315
20133
  */
19316
20134
  precisionShare?: number | PipelineRef;
19317
20135
  /**
19318
- * When true, the mesh is turned so this library's Y-up becomes Z-up, for tools that treat Z as
19319
- * up.
20136
+ * When true, the mesh is made Z-up for tools that treat Z as up: turned a quarter about X under
20137
+ * right-handed conventions, with Y and Z swapped otherwise.
19320
20138
  */
19321
20139
  adjustYtoZ?: boolean | PipelineRef;
19322
20140
  /**
@@ -19641,20 +20459,19 @@ export interface OperationParams {
19641
20459
  makeFace?: boolean | PipelineRef;
19642
20460
  };
19643
20461
  /**
19644
- * Parses an SVG document and builds every drawable element into one compound shape on the
19645
- * ground plane, ready to draw, extrude or transform as a whole.
20462
+ * Parses an SVG document into one compound on the ground, ready to draw, extrude or transform.
19646
20463
  *
19647
- * `faceStrategy` decides whether closed outlines become faces, `scale` and `flipY` map SVG
19648
- * units and its downward Y axis, and `alignment`, `direction` and `center` place the result.
19649
- * Invisible elements are skipped unless asked for.
20464
+ * `faceStrategy` decides which closed outlines become faces; `unit`, `scale` and `flipY` map SVG
20465
+ * units and its downward Y; `alignment`, `direction`, `center` and `keepOrigin` place it. A very
20466
+ * large file is read up to its limits; `loadSVGStructured` lists what was left out.
19650
20467
  */
19651
20468
  "occt.svg.loadSVG": {
19652
20469
  /** The text of the SVG document. */
19653
20470
  svg?: string | PipelineRef;
19654
20471
  /**
19655
- * How filled shapes become faces: `none` keeps only wires, `auto` follows each element's fill
19656
- * rule, `nonzero` and `evenOdd` force a rule, `perSubpath` makes one face per closed subpath
19657
- * without holes.
20472
+ * How filled shapes become faces: `none` keeps wires, `auto` follows each element's fill rule,
20473
+ * `nonzero` and `evenOdd` force one, `perSubpath` faces each closed subpath alone. Open subpaths
20474
+ * stay wires.
19658
20475
  */
19659
20476
  faceStrategy?: "none" | "auto" | "nonzero" | "evenOdd" | "perSubpath" | PipelineRef;
19660
20477
  /**
@@ -19666,33 +20483,53 @@ export interface OperationParams {
19666
20483
  includeInvisible?: boolean | PipelineRef;
19667
20484
  /** When true, consecutive segments of a subpath are merged into a single edge where they can be. */
19668
20485
  joinSegments?: boolean | PipelineRef;
19669
- /** How far apart segment ends may be and still join, in model units. */
20486
+ /**
20487
+ * How far apart segment ends may be and still join, in model units; a subpath that ends this
20488
+ * close to its start counts as closed.
20489
+ */
19670
20490
  tolerance?: number | PipelineRef;
19671
- /** A factor applied to the SVG coordinates; 1 keeps the size. */
20491
+ /**
20492
+ * A factor applied to the SVG coordinates, or to the true size when `unit` is set; 1 keeps the
20493
+ * size.
20494
+ */
19672
20495
  scale?: number | PipelineRef;
19673
20496
  /** When true, Y is negated so the drawing comes out upright, since SVG has Y pointing down. */
19674
20497
  flipY?: boolean | PipelineRef;
19675
- /** Which point of the drawing's bounding box sits on `center`; `midMid` centers it. */
20498
+ /**
20499
+ * Which point of the drawing's bounding box sits on `center`; `midMid` centers it. Not used
20500
+ * when `keepOrigin` is true.
20501
+ */
19676
20502
  alignment?: "topLeft" | "topMid" | "topRight" | "midLeft" | "midMid" | "midRight" | "bottomLeft" | "bottomMid" | "bottomRight" | PipelineRef;
19677
20503
  /** The normal of the plane the drawing is laid on; the default lays it flat on the ground. */
19678
20504
  direction?: [number, number, number] | PipelineRef;
19679
20505
  /** The point the aligned drawing is placed at. */
19680
20506
  center?: [number, number, number] | PipelineRef;
20507
+ /**
20508
+ * Imports at true size in this unit, read from the page's `width`, `height` and view box at 96
20509
+ * pixels an inch. Left out, SVG user units become model units.
20510
+ */
20511
+ unit?: "mm" | "cm" | "m" | "in" | PipelineRef;
20512
+ /**
20513
+ * When true, the origin of the imported coordinates lands on `center`, ignoring `alignment`: the
20514
+ * SVG's own origin, or the page's top left corner when `unit` is set.
20515
+ */
20516
+ keepOrigin?: boolean | PipelineRef;
19681
20517
  };
19682
20518
  /**
19683
20519
  * Parses an SVG document and builds one shape per drawable element, each bundled with its
19684
- * resolved fill, stroke and stroke width, plus the parse warnings and the SVG view box.
20520
+ * resolved fill, stroke and stroke width, plus the warnings, the view box and the page size in
20521
+ * millimetres.
19685
20522
  *
19686
20523
  * Use it when the elements need their own colors or separate handling; `loadSVG` gives the
19687
- * whole drawing as one shape. Faces are built where the outline allows it.
20524
+ * whole drawing as one shape.
19688
20525
  */
19689
20526
  "occt.svg.loadSVGStructured": {
19690
20527
  /** The text of the SVG document. */
19691
20528
  svg?: string | PipelineRef;
19692
20529
  /**
19693
- * How filled shapes become faces: `none` keeps only wires, `auto` follows each element's fill
19694
- * rule, `nonzero` and `evenOdd` force a rule, `perSubpath` makes one face per closed subpath
19695
- * without holes.
20530
+ * How filled shapes become faces: `none` keeps wires, `auto` follows each element's fill rule,
20531
+ * `nonzero` and `evenOdd` force one, `perSubpath` faces each closed subpath alone. Open subpaths
20532
+ * stay wires.
19696
20533
  */
19697
20534
  faceStrategy?: "none" | "auto" | "nonzero" | "evenOdd" | "perSubpath" | PipelineRef;
19698
20535
  /**
@@ -19704,18 +20541,37 @@ export interface OperationParams {
19704
20541
  includeInvisible?: boolean | PipelineRef;
19705
20542
  /** When true, consecutive segments of a subpath are merged into a single edge where they can be. */
19706
20543
  joinSegments?: boolean | PipelineRef;
19707
- /** How far apart segment ends may be and still join, in model units. */
20544
+ /**
20545
+ * How far apart segment ends may be and still join, in model units; a subpath that ends this
20546
+ * close to its start counts as closed.
20547
+ */
19708
20548
  tolerance?: number | PipelineRef;
19709
- /** A factor applied to the SVG coordinates; 1 keeps the size. */
20549
+ /**
20550
+ * A factor applied to the SVG coordinates, or to the true size when `unit` is set; 1 keeps the
20551
+ * size.
20552
+ */
19710
20553
  scale?: number | PipelineRef;
19711
20554
  /** When true, Y is negated so the drawing comes out upright, since SVG has Y pointing down. */
19712
20555
  flipY?: boolean | PipelineRef;
19713
- /** Which point of the drawing's bounding box sits on `center`; `midMid` centers it. */
20556
+ /**
20557
+ * Which point of the drawing's bounding box sits on `center`; `midMid` centers it. Not used
20558
+ * when `keepOrigin` is true.
20559
+ */
19714
20560
  alignment?: "topLeft" | "topMid" | "topRight" | "midLeft" | "midMid" | "midRight" | "bottomLeft" | "bottomMid" | "bottomRight" | PipelineRef;
19715
20561
  /** The normal of the plane the drawing is laid on; the default lays it flat on the ground. */
19716
20562
  direction?: [number, number, number] | PipelineRef;
19717
20563
  /** The point the aligned drawing is placed at. */
19718
20564
  center?: [number, number, number] | PipelineRef;
20565
+ /**
20566
+ * Imports at true size in this unit, read from the page's `width`, `height` and view box at 96
20567
+ * pixels an inch. Left out, SVG user units become model units.
20568
+ */
20569
+ unit?: "mm" | "cm" | "m" | "in" | PipelineRef;
20570
+ /**
20571
+ * When true, the origin of the imported coordinates lands on `center`, ignoring `alignment`: the
20572
+ * SVG's own origin, or the page's top left corner when `unit` is set.
20573
+ */
20574
+ keepOrigin?: boolean | PipelineRef;
19719
20575
  };
19720
20576
  /**
19721
20577
  * Moves a shape so that one point and direction on it land on another point and direction: the
@@ -20284,6 +21140,20 @@ export interface OperationParams {
20284
21140
  /** The move as `[x, y, z]`, in model units. */
20285
21141
  translation?: [number, number, number] | PipelineRef;
20286
21142
  };
21143
+ /** Read flat parts as nesting would, without nesting them */
21144
+ "occtPro.nesting.inspect": {
21145
+ /** The flat parts to read */
21146
+ shapes: unknown | PipelineRef;
21147
+ /** The tolerance and each part's xDirection; no stock is needed */
21148
+ options?: unknown | PipelineRef;
21149
+ };
21150
+ /** Place flat parts on sheets or a strip; returns the sheets as one compound and the layout report */
21151
+ "occtPro.nesting.nest": {
21152
+ /** The flat parts: planar faces, coplanar faces such as unfolded parts, plate solids, or drawings of closed wires */
21153
+ shapes: unknown | PipelineRef;
21154
+ /** The stock (rectangular sheets or one strip), each part's quantity, turns and flip, and the spacing, margin, tolerance and time budget; see NestingOptions */
21155
+ options: unknown | PipelineRef;
21156
+ };
20287
21157
  /** Sheet-metal unfold metrics report for a single face */
20288
21158
  "occtPro.sheetMetal.unfoldFaceReport": {
20289
21159
  /** Shape that contains the face to unfold */