dxf-json 0.0.7 → 0.0.9
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/.github/workflows/npm-publish.yml +1 -1
- package/dist/bundle.js +2 -0
- package/dist/bundle.js.LICENSE.txt +5 -0
- package/dist/consts/block.d.ts +10 -0
- package/dist/consts/block.js +22 -0
- package/dist/consts/block.js.map +1 -0
- package/dist/consts/color.d.ts +5 -0
- package/dist/consts/color.js +10 -0
- package/dist/consts/color.js.map +1 -0
- package/dist/consts/config.d.ts +2 -0
- package/dist/consts/config.js +6 -0
- package/dist/consts/config.js.map +1 -0
- package/dist/consts/dimension.d.ts +61 -0
- package/dist/consts/dimension.js +74 -0
- package/dist/consts/dimension.js.map +1 -0
- package/dist/consts/hatch.d.ts +44 -0
- package/dist/consts/hatch.js +57 -0
- package/dist/consts/hatch.js.map +1 -0
- package/dist/consts/header.d.ts +9 -0
- package/dist/consts/header.js +13 -0
- package/dist/consts/header.js.map +1 -0
- package/dist/consts/index.d.ts +9 -0
- package/dist/consts/index.js +26 -0
- package/dist/consts/index.js.map +1 -0
- package/dist/consts/lineweight.d.ts +5 -0
- package/dist/consts/lineweight.js +10 -0
- package/dist/consts/lineweight.js.map +1 -0
- package/dist/consts/measurement.d.ts +4 -0
- package/dist/consts/measurement.js +9 -0
- package/dist/consts/measurement.js.map +1 -0
- package/dist/consts/obscuredLineTypes.d.ts +21 -0
- package/dist/consts/obscuredLineTypes.js +26 -0
- package/dist/consts/obscuredLineTypes.js.map +1 -0
- package/dist/consts/scene.d.ts +2 -0
- package/dist/consts/scene.js +6 -0
- package/dist/consts/scene.js.map +1 -0
- package/dist/consts/viewport.d.ts +56 -0
- package/dist/consts/viewport.js +67 -0
- package/dist/consts/viewport.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/parser/AutoCadColorIndex.d.ts +8 -0
- package/dist/parser/AutoCadColorIndex.js +267 -0
- package/dist/parser/AutoCadColorIndex.js.map +1 -0
- package/dist/parser/DxfArrayScanner.d.ts +38 -0
- package/dist/parser/DxfArrayScanner.js +159 -0
- package/dist/parser/DxfArrayScanner.js.map +1 -0
- package/dist/parser/DxfParser.d.ts +9 -0
- package/dist/parser/DxfParser.js +108 -0
- package/dist/parser/DxfParser.js.map +1 -0
- package/dist/parser/ParseHelpers.d.ts +21 -0
- package/dist/parser/ParseHelpers.js +129 -0
- package/dist/parser/ParseHelpers.js.map +1 -0
- package/dist/parser/blocks/blocks.test.d.ts +1 -0
- package/dist/parser/blocks/blocks.test.js +86 -0
- package/dist/parser/blocks/blocks.test.js.map +1 -0
- package/dist/parser/blocks/index.d.ts +4 -0
- package/dist/parser/blocks/index.js +83 -0
- package/dist/parser/blocks/index.js.map +1 -0
- package/dist/parser/blocks/types.d.ts +14 -0
- package/dist/parser/blocks/types.js +3 -0
- package/dist/parser/blocks/types.js.map +1 -0
- package/dist/parser/entities/3dface.js +106 -0
- package/dist/parser/entities/3dface.js.map +1 -0
- package/dist/parser/entities/arc/index.d.ts +2 -0
- package/dist/parser/entities/arc/index.js +19 -0
- package/dist/parser/entities/arc/index.js.map +1 -0
- package/dist/parser/entities/arc/parser.d.ts +7 -0
- package/dist/parser/entities/arc/parser.js +63 -0
- package/dist/parser/entities/arc/parser.js.map +1 -0
- package/dist/parser/entities/arc/types.d.ts +12 -0
- package/dist/parser/entities/arc/types.js +3 -0
- package/dist/parser/entities/arc/types.js.map +1 -0
- package/dist/parser/entities/attdef/consts.d.ts +11 -0
- package/dist/parser/entities/attdef/consts.js +17 -0
- package/dist/parser/entities/attdef/consts.js.map +1 -0
- package/dist/parser/entities/attdef/index.d.ts +3 -0
- package/dist/parser/entities/attdef/index.js +20 -0
- package/dist/parser/entities/attdef/index.js.map +1 -0
- package/dist/parser/entities/attdef/parser.d.ts +8 -0
- package/dist/parser/entities/attdef/parser.js +108 -0
- package/dist/parser/entities/attdef/parser.js.map +1 -0
- package/dist/parser/entities/attdef/types.d.ts +17 -0
- package/dist/parser/entities/attdef/types.js +3 -0
- package/dist/parser/entities/attdef/types.js.map +1 -0
- package/dist/parser/entities/attribute/consts.d.ts +6 -0
- package/dist/parser/entities/attribute/consts.js +11 -0
- package/dist/parser/entities/attribute/consts.js.map +1 -0
- package/dist/parser/entities/attribute/index.d.ts +3 -0
- package/dist/parser/entities/attribute/index.js +20 -0
- package/dist/parser/entities/attribute/index.js.map +1 -0
- package/dist/parser/entities/attribute/parser.d.ts +8 -0
- package/dist/parser/entities/attribute/parser.js +185 -0
- package/dist/parser/entities/attribute/parser.js.map +1 -0
- package/dist/parser/entities/attribute/types.d.ts +30 -0
- package/dist/parser/entities/attribute/types.js +3 -0
- package/dist/parser/entities/attribute/types.js.map +1 -0
- package/dist/parser/entities/circle/index.d.ts +2 -0
- package/dist/parser/entities/circle/index.js +19 -0
- package/dist/parser/entities/circle/index.js.map +1 -0
- package/dist/parser/entities/circle/parser.d.ts +8 -0
- package/dist/parser/entities/circle/parser.js +50 -0
- package/dist/parser/entities/circle/parser.js.map +1 -0
- package/dist/parser/entities/circle/types.d.ts +10 -0
- package/dist/parser/entities/circle/types.js +3 -0
- package/dist/parser/entities/circle/types.js.map +1 -0
- package/dist/parser/entities/dimension/common.d.ts +6 -0
- package/dist/parser/entities/dimension/common.js +122 -0
- package/dist/parser/entities/dimension/common.js.map +1 -0
- package/dist/parser/entities/dimension/index.d.ts +6 -0
- package/dist/parser/entities/dimension/index.js +21 -0
- package/dist/parser/entities/dimension/index.js.map +1 -0
- package/dist/parser/entities/dimension/types.d.ts +48 -0
- package/dist/parser/entities/dimension/types.js +3 -0
- package/dist/parser/entities/dimension/types.js.map +1 -0
- package/dist/parser/entities/ellipse/index.d.ts +2 -0
- package/dist/parser/entities/ellipse/index.js +19 -0
- package/dist/parser/entities/ellipse/index.js.map +1 -0
- package/dist/parser/entities/ellipse/parser.d.ts +7 -0
- package/dist/parser/entities/ellipse/parser.js +59 -0
- package/dist/parser/entities/ellipse/parser.js.map +1 -0
- package/dist/parser/entities/ellipse/types.d.ts +12 -0
- package/dist/parser/entities/ellipse/types.js +3 -0
- package/dist/parser/entities/ellipse/types.js.map +1 -0
- package/dist/parser/entities/entities.test.d.ts +1 -0
- package/dist/parser/entities/entities.test.js +81 -0
- package/dist/parser/entities/entities.test.js.map +1 -0
- package/dist/parser/entities/hatch/boundaryPathData/edge.d.ts +6 -0
- package/dist/parser/entities/hatch/boundaryPathData/edge.js +178 -0
- package/dist/parser/entities/hatch/boundaryPathData/edge.js.map +1 -0
- package/dist/parser/entities/hatch/boundaryPathData/index.d.ts +5 -0
- package/dist/parser/entities/hatch/boundaryPathData/index.js +23 -0
- package/dist/parser/entities/hatch/boundaryPathData/index.js.map +1 -0
- package/dist/parser/entities/hatch/boundaryPathData/polyline.d.ts +2 -0
- package/dist/parser/entities/hatch/boundaryPathData/polyline.js +41 -0
- package/dist/parser/entities/hatch/boundaryPathData/polyline.js.map +1 -0
- package/dist/parser/entities/hatch/boundaryPathData/shared.d.ts +2 -0
- package/dist/parser/entities/hatch/boundaryPathData/shared.js +19 -0
- package/dist/parser/entities/hatch/boundaryPathData/shared.js.map +1 -0
- package/dist/parser/entities/hatch/index.d.ts +8 -0
- package/dist/parser/entities/hatch/index.js +183 -0
- package/dist/parser/entities/hatch/index.js.map +1 -0
- package/dist/parser/entities/hatch/patternData.d.ts +3 -0
- package/dist/parser/entities/hatch/patternData.js +54 -0
- package/dist/parser/entities/hatch/patternData.js.map +1 -0
- package/dist/parser/entities/hatch/types/boundaryPath.d.ts +59 -0
- package/dist/parser/entities/hatch/types/boundaryPath.js +3 -0
- package/dist/parser/entities/hatch/types/boundaryPath.js.map +1 -0
- package/dist/parser/entities/hatch/types/definitionLine.d.ts +8 -0
- package/dist/parser/entities/hatch/types/definitionLine.js +3 -0
- package/dist/parser/entities/hatch/types/definitionLine.js.map +1 -0
- package/dist/parser/entities/hatch/types/hatch.d.ts +38 -0
- package/dist/parser/entities/hatch/types/hatch.js +3 -0
- package/dist/parser/entities/hatch/types/hatch.js.map +1 -0
- package/dist/parser/entities/hatch/types/index.d.ts +3 -0
- package/dist/parser/entities/hatch/types/index.js +20 -0
- package/dist/parser/entities/hatch/types/index.js.map +1 -0
- package/dist/parser/entities/index.d.ts +8 -0
- package/dist/parser/entities/index.js +81 -0
- package/dist/parser/entities/index.js.map +1 -0
- package/dist/parser/entities/insert/index.d.ts +2 -0
- package/dist/parser/entities/insert/index.js +19 -0
- package/dist/parser/entities/insert/index.js.map +1 -0
- package/dist/parser/entities/insert/parser.d.ts +8 -0
- package/dist/parser/entities/insert/parser.js +97 -0
- package/dist/parser/entities/insert/parser.js.map +1 -0
- package/dist/parser/entities/insert/types.d.ts +18 -0
- package/dist/parser/entities/insert/types.js +3 -0
- package/dist/parser/entities/insert/types.js.map +1 -0
- package/dist/parser/entities/leader/consts.d.ts +6 -0
- package/dist/parser/entities/leader/consts.js +11 -0
- package/dist/parser/entities/leader/consts.js.map +1 -0
- package/dist/parser/entities/leader/index.d.ts +3 -0
- package/dist/parser/entities/leader/index.js +20 -0
- package/dist/parser/entities/leader/index.js.map +1 -0
- package/dist/parser/entities/leader/parser.d.ts +8 -0
- package/dist/parser/entities/leader/parser.js +110 -0
- package/dist/parser/entities/leader/parser.js.map +1 -0
- package/dist/parser/entities/leader/types.d.ts +23 -0
- package/dist/parser/entities/leader/types.js +3 -0
- package/dist/parser/entities/leader/types.js.map +1 -0
- package/dist/parser/entities/line/index.d.ts +2 -0
- package/dist/parser/entities/line/index.js +19 -0
- package/dist/parser/entities/line/index.js.map +1 -0
- package/dist/parser/entities/line/parser.d.ts +8 -0
- package/dist/parser/entities/line/parser.js +50 -0
- package/dist/parser/entities/line/parser.js.map +1 -0
- package/dist/parser/entities/line/types.d.ts +10 -0
- package/dist/parser/entities/line/types.js +3 -0
- package/dist/parser/entities/line/types.js.map +1 -0
- package/dist/parser/entities/lwpolyline/consts.d.ts +4 -0
- package/dist/parser/entities/lwpolyline/consts.js +9 -0
- package/dist/parser/entities/lwpolyline/consts.js.map +1 -0
- package/dist/parser/entities/lwpolyline/index.d.ts +3 -0
- package/dist/parser/entities/lwpolyline/index.js +20 -0
- package/dist/parser/entities/lwpolyline/index.js.map +1 -0
- package/dist/parser/entities/lwpolyline/parser.d.ts +7 -0
- package/dist/parser/entities/lwpolyline/parser.js +105 -0
- package/dist/parser/entities/lwpolyline/parser.js.map +1 -0
- package/dist/parser/entities/lwpolyline/types.d.ts +19 -0
- package/dist/parser/entities/lwpolyline/types.js +3 -0
- package/dist/parser/entities/lwpolyline/types.js.map +1 -0
- package/dist/parser/entities/mtext/consts.d.ts +5 -0
- package/dist/parser/entities/mtext/consts.js +10 -0
- package/dist/parser/entities/mtext/consts.js.map +1 -0
- package/dist/parser/entities/mtext/index.d.ts +3 -0
- package/dist/parser/entities/mtext/index.js +20 -0
- package/dist/parser/entities/mtext/index.js.map +1 -0
- package/dist/parser/entities/mtext/parser.d.ts +10 -0
- package/dist/parser/entities/mtext/parser.js +188 -0
- package/dist/parser/entities/mtext/parser.js.map +1 -0
- package/dist/parser/entities/mtext/types.d.ts +33 -0
- package/dist/parser/entities/mtext/types.js +3 -0
- package/dist/parser/entities/mtext/types.js.map +1 -0
- package/dist/parser/entities/point/index.d.ts +2 -0
- package/dist/parser/entities/point/index.js +19 -0
- package/dist/parser/entities/point/index.js.map +1 -0
- package/dist/parser/entities/point/parser.d.ts +6 -0
- package/dist/parser/entities/point/parser.js +54 -0
- package/dist/parser/entities/point/parser.js.map +1 -0
- package/dist/parser/entities/point/types.d.ts +9 -0
- package/dist/parser/entities/point/types.js +3 -0
- package/dist/parser/entities/point/types.js.map +1 -0
- package/dist/parser/entities/polyline/consts.d.ts +16 -0
- package/dist/parser/entities/polyline/consts.js +22 -0
- package/dist/parser/entities/polyline/consts.js.map +1 -0
- package/dist/parser/entities/polyline/index.d.ts +3 -0
- package/dist/parser/entities/polyline/index.js +20 -0
- package/dist/parser/entities/polyline/index.js.map +1 -0
- package/dist/parser/entities/polyline/parser.d.ts +7 -0
- package/dist/parser/entities/polyline/parser.js +118 -0
- package/dist/parser/entities/polyline/parser.js.map +1 -0
- package/dist/parser/entities/polyline/types.d.ts +19 -0
- package/dist/parser/entities/polyline/types.js +3 -0
- package/dist/parser/entities/polyline/types.js.map +1 -0
- package/dist/parser/entities/section/index.d.ts +2 -0
- package/dist/parser/entities/section/index.js +19 -0
- package/dist/parser/entities/section/index.js.map +1 -0
- package/dist/parser/entities/section/parser.d.ts +7 -0
- package/dist/parser/entities/section/parser.js +97 -0
- package/dist/parser/entities/section/parser.js.map +1 -0
- package/dist/parser/entities/section/types.d.ts +19 -0
- package/dist/parser/entities/section/types.js +3 -0
- package/dist/parser/entities/section/types.js.map +1 -0
- package/dist/parser/entities/shared.d.ts +35 -0
- package/dist/parser/entities/shared.js +136 -0
- package/dist/parser/entities/shared.js.map +1 -0
- package/dist/parser/entities/solid/index.d.ts +2 -0
- package/dist/parser/entities/solid/index.js +19 -0
- package/dist/parser/entities/solid/index.js.map +1 -0
- package/dist/parser/entities/solid/parser.d.ts +8 -0
- package/dist/parser/entities/solid/parser.js +48 -0
- package/dist/parser/entities/solid/parser.js.map +1 -0
- package/dist/parser/entities/solid/types.d.ts +9 -0
- package/dist/parser/entities/solid/types.js +3 -0
- package/dist/parser/entities/solid/types.js.map +1 -0
- package/dist/parser/entities/spline/consts.d.ts +8 -0
- package/dist/parser/entities/spline/consts.js +13 -0
- package/dist/parser/entities/spline/consts.js.map +1 -0
- package/dist/parser/entities/spline/index.d.ts +3 -0
- package/dist/parser/entities/spline/index.js +20 -0
- package/dist/parser/entities/spline/index.js.map +1 -0
- package/dist/parser/entities/spline/parser.d.ts +8 -0
- package/dist/parser/entities/spline/parser.js +113 -0
- package/dist/parser/entities/spline/parser.js.map +1 -0
- package/dist/parser/entities/spline/types.d.ts +21 -0
- package/dist/parser/entities/spline/types.js +3 -0
- package/dist/parser/entities/spline/types.js.map +1 -0
- package/dist/parser/entities/text/consts.d.ts +19 -0
- package/dist/parser/entities/text/consts.js +26 -0
- package/dist/parser/entities/text/consts.js.map +1 -0
- package/dist/parser/entities/text/index.d.ts +3 -0
- package/dist/parser/entities/text/index.js +20 -0
- package/dist/parser/entities/text/index.js.map +1 -0
- package/dist/parser/entities/text/parser.d.ts +26 -0
- package/dist/parser/entities/text/parser.js +112 -0
- package/dist/parser/entities/text/parser.js.map +1 -0
- package/dist/parser/entities/text/types.d.ts +20 -0
- package/dist/parser/entities/text/types.js +3 -0
- package/dist/parser/entities/text/types.js.map +1 -0
- package/dist/parser/entities/vertex/consts.d.ts +10 -0
- package/dist/parser/entities/vertex/consts.js +15 -0
- package/dist/parser/entities/vertex/consts.js.map +1 -0
- package/dist/parser/entities/vertex/index.d.ts +3 -0
- package/dist/parser/entities/vertex/index.js +20 -0
- package/dist/parser/entities/vertex/index.js.map +1 -0
- package/dist/parser/entities/vertex/parser.d.ts +8 -0
- package/dist/parser/entities/vertex/parser.js +86 -0
- package/dist/parser/entities/vertex/parser.js.map +1 -0
- package/dist/parser/entities/vertex/types.d.ts +16 -0
- package/dist/parser/entities/vertex/types.js +3 -0
- package/dist/parser/entities/vertex/types.js.map +1 -0
- package/dist/parser/entities/viewport/index.d.ts +5 -0
- package/dist/parser/entities/viewport/index.js +195 -0
- package/dist/parser/entities/viewport/index.js.map +1 -0
- package/dist/parser/entities/viewport/types.d.ts +51 -0
- package/dist/parser/entities/viewport/types.js +3 -0
- package/dist/parser/entities/viewport/types.js.map +1 -0
- package/dist/parser/filterDummyBlocks.d.ts +2 -0
- package/dist/parser/filterDummyBlocks.js +37 -0
- package/dist/parser/filterDummyBlocks.js.map +1 -0
- package/dist/parser/header/index.d.ts +3 -0
- package/dist/parser/header/index.js +32 -0
- package/dist/parser/header/index.js.map +1 -0
- package/dist/parser/objects/common.d.ts +8 -0
- package/dist/parser/objects/common.js +51 -0
- package/dist/parser/objects/common.js.map +1 -0
- package/dist/parser/objects/dictionary.d.ts +20 -0
- package/dist/parser/objects/dictionary.js +50 -0
- package/dist/parser/objects/dictionary.js.map +1 -0
- package/dist/parser/objects/index.d.ts +6 -0
- package/dist/parser/objects/index.js +43 -0
- package/dist/parser/objects/index.js.map +1 -0
- package/dist/parser/objects/layout.d.ts +30 -0
- package/dist/parser/objects/layout.js +110 -0
- package/dist/parser/objects/layout.js.map +1 -0
- package/dist/parser/objects/plotSettings.d.ts +64 -0
- package/dist/parser/objects/plotSettings.js +198 -0
- package/dist/parser/objects/plotSettings.js.map +1 -0
- package/dist/parser/objects/treefy.d.ts +2 -0
- package/dist/parser/objects/treefy.js +37 -0
- package/dist/parser/objects/treefy.js.map +1 -0
- package/dist/parser/objects/types.d.ts +15 -0
- package/dist/parser/objects/types.js +3 -0
- package/dist/parser/objects/types.js.map +1 -0
- package/dist/parser/shared/index.d.ts +7 -0
- package/dist/parser/shared/index.js +22 -0
- package/dist/parser/shared/index.js.map +1 -0
- package/dist/parser/shared/parsePoint.d.ts +7 -0
- package/dist/parser/shared/parsePoint.js +33 -0
- package/dist/parser/shared/parsePoint.js.map +1 -0
- package/dist/parser/shared/parserGenerator.d.ts +15 -0
- package/dist/parser/shared/parserGenerator.js +114 -0
- package/dist/parser/shared/parserGenerator.js.map +1 -0
- package/dist/parser/shared/parserGenerator.test.d.ts +1 -0
- package/dist/parser/shared/parserGenerator.test.js +153 -0
- package/dist/parser/shared/parserGenerator.test.js.map +1 -0
- package/dist/parser/shared/xdata/index.d.ts +3 -0
- package/dist/parser/shared/xdata/index.js +20 -0
- package/dist/parser/shared/xdata/index.js.map +1 -0
- package/dist/parser/shared/xdata/interpreter.d.ts +20 -0
- package/dist/parser/shared/xdata/interpreter.js +43 -0
- package/dist/parser/shared/xdata/interpreter.js.map +1 -0
- package/dist/parser/shared/xdata/interpreter.test.d.ts +1 -0
- package/dist/parser/shared/xdata/interpreter.test.js +83 -0
- package/dist/parser/shared/xdata/interpreter.test.js.map +1 -0
- package/dist/parser/shared/xdata/parser.d.ts +6 -0
- package/dist/parser/shared/xdata/parser.js +133 -0
- package/dist/parser/shared/xdata/parser.js.map +1 -0
- package/dist/parser/shared/xdata/parser.test.d.ts +1 -0
- package/dist/parser/shared/xdata/parser.test.js +64 -0
- package/dist/parser/shared/xdata/parser.test.js.map +1 -0
- package/dist/parser/shared/xdata/types.d.ts +9 -0
- package/dist/parser/shared/xdata/types.js +3 -0
- package/dist/parser/shared/xdata/types.js.map +1 -0
- package/dist/parser/tables/blockRecord/index.d.ts +2 -0
- package/dist/parser/tables/blockRecord/index.js +19 -0
- package/dist/parser/tables/blockRecord/index.js.map +1 -0
- package/dist/parser/tables/blockRecord/parser.d.ts +1 -0
- package/dist/parser/tables/blockRecord/parser.js +45 -0
- package/dist/parser/tables/blockRecord/parser.js.map +1 -0
- package/dist/parser/tables/blockRecord/types.d.ts +10 -0
- package/dist/parser/tables/blockRecord/types.js +3 -0
- package/dist/parser/tables/blockRecord/types.js.map +1 -0
- package/dist/parser/tables/dimStyle/consts.d.ts +2 -0
- package/dist/parser/tables/dimStyle/consts.js +424 -0
- package/dist/parser/tables/dimStyle/consts.js.map +1 -0
- package/dist/parser/tables/dimStyle/index.d.ts +3 -0
- package/dist/parser/tables/dimStyle/index.js +20 -0
- package/dist/parser/tables/dimStyle/index.js.map +1 -0
- package/dist/parser/tables/dimStyle/parser.d.ts +1 -0
- package/dist/parser/tables/dimStyle/parser.js +35 -0
- package/dist/parser/tables/dimStyle/parser.js.map +1 -0
- package/dist/parser/tables/dimStyle/types.d.ts +83 -0
- package/dist/parser/tables/dimStyle/types.js +3 -0
- package/dist/parser/tables/dimStyle/types.js.map +1 -0
- package/dist/parser/tables/index.d.ts +2 -0
- package/dist/parser/tables/index.js +19 -0
- package/dist/parser/tables/index.js.map +1 -0
- package/dist/parser/tables/layer/index.d.ts +2 -0
- package/dist/parser/tables/layer/index.js +19 -0
- package/dist/parser/tables/layer/index.js.map +1 -0
- package/dist/parser/tables/layer/parser.d.ts +1 -0
- package/dist/parser/tables/layer/parser.js +55 -0
- package/dist/parser/tables/layer/parser.js.map +1 -0
- package/dist/parser/tables/layer/types.d.ts +13 -0
- package/dist/parser/tables/layer/types.js +3 -0
- package/dist/parser/tables/layer/types.js.map +1 -0
- package/dist/parser/tables/ltype/consts.d.ts +6 -0
- package/dist/parser/tables/ltype/consts.js +11 -0
- package/dist/parser/tables/ltype/consts.js.map +1 -0
- package/dist/parser/tables/ltype/index.d.ts +3 -0
- package/dist/parser/tables/ltype/index.js +20 -0
- package/dist/parser/tables/ltype/index.js.map +1 -0
- package/dist/parser/tables/ltype/parser.d.ts +1 -0
- package/dist/parser/tables/ltype/parser.js +105 -0
- package/dist/parser/tables/ltype/parser.js.map +1 -0
- package/dist/parser/tables/ltype/types.d.ts +21 -0
- package/dist/parser/tables/ltype/types.js +3 -0
- package/dist/parser/tables/ltype/types.js.map +1 -0
- package/dist/parser/tables/parser.d.ts +2 -0
- package/dist/parser/tables/parser.js +90 -0
- package/dist/parser/tables/parser.js.map +1 -0
- package/dist/parser/tables/shared.d.ts +2 -0
- package/dist/parser/tables/shared.js +32 -0
- package/dist/parser/tables/shared.js.map +1 -0
- package/dist/parser/tables/style/index.d.ts +2 -0
- package/dist/parser/tables/style/index.js +19 -0
- package/dist/parser/tables/style/index.js.map +1 -0
- package/dist/parser/tables/style/parser.d.ts +1 -0
- package/dist/parser/tables/style/parser.js +68 -0
- package/dist/parser/tables/style/parser.js.map +1 -0
- package/dist/parser/tables/style/types.d.ts +14 -0
- package/dist/parser/tables/style/types.js +3 -0
- package/dist/parser/tables/style/types.js.map +1 -0
- package/dist/parser/tables/types.d.ts +14 -0
- package/dist/parser/tables/types.js +3 -0
- package/dist/parser/tables/types.js.map +1 -0
- package/dist/parser/tables/vport/index.d.ts +2 -0
- package/dist/parser/tables/vport/index.js +19 -0
- package/dist/parser/tables/vport/index.js.map +1 -0
- package/dist/parser/tables/vport/parser.d.ts +1 -0
- package/dist/parser/tables/vport/parser.js +201 -0
- package/dist/parser/tables/vport/parser.js.map +1 -0
- package/dist/parser/tables/vport/types.d.ts +43 -0
- package/dist/parser/tables/vport/types.js +3 -0
- package/dist/parser/tables/vport/types.js.map +1 -0
- package/dist/parser/types.d.ts +29 -0
- package/dist/parser/types.js +3 -0
- package/dist/parser/types.js.map +1 -0
- package/dist/types/color.d.ts +3 -0
- package/dist/types/color.js +3 -0
- package/dist/types/color.js.map +1 -0
- package/dist/types/dxfHeader.d.ts +16 -0
- package/dist/types/dxfHeader.js +3 -0
- package/dist/types/dxfHeader.js.map +1 -0
- package/dist/types/entity.d.ts +6 -0
- package/dist/types/entity.js +3 -0
- package/dist/types/entity.js.map +1 -0
- package/dist/types/index.d.ts +24 -0
- package/dist/types/index.js +20 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/binarySearch.d.ts +1 -0
- package/dist/utils/binarySearch.js +23 -0
- package/dist/utils/binarySearch.js.map +1 -0
- package/dist/utils/disjointSet.d.ts +6 -0
- package/dist/utils/disjointSet.js +52 -0
- package/dist/utils/disjointSet.js.map +1 -0
- package/dist/utils/flooding.d.ts +8 -0
- package/dist/utils/flooding.js +26 -0
- package/dist/utils/flooding.js.map +1 -0
- package/dist/utils/functional.d.ts +17 -0
- package/dist/utils/functional.js +111 -0
- package/dist/utils/functional.js.map +1 -0
- package/dist/utils/graph.d.ts +19 -0
- package/dist/utils/graph.js +47 -0
- package/dist/utils/graph.js.map +1 -0
- package/dist/utils/index.d.ts +30 -0
- package/dist/utils/index.js +106 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/queue.d.ts +19 -0
- package/dist/utils/queue.js +71 -0
- package/dist/utils/queue.js.map +1 -0
- package/dist/utils/triangle.d.ts +2 -0
- package/dist/utils/triangle.js +19 -0
- package/dist/utils/triangle.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EdgeBoundaryPathDataSnippets = exports.SplineEdgeSnippets = exports.EllipseEdgeSnippets = exports.CircularEdgeSnippets = exports.LineEdgeSnippets = void 0;
|
|
4
|
+
const consts_1 = require("../../../../consts");
|
|
5
|
+
const parsePoint_1 = require("../../../shared/parsePoint");
|
|
6
|
+
const parserGenerator_1 = require("../../../shared/parserGenerator");
|
|
7
|
+
const shared_1 = require("./shared");
|
|
8
|
+
exports.LineEdgeSnippets = [
|
|
9
|
+
{
|
|
10
|
+
code: 11,
|
|
11
|
+
name: 'end',
|
|
12
|
+
parser: parserGenerator_1.PointParser,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
code: 10,
|
|
16
|
+
name: 'start',
|
|
17
|
+
parser: parserGenerator_1.PointParser,
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
exports.CircularEdgeSnippets = [
|
|
21
|
+
{
|
|
22
|
+
code: 73,
|
|
23
|
+
name: 'isCCW',
|
|
24
|
+
parser: parserGenerator_1.ToBoolean,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
code: 51,
|
|
28
|
+
name: 'endAngle',
|
|
29
|
+
parser: parserGenerator_1.Identity,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
code: 50,
|
|
33
|
+
name: 'startAngle',
|
|
34
|
+
parser: parserGenerator_1.Identity,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
code: 40,
|
|
38
|
+
name: 'radius',
|
|
39
|
+
parser: parserGenerator_1.Identity,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
code: 10,
|
|
43
|
+
name: 'center',
|
|
44
|
+
parser: parserGenerator_1.PointParser,
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
exports.EllipseEdgeSnippets = [
|
|
48
|
+
{
|
|
49
|
+
code: 73,
|
|
50
|
+
name: 'isCCW',
|
|
51
|
+
parser: parserGenerator_1.ToBoolean,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
code: 51,
|
|
55
|
+
name: 'endAngle',
|
|
56
|
+
parser: parserGenerator_1.Identity,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
code: 50,
|
|
60
|
+
name: 'startAngle',
|
|
61
|
+
parser: parserGenerator_1.Identity,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
code: 40,
|
|
65
|
+
name: 'lengthOfMinorAxis',
|
|
66
|
+
parser: parserGenerator_1.Identity,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
code: 11,
|
|
70
|
+
name: 'end',
|
|
71
|
+
parser: parserGenerator_1.PointParser,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
code: 10,
|
|
75
|
+
name: 'center',
|
|
76
|
+
parser: parserGenerator_1.PointParser,
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
exports.SplineEdgeSnippets = [
|
|
80
|
+
{
|
|
81
|
+
code: 13,
|
|
82
|
+
name: 'endTangent',
|
|
83
|
+
parser: parserGenerator_1.PointParser,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
code: 12,
|
|
87
|
+
name: 'startTangent',
|
|
88
|
+
parser: parserGenerator_1.PointParser,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
code: 11,
|
|
92
|
+
name: 'fitDatum',
|
|
93
|
+
isMultiple: true,
|
|
94
|
+
parser: parserGenerator_1.PointParser,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
code: 97,
|
|
98
|
+
name: 'numberOfFitData',
|
|
99
|
+
parser: parserGenerator_1.Identity,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
code: 10,
|
|
103
|
+
name: 'controlPoints',
|
|
104
|
+
isMultiple: true,
|
|
105
|
+
parser(curr, scanner) {
|
|
106
|
+
const controlPoint = { ...(0, parsePoint_1.parsePoint)(scanner), weight: 1 };
|
|
107
|
+
curr = scanner.next();
|
|
108
|
+
if (curr.code === 42) {
|
|
109
|
+
controlPoint.weight = curr.value;
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
scanner.rewind();
|
|
113
|
+
}
|
|
114
|
+
return controlPoint;
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
code: 40,
|
|
119
|
+
name: 'knots',
|
|
120
|
+
isMultiple: true,
|
|
121
|
+
parser: parserGenerator_1.Identity,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
code: 96,
|
|
125
|
+
name: 'numberOfControlPoints',
|
|
126
|
+
parser: parserGenerator_1.Identity,
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
code: 95,
|
|
130
|
+
name: 'numberOfKnots',
|
|
131
|
+
parser: parserGenerator_1.Identity,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
code: 74,
|
|
135
|
+
name: 'isPeriodic',
|
|
136
|
+
parser: parserGenerator_1.ToBoolean,
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
code: 73,
|
|
140
|
+
name: 'splineFlag',
|
|
141
|
+
parser: parserGenerator_1.Identity,
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
code: 94,
|
|
145
|
+
name: 'degree',
|
|
146
|
+
parser: parserGenerator_1.Identity,
|
|
147
|
+
},
|
|
148
|
+
];
|
|
149
|
+
const EdgeSnippetMap = {
|
|
150
|
+
[consts_1.BoundaryPathEdgeType.Line]: exports.LineEdgeSnippets,
|
|
151
|
+
[consts_1.BoundaryPathEdgeType.Circular]: exports.CircularEdgeSnippets,
|
|
152
|
+
[consts_1.BoundaryPathEdgeType.Elliptic]: exports.EllipseEdgeSnippets,
|
|
153
|
+
[consts_1.BoundaryPathEdgeType.Spline]: exports.SplineEdgeSnippets,
|
|
154
|
+
};
|
|
155
|
+
exports.EdgeBoundaryPathDataSnippets = [
|
|
156
|
+
...shared_1.CommonBoundaryPathDataSnippets,
|
|
157
|
+
{
|
|
158
|
+
code: 72,
|
|
159
|
+
name: 'edges',
|
|
160
|
+
parser(curr, scanner) {
|
|
161
|
+
const edge = { type: curr.value };
|
|
162
|
+
const parser = (0, parserGenerator_1.createParser)(EdgeSnippetMap[edge.type]);
|
|
163
|
+
if (!parser) {
|
|
164
|
+
throw new Error(`Invalid edge type ${edge.type}`);
|
|
165
|
+
}
|
|
166
|
+
curr = scanner.next();
|
|
167
|
+
parser(curr, scanner, edge);
|
|
168
|
+
return edge;
|
|
169
|
+
},
|
|
170
|
+
isMultiple: true,
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
code: 93,
|
|
174
|
+
name: 'numberOfEdges',
|
|
175
|
+
parser: parserGenerator_1.Identity,
|
|
176
|
+
},
|
|
177
|
+
];
|
|
178
|
+
//# sourceMappingURL=edge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge.js","sourceRoot":"","sources":["../../../../../src/parser/entities/hatch/boundaryPathData/edge.ts"],"names":[],"mappings":";;;AAAA,+CAA0D;AAC1D,2DAAwD;AACxD,qEAMyC;AACzC,qCAA0D;AAE7C,QAAA,gBAAgB,GAAuB;IAChD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,6BAAW;KACtB;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,6BAAW;KACtB;CACJ,CAAC;AAEW,QAAA,oBAAoB,GAAuB;IACpD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,2BAAS;KACpB;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,0BAAQ;KACnB;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0BAAQ;KACnB;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,0BAAQ;KACnB;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,MAAM,EA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BAAY,EACvB,cAAc,CAAC,IAAI,CAAC,IAA4B,CAAC,CACpD,CAAC;YAEF,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YACtD,CAAC;YACD,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;YACtB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;YAC5B,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,UAAU,EAAE,IAAI;KACnB;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,0BAAQ;KACnB;CACJ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseBoundaryPathData = void 0;
|
|
4
|
+
const consts_1 = require("../../../../consts");
|
|
5
|
+
const parserGenerator_1 = require("../../../shared/parserGenerator");
|
|
6
|
+
const edge_1 = require("./edge");
|
|
7
|
+
const polyline_1 = require("./polyline");
|
|
8
|
+
function parseBoundaryPathData(curr, scanner) {
|
|
9
|
+
// assume start with 92
|
|
10
|
+
const boundaryPathData = {
|
|
11
|
+
boundaryPathTypeFlag: curr.value,
|
|
12
|
+
};
|
|
13
|
+
const isPolyline = boundaryPathData.boundaryPathTypeFlag & consts_1.BoundaryPathTypeFlag.Polyline;
|
|
14
|
+
curr = scanner.next();
|
|
15
|
+
if (isPolyline) {
|
|
16
|
+
(0, parserGenerator_1.createParser)(polyline_1.PolylineSnippets)(curr, scanner, boundaryPathData);
|
|
17
|
+
return boundaryPathData;
|
|
18
|
+
}
|
|
19
|
+
(0, parserGenerator_1.createParser)(edge_1.EdgeBoundaryPathDataSnippets)(curr, scanner, boundaryPathData);
|
|
20
|
+
return boundaryPathData;
|
|
21
|
+
}
|
|
22
|
+
exports.parseBoundaryPathData = parseBoundaryPathData;
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/parser/entities/hatch/boundaryPathData/index.ts"],"names":[],"mappings":";;;AAAA,+CAA0D;AAG1D,qEAA+D;AAC/D,iCAAsD;AACtD,yCAA8C;AAE9C,SAAgB,qBAAqB,CACjC,IAAkB,EAClB,OAAwB;IAExB,uBAAuB;IACvB,MAAM,gBAAgB,GAAG;QACrB,oBAAoB,EAAE,IAAI,CAAC,KAAK;KACnC,CAAC;IACF,MAAM,UAAU,GACZ,gBAAgB,CAAC,oBAAoB,GAAG,6BAAoB,CAAC,QAAQ,CAAC;IAE1E,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAEtB,IAAI,UAAU,EAAE,CAAC;QACb,IAAA,8BAAY,EAAC,2BAAgB,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC;QAChE,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IACD,IAAA,8BAAY,EAAC,mCAA4B,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC;IAC5E,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AAnBD,sDAmBC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PolylineSnippets = void 0;
|
|
4
|
+
const parsePoint_1 = require("../../../shared/parsePoint");
|
|
5
|
+
const parserGenerator_1 = require("../../../shared/parserGenerator");
|
|
6
|
+
const shared_1 = require("./shared");
|
|
7
|
+
exports.PolylineSnippets = [
|
|
8
|
+
...shared_1.CommonBoundaryPathDataSnippets,
|
|
9
|
+
{
|
|
10
|
+
code: 10,
|
|
11
|
+
name: 'vertices',
|
|
12
|
+
parser(curr, scanner) {
|
|
13
|
+
const vertex = { ...(0, parsePoint_1.parsePoint)(scanner), bulge: 0 };
|
|
14
|
+
curr = scanner.next();
|
|
15
|
+
if (curr.code === 42) {
|
|
16
|
+
vertex.bulge = curr.value;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
scanner.rewind();
|
|
20
|
+
}
|
|
21
|
+
return vertex;
|
|
22
|
+
},
|
|
23
|
+
isMultiple: true,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
code: 93,
|
|
27
|
+
name: 'numberOfVertices',
|
|
28
|
+
parser: parserGenerator_1.Identity,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
code: 73,
|
|
32
|
+
name: 'isClosed',
|
|
33
|
+
parser: parserGenerator_1.ToBoolean,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
code: 72,
|
|
37
|
+
name: 'hasBulge',
|
|
38
|
+
parser: parserGenerator_1.ToBoolean,
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
//# sourceMappingURL=polyline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polyline.js","sourceRoot":"","sources":["../../../../../src/parser/entities/hatch/boundaryPathData/polyline.ts"],"names":[],"mappings":";;;AAAA,2DAAwD;AACxD,qEAIyC;AACzC,qCAA0D;AAE7C,QAAA,gBAAgB,GAAuB;IAChD,GAAG,uCAA8B;IACjC;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,MAAM,CAAC,IAAI,EAAE,OAAO;YAChB,MAAM,MAAM,GAAG,EAAE,GAAG,IAAA,uBAAU,EAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;YAEpD,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;YACtB,IAAI,IAAI,CAAC,IAAI,KAAK,EAAE,EAAE,CAAC;gBACnB,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YAC9B,CAAC;iBAAM,CAAC;gBACJ,OAAO,CAAC,MAAM,EAAE,CAAC;YACrB,CAAC;YAED,OAAO,MAAM,CAAC;QAClB,CAAC;QACD,UAAU,EAAE,IAAI;KACnB;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,0BAAQ;KACnB;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,2BAAS;KACpB;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,2BAAS;KACpB;CACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommonBoundaryPathDataSnippets = void 0;
|
|
4
|
+
const parserGenerator_1 = require("../../../shared/parserGenerator");
|
|
5
|
+
exports.CommonBoundaryPathDataSnippets = [
|
|
6
|
+
{
|
|
7
|
+
code: 330,
|
|
8
|
+
name: 'sourceBoundaryObjects',
|
|
9
|
+
parser: parserGenerator_1.Identity,
|
|
10
|
+
isMultiple: true,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
code: 97,
|
|
14
|
+
name: 'numberOfSourceBoundaryObjects',
|
|
15
|
+
parser: parserGenerator_1.Identity,
|
|
16
|
+
},
|
|
17
|
+
// 92는 분기에 써야해서 외부에서 주입함
|
|
18
|
+
];
|
|
19
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../../src/parser/entities/hatch/boundaryPathData/shared.ts"],"names":[],"mappings":";;;AAAA,qEAA6E;AAEhE,QAAA,8BAA8B,GAAuB;IAC9D;QACI,IAAI,EAAE,GAAG;QACT,IAAI,EAAE,uBAAuB;QAC7B,MAAM,EAAE,0BAAQ;QAChB,UAAU,EAAE,IAAI;KACnB;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,+BAA+B;QACrC,MAAM,EAAE,0BAAQ;KACnB;IACD,wBAAwB;CAC3B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type DxfArrayScanner from '../../DxfArrayScanner';
|
|
2
|
+
import type { ScannerGroup } from '../../DxfArrayScanner';
|
|
3
|
+
import type { HatchEntity } from './types';
|
|
4
|
+
export declare class HatchEntityParser {
|
|
5
|
+
static ForEntityName: string;
|
|
6
|
+
private parser;
|
|
7
|
+
parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): HatchEntity;
|
|
8
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HatchEntityParser = void 0;
|
|
4
|
+
const parserGenerator_1 = require("../../shared/parserGenerator");
|
|
5
|
+
const shared_1 = require("../shared");
|
|
6
|
+
const boundaryPathData_1 = require("./boundaryPathData");
|
|
7
|
+
const patternData_1 = require("./patternData");
|
|
8
|
+
const DefaultHathEntity = {
|
|
9
|
+
extrusionDirection: { x: 0, y: 0, z: 1 },
|
|
10
|
+
gradientRotation: 0,
|
|
11
|
+
colorTint: 0,
|
|
12
|
+
};
|
|
13
|
+
const HatchSnippet = [
|
|
14
|
+
{
|
|
15
|
+
// Unused - String (default = LINEAR)
|
|
16
|
+
code: 470,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
// Unused - Reserved for future use:
|
|
20
|
+
code: 463,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
code: 462,
|
|
24
|
+
name: 'colorTint',
|
|
25
|
+
parser: parserGenerator_1.Identity,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
code: 461,
|
|
29
|
+
name: 'gradientDefinition',
|
|
30
|
+
parser: parserGenerator_1.Identity,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
code: 460,
|
|
34
|
+
name: 'gradientRotation', // radian
|
|
35
|
+
parser: parserGenerator_1.Identity,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
code: 453,
|
|
39
|
+
name: 'numberOfColors',
|
|
40
|
+
parser: parserGenerator_1.Identity,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
code: 452,
|
|
44
|
+
name: 'gradientColorFlag',
|
|
45
|
+
parser: parserGenerator_1.Identity,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
// Unused - Zero is reserved for future use
|
|
49
|
+
code: 451,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
code: 450,
|
|
53
|
+
name: 'gradientFlag',
|
|
54
|
+
parser: parserGenerator_1.Identity,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
code: 10,
|
|
58
|
+
name: 'seedPoints',
|
|
59
|
+
parser: parserGenerator_1.PointParser,
|
|
60
|
+
isMultiple: true,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
// Unused - Number of degenerate boundary paths
|
|
64
|
+
code: 99,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
code: 11,
|
|
68
|
+
name: 'offsetVector',
|
|
69
|
+
parser: parserGenerator_1.PointParser,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
code: 98,
|
|
73
|
+
name: 'numberOfSeedPoints',
|
|
74
|
+
parser: parserGenerator_1.Identity,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
code: 47,
|
|
78
|
+
name: 'pixelSize',
|
|
79
|
+
parser: parserGenerator_1.Identity,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
code: 53,
|
|
83
|
+
name: 'definitionLines',
|
|
84
|
+
parser: patternData_1.parsePatternData,
|
|
85
|
+
isMultiple: true,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
code: 78,
|
|
89
|
+
name: 'numberOfDefinitionLines',
|
|
90
|
+
parser: parserGenerator_1.Identity,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
code: 77,
|
|
94
|
+
name: 'isDouble',
|
|
95
|
+
parser: parserGenerator_1.ToBoolean,
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
code: 73,
|
|
99
|
+
name: 'isAnnotated',
|
|
100
|
+
parser: parserGenerator_1.ToBoolean,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
code: 41,
|
|
104
|
+
name: 'patternScale',
|
|
105
|
+
parser: parserGenerator_1.Identity,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
code: 52,
|
|
109
|
+
name: 'patternAngle',
|
|
110
|
+
parser: parserGenerator_1.Identity,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
code: 76,
|
|
114
|
+
name: 'patternType',
|
|
115
|
+
parser: parserGenerator_1.Identity,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
code: 75,
|
|
119
|
+
name: 'hatchStyle',
|
|
120
|
+
parser: parserGenerator_1.Identity,
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
code: 92,
|
|
124
|
+
name: 'boundaryPaths',
|
|
125
|
+
parser: boundaryPathData_1.parseBoundaryPathData,
|
|
126
|
+
isMultiple: true,
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
code: 91,
|
|
130
|
+
name: 'numberOfBoundaryPaths',
|
|
131
|
+
parser: parserGenerator_1.Identity,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
code: 71,
|
|
135
|
+
name: 'associativity',
|
|
136
|
+
parser: parserGenerator_1.Identity,
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
code: 63,
|
|
140
|
+
name: 'patternFillColor',
|
|
141
|
+
parser: parserGenerator_1.Identity,
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
code: 70,
|
|
145
|
+
name: 'solidFill',
|
|
146
|
+
parser: parserGenerator_1.Identity,
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
code: 2,
|
|
150
|
+
name: 'patternName',
|
|
151
|
+
parser: parserGenerator_1.Identity,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
code: 210,
|
|
155
|
+
name: 'extrusionDirection',
|
|
156
|
+
parser: parserGenerator_1.PointParser,
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
code: 10,
|
|
160
|
+
name: 'elevationPoint',
|
|
161
|
+
parser: parserGenerator_1.PointParser,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
code: 100,
|
|
165
|
+
name: 'subclassMarker',
|
|
166
|
+
parser: parserGenerator_1.Identity,
|
|
167
|
+
pushContext: true,
|
|
168
|
+
},
|
|
169
|
+
...shared_1.CommonEntitySnippets,
|
|
170
|
+
];
|
|
171
|
+
class HatchEntityParser {
|
|
172
|
+
constructor() {
|
|
173
|
+
this.parser = (0, parserGenerator_1.createParser)(HatchSnippet, DefaultHathEntity);
|
|
174
|
+
}
|
|
175
|
+
parseEntity(scanner, curr) {
|
|
176
|
+
const entity = {};
|
|
177
|
+
this.parser(curr, scanner, entity);
|
|
178
|
+
return entity;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
exports.HatchEntityParser = HatchEntityParser;
|
|
182
|
+
HatchEntityParser.ForEntityName = 'HATCH';
|
|
183
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/parser/entities/hatch/index.ts"],"names":[],"mappings":";;;AAEA,kEAMsC;AACtC,sCAAiD;AACjD,yDAA2D;AAC3D,+CAAiD;AAGjD,MAAM,iBAAiB,GAAG;IACtB,kBAAkB,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IACxC,gBAAgB,EAAE,CAAC;IACnB,SAAS,EAAE,CAAC;CACf,CAAC;AAEF,MAAM,YAAY,GAAuB;IACrC;QACI,qCAAqC;QACrC,IAAI,EAAE,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,EAAE,gBAAgB;QACtB,MAAM,EAAE,0BAAQ;QAChB,WAAW,EAAE,IAAI;KACpB;IACD,GAAG,6BAAoB;CAC1B,CAAC;AAEF,MAAa,iBAAiB;IAA9B;QAEY,WAAM,GAAG,IAAA,8BAAY,EAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;IAOnE,CAAC;IALG,WAAW,CAAC,OAAwB,EAAE,IAAkB;QACpD,MAAM,MAAM,GAAG,EAAS,CAAC;QACzB,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QACnC,OAAO,MAAqB,CAAC;IACjC,CAAC;;AARL,8CASC;AARU,+BAAa,GAAG,OAAO,AAAV,CAAW"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parsePatternData = void 0;
|
|
4
|
+
const parserGenerator_1 = require("../../shared/parserGenerator");
|
|
5
|
+
const PatternDataSnippets = [
|
|
6
|
+
{
|
|
7
|
+
code: 49,
|
|
8
|
+
name: 'dashLengths',
|
|
9
|
+
parser: parserGenerator_1.Identity,
|
|
10
|
+
isMultiple: true,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
code: 79,
|
|
14
|
+
name: 'numberOfDashLengths',
|
|
15
|
+
parser: parserGenerator_1.Identity,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
code: 45,
|
|
19
|
+
name: 'offset',
|
|
20
|
+
parser: pseudoPointParser,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
code: 43,
|
|
24
|
+
name: 'base',
|
|
25
|
+
parser: pseudoPointParser,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
code: 53,
|
|
29
|
+
name: 'angle',
|
|
30
|
+
parser: parserGenerator_1.Identity,
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
function pseudoPointParser(curr, scanner) {
|
|
34
|
+
const nextCode = curr.code + 1;
|
|
35
|
+
const offset = {
|
|
36
|
+
x: curr.value,
|
|
37
|
+
y: 1,
|
|
38
|
+
};
|
|
39
|
+
curr = scanner.next();
|
|
40
|
+
if (curr.code === nextCode) {
|
|
41
|
+
offset.y = curr.value;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
scanner.rewind();
|
|
45
|
+
}
|
|
46
|
+
return offset;
|
|
47
|
+
}
|
|
48
|
+
function parsePatternData(curr, scanner) {
|
|
49
|
+
const patternData = {};
|
|
50
|
+
(0, parserGenerator_1.createParser)(PatternDataSnippets)(curr, scanner, patternData);
|
|
51
|
+
return patternData;
|
|
52
|
+
}
|
|
53
|
+
exports.parsePatternData = parsePatternData;
|
|
54
|
+
//# sourceMappingURL=patternData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patternData.js","sourceRoot":"","sources":["../../../../src/parser/entities/hatch/patternData.ts"],"names":[],"mappings":";;;AAEA,kEAIsC;AAEtC,MAAM,mBAAmB,GAAuB;IAC5C;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,0BAAQ;QAChB,UAAU,EAAE,IAAI;KACnB;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,0BAAQ;KACnB;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,iBAAiB;KAC5B;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,iBAAiB;KAC5B;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,0BAAQ;KACnB;CACJ,CAAC;AAEF,SAAS,iBAAiB,CAAC,IAAkB,EAAE,OAAwB;IACnE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IAC/B,MAAM,MAAM,GAAG;QACX,CAAC,EAAE,IAAI,CAAC,KAAK;QACb,CAAC,EAAE,CAAC;KACP,CAAC;IACF,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IACtB,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACzB,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;IAC1B,CAAC;SAAM,CAAC;QACJ,OAAO,CAAC,MAAM,EAAE,CAAC;IACrB,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,SAAgB,gBAAgB,CAAC,IAAkB,EAAE,OAAwB;IACzE,MAAM,WAAW,GAAQ,EAAE,CAAC;IAC5B,IAAA,8BAAY,EAAC,mBAAmB,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC9D,OAAO,WAAW,CAAC;AACvB,CAAC;AAJD,4CAIC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { BoundaryPathEdgeType } from '../../../../consts/hatch';
|
|
2
|
+
import type { Point2D } from '../../../../types';
|
|
3
|
+
interface BoundaryPathBase {
|
|
4
|
+
boundaryPathTypeFlag: number;
|
|
5
|
+
numberOfSourceBoundaryObjects: number;
|
|
6
|
+
sourceBoundaryObjects: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface PolylineBoundaryPath extends BoundaryPathBase {
|
|
9
|
+
hasBulge: boolean;
|
|
10
|
+
isClosed: boolean;
|
|
11
|
+
numberOfVertices: number;
|
|
12
|
+
vertices: (Point2D & {
|
|
13
|
+
bulge: number;
|
|
14
|
+
})[];
|
|
15
|
+
}
|
|
16
|
+
export interface EdgeBoundaryPath<EdgeType extends BoundaryPathEdge> extends BoundaryPathBase {
|
|
17
|
+
numberOfEdges: number;
|
|
18
|
+
edges: EdgeType[];
|
|
19
|
+
}
|
|
20
|
+
interface BoundaryPathEdgeCommon {
|
|
21
|
+
type: BoundaryPathEdgeType;
|
|
22
|
+
}
|
|
23
|
+
export type BoundaryPath = PolylineBoundaryPath | EdgeBoundaryPath<BoundaryPathEdge>;
|
|
24
|
+
export interface LineEdge extends BoundaryPathEdgeCommon {
|
|
25
|
+
start: Point2D;
|
|
26
|
+
end: Point2D;
|
|
27
|
+
}
|
|
28
|
+
export interface ArcEdge extends BoundaryPathEdgeCommon {
|
|
29
|
+
center: Point2D;
|
|
30
|
+
radius: number;
|
|
31
|
+
startAngle: number;
|
|
32
|
+
endAngle: number;
|
|
33
|
+
isCCW?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface EllipseEdge extends BoundaryPathEdgeCommon {
|
|
36
|
+
center: Point2D;
|
|
37
|
+
end: Point2D;
|
|
38
|
+
lengthOfMinorAxis: number;
|
|
39
|
+
startAngle: number;
|
|
40
|
+
endAngle: number;
|
|
41
|
+
isCCW?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface SplineEdge extends BoundaryPathEdgeCommon {
|
|
44
|
+
degree: number;
|
|
45
|
+
splineFlag: number;
|
|
46
|
+
isPeriodic?: boolean;
|
|
47
|
+
numberOfKnots: number;
|
|
48
|
+
numberOfControlPoints: number;
|
|
49
|
+
knots: number[];
|
|
50
|
+
controlPoints: (Point2D & {
|
|
51
|
+
weight?: number;
|
|
52
|
+
})[];
|
|
53
|
+
numberOfFitData: number;
|
|
54
|
+
fitDatum: Point2D[];
|
|
55
|
+
startTangent: Point2D;
|
|
56
|
+
endTangent: Point2D;
|
|
57
|
+
}
|
|
58
|
+
export type BoundaryPathEdge = LineEdge | ArcEdge | EllipseEdge | SplineEdge;
|
|
59
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boundaryPath.js","sourceRoot":"","sources":["../../../../../src/parser/entities/hatch/types/boundaryPath.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitionLine.js","sourceRoot":"","sources":["../../../../../src/parser/entities/hatch/types/definitionLine.ts"],"names":[],"mappings":""}
|