@bitbybit-dev/cad-cloud-sdk 1.6.2 → 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.2
3
+ // Generated from operation-catalog.json v1.7.0
4
4
  // ---------------------------------------------------------------------------
5
5
 
6
6
  /* eslint-disable @typescript-eslint/no-empty-object-type */
@@ -40,6 +40,29 @@ export type OperationPath =
40
40
  | "csv.parseToJsonWithHeaders"
41
41
  | "csv.queryColumn"
42
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"
43
66
  | "jscad.booleans.intersect"
44
67
  | "jscad.booleans.intersectTwo"
45
68
  | "jscad.booleans.minkowskiSum"
@@ -120,6 +143,7 @@ export type OperationPath =
120
143
  | "json.stringify"
121
144
  | "line.create"
122
145
  | "line.createSegment"
146
+ | "line.distanceToPoint"
123
147
  | "line.getEndPoint"
124
148
  | "line.getPointOnLine"
125
149
  | "line.getStartPoint"
@@ -534,6 +558,8 @@ export type OperationPath =
534
558
  | "occt.io.fileLengthUnit"
535
559
  | "occt.io.loadBrep"
536
560
  | "occt.io.loadBrepBinary"
561
+ | "occt.io.loadDxf"
562
+ | "occt.io.loadDxfStructured"
537
563
  | "occt.io.loadSTEPorIGES"
538
564
  | "occt.io.loadStl"
539
565
  | "occt.io.parseStepToJson"
@@ -541,6 +567,8 @@ export type OperationPath =
541
567
  | "occt.io.saveShapeBrepAndReturn"
542
568
  | "occt.io.saveShapeBrepBinary"
543
569
  | "occt.io.saveShapeBrepBinaryAndReturn"
570
+ | "occt.io.saveShapeDxf"
571
+ | "occt.io.saveShapeDxfAndReturn"
544
572
  | "occt.io.saveShapeObj"
545
573
  | "occt.io.saveShapeObjAndReturn"
546
574
  | "occt.io.saveShapePly"
@@ -552,6 +580,8 @@ export type OperationPath =
552
580
  | "occt.io.saveShapeSvg"
553
581
  | "occt.io.saveShapeSvgAndReturn"
554
582
  | "occt.io.shapeToDxfPaths"
583
+ | "occt.io.svgCreate"
584
+ | "occt.io.svgLayer"
555
585
  | "occt.operations.boundingBoxCenterOfShape"
556
586
  | "occt.operations.boundingBoxMaxOfShape"
557
587
  | "occt.operations.boundingBoxMinOfShape"
@@ -1094,6 +1124,8 @@ export type OperationPath =
1094
1124
  | "occt.transforms.translate"
1095
1125
  | "occt.transforms.translateShapes"
1096
1126
  | "occt.transforms.translationToMatrix"
1127
+ | "occtPro.nesting.inspect"
1128
+ | "occtPro.nesting.nest"
1097
1129
  | "occtPro.sheetMetal.unfoldFaceReport"
1098
1130
  | "occtPro.sheetMetal.unfoldFaceToFlat"
1099
1131
  | "occtPro.sheetMetal.unfoldSolidReport"
@@ -1812,6 +1844,468 @@ export interface OperationParams {
1812
1844
  /** Header names whose cells are parsed as numbers, in the result and in the comparison */
1813
1845
  numberColumns?: unknown[] | PipelineRef;
1814
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
+ };
1815
2309
  /**
1816
2310
  * Keeps only the volume or area that all the inputs share, dropping everything else.
1817
2311
  *
@@ -3077,6 +3571,18 @@ export interface OperationParams {
3077
3571
  /** The second point of the line, where it finishes; the direction runs from start to end. */
3078
3572
  end: [number, number, number] | PipelineRef;
3079
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
+ };
3080
3586
  /**
3081
3587
  * Reads the end point of a line.
3082
3588
  *
@@ -5312,9 +5818,9 @@ export interface OperationParams {
5312
5818
  /**
5313
5819
  * Builds each root of a recipe as a solid placed by its matrix, in root order.
5314
5820
  *
5315
- * Shared nodes are built once. An invalid recipe throws; a root the kernel cannot build, such as
5316
- * an open mesh, throws unless `emptyWhenFailed` is set. A cut within `tolerance` of a side of the
5317
- * 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.
5318
5824
  */
5319
5825
  "manifold.recipes.build": {
5320
5826
  /**
@@ -7660,8 +8166,8 @@ export interface OperationParams {
7660
8166
  */
7661
8167
  relativeDeflection?: boolean | PipelineRef;
7662
8168
  /**
7663
- * When true, the mesh is turned so this library's Y-up becomes Z-up, for tools that treat Z as
7664
- * 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.
7665
8171
  */
7666
8172
  adjustYtoZ?: boolean | PipelineRef;
7667
8173
  /**
@@ -7711,8 +8217,8 @@ export interface OperationParams {
7711
8217
  */
7712
8218
  relativeDeflection?: boolean | PipelineRef;
7713
8219
  /**
7714
- * When true, the meshes are turned so this library's Y-up becomes Z-up, for tools that treat Z
7715
- * 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.
7716
8222
  */
7717
8223
  adjustYtoZ?: boolean | PipelineRef;
7718
8224
  /**
@@ -9093,8 +9599,8 @@ export interface OperationParams {
9093
9599
  /**
9094
9600
  * Rounds several edges of a shape, each with the same radius profile that changes along it.
9095
9601
  *
9096
- * `paramsU` are positions along each edge as fractions from 0 to 1 and `radiusList` the radius
9097
- * 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.
9098
9604
  */
9099
9605
  "occt.fillets.filletEdgesSameVariableRadius": {
9100
9606
  /** The shape the edges belong to. */
@@ -9103,7 +9609,10 @@ export interface OperationParams {
9103
9609
  edges: unknown[] | PipelineRef;
9104
9610
  /** The radius in model units at each position in `paramsU`; the lists must have the same length. */
9105
9611
  radiusList: number[] | PipelineRef;
9106
- /** 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
+ */
9107
9616
  paramsU: number[] | PipelineRef;
9108
9617
  };
9109
9618
  /**
@@ -9117,15 +9626,18 @@ export interface OperationParams {
9117
9626
  edges: unknown[] | PipelineRef;
9118
9627
  /** The radius in model units at each position in `paramsU`; the lists must have the same length. */
9119
9628
  radiusList: number[] | PipelineRef;
9120
- /** 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
+ */
9121
9633
  paramsU: number[] | PipelineRef;
9122
9634
  };
9123
9635
  /**
9124
9636
  * Rounds several edges of a shape, each with its own radius profile that changes along it.
9125
9637
  *
9126
9638
  * `radiusLists` and `paramsULists` hold one list per edge, in edge order; within each pair the
9127
- * positions are fractions from 0 to 1 along the edge and the radii apply there. All three lists
9128
- * 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.
9129
9641
  */
9130
9642
  "occt.fillets.filletEdgesVariableRadius": {
9131
9643
  /** The shape the edges belong to. */
@@ -9138,8 +9650,8 @@ export interface OperationParams {
9138
9650
  */
9139
9651
  radiusLists: unknown[] | PipelineRef;
9140
9652
  /**
9141
- * One list per edge of positions as fractions from 0 to 1 along it, each pairing with the
9142
- * 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`.
9143
9655
  */
9144
9656
  paramsULists: unknown[] | PipelineRef;
9145
9657
  };
@@ -9158,8 +9670,8 @@ export interface OperationParams {
9158
9670
  */
9159
9671
  radiusLists: unknown[] | PipelineRef;
9160
9672
  /**
9161
- * One list per edge of positions as fractions from 0 to 1 along it, each pairing with the
9162
- * 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`.
9163
9675
  */
9164
9676
  paramsULists: unknown[] | PipelineRef;
9165
9677
  };
@@ -9190,9 +9702,9 @@ export interface OperationParams {
9190
9702
  /**
9191
9703
  * Rounds one edge of a shape with a radius that changes along it.
9192
9704
  *
9193
- * `paramsU` are positions along the edge as fractions from 0 at its start to 1 at its end, and
9194
- * `radiusList` gives the radius at each; the kernel blends smoothly between them. The two lists
9195
- * 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.
9196
9708
  */
9197
9709
  "occt.fillets.filletEdgeVariableRadius": {
9198
9710
  /** The shape the edge belongs to. */
@@ -9201,7 +9713,10 @@ export interface OperationParams {
9201
9713
  edge: unknown | PipelineRef;
9202
9714
  /** The radius in model units at each position in `paramsU`; the lists must have the same length. */
9203
9715
  radiusList: number[] | PipelineRef;
9204
- /** 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
+ */
9205
9720
  paramsU: number[] | PipelineRef;
9206
9721
  };
9207
9722
  /**
@@ -9215,7 +9730,10 @@ export interface OperationParams {
9215
9730
  edge: unknown | PipelineRef;
9216
9731
  /** The radius in model units at each position in `paramsU`; the lists must have the same length. */
9217
9732
  radiusList: number[] | PipelineRef;
9218
- /** 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
+ */
9219
9737
  paramsU: number[] | PipelineRef;
9220
9738
  };
9221
9739
  /**
@@ -9638,19 +10156,30 @@ export interface OperationParams {
9638
10156
  dracoUnifiedQuantization?: boolean | PipelineRef;
9639
10157
  };
9640
10158
  /**
9641
- * Writes DXF parts into one DXF file and returns its text.
10159
+ * Writes drawing parts into one DXF file and returns its text.
9642
10160
  *
9643
- * `colorFormat` chooses AutoCAD's indexed colors or true color, `acadVersion` the DXF version:
9644
- * AC1009 is R12, the most widely readable, AC1015 is 2000, which can also state the drawing's
9645
- * `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.
9646
10164
  */
9647
10165
  "occt.io.dxfCreate": {
9648
10166
  /** The parts from `io.dxfPathsWithLayer`, each with its own layer and color. */
9649
10167
  pathsParts: unknown[] | PipelineRef;
9650
- /** 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
+ */
9651
10172
  colorFormat?: "aci" | "truecolor" | PipelineRef;
9652
- /** 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
+ */
9653
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;
9654
10183
  /**
9655
10184
  * The unit the drawing is in, written into its header so CAD programs open it at true size;
9656
10185
  * `AC1015` only. Left out, no unit is stated.
@@ -9665,10 +10194,10 @@ export interface OperationParams {
9665
10194
  tryDownload?: boolean | PipelineRef;
9666
10195
  };
9667
10196
  /**
9668
- * 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.
9669
10198
  *
9670
- * A drawing may hold several parts, each with its own layer and color; `dxfCreate` writes them
9671
- * 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.
9672
10201
  */
9673
10202
  "occt.io.dxfPathsWithLayer": {
9674
10203
  /** The paths from `io.shapeToDxfPaths`. */
@@ -9677,6 +10206,8 @@ export interface OperationParams {
9677
10206
  layer?: string | PipelineRef;
9678
10207
  /** The color of the paths as a hex string such as `#000000`. */
9679
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;
9680
10211
  };
9681
10212
  /**
9682
10213
  * Reads the unit a STEP or IGES file writes its lengths in, without building its geometry.
@@ -9715,6 +10246,69 @@ export interface OperationParams {
9715
10246
  /** The binary BREP file's bytes, or a File or Blob that holds them. */
9716
10247
  brepData: unknown | PipelineRef;
9717
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
+ };
9718
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). */
9719
10313
  "occt.io.loadSTEPorIGES": {
9720
10314
  /** File content: string for plain text files (.step, .stp, .iges, .igs), or base64-encoded ArrayBuffer for compressed files (.stpz, .igz). */
@@ -9855,13 +10449,99 @@ export interface OperationParams {
9855
10449
  */
9856
10450
  withTriangulation?: boolean | PipelineRef;
9857
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
+ };
9858
10538
  /**
9859
10539
  * Triangulates a shape, writes it as OBJ, the mesh format most 3D programs read, and starts a
9860
10540
  * browser download of the file.
9861
10541
  *
9862
- * `precision` is the meshing tolerance in model units and `adjustYtoZ` swaps Y and Z, which
9863
- * mirrors the shape. The file name may hold no spaces or slashes; `tryDownload` false skips the
9864
- * 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.
9865
10545
  */
9866
10546
  "occt.io.saveShapeObj": {
9867
10547
  /** The shape written to the file. */
@@ -9877,8 +10557,8 @@ export interface OperationParams {
9877
10557
  */
9878
10558
  precision?: number | PipelineRef;
9879
10559
  /**
9880
- * When true, Y and Z swap so Y-up becomes Z-up, which mirrors the shape. To keep it as built,
9881
- * 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.
9882
10562
  */
9883
10563
  adjustYtoZ?: boolean | PipelineRef;
9884
10564
  /**
@@ -9891,9 +10571,10 @@ export interface OperationParams {
9891
10571
  * Triangulates a shape and writes it as OBJ, the mesh format most 3D programs read, returning
9892
10572
  * the file's text.
9893
10573
  *
9894
- * `precision` is the meshing tolerance in model units, `adjustYtoZ` swaps Y and Z, which
9895
- * mirrors the shape, and coordinates keep six decimals. `mtl` stays empty, since a shape
9896
- * 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.
9897
10578
  */
9898
10579
  "occt.io.saveShapeObjAndReturn": {
9899
10580
  /** The shape written to the file. */
@@ -9909,8 +10590,8 @@ export interface OperationParams {
9909
10590
  */
9910
10591
  precision?: number | PipelineRef;
9911
10592
  /**
9912
- * When true, Y and Z swap so Y-up becomes Z-up, which mirrors the shape. To keep it as built,
9913
- * 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.
9914
10595
  */
9915
10596
  adjustYtoZ?: boolean | PipelineRef;
9916
10597
  /**
@@ -9923,9 +10604,9 @@ export interface OperationParams {
9923
10604
  * Triangulates a shape, writes it as ASCII PLY with a normal per vertex, and starts a browser
9924
10605
  * download of the file.
9925
10606
  *
9926
- * `precision` is the meshing tolerance in model units and `adjustYtoZ` swaps Y and Z, which
9927
- * mirrors the shape. `fileName` names the download and `tryDownload` false skips it;
9928
- * `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.
9929
10610
  */
9930
10611
  "occt.io.saveShapePly": {
9931
10612
  /** The shape written to the file. */
@@ -9938,8 +10619,8 @@ export interface OperationParams {
9938
10619
  */
9939
10620
  precision?: number | PipelineRef;
9940
10621
  /**
9941
- * When true, Y and Z swap so Y-up becomes Z-up, which mirrors the shape. To keep it as built,
9942
- * 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.
9943
10624
  */
9944
10625
  adjustYtoZ?: boolean | PipelineRef;
9945
10626
  /**
@@ -9953,8 +10634,8 @@ export interface OperationParams {
9953
10634
  * scanning tools read, returning the file's text.
9954
10635
  *
9955
10636
  * Coordinates keep six significant digits, so past 1000 units they keep two decimals.
9956
- * `precision` is the meshing tolerance in model units and `adjustYtoZ` swaps Y and Z, which
9957
- * 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`.
9958
10639
  */
9959
10640
  "occt.io.saveShapePlyAndReturn": {
9960
10641
  /** The shape written to the file. */
@@ -9967,8 +10648,8 @@ export interface OperationParams {
9967
10648
  */
9968
10649
  precision?: number | PipelineRef;
9969
10650
  /**
9970
- * When true, Y and Z swap so Y-up becomes Z-up, which mirrors the shape. To keep it as built,
9971
- * 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.
9972
10653
  */
9973
10654
  adjustYtoZ?: boolean | PipelineRef;
9974
10655
  /**
@@ -9981,9 +10662,9 @@ export interface OperationParams {
9981
10662
  * Writes a shape as STEP, the exchange format for exact CAD geometry, and starts a browser
9982
10663
  * download of the file.
9983
10664
  *
9984
- * With `adjustYtoZ` true, Y and Z swap, mirroring the shape; turn it 90 degrees about X with
9985
- * `transforms.rotate` first to keep it as built. The file is in millimetres, another `unit`
9986
- * 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.
9987
10668
  */
9988
10669
  "occt.io.saveShapeSTEP": {
9989
10670
  /** The shape written to the file. */
@@ -9991,13 +10672,13 @@ export interface OperationParams {
9991
10672
  /** The name the downloaded file gets; `.step` is appended when missing. */
9992
10673
  fileName?: string | PipelineRef;
9993
10674
  /**
9994
- * When true, Y and Z swap so Y-up becomes STEP's Z-up, which mirrors the shape. To keep it as
9995
- * 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.
9996
10677
  */
9997
10678
  adjustYtoZ?: boolean | PipelineRef;
9998
10679
  /**
9999
- * When true, the swap of `adjustYtoZ` becomes a turn of -90 degrees about X: the shape is not
10000
- * 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.
10001
10682
  */
10002
10683
  fromRightHanded?: boolean | PipelineRef;
10003
10684
  /**
@@ -10014,8 +10695,8 @@ export interface OperationParams {
10014
10695
  /**
10015
10696
  * Writes a shape as STEP, the exchange format for exact CAD geometry, and returns its text.
10016
10697
  *
10017
- * With `adjustYtoZ` true, Y and Z swap so Y-up becomes STEP's Z-up, mirroring the shape; turn it
10018
- * 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
10019
10700
  * millimetres, a shape in another `unit` scaled to them.
10020
10701
  */
10021
10702
  "occt.io.saveShapeSTEPAndReturn": {
@@ -10024,13 +10705,13 @@ export interface OperationParams {
10024
10705
  /** The name the downloaded file gets; `.step` is appended when missing. */
10025
10706
  fileName?: string | PipelineRef;
10026
10707
  /**
10027
- * When true, Y and Z swap so Y-up becomes STEP's Z-up, which mirrors the shape. To keep it as
10028
- * 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.
10029
10710
  */
10030
10711
  adjustYtoZ?: boolean | PipelineRef;
10031
10712
  /**
10032
- * When true, the swap of `adjustYtoZ` becomes a turn of -90 degrees about X: the shape is not
10033
- * 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.
10034
10715
  */
10035
10716
  fromRightHanded?: boolean | PipelineRef;
10036
10717
  /**
@@ -10048,9 +10729,9 @@ export interface OperationParams {
10048
10729
  * Triangulates a shape, writes it as STL, the mesh format 3D printers read, and starts a browser
10049
10730
  * download of the file.
10050
10731
  *
10051
- * `precision` is the meshing tolerance in model units, `adjustYtoZ` swaps Y and Z, which
10052
- * mirrors the shape, and `binary` writes the smaller binary form. `fileName` names the
10053
- * 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.
10054
10735
  */
10055
10736
  "occt.io.saveShapeStl": {
10056
10737
  /** The shape written to the file. */
@@ -10063,8 +10744,8 @@ export interface OperationParams {
10063
10744
  */
10064
10745
  precision?: number | PipelineRef;
10065
10746
  /**
10066
- * When true, Y and Z swap so Y-up becomes Z-up, which mirrors the shape. To keep it as built,
10067
- * 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.
10068
10749
  */
10069
10750
  adjustYtoZ?: boolean | PipelineRef;
10070
10751
  /**
@@ -10079,12 +10760,12 @@ export interface OperationParams {
10079
10760
  binary?: boolean | PipelineRef;
10080
10761
  };
10081
10762
  /**
10082
- * Triangulates a shape and writes it as STL, the mesh format 3D printers and slicers read,
10083
- * 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.
10084
10765
  *
10085
- * `precision` is the meshing tolerance in model units; smaller values follow curved surfaces
10086
- * more closely. `adjustYtoZ` swaps Y and Z, which mirrors the shape. `fileName` and
10087
- * `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.
10088
10769
  */
10089
10770
  "occt.io.saveShapeStlAndReturn": {
10090
10771
  /** The shape written to the file. */
@@ -10097,8 +10778,8 @@ export interface OperationParams {
10097
10778
  */
10098
10779
  precision?: number | PipelineRef;
10099
10780
  /**
10100
- * When true, Y and Z swap so Y-up becomes Z-up, which mirrors the shape. To keep it as built,
10101
- * 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.
10102
10783
  */
10103
10784
  adjustYtoZ?: boolean | PipelineRef;
10104
10785
  /**
@@ -10116,8 +10797,8 @@ export interface OperationParams {
10116
10797
  * Draws the edges a view of a shape sees as an SVG drawing, with the hidden edges dashed when
10117
10798
  * asked, and starts a browser download of the file.
10118
10799
  *
10119
- * The drawing shows the view from the frame's normal side, x along its direction; with the shape's
10120
- * `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.
10121
10802
  */
10122
10803
  "occt.io.saveShapeSvg": {
10123
10804
  /** The shape to draw. */
@@ -10130,8 +10811,8 @@ export interface OperationParams {
10130
10811
  /** When true, the edges other faces cover are drawn too, dashed. */
10131
10812
  drawHidden?: boolean | PipelineRef;
10132
10813
  /**
10133
- * How far the straight segments that trace a curved edge may stray from it, in model units;
10134
- * 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.
10135
10816
  */
10136
10817
  precision?: number | PipelineRef;
10137
10818
  /**
@@ -10151,9 +10832,9 @@ export interface OperationParams {
10151
10832
  * Draws the edges a view of a shape sees as SVG, hidden ones dashed when asked, and returns the
10152
10833
  * file's text.
10153
10834
  *
10154
- * The view looks from the frame's normal side, x along the frame's direction and y up, so each
10155
- * point is written as x and minus y. With the shape's `unit`, it states its true width and
10156
- * 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.
10157
10838
  */
10158
10839
  "occt.io.saveShapeSvgAndReturn": {
10159
10840
  /** The shape to draw. */
@@ -10166,8 +10847,8 @@ export interface OperationParams {
10166
10847
  /** When true, the edges other faces cover are drawn too, dashed. */
10167
10848
  drawHidden?: boolean | PipelineRef;
10168
10849
  /**
10169
- * How far the straight segments that trace a curved edge may stray from it, in model units;
10170
- * 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.
10171
10852
  */
10172
10853
  precision?: number | PipelineRef;
10173
10854
  /**
@@ -10184,14 +10865,17 @@ export interface OperationParams {
10184
10865
  tryDownload?: boolean | PipelineRef;
10185
10866
  };
10186
10867
  /**
10187
- * 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.
10188
10869
  *
10189
- * The shape must lie flat on the XZ ground plane, since DXF drawings are two-dimensional. The
10190
- * deflection settings say how closely curved edges are followed. Give the paths a layer with
10191
- * `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`.
10192
10873
  */
10193
10874
  "occt.io.shapeToDxfPaths": {
10194
- /** 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
+ */
10195
10879
  shape: unknown | PipelineRef;
10196
10880
  /**
10197
10881
  * The largest angle, in radians, the traced polyline may turn between two points; smaller
@@ -10209,6 +10893,64 @@ export interface OperationParams {
10209
10893
  uTolerance?: number | PipelineRef;
10210
10894
  /** Edges shorter than this, in model units, are traced with the minimum number of points. */
10211
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;
10212
10954
  };
10213
10955
  /**
10214
10956
  * Reads the center of a shape's axis-aligned bounding box, halfway between its two corners.
@@ -14157,8 +14899,8 @@ export interface OperationParams {
14157
14899
  * faces.
14158
14900
  *
14159
14901
  * `precision` is the meshing tolerance in model units: smaller values follow curved surfaces
14160
- * more closely and give more triangles. `adjustYtoZ` swaps the Y and Z axes for tools that
14161
- * 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.
14162
14904
  */
14163
14905
  "occt.shapeFacesToPolygonPoints": {
14164
14906
  /** The shape to triangulate. */
@@ -14169,8 +14911,8 @@ export interface OperationParams {
14169
14911
  */
14170
14912
  precision?: number | PipelineRef;
14171
14913
  /**
14172
- * When true, the points are turned so this library's Y-up becomes Z-up, for tools that treat Z
14173
- * 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.
14174
14916
  */
14175
14917
  adjustYtoZ?: boolean | PipelineRef;
14176
14918
  /**
@@ -19300,8 +20042,8 @@ export interface OperationParams {
19300
20042
  */
19301
20043
  precisionShare?: number | PipelineRef;
19302
20044
  /**
19303
- * When true, the meshes are turned so this library's Y-up becomes Z-up, for tools that treat Z
19304
- * 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.
19305
20047
  */
19306
20048
  adjustYtoZ?: boolean | PipelineRef;
19307
20049
  /**
@@ -19391,8 +20133,8 @@ export interface OperationParams {
19391
20133
  */
19392
20134
  precisionShare?: number | PipelineRef;
19393
20135
  /**
19394
- * When true, the mesh is turned so this library's Y-up becomes Z-up, for tools that treat Z as
19395
- * 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.
19396
20138
  */
19397
20139
  adjustYtoZ?: boolean | PipelineRef;
19398
20140
  /**
@@ -19717,20 +20459,19 @@ export interface OperationParams {
19717
20459
  makeFace?: boolean | PipelineRef;
19718
20460
  };
19719
20461
  /**
19720
- * Parses an SVG document and builds every drawable element into one compound shape on the
19721
- * 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.
19722
20463
  *
19723
- * `faceStrategy` decides whether closed outlines become faces, `scale` and `flipY` map SVG
19724
- * units and its downward Y axis, and `alignment`, `direction` and `center` place the result.
19725
- * 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.
19726
20467
  */
19727
20468
  "occt.svg.loadSVG": {
19728
20469
  /** The text of the SVG document. */
19729
20470
  svg?: string | PipelineRef;
19730
20471
  /**
19731
- * How filled shapes become faces: `none` keeps only wires, `auto` follows each element's fill
19732
- * rule, `nonzero` and `evenOdd` force a rule, `perSubpath` makes one face per closed subpath
19733
- * 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.
19734
20475
  */
19735
20476
  faceStrategy?: "none" | "auto" | "nonzero" | "evenOdd" | "perSubpath" | PipelineRef;
19736
20477
  /**
@@ -19742,33 +20483,53 @@ export interface OperationParams {
19742
20483
  includeInvisible?: boolean | PipelineRef;
19743
20484
  /** When true, consecutive segments of a subpath are merged into a single edge where they can be. */
19744
20485
  joinSegments?: boolean | PipelineRef;
19745
- /** 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
+ */
19746
20490
  tolerance?: number | PipelineRef;
19747
- /** 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
+ */
19748
20495
  scale?: number | PipelineRef;
19749
20496
  /** When true, Y is negated so the drawing comes out upright, since SVG has Y pointing down. */
19750
20497
  flipY?: boolean | PipelineRef;
19751
- /** 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
+ */
19752
20502
  alignment?: "topLeft" | "topMid" | "topRight" | "midLeft" | "midMid" | "midRight" | "bottomLeft" | "bottomMid" | "bottomRight" | PipelineRef;
19753
20503
  /** The normal of the plane the drawing is laid on; the default lays it flat on the ground. */
19754
20504
  direction?: [number, number, number] | PipelineRef;
19755
20505
  /** The point the aligned drawing is placed at. */
19756
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;
19757
20517
  };
19758
20518
  /**
19759
20519
  * Parses an SVG document and builds one shape per drawable element, each bundled with its
19760
- * 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.
19761
20522
  *
19762
20523
  * Use it when the elements need their own colors or separate handling; `loadSVG` gives the
19763
- * whole drawing as one shape. Faces are built where the outline allows it.
20524
+ * whole drawing as one shape.
19764
20525
  */
19765
20526
  "occt.svg.loadSVGStructured": {
19766
20527
  /** The text of the SVG document. */
19767
20528
  svg?: string | PipelineRef;
19768
20529
  /**
19769
- * How filled shapes become faces: `none` keeps only wires, `auto` follows each element's fill
19770
- * rule, `nonzero` and `evenOdd` force a rule, `perSubpath` makes one face per closed subpath
19771
- * 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.
19772
20533
  */
19773
20534
  faceStrategy?: "none" | "auto" | "nonzero" | "evenOdd" | "perSubpath" | PipelineRef;
19774
20535
  /**
@@ -19780,18 +20541,37 @@ export interface OperationParams {
19780
20541
  includeInvisible?: boolean | PipelineRef;
19781
20542
  /** When true, consecutive segments of a subpath are merged into a single edge where they can be. */
19782
20543
  joinSegments?: boolean | PipelineRef;
19783
- /** 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
+ */
19784
20548
  tolerance?: number | PipelineRef;
19785
- /** 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
+ */
19786
20553
  scale?: number | PipelineRef;
19787
20554
  /** When true, Y is negated so the drawing comes out upright, since SVG has Y pointing down. */
19788
20555
  flipY?: boolean | PipelineRef;
19789
- /** 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
+ */
19790
20560
  alignment?: "topLeft" | "topMid" | "topRight" | "midLeft" | "midMid" | "midRight" | "bottomLeft" | "bottomMid" | "bottomRight" | PipelineRef;
19791
20561
  /** The normal of the plane the drawing is laid on; the default lays it flat on the ground. */
19792
20562
  direction?: [number, number, number] | PipelineRef;
19793
20563
  /** The point the aligned drawing is placed at. */
19794
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;
19795
20575
  };
19796
20576
  /**
19797
20577
  * Moves a shape so that one point and direction on it land on another point and direction: the
@@ -20360,6 +21140,20 @@ export interface OperationParams {
20360
21140
  /** The move as `[x, y, z]`, in model units. */
20361
21141
  translation?: [number, number, number] | PipelineRef;
20362
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
+ };
20363
21157
  /** Sheet-metal unfold metrics report for a single face */
20364
21158
  "occtPro.sheetMetal.unfoldFaceReport": {
20365
21159
  /** Shape that contains the face to unfold */