@linkiez/dxf-renew 7.0.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +1 -16
- package/.github/instructions/code-patterns.instructions.md +1 -1
- package/.github/instructions/exdxf.instruction.md +161 -0
- package/.github/instructions/tdd.instructions.md +271 -0
- package/.yarn/install-state.gz +0 -0
- package/ARCHITECTURE.md +163 -0
- package/CHANGELOG.md +39 -0
- package/CONTRIBUTING.md +16 -14
- package/README.md +113 -16
- package/{PLAN.md → ROADMAP.md} +244 -102
- package/dist/dxf.js +2212 -454
- package/docs/EZDXF_REFERENCE_SITEMAP.md +55 -0
- package/docs/FIXTURE_VALIDATION_EZDXF.md +62 -0
- package/lib/Helper.cjs +6 -2
- package/lib/Helper.cjs.map +3 -3
- package/lib/Helper.js +6 -2
- package/lib/Helper.js.map +2 -2
- package/lib/denormalise.cjs +131 -91
- package/lib/denormalise.cjs.map +2 -2
- package/lib/denormalise.js +131 -91
- package/lib/denormalise.js.map +2 -2
- package/lib/dimensionToSVG.cjs +318 -53
- package/lib/dimensionToSVG.cjs.map +3 -3
- package/lib/dimensionToSVG.js +316 -52
- package/lib/dimensionToSVG.js.map +2 -2
- package/lib/entityToPolyline.cjs +95 -0
- package/lib/entityToPolyline.cjs.map +3 -3
- package/lib/entityToPolyline.js +95 -0
- package/lib/entityToPolyline.js.map +2 -2
- package/lib/handlers/entities.cjs +111 -27
- package/lib/handlers/entities.cjs.map +3 -3
- package/lib/handlers/entities.js +111 -27
- package/lib/handlers/entities.js.map +3 -3
- package/lib/handlers/entity/dgnUnderlay.cjs +106 -0
- package/lib/handlers/entity/dgnUnderlay.cjs.map +7 -0
- package/lib/handlers/entity/dgnUnderlay.js +71 -0
- package/lib/handlers/entity/dgnUnderlay.js.map +7 -0
- package/lib/handlers/entity/dimension.cjs +24 -0
- package/lib/handlers/entity/dimension.cjs.map +2 -2
- package/lib/handlers/entity/dimension.js +24 -0
- package/lib/handlers/entity/dimension.js.map +2 -2
- package/lib/handlers/entity/dwfUnderlay.cjs +106 -0
- package/lib/handlers/entity/dwfUnderlay.cjs.map +7 -0
- package/lib/handlers/entity/dwfUnderlay.js +71 -0
- package/lib/handlers/entity/dwfUnderlay.js.map +7 -0
- package/lib/handlers/entity/image.cjs +123 -0
- package/lib/handlers/entity/image.cjs.map +7 -0
- package/lib/handlers/entity/image.js +88 -0
- package/lib/handlers/entity/image.js.map +7 -0
- package/lib/handlers/entity/leader.cjs +148 -0
- package/lib/handlers/entity/leader.cjs.map +7 -0
- package/lib/handlers/entity/leader.js +113 -0
- package/lib/handlers/entity/leader.js.map +7 -0
- package/lib/handlers/entity/mleader.cjs +69 -0
- package/lib/handlers/entity/mleader.cjs.map +7 -0
- package/lib/handlers/entity/mleader.js +34 -0
- package/lib/handlers/entity/mleader.js.map +7 -0
- package/lib/handlers/entity/mline.cjs +91 -0
- package/lib/handlers/entity/mline.cjs.map +7 -0
- package/lib/handlers/entity/mline.js +56 -0
- package/lib/handlers/entity/mline.js.map +7 -0
- package/lib/handlers/entity/oleframe.cjs +98 -0
- package/lib/handlers/entity/oleframe.cjs.map +7 -0
- package/lib/handlers/entity/oleframe.js +63 -0
- package/lib/handlers/entity/oleframe.js.map +7 -0
- package/lib/handlers/entity/pdfUnderlay.cjs +106 -0
- package/lib/handlers/entity/pdfUnderlay.cjs.map +7 -0
- package/lib/handlers/entity/pdfUnderlay.js +71 -0
- package/lib/handlers/entity/pdfUnderlay.js.map +7 -0
- package/lib/handlers/entity/ray.cjs +81 -0
- package/lib/handlers/entity/ray.cjs.map +7 -0
- package/lib/handlers/entity/ray.js +46 -0
- package/lib/handlers/entity/ray.js.map +7 -0
- package/lib/handlers/entity/region.cjs +67 -0
- package/lib/handlers/entity/region.cjs.map +7 -0
- package/lib/handlers/entity/region.js +32 -0
- package/lib/handlers/entity/region.js.map +7 -0
- package/lib/handlers/entity/shape.cjs +95 -0
- package/lib/handlers/entity/shape.cjs.map +7 -0
- package/lib/handlers/entity/shape.js +60 -0
- package/lib/handlers/entity/shape.js.map +7 -0
- package/lib/handlers/entity/table.cjs +71 -0
- package/lib/handlers/entity/table.cjs.map +7 -0
- package/lib/handlers/entity/table.js +36 -0
- package/lib/handlers/entity/table.js.map +7 -0
- package/lib/handlers/entity/tolerance.cjs +90 -0
- package/lib/handlers/entity/tolerance.cjs.map +7 -0
- package/lib/handlers/entity/tolerance.js +55 -0
- package/lib/handlers/entity/tolerance.js.map +7 -0
- package/lib/handlers/entity/trace.cjs +101 -0
- package/lib/handlers/entity/trace.cjs.map +7 -0
- package/lib/handlers/entity/trace.js +66 -0
- package/lib/handlers/entity/trace.js.map +7 -0
- package/lib/handlers/entity/wipeout.cjs +122 -0
- package/lib/handlers/entity/wipeout.cjs.map +7 -0
- package/lib/handlers/entity/wipeout.js +87 -0
- package/lib/handlers/entity/wipeout.js.map +7 -0
- package/lib/handlers/entity/xline.cjs +81 -0
- package/lib/handlers/entity/xline.cjs.map +7 -0
- package/lib/handlers/entity/xline.js +46 -0
- package/lib/handlers/entity/xline.js.map +7 -0
- package/lib/handlers/objects.cjs +299 -136
- package/lib/handlers/objects.cjs.map +2 -2
- package/lib/handlers/objects.js +299 -136
- package/lib/handlers/objects.js.map +2 -2
- package/lib/handlers/tables.cjs +96 -17
- package/lib/handlers/tables.cjs.map +2 -2
- package/lib/handlers/tables.js +96 -17
- package/lib/handlers/tables.js.map +2 -2
- package/lib/index.cjs +5 -2
- package/lib/index.cjs.map +3 -3
- package/lib/index.js +18 -16
- package/lib/index.js.map +3 -3
- package/lib/toJson.cjs +29 -0
- package/lib/toJson.cjs.map +7 -0
- package/lib/toJson.js +9 -0
- package/lib/toJson.js.map +7 -0
- package/lib/toSVG.cjs +105 -11
- package/lib/toSVG.cjs.map +3 -3
- package/lib/toSVG.js +106 -12
- package/lib/toSVG.js.map +2 -2
- package/lib/types/dimension-entity.cjs.map +1 -1
- package/lib/types/entity.cjs.map +1 -1
- package/lib/types/helper.cjs.map +1 -1
- package/lib/types/image-entity.cjs +17 -0
- package/lib/types/image-entity.cjs.map +7 -0
- package/lib/types/image-entity.js +1 -0
- package/lib/types/image-entity.js.map +7 -0
- package/lib/types/index.cjs +28 -0
- package/lib/types/index.cjs.map +2 -2
- package/lib/types/index.js +14 -0
- package/lib/types/index.js.map +2 -2
- package/lib/types/leader-entity.cjs +17 -0
- package/lib/types/leader-entity.cjs.map +7 -0
- package/lib/types/leader-entity.js +1 -0
- package/lib/types/leader-entity.js.map +7 -0
- package/lib/types/mleader-entity.cjs +17 -0
- package/lib/types/mleader-entity.cjs.map +7 -0
- package/lib/types/mleader-entity.js +1 -0
- package/lib/types/mleader-entity.js.map +7 -0
- package/lib/types/mline-entity.cjs +17 -0
- package/lib/types/mline-entity.cjs.map +7 -0
- package/lib/types/mline-entity.js +1 -0
- package/lib/types/mline-entity.js.map +7 -0
- package/lib/types/oleframe-entity.cjs +17 -0
- package/lib/types/oleframe-entity.cjs.map +7 -0
- package/lib/types/oleframe-entity.js +1 -0
- package/lib/types/oleframe-entity.js.map +7 -0
- package/lib/types/options.cjs.map +1 -1
- package/lib/types/ray-entity.cjs +17 -0
- package/lib/types/ray-entity.cjs.map +7 -0
- package/lib/types/ray-entity.js +1 -0
- package/lib/types/ray-entity.js.map +7 -0
- package/lib/types/region-entity.cjs +17 -0
- package/lib/types/region-entity.cjs.map +7 -0
- package/lib/types/region-entity.js +1 -0
- package/lib/types/region-entity.js.map +7 -0
- package/lib/types/shape-entity.cjs +17 -0
- package/lib/types/shape-entity.cjs.map +7 -0
- package/lib/types/shape-entity.js +1 -0
- package/lib/types/shape-entity.js.map +7 -0
- package/lib/types/table-entity.cjs +17 -0
- package/lib/types/table-entity.cjs.map +7 -0
- package/lib/types/table-entity.js +1 -0
- package/lib/types/table-entity.js.map +7 -0
- package/lib/types/tables.cjs.map +1 -1
- package/lib/types/tolerance-entity.cjs +17 -0
- package/lib/types/tolerance-entity.cjs.map +7 -0
- package/lib/types/tolerance-entity.js +1 -0
- package/lib/types/tolerance-entity.js.map +7 -0
- package/lib/types/trace-entity.cjs +17 -0
- package/lib/types/trace-entity.cjs.map +7 -0
- package/lib/types/trace-entity.js +1 -0
- package/lib/types/trace-entity.js.map +7 -0
- package/lib/types/underlay-entity.cjs +17 -0
- package/lib/types/underlay-entity.cjs.map +7 -0
- package/lib/types/underlay-entity.js +1 -0
- package/lib/types/underlay-entity.js.map +7 -0
- package/lib/types/wipeout-entity.cjs +17 -0
- package/lib/types/wipeout-entity.cjs.map +7 -0
- package/lib/types/wipeout-entity.js +1 -0
- package/lib/types/wipeout-entity.js.map +7 -0
- package/lib/types/xline-entity.cjs +17 -0
- package/lib/types/xline-entity.cjs.map +7 -0
- package/lib/types/xline-entity.js +1 -0
- package/lib/types/xline-entity.js.map +7 -0
- package/lib/util/escapeXmlText.cjs +27 -0
- package/lib/util/escapeXmlText.cjs.map +7 -0
- package/lib/util/escapeXmlText.js +7 -0
- package/lib/util/escapeXmlText.js.map +7 -0
- package/package.json +9 -18
- package/playwright.config.cjs +20 -0
- package/src/Helper.ts +8 -3
- package/src/denormalise.ts +182 -116
- package/src/dimensionToSVG.ts +466 -54
- package/src/entityToPolyline.ts +124 -2
- package/src/handlers/entities.ts +129 -34
- package/src/handlers/entity/dgnUnderlay.ts +94 -0
- package/src/handlers/entity/dimension.ts +27 -1
- package/src/handlers/entity/dwfUnderlay.ts +94 -0
- package/src/handlers/entity/image.ts +118 -0
- package/src/handlers/entity/leader.ts +153 -0
- package/src/handlers/entity/mleader.ts +46 -0
- package/src/handlers/entity/mline.ts +74 -0
- package/src/handlers/entity/oleframe.ts +62 -0
- package/src/handlers/entity/pdfUnderlay.ts +94 -0
- package/src/handlers/entity/ray.ts +52 -0
- package/src/handlers/entity/region.ts +42 -0
- package/src/handlers/entity/shape.ts +73 -0
- package/src/handlers/entity/table.ts +49 -0
- package/src/handlers/entity/tolerance.ts +75 -0
- package/src/handlers/entity/trace.ts +72 -0
- package/src/handlers/entity/wipeout.ts +114 -0
- package/src/handlers/entity/xline.ts +52 -0
- package/src/handlers/objects.ts +379 -139
- package/src/handlers/tables.ts +134 -21
- package/src/index.ts +9 -18
- package/src/toJson.ts +8 -0
- package/src/toSVG.ts +143 -10
- package/src/types/dimension-entity.ts +11 -0
- package/src/types/entity.ts +30 -0
- package/src/types/helper.ts +2 -1
- package/src/types/image-entity.ts +35 -0
- package/src/types/index.ts +14 -0
- package/src/types/leader-entity.ts +40 -0
- package/src/types/mleader-entity.ts +8 -0
- package/src/types/mline-entity.ts +12 -0
- package/src/types/oleframe-entity.ts +40 -0
- package/src/types/options.ts +48 -0
- package/src/types/ray-entity.ts +12 -0
- package/src/types/region-entity.ts +11 -0
- package/src/types/shape-entity.ts +19 -0
- package/src/types/table-entity.ts +14 -0
- package/src/types/tables.ts +160 -0
- package/src/types/tolerance-entity.ts +20 -0
- package/src/types/trace-entity.ts +14 -0
- package/src/types/underlay-entity.ts +35 -0
- package/src/types/wipeout-entity.ts +20 -0
- package/src/types/xline-entity.ts +12 -0
- package/src/util/escapeXmlText.ts +10 -0
- package/tools/browser_test_server.cjs +87 -0
- package/tools/ezdxf_generate_dimensions_all_types.py +246 -0
- package/tools/ezdxf_generate_dimensions_angular_3p.py +59 -0
- package/tools/ezdxf_generate_dimensions_large_scale.py +87 -0
- package/tools/ezdxf_regenerate_problem_fixtures.py +184 -0
- package/tools/ezdxf_validate_fixtures.py +165 -0
- package/docs/DIMENSION_SUMMARY.md +0 -248
- package/docs/DIMENSION_SUMMARY.pt-BR.md +0 -248
- package/docs/IMPLEMENTED-2D-ENTITIES.md +0 -54
- package/docs/IMPLEMENTED-2D-ENTITIES.pt-BR.md +0 -54
- package/docs/TEXT-MTEXT-DIMENSION-SUPPORT.md +0 -241
- package/docs/TEXT-MTEXT-DIMENSION-SUPPORT.pt-BR.md +0 -169
|
@@ -36,35 +36,64 @@ var import_arc = __toESM(require("./entity/arc"), 1);
|
|
|
36
36
|
var import_attdef = __toESM(require("./entity/attdef"), 1);
|
|
37
37
|
var import_attrib = __toESM(require("./entity/attrib"), 1);
|
|
38
38
|
var import_circle = __toESM(require("./entity/circle"), 1);
|
|
39
|
+
var import_dgnUnderlay = __toESM(require("./entity/dgnUnderlay"), 1);
|
|
39
40
|
var import_dimension = __toESM(require("./entity/dimension"), 1);
|
|
41
|
+
var import_dwfUnderlay = __toESM(require("./entity/dwfUnderlay"), 1);
|
|
40
42
|
var import_ellipse = __toESM(require("./entity/ellipse"), 1);
|
|
41
43
|
var import_hatch = __toESM(require("./entity/hatch"), 1);
|
|
44
|
+
var import_image = __toESM(require("./entity/image"), 1);
|
|
42
45
|
var import_insert = __toESM(require("./entity/insert"), 1);
|
|
46
|
+
var import_leader = __toESM(require("./entity/leader"), 1);
|
|
43
47
|
var import_line = __toESM(require("./entity/line"), 1);
|
|
44
48
|
var import_lwpolyline = __toESM(require("./entity/lwpolyline"), 1);
|
|
49
|
+
var import_mleader = __toESM(require("./entity/mleader"), 1);
|
|
50
|
+
var import_mline = __toESM(require("./entity/mline"), 1);
|
|
45
51
|
var import_mtext = __toESM(require("./entity/mtext"), 1);
|
|
46
52
|
var import_ole2Frame = __toESM(require("./entity/ole2Frame"), 1);
|
|
53
|
+
var import_oleframe = __toESM(require("./entity/oleframe"), 1);
|
|
54
|
+
var import_pdfUnderlay = __toESM(require("./entity/pdfUnderlay"), 1);
|
|
47
55
|
var import_point = __toESM(require("./entity/point"), 1);
|
|
48
56
|
var import_polyline = __toESM(require("./entity/polyline"), 1);
|
|
57
|
+
var import_ray = __toESM(require("./entity/ray"), 1);
|
|
58
|
+
var import_region = __toESM(require("./entity/region"), 1);
|
|
59
|
+
var import_shape = __toESM(require("./entity/shape"), 1);
|
|
49
60
|
var import_solid = __toESM(require("./entity/solid"), 1);
|
|
50
61
|
var import_spline = __toESM(require("./entity/spline"), 1);
|
|
62
|
+
var import_table = __toESM(require("./entity/table"), 1);
|
|
51
63
|
var import_text = __toESM(require("./entity/text"), 1);
|
|
52
64
|
var import_threeDFace = __toESM(require("./entity/threeDFace"), 1);
|
|
65
|
+
var import_tolerance = __toESM(require("./entity/tolerance"), 1);
|
|
66
|
+
var import_trace = __toESM(require("./entity/trace"), 1);
|
|
53
67
|
var import_vertex = __toESM(require("./entity/vertex"), 1);
|
|
54
68
|
var import_viewport = __toESM(require("./entity/viewport"), 1);
|
|
69
|
+
var import_wipeout = __toESM(require("./entity/wipeout"), 1);
|
|
70
|
+
var import_xline = __toESM(require("./entity/xline"), 1);
|
|
55
71
|
const handlers = [
|
|
56
72
|
import_point.default,
|
|
57
73
|
import_line.default,
|
|
58
74
|
import_lwpolyline.default,
|
|
75
|
+
import_mline.default,
|
|
76
|
+
import_mleader.default,
|
|
59
77
|
import_polyline.default,
|
|
60
78
|
import_vertex.default,
|
|
61
79
|
import_circle.default,
|
|
62
80
|
import_arc.default,
|
|
63
81
|
import_ellipse.default,
|
|
64
82
|
import_spline.default,
|
|
83
|
+
import_table.default,
|
|
65
84
|
import_solid.default,
|
|
85
|
+
import_trace.default,
|
|
66
86
|
import_hatch.default,
|
|
87
|
+
import_image.default,
|
|
88
|
+
import_leader.default,
|
|
89
|
+
import_ray.default,
|
|
90
|
+
import_region.default,
|
|
91
|
+
import_dwfUnderlay.default,
|
|
92
|
+
import_dgnUnderlay.default,
|
|
93
|
+
import_pdfUnderlay.default,
|
|
94
|
+
import_shape.default,
|
|
67
95
|
import_mtext.default,
|
|
96
|
+
import_tolerance.default,
|
|
68
97
|
import_attdef.default,
|
|
69
98
|
import_attrib.default,
|
|
70
99
|
import_text.default,
|
|
@@ -72,13 +101,92 @@ const handlers = [
|
|
|
72
101
|
import_dimension.default,
|
|
73
102
|
import_threeDFace.default,
|
|
74
103
|
import_viewport.default,
|
|
75
|
-
import_ole2Frame.default
|
|
104
|
+
import_ole2Frame.default,
|
|
105
|
+
import_oleframe.default,
|
|
106
|
+
import_xline.default,
|
|
107
|
+
import_wipeout.default
|
|
76
108
|
].reduce((acc, mod) => {
|
|
77
109
|
acc[mod.TYPE] = mod;
|
|
78
110
|
return acc;
|
|
79
111
|
}, {});
|
|
112
|
+
class EntityGroupProcessor {
|
|
113
|
+
constructor() {
|
|
114
|
+
this.entities = [];
|
|
115
|
+
}
|
|
116
|
+
getEntities() {
|
|
117
|
+
return this.entities;
|
|
118
|
+
}
|
|
119
|
+
finalize() {
|
|
120
|
+
this.flushOpenPolyline("DXF ended with an open POLYLINE (missing SEQEND); flushing open polyline");
|
|
121
|
+
}
|
|
122
|
+
processGroup(tuples) {
|
|
123
|
+
const entityType = String(tuples[0][1]);
|
|
124
|
+
const contentTuples = tuples.slice(1);
|
|
125
|
+
switch (entityType) {
|
|
126
|
+
case "SEQEND":
|
|
127
|
+
this.endSequence();
|
|
128
|
+
break;
|
|
129
|
+
case "POLYLINE":
|
|
130
|
+
this.startPolyline(contentTuples);
|
|
131
|
+
break;
|
|
132
|
+
case "VERTEX":
|
|
133
|
+
this.addVertex(contentTuples);
|
|
134
|
+
break;
|
|
135
|
+
default:
|
|
136
|
+
this.addEntity(entityType, contentTuples);
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
parseEntity(entityType, contentTuples) {
|
|
141
|
+
const handler = handlers[entityType];
|
|
142
|
+
if (!handler) {
|
|
143
|
+
import_logger.default.warn("unsupported type in ENTITIES section:", entityType);
|
|
144
|
+
return void 0;
|
|
145
|
+
}
|
|
146
|
+
return handler.process(contentTuples);
|
|
147
|
+
}
|
|
148
|
+
flushOpenPolyline(reason) {
|
|
149
|
+
if (!this.currentPolyline) return;
|
|
150
|
+
import_logger.default.warn(reason);
|
|
151
|
+
this.currentPolyline = void 0;
|
|
152
|
+
}
|
|
153
|
+
endSequence() {
|
|
154
|
+
this.currentPolyline = void 0;
|
|
155
|
+
}
|
|
156
|
+
startPolyline(contentTuples) {
|
|
157
|
+
this.flushOpenPolyline(
|
|
158
|
+
"POLYLINE started while previous POLYLINE is still open; flushing previous polyline"
|
|
159
|
+
);
|
|
160
|
+
const e = this.parseEntity("POLYLINE", contentTuples);
|
|
161
|
+
if (!e) return;
|
|
162
|
+
this.currentPolyline = e;
|
|
163
|
+
this.entities.push(e);
|
|
164
|
+
}
|
|
165
|
+
addVertex(contentTuples) {
|
|
166
|
+
const e = this.parseEntity("VERTEX", contentTuples);
|
|
167
|
+
if (!e) return;
|
|
168
|
+
if (!this.currentPolyline) {
|
|
169
|
+
import_logger.default.error("ignoring invalid VERTEX entity");
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
this.currentPolyline.vertices.push(e);
|
|
173
|
+
}
|
|
174
|
+
addEntity(entityType, contentTuples) {
|
|
175
|
+
this.flushOpenPolyline("POLYLINE sequence ended without SEQEND; flushing open polyline");
|
|
176
|
+
const e = this.parseEntity(entityType, contentTuples);
|
|
177
|
+
if (!e) return;
|
|
178
|
+
this.entities.push(e);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
function processEntityGroups(entityGroups) {
|
|
182
|
+
const processor = new EntityGroupProcessor();
|
|
183
|
+
for (const tuples of entityGroups) {
|
|
184
|
+
processor.processGroup(tuples);
|
|
185
|
+
}
|
|
186
|
+
processor.finalize();
|
|
187
|
+
return processor.getEntities();
|
|
188
|
+
}
|
|
80
189
|
function parseEntities(tuples) {
|
|
81
|
-
const entities = [];
|
|
82
190
|
const entityGroups = [];
|
|
83
191
|
let currentEntityTuples = [];
|
|
84
192
|
for (const tuple of tuples) {
|
|
@@ -89,30 +197,6 @@ function parseEntities(tuples) {
|
|
|
89
197
|
}
|
|
90
198
|
currentEntityTuples.push(tuple);
|
|
91
199
|
}
|
|
92
|
-
|
|
93
|
-
for (const tuples2 of entityGroups) {
|
|
94
|
-
const entityType = tuples2[0][1];
|
|
95
|
-
const contentTuples = tuples2.slice(1);
|
|
96
|
-
if (entityType in handlers) {
|
|
97
|
-
const e = handlers[entityType].process(contentTuples);
|
|
98
|
-
if (entityType === "POLYLINE") {
|
|
99
|
-
currentPolyline = e;
|
|
100
|
-
entities.push(e);
|
|
101
|
-
} else if (entityType === "VERTEX") {
|
|
102
|
-
if (currentPolyline) {
|
|
103
|
-
currentPolyline.vertices.push(e);
|
|
104
|
-
} else {
|
|
105
|
-
import_logger.default.error("ignoring invalid VERTEX entity");
|
|
106
|
-
}
|
|
107
|
-
} else if (entityType === "SEQEND") {
|
|
108
|
-
currentPolyline = void 0;
|
|
109
|
-
} else {
|
|
110
|
-
entities.push(e);
|
|
111
|
-
}
|
|
112
|
-
} else {
|
|
113
|
-
import_logger.default.warn("unsupported type in ENTITIES section:", entityType);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return entities;
|
|
200
|
+
return processEntityGroups(entityGroups);
|
|
117
201
|
}
|
|
118
202
|
//# sourceMappingURL=entities.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/handlers/entities.ts"],
|
|
4
|
-
"sourcesContent": ["import type { DXFTuple } from '../types/dxf'\nimport type { Entity } from '../types/entity'\nimport type { PolylineEntity } from '../types/polyline-entity'\n\nimport logger from '../util/logger'\nimport arc from './entity/arc'\nimport attdef from './entity/attdef'\nimport attrib from './entity/attrib'\nimport circle from './entity/circle'\nimport dimension from './entity/dimension'\nimport ellipse from './entity/ellipse'\nimport hatch from './entity/hatch'\nimport insert from './entity/insert'\nimport line from './entity/line'\nimport lwpolyline from './entity/lwpolyline'\nimport mtext from './entity/mtext'\nimport ole2Frame from './entity/ole2Frame'\nimport point from './entity/point'\nimport polyline from './entity/polyline'\nimport solid from './entity/solid'\nimport spline from './entity/spline'\nimport text from './entity/text'\nimport threeDFace from './entity/threeDFace'\nimport vertex from './entity/vertex'\nimport viewport from './entity/viewport'\n\ninterface EntityHandler {\n TYPE: string\n process: (tuples: DXFTuple[]) => Entity\n}\n\nconst handlers: Record<string, EntityHandler> = [\n point,\n line,\n lwpolyline,\n polyline,\n vertex,\n circle,\n arc,\n ellipse,\n spline,\n solid,\n hatch,\n mtext,\n attdef,\n attrib,\n text,\n insert,\n dimension,\n threeDFace,\n viewport,\n ole2Frame,\n].reduce((acc, mod) => {\n acc[mod.TYPE] = mod\n return acc\n}, {} as Record<string, EntityHandler>)\n\n/**\n * Parses entities from DXF tuples\n *\n * @param tuples - Array of DXF tuples representing entities\n * @returns Array of parsed entities\n */\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,oBAAmB;AACnB,iBAAgB;AAChB,oBAAmB;AACnB,oBAAmB;AACnB,oBAAmB;AACnB,uBAAsB;AACtB,qBAAoB;AACpB,mBAAkB;AAClB,oBAAmB;AACnB,kBAAiB;AACjB,wBAAuB;AACvB,mBAAkB;AAClB,uBAAsB;AACtB,mBAAkB;AAClB,sBAAqB;AACrB,mBAAkB;AAClB,oBAAmB;AACnB,kBAAiB;AACjB,wBAAuB;AACvB,oBAAmB;AACnB,sBAAqB;
|
|
6
|
-
"names": ["point", "line", "lwpolyline", "polyline", "vertex", "circle", "arc", "ellipse", "spline", "solid", "hatch", "mtext", "attdef", "attrib", "text", "insert", "dimension", "threeDFace", "viewport", "ole2Frame", "
|
|
4
|
+
"sourcesContent": ["import type { DXFTuple } from '../types/dxf'\nimport type { Entity } from '../types/entity'\nimport type { PolylineEntity, Vertex } from '../types/polyline-entity'\n\nimport logger from '../util/logger'\nimport arc from './entity/arc'\nimport attdef from './entity/attdef'\nimport attrib from './entity/attrib'\nimport circle from './entity/circle'\nimport dgnUnderlay from './entity/dgnUnderlay'\nimport dimension from './entity/dimension'\nimport dwfUnderlay from './entity/dwfUnderlay'\nimport ellipse from './entity/ellipse'\nimport hatch from './entity/hatch'\nimport image from './entity/image'\nimport insert from './entity/insert'\nimport leader from './entity/leader'\nimport line from './entity/line'\nimport lwpolyline from './entity/lwpolyline'\nimport mleader from './entity/mleader'\nimport mline from './entity/mline'\nimport mtext from './entity/mtext'\nimport ole2Frame from './entity/ole2Frame'\nimport oleFrame from './entity/oleframe'\nimport pdfUnderlay from './entity/pdfUnderlay'\nimport point from './entity/point'\nimport polyline from './entity/polyline'\nimport ray from './entity/ray'\nimport region from './entity/region'\nimport shape from './entity/shape'\nimport solid from './entity/solid'\nimport spline from './entity/spline'\nimport table from './entity/table'\nimport text from './entity/text'\nimport threeDFace from './entity/threeDFace'\nimport tolerance from './entity/tolerance'\nimport trace from './entity/trace'\nimport vertex from './entity/vertex'\nimport viewport from './entity/viewport'\nimport wipeout from './entity/wipeout'\nimport xline from './entity/xline'\n\ninterface EntityHandler {\n TYPE: string\n process: (tuples: DXFTuple[]) => Entity\n}\n\nconst handlers: Record<string, EntityHandler> = [\n point,\n line,\n lwpolyline,\n mline,\n mleader,\n polyline,\n vertex,\n circle,\n arc,\n ellipse,\n spline,\n table,\n solid,\n trace,\n hatch,\n image,\n leader,\n ray,\n region,\n dwfUnderlay,\n dgnUnderlay,\n pdfUnderlay,\n shape,\n mtext,\n tolerance,\n attdef,\n attrib,\n text,\n insert,\n dimension,\n threeDFace,\n viewport,\n ole2Frame,\n oleFrame,\n xline,\n wipeout,\n].reduce((acc, mod) => {\n acc[mod.TYPE] = mod\n return acc\n}, {} as Record<string, EntityHandler>)\n\n/**\n * Parses entities from DXF tuples\n *\n * @param tuples - Array of DXF tuples representing entities\n * @returns Array of parsed entities\n */\nclass EntityGroupProcessor {\n private readonly entities: Entity[] = []\n private currentPolyline: PolylineEntity | undefined\n\n getEntities(): Entity[] {\n return this.entities\n }\n\n finalize(): void {\n this.flushOpenPolyline('DXF ended with an open POLYLINE (missing SEQEND); flushing open polyline')\n }\n\n processGroup(tuples: DXFTuple[]): void {\n const entityType = String(tuples[0][1])\n const contentTuples = tuples.slice(1)\n\n switch (entityType) {\n case 'SEQEND':\n this.endSequence()\n break\n case 'POLYLINE':\n this.startPolyline(contentTuples)\n break\n case 'VERTEX':\n this.addVertex(contentTuples)\n break\n default:\n this.addEntity(entityType, contentTuples)\n break\n }\n }\n\n private parseEntity(entityType: string, contentTuples: DXFTuple[]): Entity | undefined {\n const handler = handlers[entityType]\n if (!handler) {\n logger.warn('unsupported type in ENTITIES section:', entityType)\n return undefined\n }\n return handler.process(contentTuples)\n }\n\n private flushOpenPolyline(reason: string): void {\n if (!this.currentPolyline) return\n logger.warn(reason)\n this.currentPolyline = undefined\n }\n\n private endSequence(): void {\n // SEQEND may also terminate other sequences (e.g. INSERT attributes).\n // Only treat it as significant when we're inside a POLYLINE sequence.\n this.currentPolyline = undefined\n }\n\n private startPolyline(contentTuples: DXFTuple[]): void {\n this.flushOpenPolyline(\n 'POLYLINE started while previous POLYLINE is still open; flushing previous polyline',\n )\n\n const e = this.parseEntity('POLYLINE', contentTuples)\n if (!e) return\n\n this.currentPolyline = e as PolylineEntity\n this.entities.push(e)\n }\n\n private addVertex(contentTuples: DXFTuple[]): void {\n const e = this.parseEntity('VERTEX', contentTuples)\n if (!e) return\n\n if (!this.currentPolyline) {\n logger.error('ignoring invalid VERTEX entity')\n return\n }\n\n this.currentPolyline.vertices.push(e as Vertex)\n }\n\n private addEntity(entityType: string, contentTuples: DXFTuple[]): void {\n this.flushOpenPolyline('POLYLINE sequence ended without SEQEND; flushing open polyline')\n\n const e = this.parseEntity(entityType, contentTuples)\n if (!e) return\n this.entities.push(e)\n }\n}\n\nfunction processEntityGroups(entityGroups: DXFTuple[][]): Entity[] {\n const processor = new EntityGroupProcessor()\n for (const tuples of entityGroups) {\n processor.processGroup(tuples)\n }\n processor.finalize()\n return processor.getEntities()\n}\n\nexport default function parseEntities(tuples: DXFTuple[]): Entity[] {\n const entityGroups: DXFTuple[][] = []\n let currentEntityTuples: DXFTuple[] = []\n\n // First group them together for easy processing\n for (const tuple of tuples) {\n const type = tuple[0]\n if (type === 0) {\n currentEntityTuples = []\n entityGroups.push(currentEntityTuples)\n }\n currentEntityTuples.push(tuple)\n }\n\n return processEntityGroups(entityGroups)\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AA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IAAI,KAAK,YAAY,UAAU,aAAa;AAClD,QAAI,CAAC,EAAG;AAER,QAAI,CAAC,KAAK,iBAAiB;AACzB,oBAAAA,QAAO,MAAM,gCAAgC;AAC7C;AAAA,IACF;AAEA,SAAK,gBAAgB,SAAS,KAAK,CAAW;AAAA,EAChD;AAAA,EAEQ,UAAU,YAAoB,eAAiC;AACrE,SAAK,kBAAkB,gEAAgE;AAEvF,UAAM,IAAI,KAAK,YAAY,YAAY,aAAa;AACpD,QAAI,CAAC,EAAG;AACR,SAAK,SAAS,KAAK,CAAC;AAAA,EACtB;AACF;AAEA,SAAS,oBAAoB,cAAsC;AACjE,QAAM,YAAY,IAAI,qBAAqB;AAC3C,aAAW,UAAU,cAAc;AACjC,cAAU,aAAa,MAAM;AAAA,EAC/B;AACA,YAAU,SAAS;AACnB,SAAO,UAAU,YAAY;AAC/B;AAEe,SAAR,cAA+B,QAA8B;AAClE,QAAM,eAA6B,CAAC;AACpC,MAAI,sBAAkC,CAAC;AAGvC,aAAW,SAAS,QAAQ;AAC1B,UAAM,OAAO,MAAM,CAAC;AACpB,QAAI,SAAS,GAAG;AACd,4BAAsB,CAAC;AACvB,mBAAa,KAAK,mBAAmB;AAAA,IACvC;AACA,wBAAoB,KAAK,KAAK;AAAA,EAChC;AAEA,SAAO,oBAAoB,YAAY;AACzC;",
|
|
6
|
+
"names": ["point", "line", "lwpolyline", "mline", "mleader", "polyline", "vertex", "circle", "arc", "ellipse", "spline", "table", "solid", "trace", "hatch", "image", "leader", "ray", "region", "dwfUnderlay", "dgnUnderlay", "pdfUnderlay", "shape", "mtext", "tolerance", "attdef", "attrib", "text", "insert", "dimension", "threeDFace", "viewport", "ole2Frame", "oleFrame", "xline", "wipeout", "logger"]
|
|
7
7
|
}
|
package/lib/handlers/entities.js
CHANGED
|
@@ -3,35 +3,64 @@ import arc from "./entity/arc";
|
|
|
3
3
|
import attdef from "./entity/attdef";
|
|
4
4
|
import attrib from "./entity/attrib";
|
|
5
5
|
import circle from "./entity/circle";
|
|
6
|
+
import dgnUnderlay from "./entity/dgnUnderlay";
|
|
6
7
|
import dimension from "./entity/dimension";
|
|
8
|
+
import dwfUnderlay from "./entity/dwfUnderlay";
|
|
7
9
|
import ellipse from "./entity/ellipse";
|
|
8
10
|
import hatch from "./entity/hatch";
|
|
11
|
+
import image from "./entity/image";
|
|
9
12
|
import insert from "./entity/insert";
|
|
13
|
+
import leader from "./entity/leader";
|
|
10
14
|
import line from "./entity/line";
|
|
11
15
|
import lwpolyline from "./entity/lwpolyline";
|
|
16
|
+
import mleader from "./entity/mleader";
|
|
17
|
+
import mline from "./entity/mline";
|
|
12
18
|
import mtext from "./entity/mtext";
|
|
13
19
|
import ole2Frame from "./entity/ole2Frame";
|
|
20
|
+
import oleFrame from "./entity/oleframe";
|
|
21
|
+
import pdfUnderlay from "./entity/pdfUnderlay";
|
|
14
22
|
import point from "./entity/point";
|
|
15
23
|
import polyline from "./entity/polyline";
|
|
24
|
+
import ray from "./entity/ray";
|
|
25
|
+
import region from "./entity/region";
|
|
26
|
+
import shape from "./entity/shape";
|
|
16
27
|
import solid from "./entity/solid";
|
|
17
28
|
import spline from "./entity/spline";
|
|
29
|
+
import table from "./entity/table";
|
|
18
30
|
import text from "./entity/text";
|
|
19
31
|
import threeDFace from "./entity/threeDFace";
|
|
32
|
+
import tolerance from "./entity/tolerance";
|
|
33
|
+
import trace from "./entity/trace";
|
|
20
34
|
import vertex from "./entity/vertex";
|
|
21
35
|
import viewport from "./entity/viewport";
|
|
36
|
+
import wipeout from "./entity/wipeout";
|
|
37
|
+
import xline from "./entity/xline";
|
|
22
38
|
const handlers = [
|
|
23
39
|
point,
|
|
24
40
|
line,
|
|
25
41
|
lwpolyline,
|
|
42
|
+
mline,
|
|
43
|
+
mleader,
|
|
26
44
|
polyline,
|
|
27
45
|
vertex,
|
|
28
46
|
circle,
|
|
29
47
|
arc,
|
|
30
48
|
ellipse,
|
|
31
49
|
spline,
|
|
50
|
+
table,
|
|
32
51
|
solid,
|
|
52
|
+
trace,
|
|
33
53
|
hatch,
|
|
54
|
+
image,
|
|
55
|
+
leader,
|
|
56
|
+
ray,
|
|
57
|
+
region,
|
|
58
|
+
dwfUnderlay,
|
|
59
|
+
dgnUnderlay,
|
|
60
|
+
pdfUnderlay,
|
|
61
|
+
shape,
|
|
34
62
|
mtext,
|
|
63
|
+
tolerance,
|
|
35
64
|
attdef,
|
|
36
65
|
attrib,
|
|
37
66
|
text,
|
|
@@ -39,13 +68,92 @@ const handlers = [
|
|
|
39
68
|
dimension,
|
|
40
69
|
threeDFace,
|
|
41
70
|
viewport,
|
|
42
|
-
ole2Frame
|
|
71
|
+
ole2Frame,
|
|
72
|
+
oleFrame,
|
|
73
|
+
xline,
|
|
74
|
+
wipeout
|
|
43
75
|
].reduce((acc, mod) => {
|
|
44
76
|
acc[mod.TYPE] = mod;
|
|
45
77
|
return acc;
|
|
46
78
|
}, {});
|
|
79
|
+
class EntityGroupProcessor {
|
|
80
|
+
constructor() {
|
|
81
|
+
this.entities = [];
|
|
82
|
+
}
|
|
83
|
+
getEntities() {
|
|
84
|
+
return this.entities;
|
|
85
|
+
}
|
|
86
|
+
finalize() {
|
|
87
|
+
this.flushOpenPolyline("DXF ended with an open POLYLINE (missing SEQEND); flushing open polyline");
|
|
88
|
+
}
|
|
89
|
+
processGroup(tuples) {
|
|
90
|
+
const entityType = String(tuples[0][1]);
|
|
91
|
+
const contentTuples = tuples.slice(1);
|
|
92
|
+
switch (entityType) {
|
|
93
|
+
case "SEQEND":
|
|
94
|
+
this.endSequence();
|
|
95
|
+
break;
|
|
96
|
+
case "POLYLINE":
|
|
97
|
+
this.startPolyline(contentTuples);
|
|
98
|
+
break;
|
|
99
|
+
case "VERTEX":
|
|
100
|
+
this.addVertex(contentTuples);
|
|
101
|
+
break;
|
|
102
|
+
default:
|
|
103
|
+
this.addEntity(entityType, contentTuples);
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
parseEntity(entityType, contentTuples) {
|
|
108
|
+
const handler = handlers[entityType];
|
|
109
|
+
if (!handler) {
|
|
110
|
+
logger.warn("unsupported type in ENTITIES section:", entityType);
|
|
111
|
+
return void 0;
|
|
112
|
+
}
|
|
113
|
+
return handler.process(contentTuples);
|
|
114
|
+
}
|
|
115
|
+
flushOpenPolyline(reason) {
|
|
116
|
+
if (!this.currentPolyline) return;
|
|
117
|
+
logger.warn(reason);
|
|
118
|
+
this.currentPolyline = void 0;
|
|
119
|
+
}
|
|
120
|
+
endSequence() {
|
|
121
|
+
this.currentPolyline = void 0;
|
|
122
|
+
}
|
|
123
|
+
startPolyline(contentTuples) {
|
|
124
|
+
this.flushOpenPolyline(
|
|
125
|
+
"POLYLINE started while previous POLYLINE is still open; flushing previous polyline"
|
|
126
|
+
);
|
|
127
|
+
const e = this.parseEntity("POLYLINE", contentTuples);
|
|
128
|
+
if (!e) return;
|
|
129
|
+
this.currentPolyline = e;
|
|
130
|
+
this.entities.push(e);
|
|
131
|
+
}
|
|
132
|
+
addVertex(contentTuples) {
|
|
133
|
+
const e = this.parseEntity("VERTEX", contentTuples);
|
|
134
|
+
if (!e) return;
|
|
135
|
+
if (!this.currentPolyline) {
|
|
136
|
+
logger.error("ignoring invalid VERTEX entity");
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
this.currentPolyline.vertices.push(e);
|
|
140
|
+
}
|
|
141
|
+
addEntity(entityType, contentTuples) {
|
|
142
|
+
this.flushOpenPolyline("POLYLINE sequence ended without SEQEND; flushing open polyline");
|
|
143
|
+
const e = this.parseEntity(entityType, contentTuples);
|
|
144
|
+
if (!e) return;
|
|
145
|
+
this.entities.push(e);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function processEntityGroups(entityGroups) {
|
|
149
|
+
const processor = new EntityGroupProcessor();
|
|
150
|
+
for (const tuples of entityGroups) {
|
|
151
|
+
processor.processGroup(tuples);
|
|
152
|
+
}
|
|
153
|
+
processor.finalize();
|
|
154
|
+
return processor.getEntities();
|
|
155
|
+
}
|
|
47
156
|
function parseEntities(tuples) {
|
|
48
|
-
const entities = [];
|
|
49
157
|
const entityGroups = [];
|
|
50
158
|
let currentEntityTuples = [];
|
|
51
159
|
for (const tuple of tuples) {
|
|
@@ -56,31 +164,7 @@ function parseEntities(tuples) {
|
|
|
56
164
|
}
|
|
57
165
|
currentEntityTuples.push(tuple);
|
|
58
166
|
}
|
|
59
|
-
|
|
60
|
-
for (const tuples2 of entityGroups) {
|
|
61
|
-
const entityType = tuples2[0][1];
|
|
62
|
-
const contentTuples = tuples2.slice(1);
|
|
63
|
-
if (entityType in handlers) {
|
|
64
|
-
const e = handlers[entityType].process(contentTuples);
|
|
65
|
-
if (entityType === "POLYLINE") {
|
|
66
|
-
currentPolyline = e;
|
|
67
|
-
entities.push(e);
|
|
68
|
-
} else if (entityType === "VERTEX") {
|
|
69
|
-
if (currentPolyline) {
|
|
70
|
-
currentPolyline.vertices.push(e);
|
|
71
|
-
} else {
|
|
72
|
-
logger.error("ignoring invalid VERTEX entity");
|
|
73
|
-
}
|
|
74
|
-
} else if (entityType === "SEQEND") {
|
|
75
|
-
currentPolyline = void 0;
|
|
76
|
-
} else {
|
|
77
|
-
entities.push(e);
|
|
78
|
-
}
|
|
79
|
-
} else {
|
|
80
|
-
logger.warn("unsupported type in ENTITIES section:", entityType);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return entities;
|
|
167
|
+
return processEntityGroups(entityGroups);
|
|
84
168
|
}
|
|
85
169
|
export {
|
|
86
170
|
parseEntities as default
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/handlers/entities.ts"],
|
|
4
|
-
"sourcesContent": ["import type { DXFTuple } from '../types/dxf'\nimport type { Entity } from '../types/entity'\nimport type { PolylineEntity } from '../types/polyline-entity'\n\nimport logger from '../util/logger'\nimport arc from './entity/arc'\nimport attdef from './entity/attdef'\nimport attrib from './entity/attrib'\nimport circle from './entity/circle'\nimport dimension from './entity/dimension'\nimport ellipse from './entity/ellipse'\nimport hatch from './entity/hatch'\nimport insert from './entity/insert'\nimport line from './entity/line'\nimport lwpolyline from './entity/lwpolyline'\nimport mtext from './entity/mtext'\nimport ole2Frame from './entity/ole2Frame'\nimport point from './entity/point'\nimport polyline from './entity/polyline'\nimport solid from './entity/solid'\nimport spline from './entity/spline'\nimport text from './entity/text'\nimport threeDFace from './entity/threeDFace'\nimport vertex from './entity/vertex'\nimport viewport from './entity/viewport'\n\ninterface EntityHandler {\n TYPE: string\n process: (tuples: DXFTuple[]) => Entity\n}\n\nconst handlers: Record<string, EntityHandler> = [\n point,\n line,\n lwpolyline,\n polyline,\n vertex,\n circle,\n arc,\n ellipse,\n spline,\n solid,\n hatch,\n mtext,\n attdef,\n attrib,\n text,\n insert,\n dimension,\n threeDFace,\n viewport,\n ole2Frame,\n].reduce((acc, mod) => {\n acc[mod.TYPE] = mod\n return acc\n}, {} as Record<string, EntityHandler>)\n\n/**\n * Parses entities from DXF tuples\n *\n * @param tuples - Array of DXF tuples representing entities\n * @returns Array of parsed entities\n */\
|
|
5
|
-
"mappings": "AAIA,OAAO,YAAY;AACnB,OAAO,SAAS;AAChB,OAAO,YAAY;AACnB,OAAO,YAAY;AACnB,OAAO,YAAY;AACnB,OAAO,eAAe;AACtB,OAAO,aAAa;AACpB,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,UAAU;AACjB,OAAO,gBAAgB;AACvB,OAAO,WAAW;AAClB,OAAO,eAAe;AACtB,OAAO,WAAW;AAClB,OAAO,cAAc;AACrB,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,UAAU;AACjB,OAAO,gBAAgB;AACvB,OAAO,YAAY;AACnB,OAAO,cAAc;
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import type { DXFTuple } from '../types/dxf'\nimport type { Entity } from '../types/entity'\nimport type { PolylineEntity, Vertex } from '../types/polyline-entity'\n\nimport logger from '../util/logger'\nimport arc from './entity/arc'\nimport attdef from './entity/attdef'\nimport attrib from './entity/attrib'\nimport circle from './entity/circle'\nimport dgnUnderlay from './entity/dgnUnderlay'\nimport dimension from './entity/dimension'\nimport dwfUnderlay from './entity/dwfUnderlay'\nimport ellipse from './entity/ellipse'\nimport hatch from './entity/hatch'\nimport image from './entity/image'\nimport insert from './entity/insert'\nimport leader from './entity/leader'\nimport line from './entity/line'\nimport lwpolyline from './entity/lwpolyline'\nimport mleader from './entity/mleader'\nimport mline from './entity/mline'\nimport mtext from './entity/mtext'\nimport ole2Frame from './entity/ole2Frame'\nimport oleFrame from './entity/oleframe'\nimport pdfUnderlay from './entity/pdfUnderlay'\nimport point from './entity/point'\nimport polyline from './entity/polyline'\nimport ray from './entity/ray'\nimport region from './entity/region'\nimport shape from './entity/shape'\nimport solid from './entity/solid'\nimport spline from './entity/spline'\nimport table from './entity/table'\nimport text from './entity/text'\nimport threeDFace from './entity/threeDFace'\nimport tolerance from './entity/tolerance'\nimport trace from './entity/trace'\nimport vertex from './entity/vertex'\nimport viewport from './entity/viewport'\nimport wipeout from './entity/wipeout'\nimport xline from './entity/xline'\n\ninterface EntityHandler {\n TYPE: string\n process: (tuples: DXFTuple[]) => Entity\n}\n\nconst handlers: Record<string, EntityHandler> = [\n point,\n line,\n lwpolyline,\n mline,\n mleader,\n polyline,\n vertex,\n circle,\n arc,\n ellipse,\n spline,\n table,\n solid,\n trace,\n hatch,\n image,\n leader,\n ray,\n region,\n dwfUnderlay,\n dgnUnderlay,\n pdfUnderlay,\n shape,\n mtext,\n tolerance,\n attdef,\n attrib,\n text,\n insert,\n dimension,\n threeDFace,\n viewport,\n ole2Frame,\n oleFrame,\n xline,\n wipeout,\n].reduce((acc, mod) => {\n acc[mod.TYPE] = mod\n return acc\n}, {} as Record<string, EntityHandler>)\n\n/**\n * Parses entities from DXF tuples\n *\n * @param tuples - Array of DXF tuples representing entities\n * @returns Array of parsed entities\n */\nclass EntityGroupProcessor {\n private readonly entities: Entity[] = []\n private currentPolyline: PolylineEntity | undefined\n\n getEntities(): Entity[] {\n return this.entities\n }\n\n finalize(): void {\n this.flushOpenPolyline('DXF ended with an open POLYLINE (missing SEQEND); flushing open polyline')\n }\n\n processGroup(tuples: DXFTuple[]): void {\n const entityType = String(tuples[0][1])\n const contentTuples = tuples.slice(1)\n\n switch (entityType) {\n case 'SEQEND':\n this.endSequence()\n break\n case 'POLYLINE':\n this.startPolyline(contentTuples)\n break\n case 'VERTEX':\n this.addVertex(contentTuples)\n break\n default:\n this.addEntity(entityType, contentTuples)\n break\n }\n }\n\n private parseEntity(entityType: string, contentTuples: DXFTuple[]): Entity | undefined {\n const handler = handlers[entityType]\n if (!handler) {\n logger.warn('unsupported type in ENTITIES section:', entityType)\n return undefined\n }\n return handler.process(contentTuples)\n }\n\n private flushOpenPolyline(reason: string): void {\n if (!this.currentPolyline) return\n logger.warn(reason)\n this.currentPolyline = undefined\n }\n\n private endSequence(): void {\n // SEQEND may also terminate other sequences (e.g. INSERT attributes).\n // Only treat it as significant when we're inside a POLYLINE sequence.\n this.currentPolyline = undefined\n }\n\n private startPolyline(contentTuples: DXFTuple[]): void {\n this.flushOpenPolyline(\n 'POLYLINE started while previous POLYLINE is still open; flushing previous polyline',\n )\n\n const e = this.parseEntity('POLYLINE', contentTuples)\n if (!e) return\n\n this.currentPolyline = e as PolylineEntity\n this.entities.push(e)\n }\n\n private addVertex(contentTuples: DXFTuple[]): void {\n const e = this.parseEntity('VERTEX', contentTuples)\n if (!e) return\n\n if (!this.currentPolyline) {\n logger.error('ignoring invalid VERTEX entity')\n return\n }\n\n this.currentPolyline.vertices.push(e as Vertex)\n }\n\n private addEntity(entityType: string, contentTuples: DXFTuple[]): void {\n this.flushOpenPolyline('POLYLINE sequence ended without SEQEND; flushing open polyline')\n\n const e = this.parseEntity(entityType, contentTuples)\n if (!e) return\n this.entities.push(e)\n }\n}\n\nfunction processEntityGroups(entityGroups: DXFTuple[][]): Entity[] {\n const processor = new EntityGroupProcessor()\n for (const tuples of entityGroups) {\n processor.processGroup(tuples)\n }\n processor.finalize()\n return processor.getEntities()\n}\n\nexport default function parseEntities(tuples: DXFTuple[]): Entity[] {\n const entityGroups: DXFTuple[][] = []\n let currentEntityTuples: DXFTuple[] = []\n\n // First group them together for easy processing\n for (const tuple of tuples) {\n const type = tuple[0]\n if (type === 0) {\n currentEntityTuples = []\n entityGroups.push(currentEntityTuples)\n }\n currentEntityTuples.push(tuple)\n }\n\n return processEntityGroups(entityGroups)\n}\n"],
|
|
5
|
+
"mappings": "AAIA,OAAO,YAAY;AACnB,OAAO,SAAS;AAChB,OAAO,YAAY;AACnB,OAAO,YAAY;AACnB,OAAO,YAAY;AACnB,OAAO,iBAAiB;AACxB,OAAO,eAAe;AACtB,OAAO,iBAAiB;AACxB,OAAO,aAAa;AACpB,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,YAAY;AACnB,OAAO,UAAU;AACjB,OAAO,gBAAgB;AACvB,OAAO,aAAa;AACpB,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,eAAe;AACtB,OAAO,cAAc;AACrB,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,OAAO,cAAc;AACrB,OAAO,SAAS;AAChB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,gBAAgB;AACvB,OAAO,eAAe;AACtB,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,cAAc;AACrB,OAAO,aAAa;AACpB,OAAO,WAAW;AAOlB,MAAM,WAA0C;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,E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,MACH;AAAA,IACF;AAEA,UAAM,IAAI,KAAK,YAAY,YAAY,aAAa;AACpD,QAAI,CAAC,EAAG;AAER,SAAK,kBAAkB;AACvB,SAAK,SAAS,KAAK,CAAC;AAAA,EACtB;AAAA,EAEQ,UAAU,eAAiC;AACjD,UAAM,IAAI,KAAK,YAAY,UAAU,aAAa;AAClD,QAAI,CAAC,EAAG;AAER,QAAI,CAAC,KAAK,iBAAiB;AACzB,aAAO,MAAM,gCAAgC;AAC7C;AAAA,IACF;AAEA,SAAK,gBAAgB,SAAS,KAAK,CAAW;AAAA,EAChD;AAAA,EAEQ,UAAU,YAAoB,eAAiC;AACrE,SAAK,kBAAkB,gEAAgE;AAEvF,UAAM,IAAI,KAAK,YAAY,YAAY,aAAa;AACpD,QAAI,CAAC,EAAG;AACR,SAAK,SAAS,KAAK,CAAC;AAAA,EACtB;AACF;AAEA,SAAS,oBAAoB,cAAsC;AACjE,QAAM,YAAY,IAAI,qBAAqB;AAC3C,aAAW,UAAU,cAAc;AACjC,cAAU,aAAa,MAAM;AAAA,EAC/B;AACA,YAAU,SAAS;AACnB,SAAO,UAAU,YAAY;AAC/B;AAEe,SAAR,cAA+B,QAA8B;AAClE,QAAM,eAA6B,CAAC;AACpC,MAAI,sBAAkC,CAAC;AAGvC,aAAW,SAAS,QAAQ;AAC1B,UAAM,OAAO,MAAM,CAAC;AACpB,QAAI,SAAS,GAAG;AACd,4BAAsB,CAAC;AACvB,mBAAa,KAAK,mBAAmB;AAAA,IACvC;AACA,wBAAoB,KAAK,KAAK;AAAA,EAChC;AAEA,SAAO,oBAAoB,YAAY;AACzC;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var dgnUnderlay_exports = {};
|
|
30
|
+
__export(dgnUnderlay_exports, {
|
|
31
|
+
TYPE: () => TYPE,
|
|
32
|
+
default: () => dgnUnderlay_default,
|
|
33
|
+
process: () => process
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(dgnUnderlay_exports);
|
|
36
|
+
var import_common = __toESM(require("./common"), 1);
|
|
37
|
+
const TYPE = "DGNUNDERLAY";
|
|
38
|
+
const process = (tuples) => {
|
|
39
|
+
return tuples.reduce(
|
|
40
|
+
(entity, tuple) => {
|
|
41
|
+
const type = tuple[0];
|
|
42
|
+
const value = tuple[1];
|
|
43
|
+
switch (type) {
|
|
44
|
+
case 340:
|
|
45
|
+
entity.underlayDefinitionHandle = String(value);
|
|
46
|
+
break;
|
|
47
|
+
case 10:
|
|
48
|
+
entity.insertionPoint.x = value;
|
|
49
|
+
break;
|
|
50
|
+
case 20:
|
|
51
|
+
entity.insertionPoint.y = value;
|
|
52
|
+
break;
|
|
53
|
+
case 30:
|
|
54
|
+
entity.insertionPoint.z = value;
|
|
55
|
+
break;
|
|
56
|
+
case 41:
|
|
57
|
+
entity.scale.x = value;
|
|
58
|
+
break;
|
|
59
|
+
case 42:
|
|
60
|
+
entity.scale.y = value;
|
|
61
|
+
break;
|
|
62
|
+
case 43:
|
|
63
|
+
entity.scale.z = value;
|
|
64
|
+
break;
|
|
65
|
+
case 50:
|
|
66
|
+
entity.rotation = value;
|
|
67
|
+
break;
|
|
68
|
+
case 210:
|
|
69
|
+
entity.normal.x = value;
|
|
70
|
+
break;
|
|
71
|
+
case 220:
|
|
72
|
+
entity.normal.y = value;
|
|
73
|
+
break;
|
|
74
|
+
case 230:
|
|
75
|
+
entity.normal.z = value;
|
|
76
|
+
break;
|
|
77
|
+
case 280:
|
|
78
|
+
entity.flags = value;
|
|
79
|
+
break;
|
|
80
|
+
case 281:
|
|
81
|
+
entity.contrast = value;
|
|
82
|
+
break;
|
|
83
|
+
case 282:
|
|
84
|
+
entity.fade = value;
|
|
85
|
+
break;
|
|
86
|
+
default:
|
|
87
|
+
Object.assign(entity, (0, import_common.default)(type, value));
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
return entity;
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: TYPE,
|
|
94
|
+
insertionPoint: { x: 0, y: 0, z: 0 },
|
|
95
|
+
scale: { x: 1, y: 1, z: 1 },
|
|
96
|
+
normal: { x: 0, y: 0, z: 1 }
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
};
|
|
100
|
+
var dgnUnderlay_default = { TYPE, process };
|
|
101
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
102
|
+
0 && (module.exports = {
|
|
103
|
+
TYPE,
|
|
104
|
+
process
|
|
105
|
+
});
|
|
106
|
+
//# sourceMappingURL=dgnUnderlay.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/handlers/entity/dgnUnderlay.ts"],
|
|
4
|
+
"sourcesContent": ["import type { DXFTuple } from '../../types'\n\nimport common from './common'\n\nexport const TYPE = 'DGNUNDERLAY'\n\ninterface UnderlayEntity {\n type: typeof TYPE\n\n insertionPoint: { x: number; y: number; z: number }\n scale: { x: number; y: number; z: number }\n normal: { x: number; y: number; z: number }\n\n underlayDefinitionHandle?: string\n rotation?: number\n flags?: number\n contrast?: number\n fade?: number\n\n [key: string]: unknown\n}\n\nexport const process = (tuples: DXFTuple[]): UnderlayEntity => {\n return tuples.reduce(\n (entity, tuple) => {\n const type = tuple[0]\n const value = tuple[1]\n\n switch (type) {\n case 340:\n entity.underlayDefinitionHandle = String(value)\n break\n\n case 10:\n entity.insertionPoint.x = value as number\n break\n case 20:\n entity.insertionPoint.y = value as number\n break\n case 30:\n entity.insertionPoint.z = value as number\n break\n\n case 41:\n entity.scale.x = value as number\n break\n case 42:\n entity.scale.y = value as number\n break\n case 43:\n entity.scale.z = value as number\n break\n\n case 50:\n entity.rotation = value as number\n break\n\n case 210:\n entity.normal.x = value as number\n break\n case 220:\n entity.normal.y = value as number\n break\n case 230:\n entity.normal.z = value as number\n break\n\n case 280:\n entity.flags = value as number\n break\n case 281:\n entity.contrast = value as number\n break\n case 282:\n entity.fade = value as number\n break\n\n default:\n Object.assign(entity, common(type, value))\n break\n }\n\n return entity\n },\n {\n type: TYPE,\n insertionPoint: { x: 0, y: 0, z: 0 },\n scale: { x: 1, y: 1, z: 1 },\n normal: { x: 0, y: 0, z: 1 },\n } as UnderlayEntity,\n )\n}\n\nexport default { TYPE, process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