dxf-json 0.0.8 → 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,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CircleEntityParser = void 0;
|
|
4
|
+
const parserGenerator_1 = require("../../shared/parserGenerator");
|
|
5
|
+
const shared_1 = require("../shared");
|
|
6
|
+
const DefaultCircleEntity = {
|
|
7
|
+
thickness: 0,
|
|
8
|
+
extrusionDirection: { x: 0, y: 0, z: 1 },
|
|
9
|
+
};
|
|
10
|
+
const CircleEntityParserSnippets = [
|
|
11
|
+
{
|
|
12
|
+
code: 210,
|
|
13
|
+
name: 'extrusionDirection',
|
|
14
|
+
parser: parserGenerator_1.PointParser,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
code: 40,
|
|
18
|
+
name: 'radius',
|
|
19
|
+
parser: parserGenerator_1.Identity,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
code: 10,
|
|
23
|
+
name: 'center',
|
|
24
|
+
parser: parserGenerator_1.PointParser,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
code: 39,
|
|
28
|
+
name: 'thickness',
|
|
29
|
+
parser: parserGenerator_1.Identity,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
code: 100,
|
|
33
|
+
name: 'subclassMarker',
|
|
34
|
+
parser: parserGenerator_1.Identity,
|
|
35
|
+
},
|
|
36
|
+
...shared_1.CommonEntitySnippets,
|
|
37
|
+
];
|
|
38
|
+
class CircleEntityParser {
|
|
39
|
+
constructor() {
|
|
40
|
+
this.parser = (0, parserGenerator_1.createParser)(CircleEntityParserSnippets, DefaultCircleEntity);
|
|
41
|
+
}
|
|
42
|
+
parseEntity(scanner, curr) {
|
|
43
|
+
const entity = {};
|
|
44
|
+
this.parser(curr, scanner, entity);
|
|
45
|
+
return entity;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.CircleEntityParser = CircleEntityParser;
|
|
49
|
+
CircleEntityParser.ForEntityName = 'CIRCLE';
|
|
50
|
+
//# sourceMappingURL=parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../../src/parser/entities/circle/parser.ts"],"names":[],"mappings":";;;AAEA,kEAKsC;AACtC,sCAAiD;AAGjD,MAAM,mBAAmB,GAAG;IACxB,SAAS,EAAE,CAAC;IACZ,kBAAkB,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;CAC3C,CAAC;AAEF,MAAM,0BAA0B,GAAuB;IACnD;QACI,IAAI,EAAE,GAAG;QACT,IAAI,EAAE,oBAAoB;QAC1B,MAAM,EAAE,6BAAW;KACtB;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,EAAE,6BAAW;KACtB;IACD;QACI,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,0BAAQ;KACnB;IACD;QACI,IAAI,EAAE,GAAG;QACT,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,0BAAQ;KACnB;IACD,GAAG,6BAAoB;CAC1B,CAAC;AAEF,MAAa,kBAAkB;IAA/B;QAEY,WAAM,GAAG,IAAA,8BAAY,EACzB,0BAA0B,EAC1B,mBAAmB,CACtB,CAAC;IAON,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,MAAsB,CAAC;IAClC,CAAC;;AAXL,gDAYC;AAXU,gCAAa,GAAG,QAAQ,AAAX,CAAY"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Point3D } from '../../../types';
|
|
2
|
+
import type { CommonDxfEntity } from '../shared';
|
|
3
|
+
export interface CircleEntity extends CommonDxfEntity {
|
|
4
|
+
type: 'CIRCLE';
|
|
5
|
+
subclassMarker: 'AcDbCircle';
|
|
6
|
+
thickness: number;
|
|
7
|
+
center: Point3D;
|
|
8
|
+
radius: number;
|
|
9
|
+
extrusionDirection: Point3D;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/parser/entities/circle/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import DxfArrayScanner, { ScannerGroup } from 'parser/DxfArrayScanner';
|
|
2
|
+
import { DimensionEntity } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* @returns Return `false` if curr is not related to common dimension group
|
|
5
|
+
*/
|
|
6
|
+
export declare function parseDimension(entity: DimensionEntity, curr: ScannerGroup, scanner: DxfArrayScanner): void;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.parseDimension = void 0;
|
|
27
|
+
const helpers = __importStar(require("../../ParseHelpers"));
|
|
28
|
+
const parsePoint_1 = require("../../shared/parsePoint");
|
|
29
|
+
/**
|
|
30
|
+
* @returns Return `false` if curr is not related to common dimension group
|
|
31
|
+
*/
|
|
32
|
+
function parseDimension(entity, curr, scanner) {
|
|
33
|
+
switch (curr.code) {
|
|
34
|
+
case 100:
|
|
35
|
+
entity.subclassMarker = curr.value;
|
|
36
|
+
break;
|
|
37
|
+
case 280:
|
|
38
|
+
entity.version = curr.value;
|
|
39
|
+
break;
|
|
40
|
+
case 2:
|
|
41
|
+
entity.name = curr.value;
|
|
42
|
+
break;
|
|
43
|
+
case 10:
|
|
44
|
+
entity.definitionPoint = (0, parsePoint_1.parsePoint)(scanner);
|
|
45
|
+
break;
|
|
46
|
+
case 11:
|
|
47
|
+
entity.textPoint = (0, parsePoint_1.parsePoint)(scanner);
|
|
48
|
+
break;
|
|
49
|
+
case 12:
|
|
50
|
+
// for aligned
|
|
51
|
+
entity.insertionPoint = (0, parsePoint_1.parsePoint)(scanner);
|
|
52
|
+
break;
|
|
53
|
+
case 13:
|
|
54
|
+
// group 13 and 14 are subclass specific definition point
|
|
55
|
+
// for further information, look dxf dimension specification
|
|
56
|
+
entity.subDefinitionPoint1 = (0, parsePoint_1.parsePoint)(scanner);
|
|
57
|
+
break;
|
|
58
|
+
case 14:
|
|
59
|
+
entity.subDefinitionPoint2 = (0, parsePoint_1.parsePoint)(scanner);
|
|
60
|
+
break;
|
|
61
|
+
case 15:
|
|
62
|
+
// for angular, radial, diameter
|
|
63
|
+
entity.centerPoint = (0, parsePoint_1.parsePoint)(scanner);
|
|
64
|
+
break;
|
|
65
|
+
case 16:
|
|
66
|
+
// for angular
|
|
67
|
+
entity.arcPoint = (0, parsePoint_1.parsePoint)(scanner);
|
|
68
|
+
break;
|
|
69
|
+
case 70:
|
|
70
|
+
entity.dimensionType = curr.value;
|
|
71
|
+
break;
|
|
72
|
+
case 71:
|
|
73
|
+
entity.attachmentPoint = curr.value;
|
|
74
|
+
break;
|
|
75
|
+
case 72:
|
|
76
|
+
entity.textLineSpacingStyle = curr.value;
|
|
77
|
+
break;
|
|
78
|
+
case 40:
|
|
79
|
+
// for radial, diameter
|
|
80
|
+
entity.leaderLength = curr.value;
|
|
81
|
+
break;
|
|
82
|
+
case 41:
|
|
83
|
+
entity.textLineSpacingFactor = curr.value;
|
|
84
|
+
break;
|
|
85
|
+
case 42:
|
|
86
|
+
entity.measurement = curr.value;
|
|
87
|
+
break;
|
|
88
|
+
case 1:
|
|
89
|
+
// if value === null or "<>", measurement should be drawn as text instead
|
|
90
|
+
// if value === "", text is suppressed.
|
|
91
|
+
// otherwise text should be drawn as is.
|
|
92
|
+
entity.text = curr.value;
|
|
93
|
+
break;
|
|
94
|
+
case 50:
|
|
95
|
+
// for aligned
|
|
96
|
+
entity.rotationAngle = curr.value;
|
|
97
|
+
break;
|
|
98
|
+
case 52:
|
|
99
|
+
// for aligned
|
|
100
|
+
entity.obliqueAngle = curr.value;
|
|
101
|
+
break;
|
|
102
|
+
case 53:
|
|
103
|
+
entity.textRotation = curr.value;
|
|
104
|
+
break;
|
|
105
|
+
case 51:
|
|
106
|
+
// This group value is the negative of the angle between the OCS X axis
|
|
107
|
+
// and the UCS X axis. It is always in the XY plane of the OCS
|
|
108
|
+
entity.ocsRotation = curr.value;
|
|
109
|
+
break;
|
|
110
|
+
case 210:
|
|
111
|
+
entity.extrusionDirection = (0, parsePoint_1.parsePoint)(scanner);
|
|
112
|
+
break;
|
|
113
|
+
case 3:
|
|
114
|
+
entity.styleName = curr.value;
|
|
115
|
+
break;
|
|
116
|
+
default:
|
|
117
|
+
helpers.checkCommonEntityProperties(entity, curr, scanner);
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.parseDimension = parseDimension;
|
|
122
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/parser/entities/dimension/common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,4DAA8C;AAC9C,wDAAqD;AAGrD;;GAEG;AACH,SAAgB,cAAc,CAAC,MAAuB,EAAE,IAAkB,EAAE,OAAwB;IAChG,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAChB,KAAK,GAAG;YACJ,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC;YACnC,MAAM;QACV,KAAK,GAAG;YACJ,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC;YAC5B,MAAM;QACV,KAAK,CAAC;YACF,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;YACzB,MAAM;QACV,KAAK,EAAE;YACH,MAAM,CAAC,eAAe,GAAG,IAAA,uBAAU,EAAC,OAAO,CAAY,CAAC;YACxD,MAAM;QACV,KAAK,EAAE;YACH,MAAM,CAAC,SAAS,GAAG,IAAA,uBAAU,EAAC,OAAO,CAAY,CAAC;YAClD,MAAM;QACV,KAAK,EAAE;YACH,cAAc;YACb,MAAiC,CAAC,cAAc,GAAG,IAAA,uBAAU,EAAC,OAAO,CAAY,CAAC;YACnF,MAAM;QACV,KAAK,EAAE;YACH,yDAAyD;YACzD,4DAA4D;YAC3D,MAAoF,CAAC,mBAAmB,GAAG,IAAA,uBAAU,EAAC,OAAO,CAAY,CAAC;YAC3I,MAAM;QACV,KAAK,EAAE;YACF,MAAoF,CAAC,mBAAmB,GAAG,IAAA,uBAAU,EAAC,OAAO,CAAY,CAAC;YAC3I,MAAM;QACV,KAAK,EAAE;YACH,gCAAgC;YAC/B,MAAiE,CAAC,WAAW,GAAG,IAAA,uBAAU,EAAC,OAAO,CAAY,CAAC;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C3D,MAAM;QACV,KAAK,CAAC;YACF,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC;YAC9B,MAAM;QACV;YACI,OAAO,CAAC,2BAA2B,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;YAC3D,MAAM;IACd,CAAC;AACL,CAAC;AAxFD,wCAwFC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import DxfArrayScanner, { ScannerGroup } from 'parser/DxfArrayScanner';
|
|
2
|
+
import { DimensionEntity } from './types';
|
|
3
|
+
export default class DimensionParser {
|
|
4
|
+
static ForEntityName: string;
|
|
5
|
+
parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): DimensionEntity;
|
|
6
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const shared_1 = require("../../shared");
|
|
4
|
+
const common_1 = require("./common");
|
|
5
|
+
class DimensionParser {
|
|
6
|
+
parseEntity(scanner, curr) {
|
|
7
|
+
const entity = {};
|
|
8
|
+
while (!(0, shared_1.isMatched)(curr, 0, 'EOF')) {
|
|
9
|
+
if (curr.code === 0) {
|
|
10
|
+
scanner.rewind();
|
|
11
|
+
return entity;
|
|
12
|
+
}
|
|
13
|
+
(0, common_1.parseDimension)(entity, curr, scanner);
|
|
14
|
+
curr = scanner.next();
|
|
15
|
+
}
|
|
16
|
+
return entity;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
DimensionParser.ForEntityName = 'DIMENSION';
|
|
20
|
+
exports.default = DimensionParser;
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/parser/entities/dimension/index.ts"],"names":[],"mappings":";;AACA,yCAAyC;AACzC,qCAA0C;AAG1C,MAAqB,eAAe;IAGhC,WAAW,CAAC,OAAwB,EAAE,IAAkB;QACpD,MAAM,MAAM,GAAG,EAAqB,CAAC;QAErC,OAAO,CAAC,IAAA,kBAAS,EAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;YAChC,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;gBAClB,OAAO,CAAC,MAAM,EAAE,CAAC;gBACjB,OAAO,MAAM,CAAC;YAClB,CAAC;YAED,IAAA,uBAAc,EAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;YACtC,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;QAC1B,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;;AAhBM,6BAAa,GAAG,WAAW,CAAC;kBADlB,eAAe"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AttachmentPoint, DimensionTextLineSpacing, DimensionType } from '../../../consts';
|
|
2
|
+
import type { Point3D } from '../../../types';
|
|
3
|
+
import type { CommonDxfEntity } from '../shared';
|
|
4
|
+
export interface DimensionEntityCommon extends CommonDxfEntity {
|
|
5
|
+
type: 'DIMENSION';
|
|
6
|
+
subclassMarker: string;
|
|
7
|
+
handle: string;
|
|
8
|
+
version: string;
|
|
9
|
+
name: string;
|
|
10
|
+
definitionPoint: Point3D;
|
|
11
|
+
textPoint: Point3D;
|
|
12
|
+
dimensionType: DimensionType;
|
|
13
|
+
attachmentPoint: AttachmentPoint;
|
|
14
|
+
textLineSpacingStyle?: DimensionTextLineSpacing;
|
|
15
|
+
textLineSpacingFactor?: number;
|
|
16
|
+
measurement?: number;
|
|
17
|
+
text?: string;
|
|
18
|
+
textRotation?: number;
|
|
19
|
+
ocsRotation?: number;
|
|
20
|
+
extrusionDirection?: Point3D;
|
|
21
|
+
styleName: string;
|
|
22
|
+
}
|
|
23
|
+
export interface AlignedDimensionEntity extends DimensionEntityCommon {
|
|
24
|
+
subclassMarker: 'AcDbAlignedDimension' | 'AcDbRotatedDimension';
|
|
25
|
+
insertionPoint?: Point3D;
|
|
26
|
+
subDefinitionPoint1: Point3D;
|
|
27
|
+
subDefinitionPoint2: Point3D;
|
|
28
|
+
rotationAngle: number;
|
|
29
|
+
obliqueAngle: number;
|
|
30
|
+
}
|
|
31
|
+
export interface AngularDimensionEntity extends DimensionEntityCommon {
|
|
32
|
+
subclassMarker: 'AcDb3PointAngularDimension';
|
|
33
|
+
subDefinitionPoint1: Point3D;
|
|
34
|
+
subDefinitionPoint2: Point3D;
|
|
35
|
+
centerPoint: Point3D;
|
|
36
|
+
arcPoint: Point3D;
|
|
37
|
+
}
|
|
38
|
+
export interface OrdinateDimensionEntity extends DimensionEntityCommon {
|
|
39
|
+
subclassMarker: 'AcDbOrdinateDimension';
|
|
40
|
+
subDefinitionPoint1: Point3D;
|
|
41
|
+
subDefinitionPoint2: Point3D;
|
|
42
|
+
}
|
|
43
|
+
export interface RadialDiameterDimensionEntity extends DimensionEntityCommon {
|
|
44
|
+
subclassMarker: 'AcDbRadialDimension' | 'AcDbDiametricDimension';
|
|
45
|
+
centerPoint: Point3D;
|
|
46
|
+
leaderLength: number;
|
|
47
|
+
}
|
|
48
|
+
export type DimensionEntity = DimensionEntityCommon & (Partial<AlignedDimensionEntity> | Partial<AngularDimensionEntity> | Partial<OrdinateDimensionEntity> | Partial<RadialDiameterDimensionEntity>);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/parser/entities/dimension/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./parser"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/parser/entities/ellipse/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,2CAAyB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import DxfArrayScanner, { ScannerGroup } from '../../DxfArrayScanner';
|
|
2
|
+
import { EllipseEntity } from './types';
|
|
3
|
+
export declare class EllipseEntityParser {
|
|
4
|
+
static ForEntityName: string;
|
|
5
|
+
private parser;
|
|
6
|
+
parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): EllipseEntity;
|
|
7
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EllipseEntityParser = void 0;
|
|
4
|
+
const parserGenerator_1 = require("../../shared/parserGenerator");
|
|
5
|
+
const shared_1 = require("../shared");
|
|
6
|
+
const DefaultEllipseEnitty = {
|
|
7
|
+
extrusionDirection: { x: 0, y: 0, z: 1 },
|
|
8
|
+
};
|
|
9
|
+
const EllipseEntityParserSnippets = [
|
|
10
|
+
{
|
|
11
|
+
code: 42,
|
|
12
|
+
name: 'endAngle',
|
|
13
|
+
parser: parserGenerator_1.Identity,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
code: 41,
|
|
17
|
+
name: 'startAngle',
|
|
18
|
+
parser: parserGenerator_1.Identity,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
code: 40,
|
|
22
|
+
name: 'axisRatio',
|
|
23
|
+
parser: parserGenerator_1.Identity,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
code: 210,
|
|
27
|
+
name: 'extrusionDirection',
|
|
28
|
+
parser: parserGenerator_1.PointParser,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
code: 11,
|
|
32
|
+
name: 'majorAxisEndPoint',
|
|
33
|
+
parser: parserGenerator_1.PointParser,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
code: 10,
|
|
37
|
+
name: 'center',
|
|
38
|
+
parser: parserGenerator_1.PointParser,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
code: 100,
|
|
42
|
+
name: 'subclassMarker',
|
|
43
|
+
parser: parserGenerator_1.Identity,
|
|
44
|
+
},
|
|
45
|
+
...shared_1.CommonEntitySnippets,
|
|
46
|
+
];
|
|
47
|
+
class EllipseEntityParser {
|
|
48
|
+
constructor() {
|
|
49
|
+
this.parser = (0, parserGenerator_1.createParser)(EllipseEntityParserSnippets, DefaultEllipseEnitty);
|
|
50
|
+
}
|
|
51
|
+
parseEntity(scanner, curr) {
|
|
52
|
+
const entity = {};
|
|
53
|
+
this.parser(curr, scanner, entity);
|
|
54
|
+
return entity;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.EllipseEntityParser = EllipseEntityParser;
|
|
58
|
+
EllipseEntityParser.ForEntityName = 'ELLIPSE';
|
|
59
|
+
//# sourceMappingURL=parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../../src/parser/entities/ellipse/parser.ts"],"names":[],"mappings":";;;AACA,kEAKsC;AACtC,sCAAiD;AAGj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
|
+
export interface EllipseEntity extends CommonDxfEntity {
|
|
4
|
+
type: 'ELLIPSE';
|
|
5
|
+
subclassMarker: 'AcDbEllipse';
|
|
6
|
+
center: Point3D;
|
|
7
|
+
majorAxisEndPoint: Point3D;
|
|
8
|
+
extrusionDirection: Point3D;
|
|
9
|
+
axisRatio: number;
|
|
10
|
+
startAngle: number;
|
|
11
|
+
endAngle: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/parser/entities/ellipse/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const _1 = require(".");
|
|
7
|
+
const DxfArrayScanner_1 = __importDefault(require("../DxfArrayScanner"));
|
|
8
|
+
describe('ENTITIES section', () => {
|
|
9
|
+
describe('parseEntities', () => {
|
|
10
|
+
it('BLOCKS 섹션 안에서 parseEntities를 실행하면 scanner.next()가 <0, ENDBLK>이어야 한다.', () => {
|
|
11
|
+
const content = ` 0
|
|
12
|
+
LINE
|
|
13
|
+
5
|
|
14
|
+
entity-0
|
|
15
|
+
100
|
|
16
|
+
AcDbLine
|
|
17
|
+
100
|
|
18
|
+
AcDbEntity
|
|
19
|
+
0
|
|
20
|
+
ENDBLK
|
|
21
|
+
0
|
|
22
|
+
EOF
|
|
23
|
+
`.split('\n');
|
|
24
|
+
const scanner = new DxfArrayScanner_1.default(content);
|
|
25
|
+
let curr = scanner.next();
|
|
26
|
+
(0, _1.parseEntities)(curr, scanner);
|
|
27
|
+
curr = scanner.next();
|
|
28
|
+
expect(curr.code).toBe(0);
|
|
29
|
+
expect(curr.value).toBe('ENDBLK');
|
|
30
|
+
});
|
|
31
|
+
it('ENTITIES 섹션 안에서 parseEntities를 실행하면 scanner.next()가 <0, ENDSEC>이어야 한다.', () => {
|
|
32
|
+
const content = ` 0
|
|
33
|
+
LINE
|
|
34
|
+
5
|
|
35
|
+
entity-0
|
|
36
|
+
100
|
|
37
|
+
AcDbLine
|
|
38
|
+
100
|
|
39
|
+
AcDbEntity
|
|
40
|
+
0
|
|
41
|
+
ENDSEC
|
|
42
|
+
0
|
|
43
|
+
EOF
|
|
44
|
+
`.split('\n');
|
|
45
|
+
const scanner = new DxfArrayScanner_1.default(content);
|
|
46
|
+
let curr = scanner.next();
|
|
47
|
+
(0, _1.parseEntities)(curr, scanner);
|
|
48
|
+
curr = scanner.next();
|
|
49
|
+
expect(curr.code).toBe(0);
|
|
50
|
+
expect(curr.value).toBe('ENDSEC');
|
|
51
|
+
});
|
|
52
|
+
it('parseEntities는 모든 ENTITY를 소모하여야 한다.', () => {
|
|
53
|
+
const content = ` 0
|
|
54
|
+
LINE
|
|
55
|
+
5
|
|
56
|
+
entity-0
|
|
57
|
+
100
|
|
58
|
+
AcDbLine
|
|
59
|
+
0
|
|
60
|
+
LINE
|
|
61
|
+
5
|
|
62
|
+
entity-1
|
|
63
|
+
100
|
|
64
|
+
AcDbLine
|
|
65
|
+
100
|
|
66
|
+
AcDbEntity
|
|
67
|
+
0
|
|
68
|
+
ENDBLK
|
|
69
|
+
0
|
|
70
|
+
EOF
|
|
71
|
+
`.split('\n');
|
|
72
|
+
const scanner = new DxfArrayScanner_1.default(content);
|
|
73
|
+
let curr = scanner.next();
|
|
74
|
+
const entities = (0, _1.parseEntities)(curr, scanner);
|
|
75
|
+
expect(entities.length).toBe(2);
|
|
76
|
+
expect(entities[0].handle).toBe('entity-0');
|
|
77
|
+
expect(entities[1].handle).toBe('entity-1');
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
//# sourceMappingURL=entities.test.js.map
|
|
@@ -0,0 +1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,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;YAC3C,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;CAkB3B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACF,MAAM,OAAO,GAAG,IAAI,yBAAe,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;YAE1B,MAAM,QAAQ,GAAG,IAAA,gBAAa,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAE9C,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC5C,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DXFParserSnippet } from '../../../shared/parserGenerator';
|
|
2
|
+
export declare const LineEdgeSnippets: DXFParserSnippet[];
|
|
3
|
+
export declare const CircularEdgeSnippets: DXFParserSnippet[];
|
|
4
|
+
export declare const EllipseEdgeSnippets: DXFParserSnippet[];
|
|
5
|
+
export declare const SplineEdgeSnippets: DXFParserSnippet[];
|
|
6
|
+
export declare const EdgeBoundaryPathDataSnippets: DXFParserSnippet[];
|