@bitbybit-dev/base 1.5.0 → 1.6.0-rc.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/lib/api/GlobalCDNProvider.js +1 -1
- package/lib/api/bearings/ansi-bearings.constants.d.ts +2 -0
- package/lib/api/bearings/ansi-bearings.constants.js +26 -0
- package/lib/api/bearings/ansi-bearings.d.ts +4 -0
- package/lib/api/bearings/ansi-bearings.js +14 -0
- package/lib/api/bearings/bearing-types.d.ts +25 -0
- package/lib/api/bearings/bearing-types.js +1 -0
- package/lib/api/bearings/bearings.constants.d.ts +1 -0
- package/lib/api/bearings/bearings.constants.js +1 -0
- package/lib/api/bearings/iso-bearings.constants.d.ts +2 -0
- package/lib/api/bearings/iso-bearings.constants.js +30 -0
- package/lib/api/bearings/iso-bearings.d.ts +4 -0
- package/lib/api/bearings/iso-bearings.js +14 -0
- package/lib/api/color-space.d.ts +2 -0
- package/lib/api/color-space.js +5 -8
- package/lib/api/fasteners/ansi-fasteners.constants.d.ts +16 -0
- package/lib/api/fasteners/ansi-fasteners.constants.js +118 -0
- package/lib/api/fasteners/ansi-fasteners.d.ts +8 -0
- package/lib/api/fasteners/ansi-fasteners.js +64 -0
- package/lib/api/fasteners/fastener-types.d.ts +161 -0
- package/lib/api/fasteners/fastener-types.js +1 -0
- package/lib/api/fasteners/fasteners.constants.d.ts +5 -0
- package/lib/api/fasteners/fasteners.constants.js +5 -0
- package/lib/api/fasteners/fasteners.d.ts +2 -0
- package/lib/api/fasteners/fasteners.js +9 -0
- package/lib/api/fasteners/iso-fasteners.constants.d.ts +23 -0
- package/lib/api/fasteners/iso-fasteners.constants.js +110 -0
- package/lib/api/fasteners/iso-fasteners.d.ts +9 -0
- package/lib/api/fasteners/iso-fasteners.js +61 -0
- package/lib/api/gears/bevel-gears.d.ts +6 -0
- package/lib/api/gears/bevel-gears.js +69 -0
- package/lib/api/gears/gear-checks.d.ts +8 -0
- package/lib/api/gears/gear-checks.js +69 -0
- package/lib/api/gears/gear-pairs.d.ts +4 -0
- package/lib/api/gears/gear-pairs.js +140 -0
- package/lib/api/gears/gear-types.d.ts +425 -0
- package/lib/api/gears/gear-types.js +1 -0
- package/lib/api/gears/gears.constants.d.ts +19 -0
- package/lib/api/gears/gears.constants.js +19 -0
- package/lib/api/gears/gears.d.ts +10 -0
- package/lib/api/gears/gears.js +156 -0
- package/lib/api/gears/helical-gears.d.ts +5 -0
- package/lib/api/gears/helical-gears.js +33 -0
- package/lib/api/gears/involute-flank.d.ts +26 -0
- package/lib/api/gears/involute-flank.js +158 -0
- package/lib/api/gears/racks.d.ts +3 -0
- package/lib/api/gears/racks.js +64 -0
- package/lib/api/index.d.ts +10 -1
- package/lib/api/index.js +0 -1
- package/lib/api/inputs/base-inputs.d.ts +450 -3
- package/lib/api/inputs/base-inputs.js +12 -0
- package/lib/api/inputs/color-inputs.d.ts +14 -0
- package/lib/api/inputs/color-inputs.js +19 -0
- package/lib/api/inputs/engineering-inputs.d.ts +1539 -0
- package/lib/api/inputs/engineering-inputs.js +2181 -0
- package/lib/api/inputs/index.d.ts +2 -0
- package/lib/api/inputs/index.js +2 -0
- package/lib/api/inputs/io-inputs.d.ts +8 -1
- package/lib/api/inputs/io-inputs.js +4 -1
- package/lib/api/inputs/math-inputs.d.ts +61 -0
- package/lib/api/inputs/math-inputs.js +85 -0
- package/lib/api/inputs/mesh-inputs.d.ts +170 -0
- package/lib/api/inputs/mesh-inputs.js +206 -0
- package/lib/api/inputs/point-inputs.d.ts +4 -4
- package/lib/api/inputs/polyline-inputs.d.ts +144 -0
- package/lib/api/inputs/polyline-inputs.js +151 -0
- package/lib/api/inputs/recipes-inputs.d.ts +76 -0
- package/lib/api/inputs/recipes-inputs.js +74 -0
- package/lib/api/inputs/transforms-inputs.d.ts +34 -0
- package/lib/api/inputs/transforms-inputs.js +35 -0
- package/lib/api/keys/ansi-keys.constants.d.ts +3 -0
- package/lib/api/keys/ansi-keys.constants.js +16 -0
- package/lib/api/keys/ansi-keys.d.ts +3 -0
- package/lib/api/keys/ansi-keys.js +14 -0
- package/lib/api/keys/din-keys.constants.d.ts +3 -0
- package/lib/api/keys/din-keys.constants.js +14 -0
- package/lib/api/keys/din-keys.d.ts +3 -0
- package/lib/api/keys/din-keys.js +13 -0
- package/lib/api/keys/key-types.d.ts +17 -0
- package/lib/api/keys/key-types.js +1 -0
- package/lib/api/keys/keys.constants.d.ts +1 -0
- package/lib/api/keys/keys.constants.js +1 -0
- package/lib/api/knurls/ansi-knurls.constants.d.ts +4 -0
- package/lib/api/knurls/ansi-knurls.constants.js +8 -0
- package/lib/api/knurls/ansi-knurls.d.ts +3 -0
- package/lib/api/knurls/ansi-knurls.js +20 -0
- package/lib/api/knurls/din-knurls.constants.d.ts +2 -0
- package/lib/api/knurls/din-knurls.constants.js +2 -0
- package/lib/api/knurls/din-knurls.d.ts +3 -0
- package/lib/api/knurls/din-knurls.js +19 -0
- package/lib/api/knurls/knurl-types.d.ts +24 -0
- package/lib/api/knurls/knurl-types.js +1 -0
- package/lib/api/knurls/knurls.constants.d.ts +1 -0
- package/lib/api/knurls/knurls.constants.js +1 -0
- package/lib/api/knurls/knurls.d.ts +2 -0
- package/lib/api/knurls/knurls.js +9 -0
- package/lib/api/recipes/checks.d.ts +15 -0
- package/lib/api/recipes/checks.js +85 -0
- package/lib/api/recipes/limits.constants.d.ts +4 -0
- package/lib/api/recipes/limits.constants.js +4 -0
- package/lib/api/recipes/sources.d.ts +0 -13
- package/lib/api/recipes/sources.js +3 -15
- package/lib/api/recipes/surface-mesh.d.ts +0 -14
- package/lib/api/recipes/surface-mesh.js +8 -21
- package/lib/api/recipes/validate-brep.d.ts +2 -0
- package/lib/api/recipes/validate-brep.js +330 -0
- package/lib/api/recipes/validate.d.ts +0 -31
- package/lib/api/recipes/validate.js +7 -115
- package/lib/api/resolved-inputs/index.d.ts +80 -0
- package/lib/api/retaining-rings/ansi-retaining-rings.constants.d.ts +4 -0
- package/lib/api/retaining-rings/ansi-retaining-rings.constants.js +93 -0
- package/lib/api/retaining-rings/ansi-retaining-rings.d.ts +4 -0
- package/lib/api/retaining-rings/ansi-retaining-rings.js +20 -0
- package/lib/api/retaining-rings/din-retaining-rings.constants.d.ts +3 -0
- package/lib/api/retaining-rings/din-retaining-rings.constants.js +115 -0
- package/lib/api/retaining-rings/din-retaining-rings.d.ts +4 -0
- package/lib/api/retaining-rings/din-retaining-rings.js +20 -0
- package/lib/api/retaining-rings/retaining-ring-types.d.ts +30 -0
- package/lib/api/retaining-rings/retaining-ring-types.js +1 -0
- package/lib/api/retaining-rings/retaining-rings.constants.d.ts +1 -0
- package/lib/api/retaining-rings/retaining-rings.constants.js +1 -0
- package/lib/api/retaining-rings/retaining-rings.d.ts +2 -0
- package/lib/api/retaining-rings/retaining-rings.js +9 -0
- package/lib/api/services/base-bitbybit.d.ts +42 -0
- package/lib/api/services/base-bitbybit.js +43 -0
- package/lib/api/services/color.d.ts +35 -2
- package/lib/api/services/color.js +48 -12
- package/lib/api/services/engineering/engineering.d.ts +12 -0
- package/lib/api/services/engineering/engineering.js +13 -0
- package/lib/api/services/engineering/index.d.ts +2 -0
- package/lib/api/services/engineering/index.js +2 -0
- package/lib/api/services/engineering/mechanical/bearings-ansi.d.ts +40 -0
- package/lib/api/services/engineering/mechanical/bearings-ansi.js +47 -0
- package/lib/api/services/engineering/mechanical/bearings-iso.d.ts +39 -0
- package/lib/api/services/engineering/mechanical/bearings-iso.js +46 -0
- package/lib/api/services/engineering/mechanical/bearings.d.ts +14 -0
- package/lib/api/services/engineering/mechanical/bearings.js +15 -0
- package/lib/api/services/engineering/mechanical/fasteners-ansi.d.ts +109 -0
- package/lib/api/services/engineering/mechanical/fasteners-ansi.js +133 -0
- package/lib/api/services/engineering/mechanical/fasteners-iso.d.ts +123 -0
- package/lib/api/services/engineering/mechanical/fasteners-iso.js +151 -0
- package/lib/api/services/engineering/mechanical/fasteners.d.ts +13 -0
- package/lib/api/services/engineering/mechanical/fasteners.js +14 -0
- package/lib/api/services/engineering/mechanical/gears.d.ts +267 -0
- package/lib/api/services/engineering/mechanical/gears.js +318 -0
- package/lib/api/services/engineering/mechanical/index.d.ts +24 -0
- package/lib/api/services/engineering/mechanical/index.js +24 -0
- package/lib/api/services/engineering/mechanical/keys-ansi.d.ts +27 -0
- package/lib/api/services/engineering/mechanical/keys-ansi.js +32 -0
- package/lib/api/services/engineering/mechanical/keys-din.d.ts +26 -0
- package/lib/api/services/engineering/mechanical/keys-din.js +31 -0
- package/lib/api/services/engineering/mechanical/keys.d.ts +14 -0
- package/lib/api/services/engineering/mechanical/keys.js +15 -0
- package/lib/api/services/engineering/mechanical/knurls-ansi.d.ts +26 -0
- package/lib/api/services/engineering/mechanical/knurls-ansi.js +31 -0
- package/lib/api/services/engineering/mechanical/knurls-din.d.ts +26 -0
- package/lib/api/services/engineering/mechanical/knurls-din.js +31 -0
- package/lib/api/services/engineering/mechanical/knurls.d.ts +14 -0
- package/lib/api/services/engineering/mechanical/knurls.js +15 -0
- package/lib/api/services/engineering/mechanical/mechanical.d.ts +29 -0
- package/lib/api/services/engineering/mechanical/mechanical.js +30 -0
- package/lib/api/services/engineering/mechanical/retaining-rings-ansi.d.ts +43 -0
- package/lib/api/services/engineering/mechanical/retaining-rings-ansi.js +51 -0
- package/lib/api/services/engineering/mechanical/retaining-rings-din.d.ts +43 -0
- package/lib/api/services/engineering/mechanical/retaining-rings-din.js +51 -0
- package/lib/api/services/engineering/mechanical/retaining-rings.d.ts +13 -0
- package/lib/api/services/engineering/mechanical/retaining-rings.js +14 -0
- package/lib/api/services/engineering/mechanical/splines-ansi.d.ts +27 -0
- package/lib/api/services/engineering/mechanical/splines-ansi.js +32 -0
- package/lib/api/services/engineering/mechanical/splines-din.d.ts +26 -0
- package/lib/api/services/engineering/mechanical/splines-din.js +31 -0
- package/lib/api/services/engineering/mechanical/splines.d.ts +13 -0
- package/lib/api/services/engineering/mechanical/splines.js +14 -0
- package/lib/api/services/engineering/mechanical/springs.d.ts +27 -0
- package/lib/api/services/engineering/mechanical/springs.js +31 -0
- package/lib/api/services/engineering/mechanical/threads-ansi.d.ts +40 -0
- package/lib/api/services/engineering/mechanical/threads-ansi.js +48 -0
- package/lib/api/services/engineering/mechanical/threads-iso.d.ts +40 -0
- package/lib/api/services/engineering/mechanical/threads-iso.js +48 -0
- package/lib/api/services/engineering/mechanical/threads.d.ts +13 -0
- package/lib/api/services/engineering/mechanical/threads.js +14 -0
- package/lib/api/services/frame.js +3 -3
- package/lib/api/services/geometry-helper.js +8 -111
- package/lib/api/services/helpers/color/color-space.d.ts +2 -0
- package/lib/api/services/helpers/color/color-space.js +12 -0
- package/lib/api/services/helpers/{nurbs.d.ts → curves/nurbs.d.ts} +1 -1
- package/lib/api/services/helpers/{surface-triangulation.d.ts → curves/surface-triangulation.d.ts} +2 -2
- package/lib/api/services/helpers/{surface-triangulation.js → curves/surface-triangulation.js} +14 -8
- package/lib/api/services/helpers/{dxf → files/dxf}/dxf-generator.d.ts +2 -1
- package/lib/api/services/helpers/{dxf → files/dxf}/dxf-generator.js +19 -5
- package/lib/api/services/helpers/files/dxf/dxf.constants.d.ts +4 -0
- package/lib/api/services/helpers/files/dxf/dxf.constants.js +4 -0
- package/lib/api/services/helpers/{dxf → files/dxf}/dxf.d.ts +1 -1
- package/lib/api/services/helpers/{dxf → files/dxf}/dxf.js +2 -2
- package/lib/api/services/helpers/files/glb.constants.d.ts +11 -0
- package/lib/api/services/helpers/files/glb.constants.js +11 -0
- package/lib/api/services/helpers/files/glb.d.ts +1 -0
- package/lib/api/services/helpers/files/glb.js +69 -0
- package/lib/api/services/helpers/files/gzip.constants.d.ts +11 -0
- package/lib/api/services/helpers/files/gzip.constants.js +11 -0
- package/lib/api/services/helpers/files/gzip.d.ts +2 -0
- package/lib/api/services/helpers/files/gzip.js +52 -0
- package/lib/api/services/helpers/{inflate.constants.d.ts → files/inflate.constants.d.ts} +1 -0
- package/lib/api/services/helpers/{inflate.constants.js → files/inflate.constants.js} +1 -0
- package/lib/api/services/helpers/{inflate.d.ts → files/inflate.d.ts} +1 -1
- package/lib/api/services/helpers/{inflate.js → files/inflate.js} +5 -4
- package/lib/api/services/helpers/{zip.d.ts → files/zip.d.ts} +1 -1
- package/lib/api/services/helpers/geometry/arcs.d.ts +9 -0
- package/lib/api/services/helpers/{arcs.js → geometry/arcs.js} +7 -0
- package/lib/api/services/helpers/{frame-axes.d.ts → geometry/frame-axes.d.ts} +8 -5
- package/lib/api/services/helpers/{frame-axes.js → geometry/frame-axes.js} +21 -9
- package/lib/api/services/helpers/geometry/lengths.constants.d.ts +4 -0
- package/lib/api/services/helpers/geometry/lengths.constants.js +3 -0
- package/lib/api/services/helpers/geometry/lengths.d.ts +7 -0
- package/lib/api/services/helpers/geometry/lengths.js +20 -0
- package/lib/api/services/helpers/geometry/matrices.constants.d.ts +8 -0
- package/lib/api/services/helpers/geometry/matrices.constants.js +7 -0
- package/lib/api/services/helpers/geometry/matrices.d.ts +17 -0
- package/lib/api/services/helpers/{matrices.js → geometry/matrices.js} +28 -17
- package/lib/api/services/helpers/{paths.d.ts → geometry/paths.d.ts} +2 -1
- package/lib/api/services/helpers/{paths.js → geometry/paths.js} +36 -30
- package/lib/api/services/helpers/{polygons.d.ts → geometry/polygons.d.ts} +1 -1
- package/lib/api/services/helpers/geometry/polygons.js +111 -0
- package/lib/api/services/helpers/geometry/scalars.d.ts +9 -0
- package/lib/api/services/helpers/geometry/scalars.js +34 -0
- package/lib/api/services/helpers/{triangulation.js → geometry/triangulation.js} +11 -6
- package/lib/api/services/helpers/geometry/vector-grid.d.ts +12 -0
- package/lib/api/services/helpers/geometry/vector-grid.js +149 -0
- package/lib/api/services/helpers/{vectors.d.ts → geometry/vectors.d.ts} +8 -1
- package/lib/api/services/helpers/geometry/vectors.js +43 -0
- package/lib/api/services/helpers/helper-types.d.ts +57 -0
- package/lib/api/services/helpers/mesh/mesh-normals.d.ts +21 -0
- package/lib/api/services/helpers/{mesh-normals.js → mesh/mesh-normals.js} +54 -65
- package/lib/api/services/helpers/mesh/mesh-orientation.d.ts +24 -0
- package/lib/api/services/helpers/mesh/mesh-orientation.js +104 -0
- package/lib/api/services/helpers/{mesh-primitives.d.ts → mesh/mesh-primitives.d.ts} +1 -1
- package/lib/api/services/helpers/{mesh-primitives.js → mesh/mesh-primitives.js} +6 -5
- package/lib/api/services/helpers/mesh/mesh-proximity.constants.d.ts +7 -0
- package/lib/api/services/helpers/mesh/mesh-proximity.constants.js +11 -0
- package/lib/api/services/helpers/mesh/mesh-proximity.d.ts +11 -0
- package/lib/api/services/helpers/mesh/mesh-proximity.js +382 -0
- package/lib/api/services/index.d.ts +3 -0
- package/lib/api/services/index.js +3 -0
- package/lib/api/services/io.d.ts +1 -1
- package/lib/api/services/io.js +1 -1
- package/lib/api/services/line.js +2 -3
- package/lib/api/services/math.d.ts +47 -0
- package/lib/api/services/math.js +77 -10
- package/lib/api/services/mesh.d.ts +174 -2
- package/lib/api/services/mesh.js +305 -7
- package/lib/api/services/point.js +4 -10
- package/lib/api/services/polyline-types.d.ts +6 -0
- package/lib/api/services/polyline-types.js +1 -0
- package/lib/api/services/polyline.d.ts +163 -1
- package/lib/api/services/polyline.js +270 -13
- package/lib/api/services/recipes.d.ts +80 -0
- package/lib/api/services/recipes.js +107 -0
- package/lib/api/services/transforms.d.ts +74 -2
- package/lib/api/services/transforms.js +100 -3
- package/lib/api/services/vector.d.ts +4 -3
- package/lib/api/services/vector.js +14 -14
- package/lib/api/splines/ansi-splines.constants.d.ts +9 -0
- package/lib/api/splines/ansi-splines.constants.js +9 -0
- package/lib/api/splines/ansi-splines.d.ts +3 -0
- package/lib/api/splines/ansi-splines.js +28 -0
- package/lib/api/splines/din-splines.constants.d.ts +12 -0
- package/lib/api/splines/din-splines.constants.js +12 -0
- package/lib/api/splines/din-splines.d.ts +3 -0
- package/lib/api/splines/din-splines.js +38 -0
- package/lib/api/splines/spline-types.d.ts +32 -0
- package/lib/api/splines/spline-types.js +1 -0
- package/lib/api/splines/splines.constants.d.ts +1 -0
- package/lib/api/splines/splines.constants.js +1 -0
- package/lib/api/springs/spring-types.d.ts +26 -0
- package/lib/api/springs/spring-types.js +1 -0
- package/lib/api/springs/springs.constants.d.ts +9 -0
- package/lib/api/springs/springs.constants.js +9 -0
- package/lib/api/springs/springs.d.ts +2 -0
- package/lib/api/springs/springs.js +50 -0
- package/lib/api/threads/ansi-threads.constants.d.ts +6 -0
- package/lib/api/threads/ansi-threads.constants.js +27 -0
- package/lib/api/threads/ansi-threads.d.ts +4 -0
- package/lib/api/threads/ansi-threads.js +50 -0
- package/lib/api/threads/iso-threads.constants.d.ts +5 -0
- package/lib/api/threads/iso-threads.constants.js +20 -0
- package/lib/api/threads/iso-threads.d.ts +4 -0
- package/lib/api/threads/iso-threads.js +32 -0
- package/lib/api/threads/thread-profile.constants.d.ts +3 -0
- package/lib/api/threads/thread-profile.constants.js +3 -0
- package/lib/api/threads/thread-types.d.ts +66 -0
- package/lib/api/threads/thread-types.js +1 -0
- package/package.json +1 -1
- package/lib/api/recipes/index.d.ts +0 -4
- package/lib/api/recipes/index.js +0 -3
- package/lib/api/services/helpers/arcs.d.ts +0 -6
- package/lib/api/services/helpers/matrices.constants.d.ts +0 -2
- package/lib/api/services/helpers/matrices.constants.js +0 -2
- package/lib/api/services/helpers/matrices.d.ts +0 -25
- package/lib/api/services/helpers/mesh-normals.d.ts +0 -11
- package/lib/api/services/helpers/polygons.js +0 -59
- package/lib/api/services/helpers/vectors.js +0 -17
- /package/lib/api/services/helpers/{nurbs.js → curves/nurbs.js} +0 -0
- /package/lib/api/services/helpers/{crc32.d.ts → files/crc32.d.ts} +0 -0
- /package/lib/api/services/helpers/{crc32.js → files/crc32.js} +0 -0
- /package/lib/api/services/helpers/{zip.constants.d.ts → files/zip.constants.d.ts} +0 -0
- /package/lib/api/services/helpers/{zip.constants.js → files/zip.constants.js} +0 -0
- /package/lib/api/services/helpers/{zip.js → files/zip.js} +0 -0
- /package/lib/api/services/helpers/{triangulation.d.ts → geometry/triangulation.d.ts} +0 -0
- /package/lib/api/services/helpers/{mesh-measures.d.ts → mesh/mesh-measures.d.ts} +0 -0
- /package/lib/api/services/helpers/{mesh-measures.js → mesh/mesh-measures.js} +0 -0
- /package/lib/api/services/helpers/{mesh-primitives.constants.d.ts → mesh/mesh-primitives.constants.d.ts} +0 -0
- /package/lib/api/services/helpers/{mesh-primitives.constants.js → mesh/mesh-primitives.constants.js} +0 -0
package/lib/api/inputs/index.js
CHANGED
|
@@ -147,7 +147,7 @@ export declare namespace IO {
|
|
|
147
147
|
* write.
|
|
148
148
|
*/
|
|
149
149
|
class DxfModelDto {
|
|
150
|
-
constructor(dxfPathsParts?: DxfPathsPartDto[], colorFormat?: "aci" | "truecolor", acadVersion?: "AC1009" | "AC1015");
|
|
150
|
+
constructor(dxfPathsParts?: DxfPathsPartDto[], colorFormat?: "aci" | "truecolor", acadVersion?: "AC1009" | "AC1015", unit?: Base.unitOfLengthEnum);
|
|
151
151
|
/**
|
|
152
152
|
* Array of path parts, each containing paths with segments
|
|
153
153
|
* @default undefined
|
|
@@ -165,5 +165,12 @@ export declare namespace IO {
|
|
|
165
165
|
* @default AC1009
|
|
166
166
|
*/
|
|
167
167
|
acadVersion?: "AC1009" | "AC1015" | undefined;
|
|
168
|
+
/**
|
|
169
|
+
* The unit the drawing is in, written into its header so CAD programs open it at true size;
|
|
170
|
+
* `AC1015` only. Left out, no unit is stated.
|
|
171
|
+
* @default undefined
|
|
172
|
+
* @optional true
|
|
173
|
+
*/
|
|
174
|
+
unit?: Base.unitOfLengthEnum | undefined;
|
|
168
175
|
}
|
|
169
176
|
}
|
|
@@ -147,7 +147,7 @@ export var IO;
|
|
|
147
147
|
* write.
|
|
148
148
|
*/
|
|
149
149
|
class DxfModelDto {
|
|
150
|
-
constructor(dxfPathsParts, colorFormat, acadVersion) {
|
|
150
|
+
constructor(dxfPathsParts, colorFormat, acadVersion, unit) {
|
|
151
151
|
/**
|
|
152
152
|
* How colors are written: `aci`, the AutoCAD color index from 1 to 255 that older
|
|
153
153
|
* software reads, or `truecolor`, full 24-bit RGB for newer software.
|
|
@@ -169,6 +169,9 @@ export var IO;
|
|
|
169
169
|
if (acadVersion !== undefined) {
|
|
170
170
|
this.acadVersion = acadVersion;
|
|
171
171
|
}
|
|
172
|
+
if (unit !== undefined) {
|
|
173
|
+
this.unit = unit;
|
|
174
|
+
}
|
|
172
175
|
}
|
|
173
176
|
}
|
|
174
177
|
IO.DxfModelDto = DxfModelDto;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Base } from "./base-inputs";
|
|
1
2
|
/**
|
|
2
3
|
* Parameters for numeric helpers: the operands of arithmetic and trigonometry, the source and target
|
|
3
4
|
* ranges for remapping a value, rounding and clamping bounds, interpolation factors, and the seed for
|
|
@@ -556,4 +557,64 @@ export declare namespace Math {
|
|
|
556
557
|
*/
|
|
557
558
|
expression?: string | undefined;
|
|
558
559
|
}
|
|
560
|
+
/**
|
|
561
|
+
* A length and the two units to convert it between, for `math.convertLength`: `value` is read in
|
|
562
|
+
* `from` and given back in `to`.
|
|
563
|
+
*/
|
|
564
|
+
class ConvertLengthDto {
|
|
565
|
+
constructor(value?: number, from?: Base.unitOfLengthEnum, to?: Base.unitOfLengthEnum);
|
|
566
|
+
/**
|
|
567
|
+
* The length to convert, in `from`.
|
|
568
|
+
* @default 1
|
|
569
|
+
* @minimum -Infinity
|
|
570
|
+
* @maximum Infinity
|
|
571
|
+
* @step 0.1
|
|
572
|
+
*/
|
|
573
|
+
value?: number | undefined;
|
|
574
|
+
/**
|
|
575
|
+
* The unit `value` is in.
|
|
576
|
+
* @default inch
|
|
577
|
+
*/
|
|
578
|
+
from?: Base.unitOfLengthEnum | undefined;
|
|
579
|
+
/**
|
|
580
|
+
* The unit to give the length in.
|
|
581
|
+
* @default millimetre
|
|
582
|
+
*/
|
|
583
|
+
to?: Base.unitOfLengthEnum | undefined;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* A unit of length, for `math.millimetresPerUnit`, which says how many millimetres one of it
|
|
587
|
+
* holds.
|
|
588
|
+
*/
|
|
589
|
+
class UnitOfLengthDto {
|
|
590
|
+
constructor(unit?: Base.unitOfLengthEnum);
|
|
591
|
+
/**
|
|
592
|
+
* The unit to measure in millimetres.
|
|
593
|
+
* @default inch
|
|
594
|
+
*/
|
|
595
|
+
unit?: Base.unitOfLengthEnum | undefined;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* A number and the denominator to write it to, for `math.toFractionText`, which gives it as a
|
|
599
|
+
* whole number and a reduced fraction such as `1-1/4`.
|
|
600
|
+
*/
|
|
601
|
+
class FractionTextDto {
|
|
602
|
+
constructor(number?: number, denominator?: number);
|
|
603
|
+
/**
|
|
604
|
+
* The number to write, such as a length in inches.
|
|
605
|
+
* @default 1.25
|
|
606
|
+
* @minimum -Infinity
|
|
607
|
+
* @maximum Infinity
|
|
608
|
+
* @step 0.0625
|
|
609
|
+
*/
|
|
610
|
+
number?: number | undefined;
|
|
611
|
+
/**
|
|
612
|
+
* The finest fraction to round to: a whole number such as 64 for sixty-fourths of an inch.
|
|
613
|
+
* @default 64
|
|
614
|
+
* @minimum 1
|
|
615
|
+
* @maximum Infinity
|
|
616
|
+
* @step 1
|
|
617
|
+
*/
|
|
618
|
+
denominator?: number | undefined;
|
|
619
|
+
}
|
|
559
620
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-namespace */
|
|
2
|
+
import { Base } from "./base-inputs";
|
|
2
3
|
/**
|
|
3
4
|
* Parameters for numeric helpers: the operands of arithmetic and trigonometry, the source and target
|
|
4
5
|
* ranges for remapping a value, rounding and clamping bounds, interpolation factors, and the seed for
|
|
@@ -718,4 +719,88 @@ export var Math;
|
|
|
718
719
|
}
|
|
719
720
|
}
|
|
720
721
|
Math.EvalArithmeticDto = EvalArithmeticDto;
|
|
722
|
+
/**
|
|
723
|
+
* A length and the two units to convert it between, for `math.convertLength`: `value` is read in
|
|
724
|
+
* `from` and given back in `to`.
|
|
725
|
+
*/
|
|
726
|
+
class ConvertLengthDto {
|
|
727
|
+
constructor(value, from, to) {
|
|
728
|
+
/**
|
|
729
|
+
* The length to convert, in `from`.
|
|
730
|
+
* @default 1
|
|
731
|
+
* @minimum -Infinity
|
|
732
|
+
* @maximum Infinity
|
|
733
|
+
* @step 0.1
|
|
734
|
+
*/
|
|
735
|
+
this.value = 1;
|
|
736
|
+
/**
|
|
737
|
+
* The unit `value` is in.
|
|
738
|
+
* @default inch
|
|
739
|
+
*/
|
|
740
|
+
this.from = Base.unitOfLengthEnum.inch;
|
|
741
|
+
/**
|
|
742
|
+
* The unit to give the length in.
|
|
743
|
+
* @default millimetre
|
|
744
|
+
*/
|
|
745
|
+
this.to = Base.unitOfLengthEnum.millimetre;
|
|
746
|
+
if (value !== undefined) {
|
|
747
|
+
this.value = value;
|
|
748
|
+
}
|
|
749
|
+
if (from !== undefined) {
|
|
750
|
+
this.from = from;
|
|
751
|
+
}
|
|
752
|
+
if (to !== undefined) {
|
|
753
|
+
this.to = to;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
Math.ConvertLengthDto = ConvertLengthDto;
|
|
758
|
+
/**
|
|
759
|
+
* A unit of length, for `math.millimetresPerUnit`, which says how many millimetres one of it
|
|
760
|
+
* holds.
|
|
761
|
+
*/
|
|
762
|
+
class UnitOfLengthDto {
|
|
763
|
+
constructor(unit) {
|
|
764
|
+
/**
|
|
765
|
+
* The unit to measure in millimetres.
|
|
766
|
+
* @default inch
|
|
767
|
+
*/
|
|
768
|
+
this.unit = Base.unitOfLengthEnum.inch;
|
|
769
|
+
if (unit !== undefined) {
|
|
770
|
+
this.unit = unit;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
Math.UnitOfLengthDto = UnitOfLengthDto;
|
|
775
|
+
/**
|
|
776
|
+
* A number and the denominator to write it to, for `math.toFractionText`, which gives it as a
|
|
777
|
+
* whole number and a reduced fraction such as `1-1/4`.
|
|
778
|
+
*/
|
|
779
|
+
class FractionTextDto {
|
|
780
|
+
constructor(number, denominator) {
|
|
781
|
+
/**
|
|
782
|
+
* The number to write, such as a length in inches.
|
|
783
|
+
* @default 1.25
|
|
784
|
+
* @minimum -Infinity
|
|
785
|
+
* @maximum Infinity
|
|
786
|
+
* @step 0.0625
|
|
787
|
+
*/
|
|
788
|
+
this.number = 1.25;
|
|
789
|
+
/**
|
|
790
|
+
* The finest fraction to round to: a whole number such as 64 for sixty-fourths of an inch.
|
|
791
|
+
* @default 64
|
|
792
|
+
* @minimum 1
|
|
793
|
+
* @maximum Infinity
|
|
794
|
+
* @step 1
|
|
795
|
+
*/
|
|
796
|
+
this.denominator = 64;
|
|
797
|
+
if (number !== undefined) {
|
|
798
|
+
this.number = number;
|
|
799
|
+
}
|
|
800
|
+
if (denominator !== undefined) {
|
|
801
|
+
this.denominator = denominator;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
Math.FractionTextDto = FractionTextDto;
|
|
721
806
|
})(Math || (Math = {}));
|
|
@@ -120,6 +120,46 @@ export declare namespace Mesh {
|
|
|
120
120
|
*/
|
|
121
121
|
holes?: Base.Point3[][] | undefined;
|
|
122
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Two triangle meshes and how close they may come, for `mesh.meshesWithin`.
|
|
125
|
+
*/
|
|
126
|
+
class MeshesWithinDto {
|
|
127
|
+
constructor(mesh1?: Base.Mesh3, mesh2?: Base.Mesh3, distance?: number);
|
|
128
|
+
/**
|
|
129
|
+
* The first mesh, as a list of triangles.
|
|
130
|
+
* @default undefined
|
|
131
|
+
*/
|
|
132
|
+
mesh1: Base.Mesh3;
|
|
133
|
+
/**
|
|
134
|
+
* The second mesh, as a list of triangles.
|
|
135
|
+
* @default undefined
|
|
136
|
+
*/
|
|
137
|
+
mesh2: Base.Mesh3;
|
|
138
|
+
/**
|
|
139
|
+
* How close the meshes may come, in model units; 0 asks whether they touch or cross.
|
|
140
|
+
* @default 0
|
|
141
|
+
* @minimum 0
|
|
142
|
+
* @maximum Infinity
|
|
143
|
+
* @step 0.1
|
|
144
|
+
*/
|
|
145
|
+
distance?: number | undefined;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* A closed triangle mesh and a point, for `mesh.isPointInside`.
|
|
149
|
+
*/
|
|
150
|
+
class MeshPointDto {
|
|
151
|
+
constructor(mesh?: Base.Mesh3, point?: Base.Point3);
|
|
152
|
+
/**
|
|
153
|
+
* The closed mesh, as a list of triangles.
|
|
154
|
+
* @default undefined
|
|
155
|
+
*/
|
|
156
|
+
mesh: Base.Mesh3;
|
|
157
|
+
/**
|
|
158
|
+
* The point to test.
|
|
159
|
+
* @default undefined
|
|
160
|
+
*/
|
|
161
|
+
point: Base.Point3;
|
|
162
|
+
}
|
|
123
163
|
/**
|
|
124
164
|
* A triangle mesh, for `mesh.signedVolume` and other methods that read one.
|
|
125
165
|
*/
|
|
@@ -131,4 +171,134 @@ export declare namespace Mesh {
|
|
|
131
171
|
*/
|
|
132
172
|
mesh: Base.Mesh3;
|
|
133
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Where `mesh.icosphere` puts its sphere, how large it is and how finely it is triangulated.
|
|
176
|
+
*/
|
|
177
|
+
class IcosphereDto {
|
|
178
|
+
constructor(center?: Base.Point3, radius?: number, detail?: number);
|
|
179
|
+
/**
|
|
180
|
+
* The sphere's center.
|
|
181
|
+
* @default [0, 0, 0]
|
|
182
|
+
*/
|
|
183
|
+
center?: Base.Point3 | undefined;
|
|
184
|
+
/**
|
|
185
|
+
* The sphere's radius, in model units.
|
|
186
|
+
* @default 1
|
|
187
|
+
* @minimum 0
|
|
188
|
+
* @exclusiveMinimum true
|
|
189
|
+
* @maximum Infinity
|
|
190
|
+
* @step 0.1
|
|
191
|
+
*/
|
|
192
|
+
radius?: number | undefined;
|
|
193
|
+
/**
|
|
194
|
+
* How many times each triangle of the starting icosahedron is split in four, from 0 (20
|
|
195
|
+
* triangles) to 6 (81,920 triangles).
|
|
196
|
+
* @default 2
|
|
197
|
+
* @minimum 0
|
|
198
|
+
* @maximum 6
|
|
199
|
+
* @step 1
|
|
200
|
+
*/
|
|
201
|
+
detail?: number | undefined;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* The size and the number of sides of the cone or cylinder `mesh.frustum` makes.
|
|
205
|
+
*/
|
|
206
|
+
class FrustumDto {
|
|
207
|
+
constructor(center?: Base.Point3, direction?: Base.Vector3, bottomRadius?: number, topRadius?: number, height?: number, sides?: number);
|
|
208
|
+
/**
|
|
209
|
+
* The center of the bottom.
|
|
210
|
+
* @default [0, 0, 0]
|
|
211
|
+
*/
|
|
212
|
+
center?: Base.Point3 | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* The direction the shape rises in from `center`; its length does not matter.
|
|
215
|
+
* @default [0, 1, 0]
|
|
216
|
+
*/
|
|
217
|
+
direction?: Base.Vector3 | undefined;
|
|
218
|
+
/**
|
|
219
|
+
* The radius at the bottom, in model units; 0 makes a point.
|
|
220
|
+
* @default 1
|
|
221
|
+
* @minimum 0
|
|
222
|
+
* @maximum Infinity
|
|
223
|
+
* @step 0.1
|
|
224
|
+
*/
|
|
225
|
+
bottomRadius?: number | undefined;
|
|
226
|
+
/**
|
|
227
|
+
* The radius at the top, in model units; 0 makes a point, the bottom radius a cylinder.
|
|
228
|
+
* @default 0.5
|
|
229
|
+
* @minimum 0
|
|
230
|
+
* @maximum Infinity
|
|
231
|
+
* @step 0.1
|
|
232
|
+
*/
|
|
233
|
+
topRadius?: number | undefined;
|
|
234
|
+
/**
|
|
235
|
+
* How tall the shape is, in model units.
|
|
236
|
+
* @default 2
|
|
237
|
+
* @minimum 0
|
|
238
|
+
* @exclusiveMinimum true
|
|
239
|
+
* @maximum Infinity
|
|
240
|
+
* @step 0.1
|
|
241
|
+
*/
|
|
242
|
+
height?: number | undefined;
|
|
243
|
+
/**
|
|
244
|
+
* How many flat sides go around the shape, at least 3.
|
|
245
|
+
* @default 24
|
|
246
|
+
* @minimum 3
|
|
247
|
+
* @maximum Infinity
|
|
248
|
+
* @step 1
|
|
249
|
+
*/
|
|
250
|
+
sides?: number | undefined;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* A list of triangles and a tolerance for `mesh.toIndexed`.
|
|
254
|
+
*/
|
|
255
|
+
class MeshToIndexedDto {
|
|
256
|
+
constructor(mesh?: Base.Mesh3, tolerance?: number);
|
|
257
|
+
/**
|
|
258
|
+
* The mesh, as a list of triangles.
|
|
259
|
+
* @default undefined
|
|
260
|
+
*/
|
|
261
|
+
mesh: Base.Mesh3;
|
|
262
|
+
/**
|
|
263
|
+
* Corners closer than this in every coordinate, in model units, become one point; 0 joins
|
|
264
|
+
* none.
|
|
265
|
+
* @default 1e-7
|
|
266
|
+
* @minimum 0
|
|
267
|
+
* @maximum Infinity
|
|
268
|
+
* @step 1e-7
|
|
269
|
+
*/
|
|
270
|
+
tolerance?: number | undefined;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* An indexed mesh for `mesh.fromIndexed`, `mesh.smoothNormals`, `mesh.windingPieces` and
|
|
274
|
+
* `mesh.orientConsistently`.
|
|
275
|
+
*/
|
|
276
|
+
class IndexedMeshDto {
|
|
277
|
+
constructor(mesh?: Base.IndexedMesh);
|
|
278
|
+
/**
|
|
279
|
+
* The mesh, with its points stored once and its triangles as point numbers.
|
|
280
|
+
* @default undefined
|
|
281
|
+
*/
|
|
282
|
+
mesh: Base.IndexedMesh;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* An indexed mesh and the angle of its sharp edges for `mesh.creasedNormals`.
|
|
286
|
+
*/
|
|
287
|
+
class CreasedNormalsDto {
|
|
288
|
+
constructor(mesh?: Base.IndexedMesh, angle?: number);
|
|
289
|
+
/**
|
|
290
|
+
* The mesh, with its points stored once and its triangles as point numbers.
|
|
291
|
+
* @default undefined
|
|
292
|
+
*/
|
|
293
|
+
mesh: Base.IndexedMesh;
|
|
294
|
+
/**
|
|
295
|
+
* Triangles that turn from each other by more than this, in degrees, keep a sharp edge
|
|
296
|
+
* between them; 0 shades every triangle flat and 180 smooths across every edge.
|
|
297
|
+
* @default 30
|
|
298
|
+
* @minimum 0
|
|
299
|
+
* @maximum 180
|
|
300
|
+
* @step 1
|
|
301
|
+
*/
|
|
302
|
+
angle?: number | undefined;
|
|
303
|
+
}
|
|
134
304
|
}
|
|
@@ -116,6 +116,45 @@ export var Mesh;
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
Mesh.PolygonWithHolesDto = PolygonWithHolesDto;
|
|
119
|
+
/**
|
|
120
|
+
* Two triangle meshes and how close they may come, for `mesh.meshesWithin`.
|
|
121
|
+
*/
|
|
122
|
+
class MeshesWithinDto {
|
|
123
|
+
constructor(mesh1, mesh2, distance) {
|
|
124
|
+
/**
|
|
125
|
+
* How close the meshes may come, in model units; 0 asks whether they touch or cross.
|
|
126
|
+
* @default 0
|
|
127
|
+
* @minimum 0
|
|
128
|
+
* @maximum Infinity
|
|
129
|
+
* @step 0.1
|
|
130
|
+
*/
|
|
131
|
+
this.distance = 0;
|
|
132
|
+
if (mesh1 !== undefined) {
|
|
133
|
+
this.mesh1 = mesh1;
|
|
134
|
+
}
|
|
135
|
+
if (mesh2 !== undefined) {
|
|
136
|
+
this.mesh2 = mesh2;
|
|
137
|
+
}
|
|
138
|
+
if (distance !== undefined) {
|
|
139
|
+
this.distance = distance;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
Mesh.MeshesWithinDto = MeshesWithinDto;
|
|
144
|
+
/**
|
|
145
|
+
* A closed triangle mesh and a point, for `mesh.isPointInside`.
|
|
146
|
+
*/
|
|
147
|
+
class MeshPointDto {
|
|
148
|
+
constructor(mesh, point) {
|
|
149
|
+
if (mesh !== undefined) {
|
|
150
|
+
this.mesh = mesh;
|
|
151
|
+
}
|
|
152
|
+
if (point !== undefined) {
|
|
153
|
+
this.point = point;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
Mesh.MeshPointDto = MeshPointDto;
|
|
119
158
|
/**
|
|
120
159
|
* A triangle mesh, for `mesh.signedVolume` and other methods that read one.
|
|
121
160
|
*/
|
|
@@ -127,4 +166,171 @@ export var Mesh;
|
|
|
127
166
|
}
|
|
128
167
|
}
|
|
129
168
|
Mesh.MeshDto = MeshDto;
|
|
169
|
+
/**
|
|
170
|
+
* Where `mesh.icosphere` puts its sphere, how large it is and how finely it is triangulated.
|
|
171
|
+
*/
|
|
172
|
+
class IcosphereDto {
|
|
173
|
+
constructor(center, radius, detail) {
|
|
174
|
+
/**
|
|
175
|
+
* The sphere's center.
|
|
176
|
+
* @default [0, 0, 0]
|
|
177
|
+
*/
|
|
178
|
+
this.center = [0, 0, 0];
|
|
179
|
+
/**
|
|
180
|
+
* The sphere's radius, in model units.
|
|
181
|
+
* @default 1
|
|
182
|
+
* @minimum 0
|
|
183
|
+
* @exclusiveMinimum true
|
|
184
|
+
* @maximum Infinity
|
|
185
|
+
* @step 0.1
|
|
186
|
+
*/
|
|
187
|
+
this.radius = 1;
|
|
188
|
+
/**
|
|
189
|
+
* How many times each triangle of the starting icosahedron is split in four, from 0 (20
|
|
190
|
+
* triangles) to 6 (81,920 triangles).
|
|
191
|
+
* @default 2
|
|
192
|
+
* @minimum 0
|
|
193
|
+
* @maximum 6
|
|
194
|
+
* @step 1
|
|
195
|
+
*/
|
|
196
|
+
this.detail = 2;
|
|
197
|
+
if (center !== undefined) {
|
|
198
|
+
this.center = center;
|
|
199
|
+
}
|
|
200
|
+
if (radius !== undefined) {
|
|
201
|
+
this.radius = radius;
|
|
202
|
+
}
|
|
203
|
+
if (detail !== undefined) {
|
|
204
|
+
this.detail = detail;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
Mesh.IcosphereDto = IcosphereDto;
|
|
209
|
+
/**
|
|
210
|
+
* The size and the number of sides of the cone or cylinder `mesh.frustum` makes.
|
|
211
|
+
*/
|
|
212
|
+
class FrustumDto {
|
|
213
|
+
constructor(center, direction, bottomRadius, topRadius, height, sides) {
|
|
214
|
+
/**
|
|
215
|
+
* The center of the bottom.
|
|
216
|
+
* @default [0, 0, 0]
|
|
217
|
+
*/
|
|
218
|
+
this.center = [0, 0, 0];
|
|
219
|
+
/**
|
|
220
|
+
* The direction the shape rises in from `center`; its length does not matter.
|
|
221
|
+
* @default [0, 1, 0]
|
|
222
|
+
*/
|
|
223
|
+
this.direction = [0, 1, 0];
|
|
224
|
+
/**
|
|
225
|
+
* The radius at the bottom, in model units; 0 makes a point.
|
|
226
|
+
* @default 1
|
|
227
|
+
* @minimum 0
|
|
228
|
+
* @maximum Infinity
|
|
229
|
+
* @step 0.1
|
|
230
|
+
*/
|
|
231
|
+
this.bottomRadius = 1;
|
|
232
|
+
/**
|
|
233
|
+
* The radius at the top, in model units; 0 makes a point, the bottom radius a cylinder.
|
|
234
|
+
* @default 0.5
|
|
235
|
+
* @minimum 0
|
|
236
|
+
* @maximum Infinity
|
|
237
|
+
* @step 0.1
|
|
238
|
+
*/
|
|
239
|
+
this.topRadius = 0.5;
|
|
240
|
+
/**
|
|
241
|
+
* How tall the shape is, in model units.
|
|
242
|
+
* @default 2
|
|
243
|
+
* @minimum 0
|
|
244
|
+
* @exclusiveMinimum true
|
|
245
|
+
* @maximum Infinity
|
|
246
|
+
* @step 0.1
|
|
247
|
+
*/
|
|
248
|
+
this.height = 2;
|
|
249
|
+
/**
|
|
250
|
+
* How many flat sides go around the shape, at least 3.
|
|
251
|
+
* @default 24
|
|
252
|
+
* @minimum 3
|
|
253
|
+
* @maximum Infinity
|
|
254
|
+
* @step 1
|
|
255
|
+
*/
|
|
256
|
+
this.sides = 24;
|
|
257
|
+
if (center !== undefined) {
|
|
258
|
+
this.center = center;
|
|
259
|
+
}
|
|
260
|
+
if (direction !== undefined) {
|
|
261
|
+
this.direction = direction;
|
|
262
|
+
}
|
|
263
|
+
if (bottomRadius !== undefined) {
|
|
264
|
+
this.bottomRadius = bottomRadius;
|
|
265
|
+
}
|
|
266
|
+
if (topRadius !== undefined) {
|
|
267
|
+
this.topRadius = topRadius;
|
|
268
|
+
}
|
|
269
|
+
if (height !== undefined) {
|
|
270
|
+
this.height = height;
|
|
271
|
+
}
|
|
272
|
+
if (sides !== undefined) {
|
|
273
|
+
this.sides = sides;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
Mesh.FrustumDto = FrustumDto;
|
|
278
|
+
/**
|
|
279
|
+
* A list of triangles and a tolerance for `mesh.toIndexed`.
|
|
280
|
+
*/
|
|
281
|
+
class MeshToIndexedDto {
|
|
282
|
+
constructor(mesh, tolerance) {
|
|
283
|
+
/**
|
|
284
|
+
* Corners closer than this in every coordinate, in model units, become one point; 0 joins
|
|
285
|
+
* none.
|
|
286
|
+
* @default 1e-7
|
|
287
|
+
* @minimum 0
|
|
288
|
+
* @maximum Infinity
|
|
289
|
+
* @step 1e-7
|
|
290
|
+
*/
|
|
291
|
+
this.tolerance = 1e-7;
|
|
292
|
+
if (mesh !== undefined) {
|
|
293
|
+
this.mesh = mesh;
|
|
294
|
+
}
|
|
295
|
+
if (tolerance !== undefined) {
|
|
296
|
+
this.tolerance = tolerance;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
Mesh.MeshToIndexedDto = MeshToIndexedDto;
|
|
301
|
+
/**
|
|
302
|
+
* An indexed mesh for `mesh.fromIndexed`, `mesh.smoothNormals`, `mesh.windingPieces` and
|
|
303
|
+
* `mesh.orientConsistently`.
|
|
304
|
+
*/
|
|
305
|
+
class IndexedMeshDto {
|
|
306
|
+
constructor(mesh) {
|
|
307
|
+
if (mesh !== undefined) {
|
|
308
|
+
this.mesh = mesh;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
Mesh.IndexedMeshDto = IndexedMeshDto;
|
|
313
|
+
/**
|
|
314
|
+
* An indexed mesh and the angle of its sharp edges for `mesh.creasedNormals`.
|
|
315
|
+
*/
|
|
316
|
+
class CreasedNormalsDto {
|
|
317
|
+
constructor(mesh, angle) {
|
|
318
|
+
/**
|
|
319
|
+
* Triangles that turn from each other by more than this, in degrees, keep a sharp edge
|
|
320
|
+
* between them; 0 shades every triangle flat and 180 smooths across every edge.
|
|
321
|
+
* @default 30
|
|
322
|
+
* @minimum 0
|
|
323
|
+
* @maximum 180
|
|
324
|
+
* @step 1
|
|
325
|
+
*/
|
|
326
|
+
this.angle = 30;
|
|
327
|
+
if (mesh !== undefined) {
|
|
328
|
+
this.mesh = mesh;
|
|
329
|
+
}
|
|
330
|
+
if (angle !== undefined) {
|
|
331
|
+
this.angle = angle;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
Mesh.CreasedNormalsDto = CreasedNormalsDto;
|
|
130
336
|
})(Mesh || (Mesh = {}));
|
|
@@ -140,8 +140,8 @@ export declare namespace Point {
|
|
|
140
140
|
*/
|
|
141
141
|
updatable?: boolean | undefined;
|
|
142
142
|
/**
|
|
143
|
-
* A mesh drawn earlier
|
|
144
|
-
*
|
|
143
|
+
* A mesh drawn earlier with `updatable` on: moved in place while `colours`, `opacity` and
|
|
144
|
+
* `size` stay the same, else freed and redrawn. Use the returned mesh.
|
|
145
145
|
* @default undefined
|
|
146
146
|
* @optional true
|
|
147
147
|
*/
|
|
@@ -189,8 +189,8 @@ export declare namespace Point {
|
|
|
189
189
|
*/
|
|
190
190
|
updatable?: boolean | undefined;
|
|
191
191
|
/**
|
|
192
|
-
* A mesh drawn earlier
|
|
193
|
-
*
|
|
192
|
+
* A mesh drawn earlier with `updatable` on: moved in place while the `points` count,
|
|
193
|
+
* `colours`, `opacity` and `size` stay the same, else freed and redrawn. Use the returned mesh.
|
|
194
194
|
* @default undefined
|
|
195
195
|
* @optional true
|
|
196
196
|
*/
|