@linkiez/dxf-renew 7.2.0 → 7.2.3
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/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +18 -0
- package/build.mjs +28 -0
- package/lib/Helper.d.ts +19 -0
- package/lib/Helper.d.ts.map +1 -0
- package/lib/applyTransforms.d.ts +12 -0
- package/lib/applyTransforms.d.ts.map +1 -0
- package/lib/cli.cjs +1 -2
- package/lib/cli.cjs.map +1 -1
- package/lib/cli.d.ts +3 -0
- package/lib/cli.d.ts.map +1 -0
- package/lib/config.d.ts +4 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/constants.d.ts +3 -0
- package/lib/constants.d.ts.map +1 -0
- package/lib/denormalise.d.ts +3 -0
- package/lib/denormalise.d.ts.map +1 -0
- package/lib/dimensionToSVG.d.ts +18 -0
- package/lib/dimensionToSVG.d.ts.map +1 -0
- package/lib/entityToPolyline.d.ts +48 -0
- package/lib/entityToPolyline.d.ts.map +1 -0
- package/lib/getRGBForEntity.d.ts +5 -0
- package/lib/getRGBForEntity.d.ts.map +1 -0
- package/lib/groupEntitiesByLayer.d.ts +3 -0
- package/lib/groupEntitiesByLayer.d.ts.map +1 -0
- package/lib/handlers/blocks.d.ts +3 -0
- package/lib/handlers/blocks.d.ts.map +1 -0
- package/lib/handlers/entities.d.ts +4 -0
- package/lib/handlers/entities.d.ts.map +1 -0
- package/lib/handlers/entity/arc.d.ts +20 -0
- package/lib/handlers/entity/arc.d.ts.map +1 -0
- package/lib/handlers/entity/attdef.d.ts +11 -0
- package/lib/handlers/entity/attdef.d.ts.map +1 -0
- package/lib/handlers/entity/attrib.d.ts +9 -0
- package/lib/handlers/entity/attrib.d.ts.map +1 -0
- package/lib/handlers/entity/circle.d.ts +17 -0
- package/lib/handlers/entity/circle.d.ts.map +1 -0
- package/lib/handlers/entity/common.d.ts +3 -0
- package/lib/handlers/entity/common.d.ts.map +1 -0
- package/lib/handlers/entity/dgnUnderlay.d.ts +33 -0
- package/lib/handlers/entity/dgnUnderlay.d.ts.map +1 -0
- package/lib/handlers/entity/dimension.d.ts +35 -0
- package/lib/handlers/entity/dimension.d.ts.map +1 -0
- package/lib/handlers/entity/dwfUnderlay.d.ts +33 -0
- package/lib/handlers/entity/dwfUnderlay.d.ts.map +1 -0
- package/lib/handlers/entity/ellipse.d.ts +10 -0
- package/lib/handlers/entity/ellipse.d.ts.map +1 -0
- package/lib/handlers/entity/hatch.d.ts +9 -0
- package/lib/handlers/entity/hatch.d.ts.map +1 -0
- package/lib/handlers/entity/image.d.ts +26 -0
- package/lib/handlers/entity/image.d.ts.map +1 -0
- package/lib/handlers/entity/insert.d.ts +10 -0
- package/lib/handlers/entity/insert.d.ts.map +1 -0
- package/lib/handlers/entity/leader.d.ts +48 -0
- package/lib/handlers/entity/leader.d.ts.map +1 -0
- package/lib/handlers/entity/line.d.ts +16 -0
- package/lib/handlers/entity/line.d.ts.map +1 -0
- package/lib/handlers/entity/lwpolyline.d.ts +10 -0
- package/lib/handlers/entity/lwpolyline.d.ts.map +1 -0
- package/lib/handlers/entity/mleader.d.ts +15 -0
- package/lib/handlers/entity/mleader.d.ts.map +1 -0
- package/lib/handlers/entity/mline.d.ts +17 -0
- package/lib/handlers/entity/mline.d.ts.map +1 -0
- package/lib/handlers/entity/mtext.d.ts +62 -0
- package/lib/handlers/entity/mtext.d.ts.map +1 -0
- package/lib/handlers/entity/ole2Frame.d.ts +9 -0
- package/lib/handlers/entity/ole2Frame.d.ts.map +1 -0
- package/lib/handlers/entity/oleframe.d.ts +9 -0
- package/lib/handlers/entity/oleframe.d.ts.map +1 -0
- package/lib/handlers/entity/pdfUnderlay.d.ts +33 -0
- package/lib/handlers/entity/pdfUnderlay.d.ts.map +1 -0
- package/lib/handlers/entity/point.d.ts +17 -0
- package/lib/handlers/entity/point.d.ts.map +1 -0
- package/lib/handlers/entity/polyline.d.ts +21 -0
- package/lib/handlers/entity/polyline.d.ts.map +1 -0
- package/lib/handlers/entity/ray.d.ts +15 -0
- package/lib/handlers/entity/ray.d.ts.map +1 -0
- package/lib/handlers/entity/region.d.ts +14 -0
- package/lib/handlers/entity/region.d.ts.map +1 -0
- package/lib/handlers/entity/shape.d.ts +22 -0
- package/lib/handlers/entity/shape.d.ts.map +1 -0
- package/lib/handlers/entity/solid.d.ts +15 -0
- package/lib/handlers/entity/solid.d.ts.map +1 -0
- package/lib/handlers/entity/spline.d.ts +30 -0
- package/lib/handlers/entity/spline.d.ts.map +1 -0
- package/lib/handlers/entity/table.d.ts +16 -0
- package/lib/handlers/entity/table.d.ts.map +1 -0
- package/lib/handlers/entity/text.d.ts +31 -0
- package/lib/handlers/entity/text.d.ts.map +1 -0
- package/lib/handlers/entity/threeDFace.d.ts +14 -0
- package/lib/handlers/entity/threeDFace.d.ts.map +1 -0
- package/lib/handlers/entity/tolerance.d.ts +25 -0
- package/lib/handlers/entity/tolerance.d.ts.map +1 -0
- package/lib/handlers/entity/trace.d.ts +15 -0
- package/lib/handlers/entity/trace.d.ts.map +1 -0
- package/lib/handlers/entity/vertex.d.ts +10 -0
- package/lib/handlers/entity/vertex.d.ts.map +1 -0
- package/lib/handlers/entity/viewport.d.ts +9 -0
- package/lib/handlers/entity/viewport.d.ts.map +1 -0
- package/lib/handlers/entity/wipeout.d.ts +28 -0
- package/lib/handlers/entity/wipeout.d.ts.map +1 -0
- package/lib/handlers/entity/xline.d.ts +15 -0
- package/lib/handlers/entity/xline.d.ts.map +1 -0
- package/lib/handlers/header.d.ts +3 -0
- package/lib/handlers/header.d.ts.map +1 -0
- package/lib/handlers/objects.d.ts +3 -0
- package/lib/handlers/objects.d.ts.map +1 -0
- package/lib/handlers/tables.d.ts +13 -0
- package/lib/handlers/tables.d.ts.map +1 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/parseString.d.ts +3 -0
- package/lib/parseString.d.ts.map +1 -0
- package/lib/toJson.d.ts +3 -0
- package/lib/toJson.d.ts.map +1 -0
- package/lib/toPolylines.d.ts +4 -0
- package/lib/toPolylines.d.ts.map +1 -0
- package/lib/toSVG.d.ts +7 -0
- package/lib/toSVG.d.ts.map +1 -0
- package/lib/types/arc-entity.d.ts +8 -0
- package/lib/types/arc-entity.d.ts.map +1 -0
- package/lib/types/base-entity.d.ts +22 -0
- package/lib/types/base-entity.d.ts.map +1 -0
- package/lib/types/circle-entity.d.ts +6 -0
- package/lib/types/circle-entity.d.ts.map +1 -0
- package/lib/types/common.d.ts +30 -0
- package/lib/types/common.d.ts.map +1 -0
- package/lib/types/dimension-entity.d.ts +31 -0
- package/lib/types/dimension-entity.d.ts.map +1 -0
- package/lib/types/dxf.d.ts +55 -0
- package/lib/types/dxf.d.ts.map +1 -0
- package/lib/types/ellipse-entity.d.ts +11 -0
- package/lib/types/ellipse-entity.d.ts.map +1 -0
- package/lib/types/entity.d.ts +30 -0
- package/lib/types/entity.d.ts.map +1 -0
- package/lib/types/handler-internal.d.ts +44 -0
- package/lib/types/handler-internal.d.ts.map +1 -0
- package/lib/types/handler.d.ts +8 -0
- package/lib/types/handler.d.ts.map +1 -0
- package/lib/types/hatch-entity.d.ts +116 -0
- package/lib/types/hatch-entity.d.ts.map +1 -0
- package/lib/types/helper.d.ts +11 -0
- package/lib/types/helper.d.ts.map +1 -0
- package/lib/types/image-entity.d.ts +25 -0
- package/lib/types/image-entity.d.ts.map +1 -0
- package/lib/types/index.d.ts +43 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/insert-entity.d.ts +16 -0
- package/lib/types/insert-entity.d.ts.map +1 -0
- package/lib/types/layer-groups.d.ts +6 -0
- package/lib/types/layer-groups.d.ts.map +1 -0
- package/lib/types/leader-entity.d.ts +28 -0
- package/lib/types/leader-entity.d.ts.map +1 -0
- package/lib/types/line-entity.d.ts +8 -0
- package/lib/types/line-entity.d.ts.map +1 -0
- package/lib/types/mleader-entity.d.ts +7 -0
- package/lib/types/mleader-entity.d.ts.map +1 -0
- package/lib/types/mline-entity.d.ts +10 -0
- package/lib/types/mline-entity.d.ts.map +1 -0
- package/lib/types/mtext-entity.d.ts +33 -0
- package/lib/types/mtext-entity.d.ts.map +1 -0
- package/lib/types/ole2frame-entity.d.ts +33 -0
- package/lib/types/ole2frame-entity.d.ts.map +1 -0
- package/lib/types/oleframe-entity.d.ts +33 -0
- package/lib/types/oleframe-entity.d.ts.map +1 -0
- package/lib/types/options.d.ts +57 -0
- package/lib/types/options.d.ts.map +1 -0
- package/lib/types/point-entity.d.ts +5 -0
- package/lib/types/point-entity.d.ts.map +1 -0
- package/lib/types/polyline-entity.d.ts +17 -0
- package/lib/types/polyline-entity.d.ts.map +1 -0
- package/lib/types/polylines.d.ts +18 -0
- package/lib/types/polylines.d.ts.map +1 -0
- package/lib/types/ray-entity.d.ts +10 -0
- package/lib/types/ray-entity.d.ts.map +1 -0
- package/lib/types/region-entity.d.ts +10 -0
- package/lib/types/region-entity.d.ts.map +1 -0
- package/lib/types/shape-entity.d.ts +17 -0
- package/lib/types/shape-entity.d.ts.map +1 -0
- package/lib/types/solid-entity.d.ts +7 -0
- package/lib/types/solid-entity.d.ts.map +1 -0
- package/lib/types/spline-entity.d.ts +10 -0
- package/lib/types/spline-entity.d.ts.map +1 -0
- package/lib/types/svg.d.ts +27 -0
- package/lib/types/svg.d.ts.map +1 -0
- package/lib/types/table-entity.d.ts +12 -0
- package/lib/types/table-entity.d.ts.map +1 -0
- package/lib/types/tables.d.ts +549 -0
- package/lib/types/tables.d.ts.map +1 -0
- package/lib/types/text-entity.d.ts +21 -0
- package/lib/types/text-entity.d.ts.map +1 -0
- package/lib/types/tolerance-entity.d.ts +14 -0
- package/lib/types/tolerance-entity.d.ts.map +1 -0
- package/lib/types/trace-entity.d.ts +10 -0
- package/lib/types/trace-entity.d.ts.map +1 -0
- package/lib/types/underlay-entity.d.ts +26 -0
- package/lib/types/underlay-entity.d.ts.map +1 -0
- package/lib/types/util-types.d.ts +22 -0
- package/lib/types/util-types.d.ts.map +1 -0
- package/lib/types/viewport-entity.d.ts +79 -0
- package/lib/types/viewport-entity.d.ts.map +1 -0
- package/lib/types/wipeout-entity.d.ts +18 -0
- package/lib/types/wipeout-entity.d.ts.map +1 -0
- package/lib/types/xline-entity.d.ts +10 -0
- package/lib/types/xline-entity.d.ts.map +1 -0
- package/lib/types.d.ts +2 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/util/bSpline.d.ts +8 -0
- package/lib/util/bSpline.d.ts.map +1 -0
- package/lib/util/colors.d.ts +5 -0
- package/lib/util/colors.d.ts.map +1 -0
- package/lib/util/createArcForLWPolyline.d.ts +9 -0
- package/lib/util/createArcForLWPolyline.d.ts.map +1 -0
- package/lib/util/dxfColorToRGB.d.ts +22 -0
- package/lib/util/dxfColorToRGB.d.ts.map +1 -0
- package/lib/util/escapeXmlText.d.ts +2 -0
- package/lib/util/escapeXmlText.d.ts.map +1 -0
- package/lib/util/insertKnot.d.ts +9 -0
- package/lib/util/insertKnot.d.ts.map +1 -0
- package/lib/util/logger.d.ts +10 -0
- package/lib/util/logger.d.ts.map +1 -0
- package/lib/util/rgbToColorAttribute.d.ts +7 -0
- package/lib/util/rgbToColorAttribute.d.ts.map +1 -0
- package/lib/util/rotate.d.ts +9 -0
- package/lib/util/rotate.d.ts.map +1 -0
- package/lib/util/round10.d.ts +2 -0
- package/lib/util/round10.d.ts.map +1 -0
- package/lib/util/toPiecewiseBezier.d.ts +18 -0
- package/lib/util/toPiecewiseBezier.d.ts.map +1 -0
- package/lib/util/transformBoundingBoxAndElement.d.ts +9 -0
- package/lib/util/transformBoundingBoxAndElement.d.ts.map +1 -0
- package/package.json +1 -1
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
7
|
|
|
8
|
+
## <small>7.2.3 (2026-01-01)</small>
|
|
9
|
+
|
|
10
|
+
* Revert "ci: publish to GitHub Packages npm registry" ([647277b](https://github.com/linkiez/DXF-Renewed/commit/647277b))
|
|
11
|
+
* Revert "docs: add GitHub Packages install instructions" ([86392ec](https://github.com/linkiez/DXF-Renewed/commit/86392ec))
|
|
12
|
+
|
|
13
|
+
## <small>7.2.2 (2026-01-01)</small>
|
|
14
|
+
|
|
15
|
+
* Merge pull request #4 from linkiez/fix/emit-types ([acb6440](https://github.com/linkiez/DXF-Renewed/commit/acb6440)), closes [#4](https://github.com/linkiez/DXF-Renewed/issues/4)
|
|
16
|
+
* Update build.mjs ([6b0970c](https://github.com/linkiez/DXF-Renewed/commit/6b0970c))
|
|
17
|
+
* fix(build): avoid import.meta in CJS output ([e5a351f](https://github.com/linkiez/DXF-Renewed/commit/e5a351f))
|
|
18
|
+
* fix(build): emit TypeScript declarations ([1e6af01](https://github.com/linkiez/DXF-Renewed/commit/1e6af01))
|
|
19
|
+
|
|
20
|
+
## <small>7.2.1 (2026-01-01)</small>
|
|
21
|
+
|
|
22
|
+
* Merge pull request #3 from linkiez/feature/2026.01.01 ([2c51f7d](https://github.com/linkiez/DXF-Renewed/commit/2c51f7d)), closes [#3](https://github.com/linkiez/DXF-Renewed/issues/3)
|
|
23
|
+
* docs: add GitHub Packages install instructions ([5b4671e](https://github.com/linkiez/DXF-Renewed/commit/5b4671e))
|
|
24
|
+
* ci: publish to GitHub Packages npm registry ([a37adda](https://github.com/linkiez/DXF-Renewed/commit/a37adda))
|
|
25
|
+
|
|
8
26
|
## 7.2.0 (2026-01-01)
|
|
9
27
|
|
|
10
28
|
* Merge pull request #2 from linkiez/feature/2026.01.01 ([c01512f](https://github.com/linkiez/DXF-Renewed/commit/c01512f)), closes [#2](https://github.com/linkiez/DXF-Renewed/issues/2)
|
package/build.mjs
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
// esbuild configuration for building the project
|
|
2
2
|
import * as esbuild from 'esbuild'
|
|
3
|
+
import { execFile } from 'node:child_process'
|
|
3
4
|
import { readdir } from 'node:fs/promises'
|
|
4
5
|
import { join } from 'node:path'
|
|
5
6
|
|
|
7
|
+
async function emitTypeDeclarations() {
|
|
8
|
+
// Generate *.d.ts into ./lib without emitting JS (esbuild handles JS output)
|
|
9
|
+
await new Promise((resolve, reject) => {
|
|
10
|
+
const child = execFile(
|
|
11
|
+
process.execPath,
|
|
12
|
+
['./node_modules/typescript/bin/tsc', '-p', './tsconfig.json', '--emitDeclarationOnly'],
|
|
13
|
+
{ stdio: 'inherit' },
|
|
14
|
+
error => {
|
|
15
|
+
if (error) {
|
|
16
|
+
reject(error)
|
|
17
|
+
return
|
|
18
|
+
}
|
|
19
|
+
resolve(undefined)
|
|
20
|
+
},
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
child.on('error', reject)
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
|
|
6
27
|
async function getEntryPoints(dir) {
|
|
7
28
|
const entries = []
|
|
8
29
|
const stack = [dir]
|
|
@@ -29,6 +50,8 @@ async function getEntryPoints(dir) {
|
|
|
29
50
|
}
|
|
30
51
|
|
|
31
52
|
async function build() {
|
|
53
|
+
await emitTypeDeclarations()
|
|
54
|
+
|
|
32
55
|
const entryPoints = await getEntryPoints('src')
|
|
33
56
|
|
|
34
57
|
// Build ESM version
|
|
@@ -52,6 +75,11 @@ async function build() {
|
|
|
52
75
|
target: 'es2020',
|
|
53
76
|
sourcemap: true,
|
|
54
77
|
outExtension: { '.js': '.cjs' },
|
|
78
|
+
// CJS output does not support import.meta; this prevents warnings for code
|
|
79
|
+
// that uses import.meta.url only as an ESM fallback.
|
|
80
|
+
define: {
|
|
81
|
+
'import.meta.url': '__filename',
|
|
82
|
+
},
|
|
55
83
|
logLevel: 'info',
|
|
56
84
|
})
|
|
57
85
|
|
package/lib/Helper.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import toPolylines from './toPolylines';
|
|
2
|
+
import type { Entity, LayerGroups, ParsedDXF, ToJsonOptions, ToSVGOptions } from './types';
|
|
3
|
+
export default class Helper {
|
|
4
|
+
private readonly _contents;
|
|
5
|
+
private _parsed;
|
|
6
|
+
private _denormalised;
|
|
7
|
+
private _groups;
|
|
8
|
+
constructor(contents: string);
|
|
9
|
+
parse(): ParsedDXF;
|
|
10
|
+
get parsed(): ParsedDXF;
|
|
11
|
+
denormalise(): Entity[];
|
|
12
|
+
get denormalised(): Entity[];
|
|
13
|
+
group(): LayerGroups;
|
|
14
|
+
get groups(): LayerGroups;
|
|
15
|
+
toSVG(options?: ToSVGOptions): string;
|
|
16
|
+
toJson(options?: ToJsonOptions): string;
|
|
17
|
+
toPolylines(): ReturnType<typeof toPolylines>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=Helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Helper.d.ts","sourceRoot":"","sources":["../src/Helper.ts"],"names":[],"mappings":"AAIA,OAAO,WAAW,MAAM,eAAe,CAAA;AAIvC,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE1F,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAQ;IAClC,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,OAAO,CAAoB;gBAEvB,QAAQ,EAAE,MAAM;IAU5B,KAAK,IAAI,SAAS;IAMlB,IAAI,MAAM,IAAI,SAAS,CAKtB;IAED,WAAW,IAAI,MAAM,EAAE;IAMvB,IAAI,YAAY,IAAI,MAAM,EAAE,CAK3B;IAED,KAAK,IAAI,WAAW;IAKpB,IAAI,MAAM,IAAI,WAAW,CAKxB;IAED,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM;IAIrC,MAAM,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM;IAIvC,WAAW,IAAI,UAAU,CAAC,OAAO,WAAW,CAAC;CAG9C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apply the transforms to the polyline.
|
|
3
|
+
*
|
|
4
|
+
* @param polyline the polyline
|
|
5
|
+
* @param transforms the transforms array
|
|
6
|
+
* @returns the transformed polyline
|
|
7
|
+
*/
|
|
8
|
+
import type { PointTuple, Transform } from './types';
|
|
9
|
+
type Point = PointTuple;
|
|
10
|
+
export default function applyTransforms(polyline: Point[], transforms?: Transform[]): Point[];
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=applyTransforms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyTransforms.d.ts","sourceRoot":"","sources":["../src/applyTransforms.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEpD,KAAK,KAAK,GAAG,UAAU,CAAA;AAEvB,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,QAAQ,EAAE,KAAK,EAAE,EACjB,UAAU,CAAC,EAAE,SAAS,EAAE,GACvB,KAAK,EAAE,CAsCT"}
|
package/lib/cli.cjs
CHANGED
|
@@ -26,9 +26,8 @@ var import_commander = require("commander");
|
|
|
26
26
|
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
27
27
|
var import_node_module = require("node:module");
|
|
28
28
|
var import__ = require("./");
|
|
29
|
-
const import_meta = {};
|
|
30
29
|
const require2 = (0, import_node_module.createRequire)(
|
|
31
|
-
typeof __filename === "string" ? __filename :
|
|
30
|
+
typeof __filename === "string" ? __filename : __filename
|
|
32
31
|
);
|
|
33
32
|
const { version } = require2("../package.json");
|
|
34
33
|
const program = new import_commander.Command();
|
package/lib/cli.cjs.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/cli.ts"],
|
|
4
4
|
"sourcesContent": ["#!/usr/bin/env node\nimport { Command } from 'commander'\nimport fs from 'node:fs'\nimport { createRequire } from 'node:module'\n\nimport { denormalise, groupEntitiesByLayer, parseString, toSVG } from './'\n\nconst require = createRequire(\n typeof __filename === 'string' ? __filename : import.meta.url,\n)\nconst { version } = require('../package.json')\n\nconst program = new Command()\n\nprogram\n .version(version)\n .description('Converts a dxf file to a svg file.')\n .arguments('<dxfFile> [svgFile]')\n .option('-v --verbose', 'Verbose output')\n .action((dxfFile: string, svgFile: string | undefined, options: { verbose?: boolean }) => {\n const parsed = parseString(fs.readFileSync(dxfFile, 'utf-8'))\n\n if (options.verbose) {\n const groups = groupEntitiesByLayer(denormalise(parsed))\n console.log('[layer : number of entities]')\n for (const layer of Object.keys(groups)) {\n console.log(`${layer} : ${groups[layer].length}`)\n }\n }\n\n fs.writeFileSync(\n svgFile || `${dxfFile.split('.').slice(0, -1).join('.')}.svg`,\n toSVG(parsed),\n 'utf-8',\n )\n })\n .parse(process.argv)\n\nif (!process.argv.slice(2).length) {\n program.help()\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AACA,uBAAwB;AACxB,qBAAe;AACf,yBAA8B;AAE9B,eAAsE;
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AACA,uBAAwB;AACxB,qBAAe;AACf,yBAA8B;AAE9B,eAAsE;AAEtE,MAAMA,eAAU;AAAA,EACd,OAAO,eAAe,WAAW,aAAa;AAChD;AACA,MAAM,EAAE,QAAQ,IAAIA,SAAQ,iBAAiB;AAE7C,MAAM,UAAU,IAAI,yBAAQ;AAE5B,QACG,QAAQ,OAAO,EACf,YAAY,oCAAoC,EAChD,UAAU,qBAAqB,EAC/B,OAAO,gBAAgB,gBAAgB,EACvC,OAAO,CAAC,SAAiB,SAA6B,YAAmC;AACxF,QAAM,aAAS,sBAAY,eAAAC,QAAG,aAAa,SAAS,OAAO,CAAC;AAE5D,MAAI,QAAQ,SAAS;AACnB,UAAM,aAAS,mCAAqB,sBAAY,MAAM,CAAC;AACvD,YAAQ,IAAI,8BAA8B;AAC1C,eAAW,SAAS,OAAO,KAAK,MAAM,GAAG;AACvC,cAAQ,IAAI,GAAG,KAAK,MAAM,OAAO,KAAK,EAAE,MAAM,EAAE;AAAA,IAClD;AAAA,EACF;AAEA,iBAAAA,QAAG;AAAA,IACD,WAAW,GAAG,QAAQ,MAAM,GAAG,EAAE,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC;AAAA,QACvD,gBAAM,MAAM;AAAA,IACZ;AAAA,EACF;AACF,CAAC,EACA,MAAM,QAAQ,IAAI;AAErB,IAAI,CAAC,QAAQ,KAAK,MAAM,CAAC,EAAE,QAAQ;AACjC,UAAQ,KAAK;AACf;",
|
|
6
6
|
"names": ["require", "fs"]
|
|
7
7
|
}
|
package/lib/cli.d.ts
ADDED
package/lib/cli.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/lib/config.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAErC,QAAA,MAAM,MAAM,EAAE,MAIb,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,eAAO,MAAM,cAAc,EAAE,aAU5B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"denormalise.d.ts","sourceRoot":"","sources":["../src/denormalise.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAMR,MAAM,EAIN,SAAS,EAKZ,MAAM,SAAS,CAAA;AAsKhB,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,WAAW,EAAE,SAAS,GAAG,MAAM,EAAE,CAiCpE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Box2 } from 'vecks';
|
|
2
|
+
import type { DimensionEntity, ToSVGOptions } from './types';
|
|
3
|
+
import type { DimStyleTable } from './types/dxf';
|
|
4
|
+
import type { BoundsAndElement } from './types/svg';
|
|
5
|
+
export interface DimensionViewport {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const getDimensionGeometryBBox: (entity: DimensionEntity) => Box2;
|
|
10
|
+
/**
|
|
11
|
+
* Render DIMENSION entity to SVG with proper DIMSTYLE support
|
|
12
|
+
*/
|
|
13
|
+
export default function dimensionToSVG(entity: DimensionEntity, dimStyle?: DimStyleTable, options?: ToSVGOptions, viewport?: DimensionViewport): BoundsAndElement;
|
|
14
|
+
/**
|
|
15
|
+
* Create SVG marker definition for dimension arrows
|
|
16
|
+
*/
|
|
17
|
+
export declare function createArrowMarker(id: string, size: number, color: string, direction?: 'forward' | 'backward'): string;
|
|
18
|
+
//# sourceMappingURL=dimensionToSVG.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dimensionToSVG.d.ts","sourceRoot":"","sources":["../src/dimensionToSVG.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAM5B,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAInD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAqCD,eAAO,MAAM,wBAAwB,GAAI,QAAQ,eAAe,KAAG,IAqBlE,CAAA;AA6ND;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,MAAM,EAAE,eAAe,EACvB,QAAQ,CAAC,EAAE,aAAa,EACxB,OAAO,CAAC,EAAE,YAAY,EACtB,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,gBAAgB,CAoBlB;AA0HD;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,SAAS,GAAE,SAAS,GAAG,UAAsB,GAC5C,MAAM,CASR"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ArcEntity, CircleEntity, ControlPoint, EllipseEntity, EntityToPolylineOptions, HandlerVertex, LeaderEntity, LineEntity, RayEntity, ShapeEntity, SplineEntity, WipeoutEntity, XLineEntity } from './types';
|
|
2
|
+
import type { PointTuple } from './types/common';
|
|
3
|
+
export type { ControlPoint, EntityToPolylineOptions } from './types';
|
|
4
|
+
type Point = PointTuple;
|
|
5
|
+
interface LocalVertex extends HandlerVertex {
|
|
6
|
+
faces?: number[];
|
|
7
|
+
}
|
|
8
|
+
interface LocalPolylineEntity {
|
|
9
|
+
type: string;
|
|
10
|
+
vertices: LocalVertex[];
|
|
11
|
+
closed?: boolean;
|
|
12
|
+
polyfaceMesh?: boolean;
|
|
13
|
+
polygonMesh?: boolean;
|
|
14
|
+
}
|
|
15
|
+
type Entity = LineEntity | LeaderEntity | RayEntity | XLineEntity | ShapeEntity | WipeoutEntity | (LocalPolylineEntity & {
|
|
16
|
+
type: 'LWPOLYLINE' | 'POLYLINE';
|
|
17
|
+
}) | {
|
|
18
|
+
type: 'SOLID' | 'TRACE';
|
|
19
|
+
corners?: Array<{
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
}>;
|
|
23
|
+
points?: Array<{
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
}>;
|
|
27
|
+
} | CircleEntity | EllipseEntity | ArcEntity | SplineEntity;
|
|
28
|
+
/**
|
|
29
|
+
* Interpolate a b-spline. The algorithm examins the knot vector
|
|
30
|
+
* to create segments for interpolation. The parameterisation value
|
|
31
|
+
* is re-normalised back to [0,1] as that is what the lib expects (
|
|
32
|
+
* and t i de-normalised in the b-spline library)
|
|
33
|
+
*
|
|
34
|
+
* @param controlPoints the control points
|
|
35
|
+
* @param degree the b-spline degree
|
|
36
|
+
* @param knots the knot vector
|
|
37
|
+
* @returns the polyline
|
|
38
|
+
*/
|
|
39
|
+
export declare const interpolateBSpline: (controlPoints: ControlPoint[], degree: number, knots: number[], interpolationsPerSplineSegment?: number, weights?: number[]) => Point[];
|
|
40
|
+
export declare const polyfaceOutline: (entity: LocalPolylineEntity) => Point[][];
|
|
41
|
+
/**
|
|
42
|
+
* Convert a parsed DXF entity to a polyline. These can be used to render the
|
|
43
|
+
* the DXF in SVG, Canvas, WebGL etc., without depending on native support
|
|
44
|
+
* of primitive objects (ellispe, spline etc.)
|
|
45
|
+
*/
|
|
46
|
+
export default function entityToPolyline(// NOSONAR
|
|
47
|
+
entity: Entity, options?: EntityToPolylineOptions): Point[];
|
|
48
|
+
//# sourceMappingURL=entityToPolyline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entityToPolyline.d.ts","sourceRoot":"","sources":["../src/entityToPolyline.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,uBAAuB,EACvB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,EACZ,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAGhD,YAAY,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAEpE,KAAK,KAAK,GAAG,UAAU,CAAA;AAGvB,UAAU,WAAY,SAAQ,aAAa;IACzC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;CACjB;AAGD,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,WAAW,EAAE,CAAA;IACvB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,KAAK,MAAM,GACP,UAAU,GACV,YAAY,GACZ,SAAS,GACT,WAAW,GACX,WAAW,GACX,aAAa,GACb,CAAC,mBAAmB,GAAG;IAAE,IAAI,EAAE,YAAY,GAAG,UAAU,CAAA;CAAE,CAAC,GAC3D;IACE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAA;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACzC,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACzC,GACD,YAAY,GACZ,aAAa,GACb,SAAS,GACT,YAAY,CAAA;AA+DhB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAC7B,eAAe,YAAY,EAAE,EAC7B,QAAQ,MAAM,EACd,OAAO,MAAM,EAAE,EACf,iCAAiC,MAAM,EACvC,UAAU,MAAM,EAAE,KACjB,KAAK,EA8BP,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,QAAQ,mBAAmB,KAAG,KAAK,EAAE,EA6DpE,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAE,UAAU;AAClD,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,uBAAuB,GAChC,KAAK,EAAE,CA4NT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRGBForEntity.d.ts","sourceRoot":"","sources":["../src/getRGBForEntity.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE3D,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,MAAM,EAAE;IAAE,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,EAC3C,MAAM,EAAE,MAAM,GACb,QAAQ,CAmBV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groupEntitiesByLayer.d.ts","sourceRoot":"","sources":["../src/groupEntitiesByLayer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAElD,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,QAAQ,EAAE,MAAM,EAAE,GACjB,WAAW,CASb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../src/handlers/blocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,QAAQ,EAAE,MAAM,UAAU,CAAA;AAIvD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,EAAE,CA4D7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/handlers/entities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AA6L7C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,CAelE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DXFTuple } from '../../types/dxf';
|
|
2
|
+
export declare const TYPE = "ARC";
|
|
3
|
+
interface ArcEntity {
|
|
4
|
+
type: typeof TYPE;
|
|
5
|
+
x?: number;
|
|
6
|
+
y?: number;
|
|
7
|
+
z?: number;
|
|
8
|
+
thickness?: number;
|
|
9
|
+
r?: number;
|
|
10
|
+
startAngle?: number;
|
|
11
|
+
endAngle?: number;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export declare const process: (tuples: DXFTuple[]) => ArcEntity;
|
|
15
|
+
declare const _default: {
|
|
16
|
+
TYPE: string;
|
|
17
|
+
process: (tuples: DXFTuple[]) => ArcEntity;
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
20
|
+
//# sourceMappingURL=arc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arc.d.ts","sourceRoot":"","sources":["../../../src/handlers/entity/arc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAI/C,eAAO,MAAM,IAAI,QAAQ,CAAA;AAGzB,UAAU,SAAS;IACjB,IAAI,EAAE,OAAO,IAAI,CAAA;IACjB,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,eAAO,MAAM,OAAO,GAAI,QAAQ,QAAQ,EAAE,KAAG,SAuC5C,CAAA;;;sBAvC+B,QAAQ,EAAE,KAAG,SAAS;;AAyCtD,wBAAgC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DXFTuple } from '../../types/dxf';
|
|
2
|
+
export declare const TYPE = "ATTDEF";
|
|
3
|
+
export declare const process: (tuples: DXFTuple[]) => any;
|
|
4
|
+
export declare const assign: (entity: any, type: number, value: string | number) => void;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
TYPE: string;
|
|
7
|
+
process: (tuples: DXFTuple[]) => any;
|
|
8
|
+
assign: (entity: any, type: number, value: string | number) => void;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=attdef.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attdef.d.ts","sourceRoot":"","sources":["../../../src/handlers/entity/attdef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAO/C,eAAO,MAAM,IAAI,WAAW,CAAA;AAE5B,eAAO,MAAM,OAAO,GAAI,QAAQ,QAAQ,EAAE,KAAG,GAmB5C,CAAA;AAED,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,MAAM,MAAM,EAAE,OAAO,MAAM,GAAG,MAAM,KAAG,IA2P1E,CAAA;;;sBAhR+B,QAAQ,EAAE,KAAG,GAAG;qBAqBjB,GAAG,QAAQ,MAAM,SAAS,MAAM,GAAG,MAAM,KAAG,IAAI;;AA6P/E,wBAAwC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DXFTuple } from '../../types/dxf';
|
|
2
|
+
export declare const TYPE = "ATTRIB";
|
|
3
|
+
export declare const process: (tuples: DXFTuple[]) => any;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
TYPE: string;
|
|
6
|
+
process: (tuples: DXFTuple[]) => any;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=attrib.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attrib.d.ts","sourceRoot":"","sources":["../../../src/handlers/entity/attrib.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAI/C,eAAO,MAAM,IAAI,WAAW,CAAA;AAG5B,eAAO,MAAM,OAAO,GAAI,QAAQ,QAAQ,EAAE,KAAG,GAmB5C,CAAA;;;sBAnB+B,QAAQ,EAAE,KAAG,GAAG;;AAqBhD,wBAAgC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DXFTuple } from '../../types/dxf';
|
|
2
|
+
export declare const TYPE = "CIRCLE";
|
|
3
|
+
interface CircleEntity {
|
|
4
|
+
type: typeof TYPE;
|
|
5
|
+
x?: number;
|
|
6
|
+
y?: number;
|
|
7
|
+
z?: number;
|
|
8
|
+
r?: number;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export declare const process: (tuples: DXFTuple[]) => CircleEntity;
|
|
12
|
+
declare const _default: {
|
|
13
|
+
TYPE: string;
|
|
14
|
+
process: (tuples: DXFTuple[]) => CircleEntity;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
17
|
+
//# sourceMappingURL=circle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circle.d.ts","sourceRoot":"","sources":["../../../src/handlers/entity/circle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAI/C,eAAO,MAAM,IAAI,WAAW,CAAA;AAG5B,UAAU,YAAY;IACpB,IAAI,EAAE,OAAO,IAAI,CAAA;IACjB,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,eAAO,MAAM,OAAO,GAAI,QAAQ,QAAQ,EAAE,KAAG,YA4B5C,CAAA;;;sBA5B+B,QAAQ,EAAE,KAAG,YAAY;;AA8BzD,wBAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/handlers/entity/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAE1E,MAAM,CAAC,OAAO,UAAU,2BAA2B,CACjD,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GAAG,MAAM,GACrB,sBAAsB,CAyExB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DXFTuple } from '../../types';
|
|
2
|
+
export declare const TYPE = "DGNUNDERLAY";
|
|
3
|
+
interface UnderlayEntity {
|
|
4
|
+
type: typeof TYPE;
|
|
5
|
+
insertionPoint: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
z: number;
|
|
9
|
+
};
|
|
10
|
+
scale: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
z: number;
|
|
14
|
+
};
|
|
15
|
+
normal: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
z: number;
|
|
19
|
+
};
|
|
20
|
+
underlayDefinitionHandle?: string;
|
|
21
|
+
rotation?: number;
|
|
22
|
+
flags?: number;
|
|
23
|
+
contrast?: number;
|
|
24
|
+
fade?: number;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export declare const process: (tuples: DXFTuple[]) => UnderlayEntity;
|
|
28
|
+
declare const _default: {
|
|
29
|
+
TYPE: string;
|
|
30
|
+
process: (tuples: DXFTuple[]) => UnderlayEntity;
|
|
31
|
+
};
|
|
32
|
+
export default _default;
|
|
33
|
+
//# sourceMappingURL=dgnUnderlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dgnUnderlay.d.ts","sourceRoot":"","sources":["../../../src/handlers/entity/dgnUnderlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAI3C,eAAO,MAAM,IAAI,gBAAgB,CAAA;AAEjC,UAAU,cAAc;IACtB,IAAI,EAAE,OAAO,IAAI,CAAA;IAEjB,cAAc,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACnD,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,MAAM,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAE3C,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,eAAO,MAAM,OAAO,GAAI,QAAQ,QAAQ,EAAE,KAAG,cAqE5C,CAAA;;;sBArE+B,QAAQ,EAAE,KAAG,cAAc;;AAuE3D,wBAAgC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { DXFTuple } from '../../types/dxf';
|
|
2
|
+
export declare const TYPE = "DIMENSION";
|
|
3
|
+
interface Point3D {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
z: number;
|
|
7
|
+
}
|
|
8
|
+
interface DimensionEntity {
|
|
9
|
+
type: typeof TYPE;
|
|
10
|
+
block?: string;
|
|
11
|
+
start: Point3D;
|
|
12
|
+
angleVertex?: Point3D;
|
|
13
|
+
arcPoint?: Point3D;
|
|
14
|
+
textMidpoint: Point3D;
|
|
15
|
+
measureStart: Point3D;
|
|
16
|
+
measureEnd: Point3D;
|
|
17
|
+
rotation?: number;
|
|
18
|
+
horizonRotation?: number;
|
|
19
|
+
extensionRotation?: number;
|
|
20
|
+
textRotation?: number;
|
|
21
|
+
ordinateType?: boolean;
|
|
22
|
+
uniqueBlockReference?: boolean;
|
|
23
|
+
userDefinedLocation?: boolean;
|
|
24
|
+
dimensionType: number;
|
|
25
|
+
attachementPoint: number;
|
|
26
|
+
extrudeDirection?: Point3D;
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
}
|
|
29
|
+
export declare const process: (tuples: DXFTuple[]) => DimensionEntity;
|
|
30
|
+
declare const _default: {
|
|
31
|
+
TYPE: string;
|
|
32
|
+
process: (tuples: DXFTuple[]) => DimensionEntity;
|
|
33
|
+
};
|
|
34
|
+
export default _default;
|
|
35
|
+
//# sourceMappingURL=dimension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dimension.d.ts","sourceRoot":"","sources":["../../../src/handlers/entity/dimension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAI/C,eAAO,MAAM,IAAI,cAAc,CAAA;AAG/B,UAAU,OAAO;IACf,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED,UAAU,eAAe;IACvB,IAAI,EAAE,OAAO,IAAI,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,OAAO,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AASD,eAAO,MAAM,OAAO,GAAI,QAAQ,QAAQ,EAAE,KAAG,eAgJ5C,CAAA;;;sBAhJ+B,QAAQ,EAAE,KAAG,eAAe;;AAwM5D,wBAAgC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DXFTuple } from '../../types';
|
|
2
|
+
export declare const TYPE = "DWFUNDERLAY";
|
|
3
|
+
interface UnderlayEntity {
|
|
4
|
+
type: typeof TYPE;
|
|
5
|
+
insertionPoint: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
z: number;
|
|
9
|
+
};
|
|
10
|
+
scale: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
z: number;
|
|
14
|
+
};
|
|
15
|
+
normal: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
z: number;
|
|
19
|
+
};
|
|
20
|
+
underlayDefinitionHandle?: string;
|
|
21
|
+
rotation?: number;
|
|
22
|
+
flags?: number;
|
|
23
|
+
contrast?: number;
|
|
24
|
+
fade?: number;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export declare const process: (tuples: DXFTuple[]) => UnderlayEntity;
|
|
28
|
+
declare const _default: {
|
|
29
|
+
TYPE: string;
|
|
30
|
+
process: (tuples: DXFTuple[]) => UnderlayEntity;
|
|
31
|
+
};
|
|
32
|
+
export default _default;
|
|
33
|
+
//# sourceMappingURL=dwfUnderlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dwfUnderlay.d.ts","sourceRoot":"","sources":["../../../src/handlers/entity/dwfUnderlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAI3C,eAAO,MAAM,IAAI,gBAAgB,CAAA;AAEjC,UAAU,cAAc;IACtB,IAAI,EAAE,OAAO,IAAI,CAAA;IAEjB,cAAc,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACnD,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,MAAM,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAE3C,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,eAAO,MAAM,OAAO,GAAI,QAAQ,QAAQ,EAAE,KAAG,cAqE5C,CAAA;;;sBArE+B,QAAQ,EAAE,KAAG,cAAc;;AAuE3D,wBAAgC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DXFTuple } from '../../types/dxf';
|
|
2
|
+
import type { EllipseEntity } from '../../types';
|
|
3
|
+
export declare const TYPE = "ELLIPSE";
|
|
4
|
+
export declare const process: (tuples: DXFTuple[]) => EllipseEntity;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
TYPE: string;
|
|
7
|
+
process: (tuples: DXFTuple[]) => EllipseEntity;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=ellipse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ellipse.d.ts","sourceRoot":"","sources":["../../../src/handlers/entity/ellipse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAI/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,eAAO,MAAM,IAAI,YAAY,CAAA;AAG7B,eAAO,MAAM,OAAO,GAAI,QAAQ,QAAQ,EAAE,KAAG,aA2C5C,CAAA;;;sBA3C+B,QAAQ,EAAE,KAAG,aAAa;;AA6C1D,wBAAgC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DXFTuple, HatchEntity } from '../../types';
|
|
2
|
+
export declare const TYPE = "HATCH";
|
|
3
|
+
export declare const process: (tuples: DXFTuple[]) => HatchEntity;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
TYPE: string;
|
|
6
|
+
process: (tuples: DXFTuple[]) => HatchEntity;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=hatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hatch.d.ts","sourceRoot":"","sources":["../../../src/handlers/entity/hatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAwB,MAAM,aAAa,CAAA;AAI9E,eAAO,MAAM,IAAI,UAAU,CAAA;AAU3B,eAAO,MAAM,OAAO,GAAI,QAAQ,QAAQ,EAAE,KAAG,WA8P5C,CAAA;;;sBA9P+B,QAAQ,EAAE,KAAG,WAAW;;AAgQxD,wBAAgC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DXFTuple, PartialPoint3D } from '../../types';
|
|
2
|
+
export declare const TYPE = "IMAGE";
|
|
3
|
+
interface ImageEntity {
|
|
4
|
+
type: typeof TYPE;
|
|
5
|
+
insertionPoint: PartialPoint3D;
|
|
6
|
+
uVector: PartialPoint3D;
|
|
7
|
+
vVector: PartialPoint3D;
|
|
8
|
+
pixelSizeX: number;
|
|
9
|
+
pixelSizeY: number;
|
|
10
|
+
imageDefHandle?: string;
|
|
11
|
+
imageDefReactorHandle?: string;
|
|
12
|
+
displayProperties?: number;
|
|
13
|
+
clippingState?: number;
|
|
14
|
+
brightness?: number;
|
|
15
|
+
contrast?: number;
|
|
16
|
+
fade?: number;
|
|
17
|
+
classVersion?: number;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
export declare const process: (tuples: DXFTuple[]) => ImageEntity;
|
|
21
|
+
declare const _default: {
|
|
22
|
+
TYPE: string;
|
|
23
|
+
process: (tuples: DXFTuple[]) => ImageEntity;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
26
|
+
//# sourceMappingURL=image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/handlers/entity/image.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAI3D,eAAO,MAAM,IAAI,UAAU,CAAA;AAE3B,UAAU,WAAW;IACnB,IAAI,EAAE,OAAO,IAAI,CAAA;IAEjB,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,EAAE,cAAc,CAAA;IACvB,OAAO,EAAE,cAAc,CAAA;IAEvB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAElB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAE9B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,eAAO,MAAM,OAAO,GAAI,QAAQ,QAAQ,EAAE,KAAG,WAsF5C,CAAA;;;sBAtF+B,QAAQ,EAAE,KAAG,WAAW;;AAwFxD,wBAAgC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DXFTuple } from '../../types/dxf';
|
|
2
|
+
import type { InsertEntity } from '../../types';
|
|
3
|
+
export declare const TYPE = "INSERT";
|
|
4
|
+
export declare const process: (tuples: DXFTuple[]) => InsertEntity;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
TYPE: string;
|
|
7
|
+
process: (tuples: DXFTuple[]) => InsertEntity;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=insert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../../../src/handlers/entity/insert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAI/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,eAAO,MAAM,IAAI,WAAW,CAAA;AAG5B,eAAO,MAAM,OAAO,GAAI,QAAQ,QAAQ,EAAE,KAAG,YA6D5C,CAAA;;;sBA7D+B,QAAQ,EAAE,KAAG,YAAY;;AA+DzD,wBAAgC"}
|