@bitbybit-dev/base 1.6.2 → 1.8.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.
- package/NOTICE +24 -0
- package/README.md +3 -1
- package/lib/api/GlobalCDNProvider.js +1 -1
- package/lib/api/inputs/base-inputs.d.ts +40 -7
- package/lib/api/inputs/base-inputs.js +32 -0
- package/lib/api/inputs/io-inputs.d.ts +927 -59
- package/lib/api/inputs/io-inputs.js +769 -40
- package/lib/api/inputs/line-inputs.d.ts +17 -0
- package/lib/api/inputs/line-inputs.js +15 -0
- package/lib/api/inputs/mesh-inputs.d.ts +20 -1
- package/lib/api/inputs/mesh-inputs.js +23 -0
- package/lib/api/inputs/recipes-inputs.d.ts +13 -5
- package/lib/api/inputs/recipes-inputs.js +10 -5
- package/lib/api/kernel-calls/index.d.ts +2 -0
- package/lib/api/kernel-calls/index.js +2 -0
- package/lib/api/kernel-calls/resolve-dto.d.ts +3 -1
- package/lib/api/kernel-calls/resolve-dto.js +7 -2
- package/lib/api/kernel-calls/settings.d.ts +101 -0
- package/lib/api/kernel-calls/settings.js +123 -0
- package/lib/api/kernel-calls/up-axis-aliases.d.ts +25 -0
- package/lib/api/kernel-calls/up-axis-aliases.js +70 -0
- package/lib/api/models/simplex.d.ts +2 -0
- package/lib/api/models/simplex.js +10 -1
- package/lib/api/recipes/surface-mesh.d.ts +2 -1
- package/lib/api/recipes/surface-mesh.js +5 -3
- package/lib/api/resolved-inputs/index.d.ts +32 -3
- package/lib/api/services/base-bitbybit.d.ts +12 -0
- package/lib/api/services/base-bitbybit.js +19 -3
- package/lib/api/services/color.js +2 -3
- package/lib/api/services/helpers/color/color-forms.constants.d.ts +3 -0
- package/lib/api/services/helpers/color/color-forms.constants.js +3 -0
- package/lib/api/services/helpers/color/color-forms.d.ts +1 -0
- package/lib/api/services/helpers/color/color-forms.js +4 -1
- package/lib/api/services/helpers/color/css-colors.constants.d.ts +9 -0
- package/lib/api/services/helpers/color/css-colors.constants.js +158 -0
- package/lib/api/services/helpers/color/css-colors.d.ts +1 -0
- package/lib/api/services/helpers/color/css-colors.js +61 -0
- package/lib/api/services/helpers/curves/bezier-pieces.constants.d.ts +5 -0
- package/lib/api/services/helpers/curves/bezier-pieces.constants.js +5 -0
- package/lib/api/services/helpers/curves/bezier-pieces.d.ts +24 -0
- package/lib/api/services/helpers/curves/bezier-pieces.js +149 -0
- package/lib/api/services/helpers/curves/conic-arcs.constants.d.ts +5 -0
- package/lib/api/services/helpers/curves/conic-arcs.constants.js +5 -0
- package/lib/api/services/helpers/curves/conic-arcs.d.ts +26 -0
- package/lib/api/services/helpers/curves/conic-arcs.js +87 -0
- package/lib/api/services/helpers/curves/nurbs-forms.d.ts +20 -0
- package/lib/api/services/helpers/curves/nurbs-forms.js +112 -0
- package/lib/api/services/helpers/curves/nurbs.d.ts +4 -0
- package/lib/api/services/helpers/curves/nurbs.js +10 -9
- package/lib/api/services/helpers/files/drawing/drawing-budget.d.ts +3 -0
- package/lib/api/services/helpers/files/drawing/drawing-budget.js +34 -0
- package/lib/api/services/helpers/files/drawing/drawing-dimension.constants.d.ts +14 -0
- package/lib/api/services/helpers/files/drawing/drawing-dimension.constants.js +14 -0
- package/lib/api/services/helpers/files/drawing/drawing-dimension.d.ts +4 -0
- package/lib/api/services/helpers/files/drawing/drawing-dimension.js +271 -0
- package/lib/api/services/helpers/files/drawing/drawing-geometry.d.ts +21 -0
- package/lib/api/services/helpers/files/drawing/drawing-geometry.js +101 -0
- package/lib/api/services/helpers/files/drawing/drawing-hatch.d.ts +10 -0
- package/lib/api/services/helpers/files/drawing/drawing-hatch.js +123 -0
- package/lib/api/services/helpers/files/drawing/drawing-loops.d.ts +3 -0
- package/lib/api/services/helpers/files/drawing/drawing-loops.js +91 -0
- package/lib/api/services/helpers/files/drawing/drawing-model.d.ts +10 -0
- package/lib/api/services/helpers/files/drawing/drawing-model.js +336 -0
- package/lib/api/services/helpers/files/drawing/drawing-scale.d.ts +2 -0
- package/lib/api/services/helpers/files/drawing/drawing-scale.js +47 -0
- package/lib/api/services/helpers/files/drawing/drawing-text.d.ts +9 -0
- package/lib/api/services/helpers/files/drawing/drawing-text.js +25 -0
- package/lib/api/services/helpers/files/drawing/drawing-types.d.ts +117 -0
- package/lib/api/services/helpers/files/drawing/drawing-types.js +1 -0
- package/lib/api/services/helpers/files/drawing/drawing.constants.d.ts +41 -0
- package/lib/api/services/helpers/files/drawing/drawing.constants.js +46 -0
- package/lib/api/services/helpers/files/dxf/dxf-annotations.d.ts +5 -0
- package/lib/api/services/helpers/files/dxf/dxf-annotations.js +96 -0
- package/lib/api/services/helpers/files/dxf/dxf-colors.d.ts +5 -0
- package/lib/api/services/helpers/files/dxf/dxf-colors.js +45 -0
- package/lib/api/services/helpers/files/dxf/dxf-entities.d.ts +21 -0
- package/lib/api/services/helpers/files/dxf/dxf-entities.js +196 -0
- package/lib/api/services/helpers/files/dxf/dxf-file-text.d.ts +1 -0
- package/lib/api/services/helpers/files/dxf/dxf-file-text.js +50 -0
- package/lib/api/services/helpers/files/dxf/dxf-generator.d.ts +2 -36
- package/lib/api/services/helpers/files/dxf/dxf-generator.js +97 -523
- package/lib/api/services/helpers/files/dxf/dxf-reader-annotations.d.ts +9 -0
- package/lib/api/services/helpers/files/dxf/dxf-reader-annotations.js +312 -0
- package/lib/api/services/helpers/files/dxf/dxf-reader-dtos.d.ts +6 -0
- package/lib/api/services/helpers/files/dxf/dxf-reader-dtos.js +115 -0
- package/lib/api/services/helpers/files/dxf/dxf-reader-geometry.d.ts +21 -0
- package/lib/api/services/helpers/files/dxf/dxf-reader-geometry.js +67 -0
- package/lib/api/services/helpers/files/dxf/dxf-reader-segments.d.ts +9 -0
- package/lib/api/services/helpers/files/dxf/dxf-reader-segments.js +151 -0
- package/lib/api/services/helpers/files/dxf/dxf-reader-types.d.ts +96 -0
- package/lib/api/services/helpers/files/dxf/dxf-reader-types.js +1 -0
- package/lib/api/services/helpers/files/dxf/dxf-reader.constants.d.ts +134 -0
- package/lib/api/services/helpers/files/dxf/dxf-reader.constants.js +95 -0
- package/lib/api/services/helpers/files/dxf/dxf-reader.d.ts +2 -0
- package/lib/api/services/helpers/files/dxf/dxf-reader.js +446 -0
- package/lib/api/services/helpers/files/dxf/dxf-tables.d.ts +29 -0
- package/lib/api/services/helpers/files/dxf/dxf-tables.js +248 -0
- package/lib/api/services/helpers/files/dxf/dxf-text.d.ts +26 -0
- package/lib/api/services/helpers/files/dxf/dxf-text.js +97 -0
- package/lib/api/services/helpers/files/dxf/dxf-tokens.d.ts +11 -0
- package/lib/api/services/helpers/files/dxf/dxf-tokens.js +89 -0
- package/lib/api/services/helpers/files/dxf/dxf.constants.d.ts +43 -1
- package/lib/api/services/helpers/files/dxf/dxf.constants.js +47 -1
- package/lib/api/services/helpers/files/file-bytes.d.ts +1 -0
- package/lib/api/services/helpers/files/file-bytes.js +15 -0
- package/lib/api/services/helpers/files/ground-axes.d.ts +2 -0
- package/lib/api/services/helpers/files/ground-axes.js +4 -0
- package/lib/api/services/helpers/files/mesh-file-axes.d.ts +7 -0
- package/lib/api/services/helpers/files/mesh-file-axes.js +17 -0
- package/lib/api/services/helpers/files/stl-axes.d.ts +4 -0
- package/lib/api/services/helpers/files/stl-axes.js +22 -0
- package/lib/api/services/helpers/files/stl-types.d.ts +7 -0
- package/lib/api/services/helpers/files/stl-types.js +1 -0
- package/lib/api/services/helpers/files/stl.constants.d.ts +11 -0
- package/lib/api/services/helpers/files/stl.constants.js +11 -0
- package/lib/api/services/helpers/files/stl.d.ts +3 -0
- package/lib/api/services/helpers/files/stl.js +93 -0
- package/lib/api/services/helpers/files/svg/svg-css.d.ts +48 -0
- package/lib/api/services/helpers/files/svg/svg-css.js +444 -0
- package/lib/api/services/helpers/files/svg/svg-dash-patterns.d.ts +2 -0
- package/lib/api/services/helpers/files/svg/svg-dash-patterns.js +35 -0
- package/lib/api/services/helpers/files/svg/svg-document.d.ts +26 -0
- package/lib/api/services/helpers/files/svg/svg-document.js +89 -0
- package/lib/api/services/helpers/files/svg/svg-memo.d.ts +1 -0
- package/lib/api/services/helpers/files/svg/svg-memo.js +8 -0
- package/lib/api/services/helpers/files/svg/svg-normalizer.d.ts +6 -0
- package/lib/api/services/helpers/files/svg/svg-normalizer.js +433 -0
- package/lib/api/services/helpers/files/svg/svg-numbers.d.ts +15 -0
- package/lib/api/services/helpers/files/svg/svg-numbers.js +61 -0
- package/lib/api/services/helpers/files/svg/svg-path-data.constants.d.ts +8 -0
- package/lib/api/services/helpers/files/svg/svg-path-data.constants.js +10 -0
- package/lib/api/services/helpers/files/svg/svg-path-data.d.ts +9 -0
- package/lib/api/services/helpers/files/svg/svg-path-data.js +203 -0
- package/lib/api/services/helpers/files/svg/svg-path-types.d.ts +33 -0
- package/lib/api/services/helpers/files/svg/svg-path-types.js +1 -0
- package/lib/api/services/helpers/files/svg/svg-reader.constants.d.ts +35 -0
- package/lib/api/services/helpers/files/svg/svg-reader.constants.js +35 -0
- package/lib/api/services/helpers/files/svg/svg-reading.constants.d.ts +9 -0
- package/lib/api/services/helpers/files/svg/svg-reading.constants.js +9 -0
- package/lib/api/services/helpers/files/svg/svg-reading.d.ts +6 -0
- package/lib/api/services/helpers/files/svg/svg-reading.js +233 -0
- package/lib/api/services/helpers/files/svg/svg-scene-types.d.ts +54 -0
- package/lib/api/services/helpers/files/svg/svg-scene-types.js +1 -0
- package/lib/api/services/helpers/files/svg/svg-shapes.d.ts +6 -0
- package/lib/api/services/helpers/files/svg/svg-shapes.js +102 -0
- package/lib/api/services/helpers/files/svg/svg-strokes.d.ts +38 -0
- package/lib/api/services/helpers/files/svg/svg-strokes.js +132 -0
- package/lib/api/services/helpers/files/svg/svg-style.d.ts +26 -0
- package/lib/api/services/helpers/files/svg/svg-style.js +211 -0
- package/lib/api/services/helpers/files/svg/svg-transform.d.ts +10 -0
- package/lib/api/services/helpers/files/svg/svg-transform.js +76 -0
- package/lib/api/services/helpers/files/svg/svg-writer.d.ts +18 -0
- package/lib/api/services/helpers/files/svg/svg-writer.js +230 -0
- package/lib/api/services/helpers/files/svg/svg-xml.d.ts +11 -0
- package/lib/api/services/helpers/files/svg/svg-xml.js +322 -0
- package/lib/api/services/helpers/files/svg/svg.constants.d.ts +14 -0
- package/lib/api/services/helpers/files/svg/svg.constants.js +14 -0
- package/lib/api/services/helpers/files/work-budget.d.ts +11 -0
- package/lib/api/services/helpers/files/work-budget.js +26 -0
- package/lib/api/services/helpers/geometry/affine2.d.ts +8 -0
- package/lib/api/services/helpers/geometry/affine2.js +18 -0
- package/lib/api/services/helpers/geometry/ellipse-arcs.d.ts +14 -0
- package/lib/api/services/helpers/geometry/ellipse-arcs.js +96 -0
- package/lib/api/services/helpers/geometry/frame-axes.d.ts +3 -1
- package/lib/api/services/helpers/geometry/loop-fill.d.ts +2 -0
- package/lib/api/services/helpers/geometry/loop-fill.js +37 -0
- package/lib/api/services/helpers/geometry/polygon-nesting.constants.d.ts +6 -0
- package/lib/api/services/helpers/geometry/polygon-nesting.constants.js +6 -0
- package/lib/api/services/helpers/geometry/polygon-nesting.d.ts +31 -0
- package/lib/api/services/helpers/geometry/polygon-nesting.js +251 -0
- package/lib/api/services/helpers/geometry/vectors.d.ts +1 -0
- package/lib/api/services/helpers/geometry/vectors.js +6 -0
- package/lib/api/services/helpers/helper-types.d.ts +33 -0
- package/lib/api/services/helpers/text/stroke-font.d.ts +6 -0
- package/lib/api/services/helpers/text/stroke-font.js +177 -0
- package/lib/api/services/helpers/text/stroke-letters.constants.d.ts +2 -0
- package/lib/api/services/helpers/text/stroke-letters.constants.js +18 -0
- package/lib/api/services/helpers/text/stroke-marks.constants.d.ts +14 -0
- package/lib/api/services/helpers/text/stroke-marks.constants.js +34 -0
- package/lib/api/services/io/drawing.d.ts +368 -0
- package/lib/api/services/io/drawing.js +454 -0
- package/lib/api/services/io/dxf.d.ts +134 -0
- package/lib/api/services/io/dxf.js +167 -0
- package/lib/api/services/io/index.d.ts +4 -0
- package/lib/api/services/io/index.js +4 -0
- package/lib/api/services/io/io.d.ts +14 -0
- package/lib/api/services/io/io.js +15 -0
- package/lib/api/services/io/svg.d.ts +66 -0
- package/lib/api/services/io/svg.js +105 -0
- package/lib/api/services/line.d.ts +17 -0
- package/lib/api/services/line.js +20 -1
- package/lib/api/services/mesh.d.ts +19 -0
- package/lib/api/services/mesh.js +40 -0
- package/lib/api/services/point.d.ts +4 -1
- package/lib/api/services/point.js +9 -4
- package/lib/api/services/recipes.d.ts +3 -0
- package/lib/api/services/recipes.js +6 -2
- package/lib/api/services/text.d.ts +7 -4
- package/lib/api/services/text.js +14 -27
- package/package.json +1 -1
- package/lib/api/services/helpers/files/dxf/dxf.d.ts +0 -87
- package/lib/api/services/helpers/files/dxf/dxf.js +0 -111
- package/lib/api/services/io.d.ts +0 -9
- package/lib/api/services/io.js +0 -10
|
@@ -5,164 +5,709 @@ import type { Base } from "./base-inputs";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare namespace IO {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* How the lines of a drawing part are drawn: whole, or broken into dashes, the dashes scaled to
|
|
9
|
+
* the drawing's size. DXF writes the matching line type, SVG a dash pattern.
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
enum lineTypeEnum {
|
|
12
|
+
continuous = "continuous",
|
|
13
|
+
dashed = "dashed",
|
|
14
|
+
hidden = "hidden",
|
|
15
|
+
center = "center",
|
|
16
|
+
dotted = "dotted"
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* What a hatch fills its region with: `solid` ink, or lines `spacing` apart - `ansi31` one run
|
|
20
|
+
* of lines, `ansi32` lines in pairs a third of the spacing apart, `ansi37` two runs crossing at
|
|
21
|
+
* right angles.
|
|
22
|
+
*
|
|
23
|
+
* The second line of each `ansi32` pair is drawn whole, where the ANSI32 of CAD programs dashes
|
|
24
|
+
* it; a DXF file names the pattern ANSI32 at its standard scale.
|
|
25
|
+
* @beta
|
|
26
|
+
*/
|
|
27
|
+
enum hatchPatternEnum {
|
|
28
|
+
solid = "solid",
|
|
29
|
+
ansi31 = "ansi31",
|
|
30
|
+
ansi32 = "ansi32",
|
|
31
|
+
ansi37 = "ansi37"
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* What a dimension measures: a `linear` distance between two points, the `diameter` or the
|
|
35
|
+
* `radius` of a circle, or the `angle` between two arms that meet at a point.
|
|
36
|
+
* @beta
|
|
37
|
+
*/
|
|
38
|
+
enum dimensionKindEnum {
|
|
39
|
+
linear = "linear",
|
|
40
|
+
diameter = "diameter",
|
|
41
|
+
radius = "radius",
|
|
42
|
+
angular = "angular"
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A straight line in a drawing path, from `start` to `end`. Points may carry a Z coordinate; one
|
|
46
|
+
* without it lies at Z 0.
|
|
47
|
+
*/
|
|
48
|
+
class DrawingLineSegmentDto {
|
|
49
|
+
constructor(start?: Base.Point2 | Base.Point3, end?: Base.Point2 | Base.Point3);
|
|
12
50
|
/**
|
|
13
|
-
*
|
|
51
|
+
* Where the line starts.
|
|
14
52
|
* @default undefined
|
|
15
53
|
*/
|
|
16
|
-
start: Base.Point2;
|
|
54
|
+
start: Base.Point2 | Base.Point3;
|
|
17
55
|
/**
|
|
18
|
-
*
|
|
56
|
+
* Where the line ends.
|
|
19
57
|
* @default undefined
|
|
20
58
|
*/
|
|
21
|
-
end: Base.Point2;
|
|
59
|
+
end: Base.Point2 | Base.Point3;
|
|
22
60
|
}
|
|
23
61
|
/**
|
|
24
|
-
*
|
|
62
|
+
* A circular arc in a drawing path, running counterclockwise from `startAngle` to `endAngle`
|
|
63
|
+
* about its `center`, in the XY plane unless a `normal` tilts it.
|
|
25
64
|
*/
|
|
26
|
-
class
|
|
27
|
-
constructor(center?: Base.Point2, radius?: number, startAngle?: number, endAngle?: number);
|
|
65
|
+
class DrawingArcSegmentDto {
|
|
66
|
+
constructor(center?: Base.Point2 | Base.Point3, radius?: number, startAngle?: number, endAngle?: number, normal?: Base.Vector3);
|
|
28
67
|
/**
|
|
29
|
-
*
|
|
68
|
+
* The center of the arc's circle.
|
|
30
69
|
* @default undefined
|
|
31
70
|
*/
|
|
32
|
-
center: Base.Point2;
|
|
71
|
+
center: Base.Point2 | Base.Point3;
|
|
33
72
|
/**
|
|
34
73
|
* Distance from the center to the arc, in drawing units.
|
|
35
74
|
* @default undefined
|
|
75
|
+
* @minimum 0
|
|
76
|
+
* @exclusiveMinimum true
|
|
36
77
|
*/
|
|
37
78
|
radius: number;
|
|
38
79
|
/**
|
|
39
|
-
*
|
|
80
|
+
* Where the arc starts, in degrees counterclockwise from the X axis (the X axis CAD programs
|
|
81
|
+
* derive from the `normal` when one is given).
|
|
40
82
|
* @default undefined
|
|
41
83
|
*/
|
|
42
84
|
startAngle: number;
|
|
43
85
|
/**
|
|
44
|
-
*
|
|
86
|
+
* Where the arc ends, in degrees; the arc runs counterclockwise from the start, through 0
|
|
87
|
+
* when the end is below the start.
|
|
45
88
|
* @default undefined
|
|
46
89
|
*/
|
|
47
90
|
endAngle: number;
|
|
91
|
+
/**
|
|
92
|
+
* The direction the arc's plane faces, counterclockwise seen from its tip. Leave it out for an
|
|
93
|
+
* arc in the XY plane facing +Z.
|
|
94
|
+
* @default undefined
|
|
95
|
+
* @optional true
|
|
96
|
+
*/
|
|
97
|
+
normal?: Base.Vector3 | undefined;
|
|
48
98
|
}
|
|
49
99
|
/**
|
|
50
|
-
* A full circle in a
|
|
100
|
+
* A full circle in a drawing path, given by its center and radius, in the XY plane unless a
|
|
101
|
+
* `normal` tilts it.
|
|
51
102
|
*/
|
|
52
|
-
class
|
|
53
|
-
constructor(center?: Base.Point2, radius?: number);
|
|
103
|
+
class DrawingCircleSegmentDto {
|
|
104
|
+
constructor(center?: Base.Point2 | Base.Point3, radius?: number, normal?: Base.Vector3);
|
|
54
105
|
/**
|
|
55
|
-
*
|
|
106
|
+
* Where the circle's center lies; without a Z it lies at Z 0.
|
|
56
107
|
* @default undefined
|
|
57
108
|
*/
|
|
58
|
-
center: Base.Point2;
|
|
109
|
+
center: Base.Point2 | Base.Point3;
|
|
59
110
|
/**
|
|
60
111
|
* Distance from the center to the circle, in drawing units.
|
|
61
112
|
* @default undefined
|
|
113
|
+
* @minimum 0
|
|
114
|
+
* @exclusiveMinimum true
|
|
62
115
|
*/
|
|
63
116
|
radius: number;
|
|
117
|
+
/**
|
|
118
|
+
* The direction the circle's plane faces. Leave it out for a circle in the XY plane.
|
|
119
|
+
* @default undefined
|
|
120
|
+
* @optional true
|
|
121
|
+
*/
|
|
122
|
+
normal?: Base.Vector3 | undefined;
|
|
64
123
|
}
|
|
65
124
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
125
|
+
* Connected straight segments through `points`, each of which a bulge can bend into an arc. A
|
|
126
|
+
* polyline whose points do not all share one Z is written as a 3D polyline, which takes no bulges.
|
|
68
127
|
*/
|
|
69
|
-
class
|
|
70
|
-
constructor(points?: Base.Point2[], closed?: boolean, bulges?: number[]);
|
|
128
|
+
class DrawingPolylineSegmentDto {
|
|
129
|
+
constructor(points?: (Base.Point2 | Base.Point3)[], closed?: boolean, bulges?: number[]);
|
|
71
130
|
/**
|
|
72
|
-
*
|
|
131
|
+
* The vertices, in order. A last point equal to the first closes the polyline as `closed`
|
|
132
|
+
* does.
|
|
73
133
|
* @default undefined
|
|
74
134
|
*/
|
|
75
|
-
points: Base.Point2[];
|
|
135
|
+
points: (Base.Point2 | Base.Point3)[];
|
|
76
136
|
/**
|
|
77
|
-
* Whether the
|
|
137
|
+
* Whether a segment joins the last vertex back to the first.
|
|
78
138
|
* @default false
|
|
79
139
|
*/
|
|
80
140
|
closed?: boolean | undefined;
|
|
81
141
|
/**
|
|
82
|
-
* One
|
|
83
|
-
*
|
|
84
|
-
* only.
|
|
142
|
+
* One per vertex, bending the segment after it into an arc: the tangent of a quarter of its
|
|
143
|
+
* turn, 0 for straight, positive counterclockwise. Left out, every segment is straight.
|
|
85
144
|
* @default undefined
|
|
86
145
|
* @optional true
|
|
87
146
|
*/
|
|
88
147
|
bulges?: number[] | undefined;
|
|
89
148
|
}
|
|
90
149
|
/**
|
|
91
|
-
*
|
|
150
|
+
* A B-spline or NURBS curve in a drawing path, given by its control points, degree and
|
|
151
|
+
* optionally its knots and weights. Without knots the curve starts and ends at its end points.
|
|
92
152
|
*/
|
|
93
|
-
class
|
|
94
|
-
constructor(controlPoints?: Base.Point2[], degree?: number, closed?: boolean);
|
|
153
|
+
class DrawingSplineSegmentDto {
|
|
154
|
+
constructor(controlPoints?: (Base.Point2 | Base.Point3)[], degree?: number, closed?: boolean, knots?: number[], weights?: number[]);
|
|
95
155
|
/**
|
|
96
|
-
*
|
|
156
|
+
* The control points the curve is pulled towards; there must be more of them than the
|
|
157
|
+
* degree.
|
|
97
158
|
* @default undefined
|
|
98
159
|
*/
|
|
99
|
-
controlPoints: Base.Point2[];
|
|
160
|
+
controlPoints: (Base.Point2 | Base.Point3)[];
|
|
100
161
|
/**
|
|
101
|
-
*
|
|
162
|
+
* The degree of the curve: 1 draws the control polygon, 2 and 3 smooth curves.
|
|
102
163
|
* @default 3
|
|
164
|
+
* @minimum 1
|
|
165
|
+
* @maximum Infinity
|
|
166
|
+
* @step 1
|
|
103
167
|
*/
|
|
104
168
|
degree?: number | undefined;
|
|
105
169
|
/**
|
|
106
|
-
*
|
|
170
|
+
* Without `knots`, whether the curve wraps around its control points into a smooth closed
|
|
171
|
+
* loop. With `knots`, the knots decide, and this is ignored.
|
|
107
172
|
* @default false
|
|
108
173
|
*/
|
|
109
174
|
closed?: boolean | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* The full knot vector: never decreasing, one more value than the control points and the
|
|
177
|
+
* degree together. Left out, the curve starts and ends at its end points.
|
|
178
|
+
* @default undefined
|
|
179
|
+
* @optional true
|
|
180
|
+
*/
|
|
181
|
+
knots?: number[] | undefined;
|
|
182
|
+
/**
|
|
183
|
+
* One positive weight per control point, which makes the curve rational (a NURBS curve). Leave
|
|
184
|
+
* it out for a weight of 1 everywhere.
|
|
185
|
+
* @default undefined
|
|
186
|
+
* @optional true
|
|
187
|
+
*/
|
|
188
|
+
weights?: number[] | undefined;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* An ellipse or an arc of one in a drawing path: its center, the vector to the end of its major
|
|
192
|
+
* axis and the minor to major ratio, in the XY plane unless `normal` tilts it.
|
|
193
|
+
*/
|
|
194
|
+
class DrawingEllipseSegmentDto {
|
|
195
|
+
constructor(center?: Base.Point2 | Base.Point3, majorAxis?: Base.Vector2 | Base.Vector3, ratio?: number, startParameter?: number, endParameter?: number, normal?: Base.Vector3);
|
|
196
|
+
/**
|
|
197
|
+
* Where the ellipse's center lies; without a Z it lies at Z 0.
|
|
198
|
+
* @default undefined
|
|
199
|
+
*/
|
|
200
|
+
center: Base.Point2 | Base.Point3;
|
|
201
|
+
/**
|
|
202
|
+
* The vector from the center to one end of the major axis; its length is the major radius,
|
|
203
|
+
* in drawing units.
|
|
204
|
+
* @default undefined
|
|
205
|
+
*/
|
|
206
|
+
majorAxis: Base.Vector2 | Base.Vector3;
|
|
207
|
+
/**
|
|
208
|
+
* The minor radius divided by the major radius.
|
|
209
|
+
* @default undefined
|
|
210
|
+
* @minimum 0
|
|
211
|
+
* @maximum 1
|
|
212
|
+
* @exclusiveMinimum true
|
|
213
|
+
*/
|
|
214
|
+
ratio: number;
|
|
215
|
+
/**
|
|
216
|
+
* Where the arc starts, as the ellipse's parameter t in radians (the point center +
|
|
217
|
+
* cos(t) `majorAxis` + sin(t) minor axis), the angle only when `ratio` is 1.
|
|
218
|
+
* @default 0
|
|
219
|
+
* @minimum -Infinity
|
|
220
|
+
* @maximum Infinity
|
|
221
|
+
*/
|
|
222
|
+
startParameter?: number | undefined;
|
|
223
|
+
/**
|
|
224
|
+
* Where the arc ends, as the same parameter in radians; the arc runs counterclockwise from the
|
|
225
|
+
* start, through 0 when the end is below the start.
|
|
226
|
+
* @default 6.283185307179586
|
|
227
|
+
* @minimum -Infinity
|
|
228
|
+
* @maximum Infinity
|
|
229
|
+
*/
|
|
230
|
+
endParameter?: number | undefined;
|
|
231
|
+
/**
|
|
232
|
+
* The direction the ellipse's plane faces, perpendicular to `majorAxis`. Leave it out for an
|
|
233
|
+
* ellipse in the XY plane facing +Z.
|
|
234
|
+
* @default undefined
|
|
235
|
+
* @optional true
|
|
236
|
+
*/
|
|
237
|
+
normal?: Base.Vector3 | undefined;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* A path of a drawing: segments of any kind (lines, arcs, circles, polylines, splines and
|
|
241
|
+
* ellipses), in the order they are drawn, like the edges of a wire.
|
|
242
|
+
*/
|
|
243
|
+
class DrawingPathDto {
|
|
244
|
+
constructor(segments?: (DrawingLineSegmentDto | DrawingArcSegmentDto | DrawingCircleSegmentDto | DrawingPolylineSegmentDto | DrawingSplineSegmentDto | DrawingEllipseSegmentDto)[]);
|
|
245
|
+
/**
|
|
246
|
+
* The segments of the path, in order; where one ends at the next one's start, SVG draws them
|
|
247
|
+
* as one stroke.
|
|
248
|
+
* @default undefined
|
|
249
|
+
*/
|
|
250
|
+
segments: (DrawingLineSegmentDto | DrawingArcSegmentDto | DrawingCircleSegmentDto | DrawingPolylineSegmentDto | DrawingSplineSegmentDto | DrawingEllipseSegmentDto)[];
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* A line of text, in the stroke font `text.vectorText` draws.
|
|
254
|
+
*
|
|
255
|
+
* SVG draws its strokes; DXF writes a text fitted to their width. Accented Latin letters are
|
|
256
|
+
* drawn; a character the font lacks is a question mark, an emoji two.
|
|
257
|
+
* @beta
|
|
258
|
+
*/
|
|
259
|
+
class DrawingTextDto {
|
|
260
|
+
constructor(text?: string, position?: Base.Point2 | Base.Point3, height?: number, anchor?: "start" | "middle" | "end", rotation?: number, widthFactor?: number);
|
|
261
|
+
/**
|
|
262
|
+
* The text, one line of it: a control character, such as a line break, a tab or U+0085, is
|
|
263
|
+
* refused; a line separator is drawn as a question mark.
|
|
264
|
+
* @default undefined
|
|
265
|
+
*/
|
|
266
|
+
text: string;
|
|
267
|
+
/**
|
|
268
|
+
* The point on the baseline the text is placed by; `anchor` says which point of the line it is.
|
|
269
|
+
* @default undefined
|
|
270
|
+
*/
|
|
271
|
+
position: Base.Point2 | Base.Point3;
|
|
272
|
+
/**
|
|
273
|
+
* The height of a capital letter, in drawing units.
|
|
274
|
+
* @default 3.5
|
|
275
|
+
* @minimum 0
|
|
276
|
+
* @exclusiveMinimum true
|
|
277
|
+
*/
|
|
278
|
+
height?: number | undefined;
|
|
279
|
+
/**
|
|
280
|
+
* Which point of the baseline `position` is: where the text starts, its middle or its end.
|
|
281
|
+
* @default start
|
|
282
|
+
*/
|
|
283
|
+
anchor?: "start" | "middle" | "end" | undefined;
|
|
284
|
+
/**
|
|
285
|
+
* The angle of the baseline in degrees, counterclockwise from the X axis.
|
|
286
|
+
* @default 0
|
|
287
|
+
*/
|
|
288
|
+
rotation?: number | undefined;
|
|
289
|
+
/**
|
|
290
|
+
* How wide the letters are drawn against their natural width: below 1 narrows a text to fit a
|
|
291
|
+
* cell, above 1 widens it.
|
|
292
|
+
* @default 1
|
|
293
|
+
* @minimum 0
|
|
294
|
+
* @exclusiveMinimum true
|
|
295
|
+
*/
|
|
296
|
+
widthFactor?: number | undefined;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* The room a drawing text takes, as `io.drawing.textSize` measures it.
|
|
300
|
+
* @beta
|
|
301
|
+
*/
|
|
302
|
+
class DrawingTextSizeDto {
|
|
303
|
+
/**
|
|
304
|
+
* The length of the text along its baseline, in drawing units.
|
|
305
|
+
* @default undefined
|
|
306
|
+
*/
|
|
307
|
+
width: number;
|
|
308
|
+
/**
|
|
309
|
+
* How far the font's highest ink rises above the baseline: a little more than `height`, which
|
|
310
|
+
* marks over capitals and tall signs use.
|
|
311
|
+
* @default undefined
|
|
312
|
+
*/
|
|
313
|
+
above: number;
|
|
314
|
+
/**
|
|
315
|
+
* How far the font's lowest ink drops below the baseline, where the tail of a `g` or a `y` ends.
|
|
316
|
+
* @default undefined
|
|
317
|
+
*/
|
|
318
|
+
below: number;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* A hatched region of a drawing part: what its boundaries enclose, filled with a pattern.
|
|
322
|
+
*
|
|
323
|
+
* A boundary inside another cuts a hole, and one whose ends do not meet is closed by a
|
|
324
|
+
* straight line.
|
|
325
|
+
* @beta
|
|
326
|
+
*/
|
|
327
|
+
class DrawingHatchDto {
|
|
328
|
+
constructor(boundaries?: DrawingPathDto[], pattern?: hatchPatternEnum, angle?: number, spacing?: number);
|
|
329
|
+
/**
|
|
330
|
+
* The closed paths that bound the region, in the drawing's XY plane.
|
|
331
|
+
* @default undefined
|
|
332
|
+
*/
|
|
333
|
+
boundaries: DrawingPathDto[];
|
|
334
|
+
/**
|
|
335
|
+
* What the region is filled with.
|
|
336
|
+
* @default ansi31
|
|
337
|
+
*/
|
|
338
|
+
pattern?: hatchPatternEnum | undefined;
|
|
339
|
+
/**
|
|
340
|
+
* The angle of the pattern's lines in degrees, counterclockwise from the X axis; `solid`
|
|
341
|
+
* ignores it.
|
|
342
|
+
* @default 45
|
|
343
|
+
*/
|
|
344
|
+
angle?: number | undefined;
|
|
345
|
+
/**
|
|
346
|
+
* The distance between the pattern's lines, in drawing units; `solid` ignores it. DXF writes
|
|
347
|
+
* it as a scale of the pattern in `acad.pat` for an inch drawing, in `acadiso.pat` otherwise.
|
|
348
|
+
* @default 3
|
|
349
|
+
* @minimum 0
|
|
350
|
+
* @exclusiveMinimum true
|
|
351
|
+
*/
|
|
352
|
+
spacing?: number | undefined;
|
|
110
353
|
}
|
|
111
354
|
/**
|
|
112
|
-
* A
|
|
113
|
-
*
|
|
355
|
+
* A hatch and how closely its curved boundaries are followed, for `io.drawing.clippedHatchLines`,
|
|
356
|
+
* which clips the pattern's lines to the region, and `io.drawing.hatchOutlines`, which gives the
|
|
357
|
+
* region's outlines as points.
|
|
358
|
+
* @beta
|
|
114
359
|
*/
|
|
115
|
-
class
|
|
116
|
-
constructor(
|
|
360
|
+
class DrawingHatchRegionDto {
|
|
361
|
+
constructor(boundaries?: DrawingPathDto[], pattern?: hatchPatternEnum, angle?: number, spacing?: number, tolerance?: number);
|
|
117
362
|
/**
|
|
118
|
-
*
|
|
119
|
-
*
|
|
363
|
+
* The closed paths that bound the region, in the drawing's XY plane; a boundary inside another
|
|
364
|
+
* cuts a hole, and one inside that hole is filled again.
|
|
120
365
|
* @default undefined
|
|
121
366
|
*/
|
|
122
|
-
|
|
367
|
+
boundaries: DrawingPathDto[];
|
|
368
|
+
/**
|
|
369
|
+
* What the region is filled with; `solid` has no lines.
|
|
370
|
+
* @default ansi31
|
|
371
|
+
*/
|
|
372
|
+
pattern?: hatchPatternEnum | undefined;
|
|
373
|
+
/**
|
|
374
|
+
* The angle of the pattern's lines in degrees, counterclockwise from the X axis.
|
|
375
|
+
* @default 45
|
|
376
|
+
*/
|
|
377
|
+
angle?: number | undefined;
|
|
378
|
+
/**
|
|
379
|
+
* The distance between the pattern's lines, in drawing units.
|
|
380
|
+
* @default 3
|
|
381
|
+
* @minimum 0
|
|
382
|
+
* @exclusiveMinimum true
|
|
383
|
+
*/
|
|
384
|
+
spacing?: number | undefined;
|
|
385
|
+
/**
|
|
386
|
+
* How far, in drawing units, the outline may stray from a curved boundary: arcs, circles,
|
|
387
|
+
* ellipses and splines become straight pieces this close to the curve.
|
|
388
|
+
* @default 0.01
|
|
389
|
+
* @minimum 0
|
|
390
|
+
* @exclusiveMinimum true
|
|
391
|
+
* @maximum Infinity
|
|
392
|
+
* @step 0.001
|
|
393
|
+
*/
|
|
394
|
+
tolerance?: number | undefined;
|
|
123
395
|
}
|
|
124
396
|
/**
|
|
125
|
-
* A part
|
|
397
|
+
* A part of a drawing: paths, texts and hatches on one layer, in one color, line type and line
|
|
398
|
+
* weight, which `io.dxf.dxfCreate` writes as DXF and `io.svg.svgCreate` as SVG.
|
|
126
399
|
*/
|
|
127
|
-
class
|
|
128
|
-
constructor(layer?: string, color?: Base.Color, paths?:
|
|
400
|
+
class DrawingPartDto {
|
|
401
|
+
constructor(layer?: string, color?: Base.Color, paths?: DrawingPathDto[], lineType?: lineTypeEnum, lineWeight?: number, texts?: DrawingTextDto[], hatches?: DrawingHatchDto[]);
|
|
129
402
|
/**
|
|
130
|
-
*
|
|
403
|
+
* The layer the paths go on. Parts may share a layer, which takes the first part's color and
|
|
404
|
+
* line type; every part's paths keep their own.
|
|
131
405
|
* @default Default
|
|
132
406
|
*/
|
|
133
407
|
layer?: string | undefined;
|
|
134
408
|
/**
|
|
135
|
-
*
|
|
409
|
+
* The color of every path in the part, as a hex string such as `#000000`.
|
|
136
410
|
* @default #000000
|
|
137
411
|
*/
|
|
138
412
|
color?: Base.Color | undefined;
|
|
139
413
|
/**
|
|
140
|
-
*
|
|
414
|
+
* The paths of the part, each a run of segments.
|
|
415
|
+
* @default undefined
|
|
416
|
+
*/
|
|
417
|
+
paths: DrawingPathDto[];
|
|
418
|
+
/**
|
|
419
|
+
* Whether the lines are whole or dashed, such as `hidden` for edges a view cannot see.
|
|
420
|
+
* @default continuous
|
|
421
|
+
*/
|
|
422
|
+
lineType?: lineTypeEnum | undefined;
|
|
423
|
+
/**
|
|
424
|
+
* How wide the part's lines and text strokes are, in drawing units. Left out, the writer's own
|
|
425
|
+
* width is used: the drawing's `strokeWidth` in SVG, the layer's in DXF.
|
|
426
|
+
* @default undefined
|
|
427
|
+
* @optional true
|
|
428
|
+
* @minimum 0
|
|
429
|
+
* @exclusiveMinimum true
|
|
430
|
+
* @beta
|
|
431
|
+
*/
|
|
432
|
+
lineWeight?: number | undefined;
|
|
433
|
+
/**
|
|
434
|
+
* Lines of text on the part's layer, in its color.
|
|
435
|
+
* @default undefined
|
|
436
|
+
* @optional true
|
|
437
|
+
* @beta
|
|
438
|
+
*/
|
|
439
|
+
texts?: DrawingTextDto[] | undefined;
|
|
440
|
+
/**
|
|
441
|
+
* Hatched regions on the part's layer, in its color.
|
|
442
|
+
* @default undefined
|
|
443
|
+
* @optional true
|
|
444
|
+
* @beta
|
|
445
|
+
*/
|
|
446
|
+
hatches?: DrawingHatchDto[] | undefined;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Drawing parts and the one factor `io.drawing.scaleParts` scales them by about the origin, such
|
|
450
|
+
* as 1/25.4 to turn a drawing in millimetres into inches before writing it.
|
|
451
|
+
* @beta
|
|
452
|
+
*/
|
|
453
|
+
class DrawingScalePartsDto {
|
|
454
|
+
constructor(parts?: DrawingPartDto[], factor?: number);
|
|
455
|
+
/**
|
|
456
|
+
* The parts to scale; they stay as they are and scaled copies come back.
|
|
457
|
+
* @default undefined
|
|
458
|
+
*/
|
|
459
|
+
parts: DrawingPartDto[];
|
|
460
|
+
/**
|
|
461
|
+
* What every length is multiplied by: 2 doubles the drawing, 25.4 turns inches into
|
|
462
|
+
* millimetres.
|
|
463
|
+
* @default 1
|
|
464
|
+
* @minimum 0
|
|
465
|
+
* @exclusiveMinimum true
|
|
466
|
+
*/
|
|
467
|
+
factor?: number | undefined;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* A dimension in the drawing's plane for `io.drawing.dimensionPicture`, which draws it, and
|
|
471
|
+
* `io.drawing.dimensionExtent`, which measures the box it fills: what it measures, between which
|
|
472
|
+
* points, and the size of its text and arrows.
|
|
473
|
+
* @beta
|
|
474
|
+
*/
|
|
475
|
+
class DrawingDimensionDto {
|
|
476
|
+
constructor(kind?: dimensionKindEnum, start?: Base.Point2, end?: Base.Point2, direction?: Base.Vector2, offset?: number, angle?: number, value?: number, decimalPlaces?: number, upperTolerance?: number, lowerTolerance?: number, textHeight?: number, arrowLength?: number);
|
|
477
|
+
/**
|
|
478
|
+
* What the dimension measures; it decides what `start`, `end`, `offset` and `angle` mean.
|
|
479
|
+
* @default linear
|
|
480
|
+
*/
|
|
481
|
+
kind?: dimensionKindEnum | undefined;
|
|
482
|
+
/**
|
|
483
|
+
* For `linear`, the first point measured; for `diameter`, `radius` and `angular`, the center of
|
|
484
|
+
* the circle or the point where the two arms of the angle meet.
|
|
485
|
+
* @default undefined
|
|
486
|
+
*/
|
|
487
|
+
start: Base.Point2;
|
|
488
|
+
/**
|
|
489
|
+
* For `linear`, the second point measured; for `diameter` and `radius`, a point on the circle; for
|
|
490
|
+
* `angular`, a point on the first arm, where the arc passes.
|
|
491
|
+
* @default undefined
|
|
492
|
+
*/
|
|
493
|
+
end: Base.Point2;
|
|
494
|
+
/**
|
|
495
|
+
* For `linear`, the direction measured along, such as [1, 0] for a horizontal dimension; left
|
|
496
|
+
* out, from `start` to `end`. Other kinds ignore it.
|
|
497
|
+
* @default undefined
|
|
498
|
+
* @optional true
|
|
499
|
+
*/
|
|
500
|
+
direction?: Base.Vector2 | undefined;
|
|
501
|
+
/**
|
|
502
|
+
* For `linear`, how far the dimension line stands from `start`, in drawing units, to the left of
|
|
503
|
+
* `direction`; negative puts it right. Other kinds ignore it.
|
|
504
|
+
* @default 10
|
|
505
|
+
* @minimum -Infinity
|
|
506
|
+
* @maximum Infinity
|
|
507
|
+
*/
|
|
508
|
+
offset?: number | undefined;
|
|
509
|
+
/**
|
|
510
|
+
* For `angular`, the angle in degrees from the first arm, the one through `end`,
|
|
511
|
+
* counterclockwise to the second arm. Other kinds ignore it.
|
|
512
|
+
* @default 90
|
|
513
|
+
* @minimum 0
|
|
514
|
+
* @maximum 360
|
|
515
|
+
* @exclusiveMinimum true
|
|
516
|
+
* @exclusiveMaximum true
|
|
517
|
+
*/
|
|
518
|
+
angle?: number | undefined;
|
|
519
|
+
/**
|
|
520
|
+
* The number written; left out, the one measured. A diameter is written after the diameter
|
|
521
|
+
* sign, a radius after R, an angle before the degree sign.
|
|
522
|
+
* @default undefined
|
|
523
|
+
* @optional true
|
|
524
|
+
*/
|
|
525
|
+
value?: number | undefined;
|
|
526
|
+
/**
|
|
527
|
+
* How many decimals the value keeps; trailing zeros are dropped, so 15.50 shows as 15.5.
|
|
528
|
+
* @default 2
|
|
529
|
+
* @minimum 0
|
|
530
|
+
* @maximum 15
|
|
531
|
+
* @step 1
|
|
532
|
+
*/
|
|
533
|
+
decimalPlaces?: number | undefined;
|
|
534
|
+
/**
|
|
535
|
+
* How far above the value the measure may lie, written `+0.1`, or `±0.1` when equal to
|
|
536
|
+
* `lowerTolerance`; 0 when only `lowerTolerance` is given.
|
|
537
|
+
* @default undefined
|
|
538
|
+
* @optional true
|
|
539
|
+
* @minimum 0
|
|
540
|
+
*/
|
|
541
|
+
upperTolerance?: number | undefined;
|
|
542
|
+
/**
|
|
543
|
+
* How far below the value the measure may lie, as an amount, written `-0.05`; 0 when only
|
|
544
|
+
* `upperTolerance` is given. Without either, no tolerance is written.
|
|
545
|
+
* @default undefined
|
|
546
|
+
* @optional true
|
|
547
|
+
* @minimum 0
|
|
548
|
+
*/
|
|
549
|
+
lowerTolerance?: number | undefined;
|
|
550
|
+
/**
|
|
551
|
+
* The height of the text's digits, in drawing units; the gaps around the lines are sized from it.
|
|
552
|
+
* @default 3.5
|
|
553
|
+
* @minimum 0
|
|
554
|
+
* @exclusiveMinimum true
|
|
555
|
+
*/
|
|
556
|
+
textHeight?: number | undefined;
|
|
557
|
+
/**
|
|
558
|
+
* The length of each arrowhead, in drawing units; each is a third as wide as it is long. Left
|
|
559
|
+
* out, it is `textHeight`.
|
|
560
|
+
* @default undefined
|
|
561
|
+
* @optional true
|
|
562
|
+
* @minimum 0
|
|
563
|
+
* @exclusiveMinimum true
|
|
564
|
+
*/
|
|
565
|
+
arrowLength?: number | undefined;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* The box a dimension's picture fills, as `io.drawing.dimensionExtent` and
|
|
569
|
+
* `io.drawing.dimensionPicture` measure it, by its lowest and highest corner.
|
|
570
|
+
* @beta
|
|
571
|
+
*/
|
|
572
|
+
class DrawingExtentDto {
|
|
573
|
+
/**
|
|
574
|
+
* The corner with the least X and the least Y.
|
|
575
|
+
* @default undefined
|
|
576
|
+
*/
|
|
577
|
+
min: Base.Point2;
|
|
578
|
+
/**
|
|
579
|
+
* The corner with the greatest X and the greatest Y.
|
|
141
580
|
* @default undefined
|
|
142
581
|
*/
|
|
143
|
-
|
|
582
|
+
max: Base.Point2;
|
|
144
583
|
}
|
|
145
584
|
/**
|
|
146
|
-
* A
|
|
147
|
-
*
|
|
585
|
+
* A dimension drawn by `io.drawing.dimensionPicture`: its lines, its arrowheads as loops to
|
|
586
|
+
* fill, its text as strokes and as a drawing text, and the box all of it fills.
|
|
587
|
+
* @beta
|
|
588
|
+
*/
|
|
589
|
+
class DrawingDimensionPictureDto {
|
|
590
|
+
/**
|
|
591
|
+
* The dimension line, or its arc, and the extension lines, each a polyline of two or more
|
|
592
|
+
* points without two neighbours in one place.
|
|
593
|
+
* @default undefined
|
|
594
|
+
*/
|
|
595
|
+
lines: Base.Point2[][];
|
|
596
|
+
/**
|
|
597
|
+
* The arrowheads, each a closed triangle running counterclockwise, its first point not repeated;
|
|
598
|
+
* the first point of each is its tip.
|
|
599
|
+
* @default undefined
|
|
600
|
+
*/
|
|
601
|
+
fills: Base.Point2[][];
|
|
602
|
+
/**
|
|
603
|
+
* The text's letters as strokes, each a polyline of two or more points, as
|
|
604
|
+
* `io.drawing.textStrokes` draws `text`.
|
|
605
|
+
* @default undefined
|
|
606
|
+
*/
|
|
607
|
+
textStrokes: Base.Point2[][];
|
|
608
|
+
/**
|
|
609
|
+
* The text as a drawing text, placed and turned so it reads from left to right or from bottom
|
|
610
|
+
* to top, for a drawing part's `texts`.
|
|
611
|
+
* @default undefined
|
|
612
|
+
*/
|
|
613
|
+
text: DrawingTextDto;
|
|
614
|
+
/**
|
|
615
|
+
* The middle of the box the text fills.
|
|
616
|
+
* @default undefined
|
|
617
|
+
*/
|
|
618
|
+
textPoint: Base.Point2;
|
|
619
|
+
/**
|
|
620
|
+
* The box the lines, the arrowheads and the text fill together.
|
|
621
|
+
* @default undefined
|
|
622
|
+
*/
|
|
623
|
+
extent: DrawingExtentDto;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* A straight line in a drawing path, under its former DXF name.
|
|
627
|
+
*
|
|
628
|
+
* @deprecated Use `DrawingLineSegmentDto`, the same DTO under the drawing's own name; this one is removed
|
|
629
|
+
* in the next major version.
|
|
630
|
+
*/
|
|
631
|
+
class DxfLineSegmentDto extends DrawingLineSegmentDto {
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* A circular arc in a drawing path, under its former DXF name.
|
|
635
|
+
*
|
|
636
|
+
* @deprecated Use `DrawingArcSegmentDto`, the same DTO under the drawing's own name; this one is removed
|
|
637
|
+
* in the next major version.
|
|
638
|
+
*/
|
|
639
|
+
class DxfArcSegmentDto extends DrawingArcSegmentDto {
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* A full circle in a drawing path, under its former DXF name.
|
|
643
|
+
*
|
|
644
|
+
* @deprecated Use `DrawingCircleSegmentDto`, the same DTO under the drawing's own name; this one is removed
|
|
645
|
+
* in the next major version.
|
|
646
|
+
*/
|
|
647
|
+
class DxfCircleSegmentDto extends DrawingCircleSegmentDto {
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Connected straight segments in a drawing path, under its former DXF name.
|
|
651
|
+
*
|
|
652
|
+
* @deprecated Use `DrawingPolylineSegmentDto`, the same DTO under the drawing's own name; this one is removed
|
|
653
|
+
* in the next major version.
|
|
654
|
+
*/
|
|
655
|
+
class DxfPolylineSegmentDto extends DrawingPolylineSegmentDto {
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* A B-spline or NURBS curve in a drawing path, under its former DXF name.
|
|
659
|
+
*
|
|
660
|
+
* @deprecated Use `DrawingSplineSegmentDto`, the same DTO under the drawing's own name; this one is removed
|
|
661
|
+
* in the next major version.
|
|
662
|
+
*/
|
|
663
|
+
class DxfSplineSegmentDto extends DrawingSplineSegmentDto {
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* An ellipse or an arc of one in a drawing path, under its former DXF name.
|
|
667
|
+
*
|
|
668
|
+
* @deprecated Use `DrawingEllipseSegmentDto`, the same DTO under the drawing's own name; this one is removed
|
|
669
|
+
* in the next major version.
|
|
670
|
+
*/
|
|
671
|
+
class DxfEllipseSegmentDto extends DrawingEllipseSegmentDto {
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* A path of a drawing, under its former DXF name.
|
|
675
|
+
*
|
|
676
|
+
* @deprecated Use `DrawingPathDto`, the same DTO under the drawing's own name; this one is removed
|
|
677
|
+
* in the next major version.
|
|
678
|
+
*/
|
|
679
|
+
class DxfPathDto extends DrawingPathDto {
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* A part of a drawing: paths on one layer with one color and one line type, under its former DXF name.
|
|
683
|
+
*
|
|
684
|
+
* @deprecated Use `DrawingPartDto`, the same DTO under the drawing's own name; this one is removed
|
|
685
|
+
* in the next major version.
|
|
686
|
+
*/
|
|
687
|
+
class DxfPathsPartDto extends DrawingPartDto {
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* A whole DXF drawing for `io.dxf.dxfCreate`: its path parts by layer and color, and the color
|
|
691
|
+
* format, the version and the unit to write. In inches it is marked imperial, so hatch scales
|
|
692
|
+
* count from inch patterns.
|
|
148
693
|
*/
|
|
149
694
|
class DxfModelDto {
|
|
150
|
-
constructor(dxfPathsParts?:
|
|
695
|
+
constructor(dxfPathsParts?: DrawingPartDto[], colorFormat?: "aci" | "truecolor", acadVersion?: "AC1009" | "AC1015", unit?: Base.unitOfLengthEnum, curveTolerance?: number, lineTypeScale?: number);
|
|
151
696
|
/**
|
|
152
697
|
* Array of path parts, each containing paths with segments
|
|
153
698
|
* @default undefined
|
|
154
699
|
*/
|
|
155
|
-
dxfPathsParts:
|
|
700
|
+
dxfPathsParts: DrawingPartDto[];
|
|
156
701
|
/**
|
|
157
|
-
* How colors are written: `aci`, the AutoCAD
|
|
158
|
-
*
|
|
702
|
+
* How colors are written: `aci`, the nearest of AutoCAD's 255 index colors, or `truecolor`,
|
|
703
|
+
* the exact color beside that index (`AC1015` only; `AC1009` writes the index).
|
|
159
704
|
* @default aci
|
|
160
705
|
*/
|
|
161
706
|
colorFormat?: "aci" | "truecolor" | undefined;
|
|
162
707
|
/**
|
|
163
|
-
* The DXF version
|
|
164
|
-
*
|
|
165
|
-
* @default
|
|
708
|
+
* The DXF version: `AC1015` (AutoCAD 2000), which keeps splines and ellipses exact, or `AC1009`
|
|
709
|
+
* (AutoCAD R12) for old software, where they become polylines within `curveTolerance`.
|
|
710
|
+
* @default AC1015
|
|
166
711
|
*/
|
|
167
712
|
acadVersion?: "AC1009" | "AC1015" | undefined;
|
|
168
713
|
/**
|
|
@@ -172,5 +717,328 @@ export declare namespace IO {
|
|
|
172
717
|
* @optional true
|
|
173
718
|
*/
|
|
174
719
|
unit?: Base.unitOfLengthEnum | undefined;
|
|
720
|
+
/**
|
|
721
|
+
* The largest distance, in drawing units, between a curve and the polyline that stands in for
|
|
722
|
+
* it where the version cannot hold the curve exactly.
|
|
723
|
+
* @default 0.01
|
|
724
|
+
* @minimum 0
|
|
725
|
+
* @exclusiveMinimum true
|
|
726
|
+
*/
|
|
727
|
+
curveTolerance?: number | undefined;
|
|
728
|
+
/**
|
|
729
|
+
* The length of one unit of a dash pattern, in drawing units: `hidden` is 2 units of dash
|
|
730
|
+
* and 1 of gap. Left out, a two-hundredth of the drawing's size.
|
|
731
|
+
* @default undefined
|
|
732
|
+
* @optional true
|
|
733
|
+
* @minimum 0
|
|
734
|
+
* @exclusiveMinimum true
|
|
735
|
+
* @beta
|
|
736
|
+
*/
|
|
737
|
+
lineTypeScale?: number | undefined;
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* The text of a DXF file for `io.dxf.dxfRead`, which reads its drawing into path parts, and
|
|
741
|
+
* whether layers that are switched off or frozen are read too.
|
|
742
|
+
*/
|
|
743
|
+
class DxfReadDto {
|
|
744
|
+
constructor(dxf?: string | Uint8Array, includeHiddenLayers?: boolean);
|
|
745
|
+
/**
|
|
746
|
+
* An ASCII DXF file from R12 on, as text or bytes; older bytes not in UTF-8 are read in the
|
|
747
|
+
* header's code page, or as Windows-1252.
|
|
748
|
+
* @default undefined
|
|
749
|
+
*/
|
|
750
|
+
dxf: string | Uint8Array;
|
|
751
|
+
/**
|
|
752
|
+
* When true, layers the file has switched off or frozen are read as well.
|
|
753
|
+
* @default false
|
|
754
|
+
*/
|
|
755
|
+
includeHiddenLayers?: boolean | undefined;
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* A drawing read from a DXF file by `io.dxf.dxfRead`: its parts by layer, color and line type, in
|
|
759
|
+
* the shape `io.dxf.dxfCreate` and `io.svg.svgCreate` write, with the unit and what was left out.
|
|
760
|
+
*/
|
|
761
|
+
class DxfDrawingDto {
|
|
762
|
+
/**
|
|
763
|
+
* The parts, one for each layer, color and line type that holds anything: each entity one path,
|
|
764
|
+
* each text and hatch in its part's `texts` and `hatches`.
|
|
765
|
+
* @default undefined
|
|
766
|
+
*/
|
|
767
|
+
parts: DrawingPartDto[];
|
|
768
|
+
/**
|
|
769
|
+
* The unit the file states, when it is one of millimetres, centimetres, metres or inches.
|
|
770
|
+
* @default undefined
|
|
771
|
+
* @optional true
|
|
772
|
+
*/
|
|
773
|
+
unit?: Base.unitOfLengthEnum | undefined;
|
|
774
|
+
/**
|
|
775
|
+
* The DXF version the file states, such as `AC1015`, or an empty text when it states none.
|
|
776
|
+
* @default undefined
|
|
777
|
+
*/
|
|
778
|
+
version: string;
|
|
779
|
+
/**
|
|
780
|
+
* What was left out and why, each kind once with its count.
|
|
781
|
+
* @default undefined
|
|
782
|
+
*/
|
|
783
|
+
warnings: string[];
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* A whole SVG drawing for `io.svg.svgCreate`: its path parts by layer, color and line type, the
|
|
787
|
+
* unit that gives it its true size, and how wide the lines and the border are.
|
|
788
|
+
*/
|
|
789
|
+
class SvgModelDto {
|
|
790
|
+
constructor(parts?: DrawingPartDto[], unit?: Base.unitOfLengthEnum, strokeWidth?: number, margin?: number, tolerance?: number, lineTypeScale?: number);
|
|
791
|
+
/**
|
|
792
|
+
* The parts of the drawing; each layer becomes a group that Inkscape reads as a layer.
|
|
793
|
+
* @default undefined
|
|
794
|
+
*/
|
|
795
|
+
parts: DrawingPartDto[];
|
|
796
|
+
/**
|
|
797
|
+
* The unit the drawing is in, which gives the file its true width and height. Left out, the
|
|
798
|
+
* file states no size and viewers fit it to the window.
|
|
799
|
+
* @default undefined
|
|
800
|
+
* @optional true
|
|
801
|
+
*/
|
|
802
|
+
unit?: Base.unitOfLengthEnum | undefined;
|
|
803
|
+
/**
|
|
804
|
+
* How wide the lines are, in drawing units. Left out, a five-hundredth of the drawing's larger
|
|
805
|
+
* side.
|
|
806
|
+
* @default undefined
|
|
807
|
+
* @optional true
|
|
808
|
+
* @minimum 0
|
|
809
|
+
* @exclusiveMinimum true
|
|
810
|
+
*/
|
|
811
|
+
strokeWidth?: number | undefined;
|
|
812
|
+
/**
|
|
813
|
+
* The empty border around the drawing, in drawing units. Left out, a fortieth of the
|
|
814
|
+
* drawing's larger side.
|
|
815
|
+
* @default undefined
|
|
816
|
+
* @optional true
|
|
817
|
+
* @minimum 0
|
|
818
|
+
*/
|
|
819
|
+
margin?: number | undefined;
|
|
820
|
+
/**
|
|
821
|
+
* The largest distance, in drawing units, between a curve SVG cannot draw exactly (a rational
|
|
822
|
+
* or higher degree spline) and the cubic curves that stand in for it.
|
|
823
|
+
* @default 0.01
|
|
824
|
+
* @minimum 0
|
|
825
|
+
* @exclusiveMinimum true
|
|
826
|
+
*/
|
|
827
|
+
tolerance?: number | undefined;
|
|
828
|
+
/**
|
|
829
|
+
* The length of one unit of a dash pattern, in drawing units: `hidden` is 2 units of dash
|
|
830
|
+
* and 1 of gap. Left out, a two-hundredth of the drawing's size.
|
|
831
|
+
* @default undefined
|
|
832
|
+
* @optional true
|
|
833
|
+
* @minimum 0
|
|
834
|
+
* @exclusiveMinimum true
|
|
835
|
+
* @beta
|
|
836
|
+
*/
|
|
837
|
+
lineTypeScale?: number | undefined;
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* One drawing path for `io.svg.pathData`, and how its coordinates are written.
|
|
841
|
+
*/
|
|
842
|
+
class SvgPathDataDto {
|
|
843
|
+
constructor(path?: DrawingPathDto, flipY?: boolean, tolerance?: number, cubicsOnly?: boolean);
|
|
844
|
+
/**
|
|
845
|
+
* The path to write as SVG path data.
|
|
846
|
+
* @default undefined
|
|
847
|
+
*/
|
|
848
|
+
path: DrawingPathDto;
|
|
849
|
+
/**
|
|
850
|
+
* Whether Y is negated, as an SVG file needs (its Y runs down); leave it off for data drawn
|
|
851
|
+
* inside a group that flips Y itself.
|
|
852
|
+
* @default true
|
|
853
|
+
*/
|
|
854
|
+
flipY?: boolean | undefined;
|
|
855
|
+
/**
|
|
856
|
+
* The largest distance, in drawing units, between a curve SVG cannot draw exactly and the
|
|
857
|
+
* cubic curves that stand in for it.
|
|
858
|
+
* @default 0.01
|
|
859
|
+
* @minimum 0
|
|
860
|
+
* @exclusiveMinimum true
|
|
861
|
+
*/
|
|
862
|
+
tolerance?: number | undefined;
|
|
863
|
+
/**
|
|
864
|
+
* When true, every curve is written as cubic Beziers (`C`), arcs within `tolerance`, for
|
|
865
|
+
* renderers that draw only lines and cubics.
|
|
866
|
+
* @default false
|
|
867
|
+
* @beta
|
|
868
|
+
*/
|
|
869
|
+
cubicsOnly?: boolean | undefined;
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* The text of an SVG file for `io.svg.svgRead`, which reads its drawing into path parts, with the
|
|
873
|
+
* unit that brings it in at true size and whether hidden elements are read too.
|
|
874
|
+
*/
|
|
875
|
+
class SvgReadDto {
|
|
876
|
+
constructor(svg?: string, unit?: Base.unitOfLengthEnum, includeInvisible?: boolean);
|
|
877
|
+
/**
|
|
878
|
+
* The whole text of an SVG file.
|
|
879
|
+
* @default undefined
|
|
880
|
+
*/
|
|
881
|
+
svg: string;
|
|
882
|
+
/**
|
|
883
|
+
* The unit to read the drawing in at its true size, with the page's top left corner at the
|
|
884
|
+
* origin. Left out, coordinates stay in the file's own user units.
|
|
885
|
+
* @default undefined
|
|
886
|
+
* @optional true
|
|
887
|
+
*/
|
|
888
|
+
unit?: Base.unitOfLengthEnum | undefined;
|
|
889
|
+
/**
|
|
890
|
+
* When true, elements hidden by `display` or `visibility` are read as well.
|
|
891
|
+
* @default false
|
|
892
|
+
*/
|
|
893
|
+
includeInvisible?: boolean | undefined;
|
|
894
|
+
}
|
|
895
|
+
/**
|
|
896
|
+
* A drawing read from an SVG file by `io.svg.svgRead`: its parts by layer, color and line type, in
|
|
897
|
+
* the shape `io.dxf.dxfCreate` and `io.svg.svgCreate` write, with the unit, the view box and what
|
|
898
|
+
* was left out.
|
|
899
|
+
*/
|
|
900
|
+
class SvgDrawingDto {
|
|
901
|
+
/**
|
|
902
|
+
* The parts, one for each layer, color and line type that holds anything, each subpath one path.
|
|
903
|
+
* @default undefined
|
|
904
|
+
*/
|
|
905
|
+
parts: DrawingPartDto[];
|
|
906
|
+
/**
|
|
907
|
+
* The unit the drawing was read in, when one was asked for.
|
|
908
|
+
* @default undefined
|
|
909
|
+
* @optional true
|
|
910
|
+
*/
|
|
911
|
+
unit?: Base.unitOfLengthEnum | undefined;
|
|
912
|
+
/**
|
|
913
|
+
* The view box the file gives its root, as x, y, width and height in the file's own
|
|
914
|
+
* coordinates, where Y runs down.
|
|
915
|
+
* @default undefined
|
|
916
|
+
* @optional true
|
|
917
|
+
*/
|
|
918
|
+
viewBox?: number[] | undefined;
|
|
919
|
+
/**
|
|
920
|
+
* What was left out or read differently and why, each kind once with its count.
|
|
921
|
+
* @default undefined
|
|
922
|
+
*/
|
|
923
|
+
warnings: string[];
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* An SVG file for `io.drawing.svgToDxf`, which reads it as `io.svg.svgRead` does and writes it as
|
|
927
|
+
* `io.dxf.dxfCreate` does, with the options of both.
|
|
928
|
+
*/
|
|
929
|
+
class SvgToDxfDto {
|
|
930
|
+
constructor(svg?: string, unit?: Base.unitOfLengthEnum, includeInvisible?: boolean, colorFormat?: "aci" | "truecolor", acadVersion?: "AC1009" | "AC1015", curveTolerance?: number);
|
|
931
|
+
/**
|
|
932
|
+
* The whole text of an SVG file.
|
|
933
|
+
* @default undefined
|
|
934
|
+
*/
|
|
935
|
+
svg: string;
|
|
936
|
+
/**
|
|
937
|
+
* The unit to read the drawing in at true size, also stated in the DXF (`AC1015` only). Left
|
|
938
|
+
* out, user units are written and no unit is stated.
|
|
939
|
+
* @default undefined
|
|
940
|
+
* @optional true
|
|
941
|
+
*/
|
|
942
|
+
unit?: Base.unitOfLengthEnum | undefined;
|
|
943
|
+
/**
|
|
944
|
+
* When true, elements hidden by `display` or `visibility` are written as well.
|
|
945
|
+
* @default false
|
|
946
|
+
*/
|
|
947
|
+
includeInvisible?: boolean | undefined;
|
|
948
|
+
/**
|
|
949
|
+
* How colors are written: `aci`, the nearest of AutoCAD's 255 index colors, or `truecolor`,
|
|
950
|
+
* the exact color beside that index (`AC1015` only; `AC1009` writes the index).
|
|
951
|
+
* @default aci
|
|
952
|
+
*/
|
|
953
|
+
colorFormat?: "aci" | "truecolor" | undefined;
|
|
954
|
+
/**
|
|
955
|
+
* The DXF version: `AC1015` (AutoCAD 2000), which keeps splines and ellipses exact, or `AC1009`
|
|
956
|
+
* (AutoCAD R12) for old software, where they become polylines within `curveTolerance`.
|
|
957
|
+
* @default AC1015
|
|
958
|
+
*/
|
|
959
|
+
acadVersion?: "AC1009" | "AC1015" | undefined;
|
|
960
|
+
/**
|
|
961
|
+
* The largest distance, in drawing units, between a curve and the polyline that stands in for
|
|
962
|
+
* it where the version cannot hold the curve exactly.
|
|
963
|
+
* @default 0.01
|
|
964
|
+
* @minimum 0
|
|
965
|
+
* @exclusiveMinimum true
|
|
966
|
+
*/
|
|
967
|
+
curveTolerance?: number | undefined;
|
|
968
|
+
}
|
|
969
|
+
/**
|
|
970
|
+
* What `io.drawing.svgToDxf` returns: the DXF file it wrote from an SVG file, and what the
|
|
971
|
+
* reading left out or read differently.
|
|
972
|
+
*/
|
|
973
|
+
class SvgToDxfResultDto {
|
|
974
|
+
/**
|
|
975
|
+
* The DXF file as text.
|
|
976
|
+
* @default undefined
|
|
977
|
+
*/
|
|
978
|
+
dxf: string;
|
|
979
|
+
/**
|
|
980
|
+
* What was left out or read differently and why, each kind once with its count.
|
|
981
|
+
* @default undefined
|
|
982
|
+
*/
|
|
983
|
+
warnings: string[];
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* A DXF file for `io.drawing.dxfToSvg`, which reads it as `io.dxf.dxfRead` does and writes it as
|
|
987
|
+
* `io.svg.svgCreate` does, with the options of both.
|
|
988
|
+
*/
|
|
989
|
+
class DxfToSvgDto {
|
|
990
|
+
constructor(dxf?: string | Uint8Array, includeHiddenLayers?: boolean, strokeWidth?: number, margin?: number, tolerance?: number);
|
|
991
|
+
/**
|
|
992
|
+
* An ASCII DXF file from R12 on, as text or bytes; older bytes not in UTF-8 are read in the
|
|
993
|
+
* header's code page, or as Windows-1252.
|
|
994
|
+
* @default undefined
|
|
995
|
+
*/
|
|
996
|
+
dxf: string | Uint8Array;
|
|
997
|
+
/**
|
|
998
|
+
* When true, layers the file has switched off or frozen are written as well.
|
|
999
|
+
* @default false
|
|
1000
|
+
*/
|
|
1001
|
+
includeHiddenLayers?: boolean | undefined;
|
|
1002
|
+
/**
|
|
1003
|
+
* How wide the lines are, in drawing units. Left out, a five-hundredth of the drawing's larger
|
|
1004
|
+
* side.
|
|
1005
|
+
* @default undefined
|
|
1006
|
+
* @optional true
|
|
1007
|
+
* @minimum 0
|
|
1008
|
+
* @exclusiveMinimum true
|
|
1009
|
+
*/
|
|
1010
|
+
strokeWidth?: number | undefined;
|
|
1011
|
+
/**
|
|
1012
|
+
* The empty border around the drawing, in drawing units. Left out, a fortieth of the
|
|
1013
|
+
* drawing's larger side.
|
|
1014
|
+
* @default undefined
|
|
1015
|
+
* @optional true
|
|
1016
|
+
* @minimum 0
|
|
1017
|
+
*/
|
|
1018
|
+
margin?: number | undefined;
|
|
1019
|
+
/**
|
|
1020
|
+
* The largest distance, in drawing units, between a curve SVG cannot draw exactly (a rational
|
|
1021
|
+
* or higher degree spline) and the cubic curves that stand in for it.
|
|
1022
|
+
* @default 0.01
|
|
1023
|
+
* @minimum 0
|
|
1024
|
+
* @exclusiveMinimum true
|
|
1025
|
+
*/
|
|
1026
|
+
tolerance?: number | undefined;
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* What `io.drawing.dxfToSvg` returns: the SVG file it wrote from a DXF file, and what the reading
|
|
1030
|
+
* left out.
|
|
1031
|
+
*/
|
|
1032
|
+
class DxfToSvgResultDto {
|
|
1033
|
+
/**
|
|
1034
|
+
* The SVG file as text.
|
|
1035
|
+
* @default undefined
|
|
1036
|
+
*/
|
|
1037
|
+
svg: string;
|
|
1038
|
+
/**
|
|
1039
|
+
* What was left out and why, each kind once with its count.
|
|
1040
|
+
* @default undefined
|
|
1041
|
+
*/
|
|
1042
|
+
warnings: string[];
|
|
175
1043
|
}
|
|
176
1044
|
}
|