dxf-json 0.0.21 → 0.0.23
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/package.json +8 -1
- package/.github/FUNDING.yml +0 -1
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
- package/.github/ISSUE_TEMPLATE/custom.md +0 -10
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/pull_request_template.md +0 -23
- package/.github/workflows/npm-publish.yml +0 -55
- package/.swcrc +0 -8
- package/jest.config.js +0 -20
- package/src/consts/block.ts +0 -22
- package/src/consts/color.ts +0 -6
- package/src/consts/config.ts +0 -2
- package/src/consts/dimension.ts +0 -69
- package/src/consts/hatch.ts +0 -52
- package/src/consts/header.ts +0 -10
- package/src/consts/index.ts +0 -9
- package/src/consts/lineweight.ts +0 -5
- package/src/consts/measurement.ts +0 -4
- package/src/consts/obscuredLineTypes.ts +0 -21
- package/src/consts/scene.ts +0 -2
- package/src/consts/viewport.ts +0 -62
- package/src/index.ts +0 -3
- package/src/parser/AutoCadColorIndex.ts +0 -265
- package/src/parser/DxfArrayScanner.ts +0 -161
- package/src/parser/DxfParser.ts +0 -109
- package/src/parser/ParseHelpers.ts +0 -124
- package/src/parser/blocks/blocks.test.ts +0 -97
- package/src/parser/blocks/index.ts +0 -88
- package/src/parser/blocks/types.ts +0 -15
- package/src/parser/entities/arc/index.ts +0 -2
- package/src/parser/entities/arc/parser.ts +0 -67
- package/src/parser/entities/arc/types.ts +0 -13
- package/src/parser/entities/attdef/consts.ts +0 -12
- package/src/parser/entities/attdef/index.ts +0 -3
- package/src/parser/entities/attdef/parser.ts +0 -119
- package/src/parser/entities/attdef/types.ts +0 -19
- package/src/parser/entities/attribute/consts.ts +0 -6
- package/src/parser/entities/attribute/index.ts +0 -3
- package/src/parser/entities/attribute/parser.ts +0 -198
- package/src/parser/entities/attribute/types.ts +0 -31
- package/src/parser/entities/circle/index.ts +0 -2
- package/src/parser/entities/circle/parser.ts +0 -58
- package/src/parser/entities/circle/types.ts +0 -11
- package/src/parser/entities/dimension/common.ts +0 -98
- package/src/parser/entities/dimension/index.ts +0 -24
- package/src/parser/entities/dimension/types.ts +0 -65
- package/src/parser/entities/ellipse/index.ts +0 -2
- package/src/parser/entities/ellipse/parser.ts +0 -66
- package/src/parser/entities/ellipse/types.ts +0 -13
- package/src/parser/entities/entities.test.ts +0 -86
- package/src/parser/entities/hatch/boundaryPathData/edge.ts +0 -190
- package/src/parser/entities/hatch/boundaryPathData/index.ts +0 -27
- package/src/parser/entities/hatch/boundaryPathData/polyline.ts +0 -43
- package/src/parser/entities/hatch/boundaryPathData/shared.ts +0 -16
- package/src/parser/entities/hatch/index.ts +0 -189
- package/src/parser/entities/hatch/patternData.ts +0 -57
- package/src/parser/entities/hatch/types/boundaryPath.ts +0 -72
- package/src/parser/entities/hatch/types/definitionLine.ts +0 -14
- package/src/parser/entities/hatch/types/hatch.ts +0 -47
- package/src/parser/entities/hatch/types/index.ts +0 -3
- package/src/parser/entities/index.ts +0 -87
- package/src/parser/entities/insert/index.ts +0 -2
- package/src/parser/entities/insert/parser.ts +0 -106
- package/src/parser/entities/insert/types.ts +0 -19
- package/src/parser/entities/leader/consts.ts +0 -6
- package/src/parser/entities/leader/index.ts +0 -3
- package/src/parser/entities/leader/parser.ts +0 -119
- package/src/parser/entities/leader/types.ts +0 -24
- package/src/parser/entities/line/index.ts +0 -2
- package/src/parser/entities/line/parser.ts +0 -55
- package/src/parser/entities/line/types.ts +0 -11
- package/src/parser/entities/lwpolyline/consts.ts +0 -4
- package/src/parser/entities/lwpolyline/index.ts +0 -3
- package/src/parser/entities/lwpolyline/parser.ts +0 -122
- package/src/parser/entities/lwpolyline/types.ts +0 -21
- package/src/parser/entities/mtext/consts.ts +0 -5
- package/src/parser/entities/mtext/index.ts +0 -3
- package/src/parser/entities/mtext/parser.ts +0 -195
- package/src/parser/entities/mtext/types.ts +0 -34
- package/src/parser/entities/point/index.ts +0 -2
- package/src/parser/entities/point/parser.ts +0 -60
- package/src/parser/entities/point/types.ts +0 -10
- package/src/parser/entities/polyline/consts.ts +0 -17
- package/src/parser/entities/polyline/index.ts +0 -3
- package/src/parser/entities/polyline/parser.ts +0 -126
- package/src/parser/entities/polyline/types.ts +0 -20
- package/src/parser/entities/section/index.ts +0 -2
- package/src/parser/entities/section/parser.ts +0 -104
- package/src/parser/entities/section/types.ts +0 -20
- package/src/parser/entities/shared.ts +0 -166
- package/src/parser/entities/solid/index.ts +0 -2
- package/src/parser/entities/solid/parser.ts +0 -56
- package/src/parser/entities/solid/types.ts +0 -10
- package/src/parser/entities/spline/consts.ts +0 -8
- package/src/parser/entities/spline/index.ts +0 -3
- package/src/parser/entities/spline/parser.ts +0 -121
- package/src/parser/entities/spline/types.ts +0 -22
- package/src/parser/entities/text/consts.ts +0 -21
- package/src/parser/entities/text/index.ts +0 -3
- package/src/parser/entities/text/parser.ts +0 -117
- package/src/parser/entities/text/types.ts +0 -21
- package/src/parser/entities/vertex/consts.ts +0 -10
- package/src/parser/entities/vertex/index.ts +0 -3
- package/src/parser/entities/vertex/parser.ts +0 -90
- package/src/parser/entities/vertex/types.ts +0 -17
- package/src/parser/entities/viewport/index.ts +0 -178
- package/src/parser/entities/viewport/types.ts +0 -58
- package/src/parser/filterDummyBlocks.ts +0 -49
- package/src/parser/header/index.ts +0 -30
- package/src/parser/objects/common.ts +0 -55
- package/src/parser/objects/dictionary.ts +0 -61
- package/src/parser/objects/index.ts +0 -45
- package/src/parser/objects/layout.ts +0 -136
- package/src/parser/objects/plotSettings.ts +0 -231
- package/src/parser/objects/treefy.ts +0 -53
- package/src/parser/objects/types.ts +0 -17
- package/src/parser/shared/index.ts +0 -21
- package/src/parser/shared/parsePoint.ts +0 -37
- package/src/parser/shared/parserGenerator.test.ts +0 -164
- package/src/parser/shared/parserGenerator.ts +0 -180
- package/src/parser/shared/xdata/index.ts +0 -3
- package/src/parser/shared/xdata/interpreter.test.ts +0 -85
- package/src/parser/shared/xdata/interpreter.ts +0 -65
- package/src/parser/shared/xdata/parser.test.ts +0 -66
- package/src/parser/shared/xdata/parser.ts +0 -140
- package/src/parser/shared/xdata/types.ts +0 -22
- package/src/parser/tables/blockRecord/index.ts +0 -2
- package/src/parser/tables/blockRecord/parser.ts +0 -49
- package/src/parser/tables/blockRecord/types.ts +0 -11
- package/src/parser/tables/dimStyle/consts.ts +0 -428
- package/src/parser/tables/dimStyle/index.ts +0 -3
- package/src/parser/tables/dimStyle/parser.ts +0 -37
- package/src/parser/tables/dimStyle/types.ts +0 -164
- package/src/parser/tables/index.ts +0 -2
- package/src/parser/tables/layer/index.ts +0 -2
- package/src/parser/tables/layer/parser.ts +0 -58
- package/src/parser/tables/layer/types.ts +0 -14
- package/src/parser/tables/ltype/consts.ts +0 -6
- package/src/parser/tables/ltype/index.ts +0 -3
- package/src/parser/tables/ltype/parser.ts +0 -110
- package/src/parser/tables/ltype/types.ts +0 -23
- package/src/parser/tables/parser.ts +0 -100
- package/src/parser/tables/shared.ts +0 -32
- package/src/parser/tables/style/index.ts +0 -2
- package/src/parser/tables/style/parser.ts +0 -70
- package/src/parser/tables/style/types.ts +0 -15
- package/src/parser/tables/types.ts +0 -15
- package/src/parser/tables/vport/index.ts +0 -2
- package/src/parser/tables/vport/parser.ts +0 -205
- package/src/parser/tables/vport/types.ts +0 -48
- package/src/parser/types.ts +0 -30
- package/src/types/color.ts +0 -5
- package/src/types/dxfHeader.ts +0 -21
- package/src/types/entity.ts +0 -7
- package/src/types/index.ts +0 -30
- package/src/utils/binarySearch.ts +0 -20
- package/src/utils/disjointSet.ts +0 -52
- package/src/utils/flooding.ts +0 -37
- package/src/utils/functional.ts +0 -124
- package/src/utils/graph.ts +0 -53
- package/src/utils/index.ts +0 -102
- package/src/utils/queue.ts +0 -77
- package/src/utils/triangle.ts +0 -28
- package/tsconfig.json +0 -37
- package/webpack.config.js +0 -53
|
@@ -1,428 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DimensionTextHorizontal,
|
|
3
|
-
DimensionTextVertical,
|
|
4
|
-
DimensionToleranceTextVertical,
|
|
5
|
-
DimensionZeroSuppression,
|
|
6
|
-
DimensionZeroSuppressionAngular,
|
|
7
|
-
} from '../../../consts';
|
|
8
|
-
import type { DimStyleVariableSchema } from './types';
|
|
9
|
-
|
|
10
|
-
export const DimStyleVariablesSchema = [
|
|
11
|
-
// Prefix/suffix for primary units dimension values.
|
|
12
|
-
{
|
|
13
|
-
name: 'DIMPOST',
|
|
14
|
-
code: 3,
|
|
15
|
-
},
|
|
16
|
-
// Prefix/suffix for alternate units dimensions.
|
|
17
|
-
{
|
|
18
|
-
name: 'DIMAPOST',
|
|
19
|
-
code: 4,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
name: 'DIMBLK_OBSOLETE',
|
|
23
|
-
code: 5,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: 'DIMBLK1_OBSOLETE',
|
|
27
|
-
code: 6,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: 'DIMBLK2_OBSOLETE',
|
|
31
|
-
code: 7,
|
|
32
|
-
},
|
|
33
|
-
// Global dimension feature scale factor
|
|
34
|
-
{
|
|
35
|
-
name: 'DIMSCALE',
|
|
36
|
-
code: 40,
|
|
37
|
-
defaultValue: 1,
|
|
38
|
-
},
|
|
39
|
-
// Dimension line and arrowhead size
|
|
40
|
-
{
|
|
41
|
-
name: 'DIMASZ',
|
|
42
|
-
code: 41,
|
|
43
|
-
defaultValue: 0.25,
|
|
44
|
-
},
|
|
45
|
-
// Distance from origin points to extension lines
|
|
46
|
-
{
|
|
47
|
-
name: 'DIMEXO',
|
|
48
|
-
code: 42,
|
|
49
|
-
defaultValue: 0.625,
|
|
50
|
-
defaultValueImperial: 0.0625,
|
|
51
|
-
},
|
|
52
|
-
// Incremental spacing between baseline dimensions
|
|
53
|
-
{
|
|
54
|
-
name: 'DIMDLI',
|
|
55
|
-
code: 43,
|
|
56
|
-
defaultValue: 3.75,
|
|
57
|
-
defaultValueImperial: 0.38,
|
|
58
|
-
},
|
|
59
|
-
// Extension line distance beyond dimension line
|
|
60
|
-
{
|
|
61
|
-
name: 'DIMEXE',
|
|
62
|
-
code: 44,
|
|
63
|
-
defaultValue: 2.25,
|
|
64
|
-
defaultValueImperial: 0.28,
|
|
65
|
-
},
|
|
66
|
-
// Rounding value for decimal dimensions
|
|
67
|
-
{
|
|
68
|
-
name: 'DIMRND',
|
|
69
|
-
code: 45,
|
|
70
|
-
defaultValue: 0,
|
|
71
|
-
},
|
|
72
|
-
// Dimension line extension beyond extension lines
|
|
73
|
-
{
|
|
74
|
-
name: 'DIMDLE',
|
|
75
|
-
code: 46,
|
|
76
|
-
defaultValue: 0,
|
|
77
|
-
},
|
|
78
|
-
// Upper tolerance value for tolerance dimensions
|
|
79
|
-
{
|
|
80
|
-
name: 'DIMTP',
|
|
81
|
-
code: 47,
|
|
82
|
-
defaultValue: 0,
|
|
83
|
-
},
|
|
84
|
-
// Lower tolerance value for tolerance dimensions
|
|
85
|
-
{
|
|
86
|
-
name: 'DIMTM',
|
|
87
|
-
code: 48,
|
|
88
|
-
defaultValue: 0,
|
|
89
|
-
},
|
|
90
|
-
// Size of dimension text
|
|
91
|
-
{
|
|
92
|
-
name: 'DIMTXT',
|
|
93
|
-
code: 140,
|
|
94
|
-
defaultValue: 2.5,
|
|
95
|
-
defaultValueImperial: 0.28,
|
|
96
|
-
},
|
|
97
|
-
// Controls placement of center marks or centerlines
|
|
98
|
-
{
|
|
99
|
-
name: 'DIMCEN',
|
|
100
|
-
code: 141,
|
|
101
|
-
defaultValue: 2.5,
|
|
102
|
-
defaultValueImperial: 0.09,
|
|
103
|
-
},
|
|
104
|
-
// Controls size of dimension line tick marks drawn instead of arrowheads
|
|
105
|
-
{
|
|
106
|
-
name: 'DIMTSZ',
|
|
107
|
-
code: 142,
|
|
108
|
-
defaultValue: 0,
|
|
109
|
-
},
|
|
110
|
-
// Alternate units dimension scale factor
|
|
111
|
-
{
|
|
112
|
-
name: 'DIMALTF',
|
|
113
|
-
code: 143,
|
|
114
|
-
defaultValue: 25.4,
|
|
115
|
-
},
|
|
116
|
-
// Scale factor for linear dimension values
|
|
117
|
-
{
|
|
118
|
-
name: 'DIMLFAC',
|
|
119
|
-
code: 144,
|
|
120
|
-
defaultValue: 1,
|
|
121
|
-
},
|
|
122
|
-
// Vertical position of text above or below dimension line if dimtad is 0
|
|
123
|
-
{
|
|
124
|
-
name: 'DIMTVP',
|
|
125
|
-
code: 145,
|
|
126
|
-
defaultValue: 0,
|
|
127
|
-
},
|
|
128
|
-
// Scale factor for fractional or tolerance text size
|
|
129
|
-
{
|
|
130
|
-
name: 'DIMTFAC',
|
|
131
|
-
code: 146,
|
|
132
|
-
defaultValue: 1,
|
|
133
|
-
},
|
|
134
|
-
// Gap size between dimension line and dimension text
|
|
135
|
-
{
|
|
136
|
-
name: 'DIMGAP',
|
|
137
|
-
code: 147,
|
|
138
|
-
defaultValue: 0.625,
|
|
139
|
-
defaultValueImperial: 0.09,
|
|
140
|
-
},
|
|
141
|
-
// Rounding value for alternate dimension units
|
|
142
|
-
{
|
|
143
|
-
name: 'DIMALTRND',
|
|
144
|
-
code: 148,
|
|
145
|
-
defaultValue: 0,
|
|
146
|
-
},
|
|
147
|
-
// Toggles creation of appended tolerance dimensions
|
|
148
|
-
{
|
|
149
|
-
name: 'DIMTOL',
|
|
150
|
-
code: 71,
|
|
151
|
-
defaultValue: 0,
|
|
152
|
-
defaultValueImperial: 1,
|
|
153
|
-
},
|
|
154
|
-
// Toggles creation of limits-style dimension text
|
|
155
|
-
{
|
|
156
|
-
name: 'DIMLIM',
|
|
157
|
-
code: 72,
|
|
158
|
-
defaultValue: 0,
|
|
159
|
-
},
|
|
160
|
-
// Orientation of text inside extension lines
|
|
161
|
-
{
|
|
162
|
-
name: 'DIMTIH',
|
|
163
|
-
code: 73,
|
|
164
|
-
defaultValue: 0,
|
|
165
|
-
defaultValueImperial: 1,
|
|
166
|
-
},
|
|
167
|
-
// Orientation of text outside extension lines
|
|
168
|
-
{
|
|
169
|
-
name: 'DIMTOH',
|
|
170
|
-
code: 74,
|
|
171
|
-
defaultValue: 0,
|
|
172
|
-
defaultValueImperial: 1,
|
|
173
|
-
},
|
|
174
|
-
// Toggles suppression of first extension line
|
|
175
|
-
{
|
|
176
|
-
name: 'DIMSE1',
|
|
177
|
-
code: 75,
|
|
178
|
-
defaultValue: 0,
|
|
179
|
-
},
|
|
180
|
-
// Toggles suppression of second extension line
|
|
181
|
-
{
|
|
182
|
-
name: 'DIMSE2',
|
|
183
|
-
code: 76,
|
|
184
|
-
defaultValue: 0,
|
|
185
|
-
},
|
|
186
|
-
// Sets vertical text placement relative to dimension line
|
|
187
|
-
{
|
|
188
|
-
name: 'DIMTAD',
|
|
189
|
-
code: 77,
|
|
190
|
-
defaultValue: DimensionTextVertical.Above,
|
|
191
|
-
defaultValueImperial: DimensionTextVertical.Center,
|
|
192
|
-
},
|
|
193
|
-
// Zero suppression for primary units dimensions
|
|
194
|
-
{
|
|
195
|
-
name: 'DIMZIN',
|
|
196
|
-
code: 78,
|
|
197
|
-
defaultValue: DimensionZeroSuppression.Trailing,
|
|
198
|
-
defaultValueImperial: DimensionZeroSuppression.Feet,
|
|
199
|
-
},
|
|
200
|
-
// Controls zero suppression for angular dimensions
|
|
201
|
-
{
|
|
202
|
-
name: 'DIMAZIN',
|
|
203
|
-
code: 79,
|
|
204
|
-
defaultValue: DimensionZeroSuppressionAngular.None,
|
|
205
|
-
},
|
|
206
|
-
// Enables or disables alternate units dimensioning
|
|
207
|
-
{
|
|
208
|
-
name: 'DIMALT',
|
|
209
|
-
code: 170,
|
|
210
|
-
defaultValue: 0,
|
|
211
|
-
},
|
|
212
|
-
// Controls decimal places for alternate units dimensions
|
|
213
|
-
{
|
|
214
|
-
name: 'DIMALTD',
|
|
215
|
-
code: 171,
|
|
216
|
-
defaultValue: 3,
|
|
217
|
-
defaultValueImperial: 2,
|
|
218
|
-
},
|
|
219
|
-
// Toggles forced dimension line creation
|
|
220
|
-
{
|
|
221
|
-
name: 'DIMTOFL',
|
|
222
|
-
code: 172,
|
|
223
|
-
defaultValue: 1,
|
|
224
|
-
defaultValueImperial: 0,
|
|
225
|
-
},
|
|
226
|
-
// Toggles appearance of arrowhead blocks
|
|
227
|
-
{
|
|
228
|
-
name: 'DIMSAH',
|
|
229
|
-
code: 173,
|
|
230
|
-
defaultValue: 0,
|
|
231
|
-
},
|
|
232
|
-
// Toggles forced placement of text between extension lines
|
|
233
|
-
{
|
|
234
|
-
name: 'DIMTIX',
|
|
235
|
-
code: 174,
|
|
236
|
-
defaultValue: 0,
|
|
237
|
-
},
|
|
238
|
-
// Suppresses dimension lines outside extension lines
|
|
239
|
-
{
|
|
240
|
-
name: 'DIMSOXD',
|
|
241
|
-
code: 175,
|
|
242
|
-
defaultValue: 0,
|
|
243
|
-
},
|
|
244
|
-
// Dimension line, arrowhead, and leader line color
|
|
245
|
-
{
|
|
246
|
-
name: 'DIMCLRD',
|
|
247
|
-
code: 176,
|
|
248
|
-
defaultValue: 0,
|
|
249
|
-
},
|
|
250
|
-
// Dimension extension line color
|
|
251
|
-
{
|
|
252
|
-
name: 'DIMCLRE',
|
|
253
|
-
code: 177,
|
|
254
|
-
defaultValue: 0,
|
|
255
|
-
},
|
|
256
|
-
// Dimension text color
|
|
257
|
-
{
|
|
258
|
-
name: 'DIMCLRT',
|
|
259
|
-
code: 178,
|
|
260
|
-
defaultValue: 0,
|
|
261
|
-
},
|
|
262
|
-
// Controls the number of decimal places for angular dimensions
|
|
263
|
-
{
|
|
264
|
-
name: 'DIMADEC',
|
|
265
|
-
code: 179,
|
|
266
|
-
},
|
|
267
|
-
// Obsolete, now use DIMLUNIT AND DIMFRAC
|
|
268
|
-
{
|
|
269
|
-
name: 'DIMUNIT',
|
|
270
|
-
code: 270,
|
|
271
|
-
},
|
|
272
|
-
// Decimal places for dimension values
|
|
273
|
-
{
|
|
274
|
-
name: 'DIMDEC',
|
|
275
|
-
code: 271,
|
|
276
|
-
defaultValue: 2,
|
|
277
|
-
defaultValueImperial: 4,
|
|
278
|
-
},
|
|
279
|
-
// Decimal places for primary units tolerance values
|
|
280
|
-
{
|
|
281
|
-
name: 'DIMTDEC',
|
|
282
|
-
code: 272,
|
|
283
|
-
defaultValue: 2,
|
|
284
|
-
defaultValueImperial: 4,
|
|
285
|
-
},
|
|
286
|
-
// Units format for alternate units dimensions
|
|
287
|
-
{
|
|
288
|
-
name: 'DIMALTU',
|
|
289
|
-
code: 273,
|
|
290
|
-
defaultValue: 2,
|
|
291
|
-
},
|
|
292
|
-
// Decimal places for alternate units tolerance values
|
|
293
|
-
{
|
|
294
|
-
name: 'DIMALTTD',
|
|
295
|
-
code: 274,
|
|
296
|
-
defaultValue: 2,
|
|
297
|
-
defaultValueImperial: 4,
|
|
298
|
-
},
|
|
299
|
-
// Unit format for angular dimension values
|
|
300
|
-
{
|
|
301
|
-
name: 'DIMAUNIT',
|
|
302
|
-
code: 275,
|
|
303
|
-
defaultValue: 0,
|
|
304
|
-
},
|
|
305
|
-
// Controls the fraction format used for architectural and fractional dimensions
|
|
306
|
-
{
|
|
307
|
-
name: 'DIMFRAC',
|
|
308
|
-
code: 276,
|
|
309
|
-
defaultValue: 0,
|
|
310
|
-
},
|
|
311
|
-
// Specifies units for all nonangular dimensions
|
|
312
|
-
{
|
|
313
|
-
name: 'DIMLUNIT',
|
|
314
|
-
code: 277,
|
|
315
|
-
defaultValue: 2,
|
|
316
|
-
},
|
|
317
|
-
// Specifies a single character to use as a decimal separator
|
|
318
|
-
{
|
|
319
|
-
name: 'DIMDSEP',
|
|
320
|
-
code: 278,
|
|
321
|
-
defaultValue: ',',
|
|
322
|
-
defaultValueImperial: '.',
|
|
323
|
-
},
|
|
324
|
-
// Controls the format of dimension text when it is moved
|
|
325
|
-
// 뷰어에는 필요없어서 주석처리
|
|
326
|
-
// {
|
|
327
|
-
// name: 'DIMTMOVE',
|
|
328
|
-
// code: 279,
|
|
329
|
-
// defaultValue: 0,
|
|
330
|
-
// },
|
|
331
|
-
// Horizontal justification of dimension text
|
|
332
|
-
{
|
|
333
|
-
name: 'DIMJUST',
|
|
334
|
-
code: 280,
|
|
335
|
-
defaultValue: DimensionTextHorizontal.Center,
|
|
336
|
-
},
|
|
337
|
-
// Toggles suppression of first dimension line
|
|
338
|
-
{
|
|
339
|
-
name: 'DIMSD1',
|
|
340
|
-
code: 281,
|
|
341
|
-
defaultValue: 0,
|
|
342
|
-
},
|
|
343
|
-
// Toggles suppression of second dimension line
|
|
344
|
-
{
|
|
345
|
-
name: 'DIMSD2',
|
|
346
|
-
code: 282,
|
|
347
|
-
defaultValue: 0,
|
|
348
|
-
},
|
|
349
|
-
// Vertical justification for dimension tolerance text
|
|
350
|
-
{
|
|
351
|
-
name: 'DIMTOLJ',
|
|
352
|
-
code: 283,
|
|
353
|
-
defaultValue: DimensionToleranceTextVertical.Center,
|
|
354
|
-
},
|
|
355
|
-
// Zero suppression for tolerances values
|
|
356
|
-
{
|
|
357
|
-
name: 'DIMTZIN',
|
|
358
|
-
code: 284,
|
|
359
|
-
defaultValue: DimensionZeroSuppression.Trailing,
|
|
360
|
-
defaultValueImperial: DimensionZeroSuppression.Feet,
|
|
361
|
-
},
|
|
362
|
-
// Zero suppression for alternate units dimension values
|
|
363
|
-
{
|
|
364
|
-
name: 'DIMALTZ',
|
|
365
|
-
code: 285,
|
|
366
|
-
defaultValue: DimensionZeroSuppression.Trailing,
|
|
367
|
-
},
|
|
368
|
-
// Zero suppression for alternate units tolerance values
|
|
369
|
-
{
|
|
370
|
-
name: 'DIMALTTZ',
|
|
371
|
-
code: 286,
|
|
372
|
-
defaultValue: DimensionZeroSuppression.Trailing,
|
|
373
|
-
},
|
|
374
|
-
// Obsolete, now use DIMATFIT and DIMTMOVE
|
|
375
|
-
{
|
|
376
|
-
name: 'DIMFIT',
|
|
377
|
-
code: 287,
|
|
378
|
-
},
|
|
379
|
-
// Controls user placement of dimension line and text
|
|
380
|
-
{
|
|
381
|
-
name: 'DIMUPT',
|
|
382
|
-
code: 288,
|
|
383
|
-
defaultValue: 0,
|
|
384
|
-
},
|
|
385
|
-
// Controls placement of text and arrowheads when there is insufficient space between the extension lines
|
|
386
|
-
{
|
|
387
|
-
name: 'DIMATFIT',
|
|
388
|
-
code: 289,
|
|
389
|
-
defaultValue: 3,
|
|
390
|
-
},
|
|
391
|
-
// Text style used for dimension text by name
|
|
392
|
-
{
|
|
393
|
-
name: 'DIMTXSTY',
|
|
394
|
-
code: 340,
|
|
395
|
-
},
|
|
396
|
-
// Specify arrowhead used for leaders by name
|
|
397
|
-
{
|
|
398
|
-
name: 'DIMLDRBLK',
|
|
399
|
-
code: 341,
|
|
400
|
-
},
|
|
401
|
-
// Block type to use for both arrowheads, handle of referenced block
|
|
402
|
-
{
|
|
403
|
-
name: 'DIMBLK',
|
|
404
|
-
code: 342,
|
|
405
|
-
},
|
|
406
|
-
// Block type to use for first arrowhead, handle of referenced block
|
|
407
|
-
{
|
|
408
|
-
name: 'DIMBLK1',
|
|
409
|
-
code: 343,
|
|
410
|
-
},
|
|
411
|
-
// Block type to use for first arrowhead, handle of referenced block
|
|
412
|
-
{
|
|
413
|
-
name: 'DIMBLK2',
|
|
414
|
-
code: 344,
|
|
415
|
-
},
|
|
416
|
-
// Lineweight value for dimension lines
|
|
417
|
-
{
|
|
418
|
-
name: 'DIMLWD',
|
|
419
|
-
code: 371,
|
|
420
|
-
defaultValue: -2,
|
|
421
|
-
},
|
|
422
|
-
// Lineweight value for extension lines
|
|
423
|
-
{
|
|
424
|
-
name: 'DIMLWD',
|
|
425
|
-
code: 372,
|
|
426
|
-
defaultValue: -2,
|
|
427
|
-
},
|
|
428
|
-
] as DimStyleVariableSchema[];
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createParser,
|
|
3
|
-
DXFParserSnippet,
|
|
4
|
-
Identity,
|
|
5
|
-
} from '../../shared/parserGenerator';
|
|
6
|
-
import { DimStyleVariablesSchema } from './consts';
|
|
7
|
-
import { CommonTableEntryParserSnippets } from '../shared';
|
|
8
|
-
|
|
9
|
-
const DimStyleTableParserSnippets: DXFParserSnippet[] = [
|
|
10
|
-
...DimStyleVariablesSchema.map((schema) => ({
|
|
11
|
-
...schema,
|
|
12
|
-
parser: Identity,
|
|
13
|
-
})),
|
|
14
|
-
{
|
|
15
|
-
code: 70,
|
|
16
|
-
name: 'standardFlag',
|
|
17
|
-
parser: Identity,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
code: 2,
|
|
21
|
-
name: 'name',
|
|
22
|
-
parser: Identity,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
code: 100,
|
|
26
|
-
name: 'subclassMarker',
|
|
27
|
-
parser: Identity,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
code: 105,
|
|
31
|
-
name: 'handle',
|
|
32
|
-
parser: Identity,
|
|
33
|
-
},
|
|
34
|
-
...CommonTableEntryParserSnippets.filter((snippet) => snippet.code !== 5),
|
|
35
|
-
];
|
|
36
|
-
|
|
37
|
-
export const parseDimStyle = createParser(DimStyleTableParserSnippets);
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
DimensionTextHorizontal,
|
|
3
|
-
DimensionTextVertical,
|
|
4
|
-
DimensionZeroSuppression,
|
|
5
|
-
DimensionZeroSuppressionAngular,
|
|
6
|
-
} from '../../../consts';
|
|
7
|
-
import type { CommonDxfTableEntry } from '../types';
|
|
8
|
-
|
|
9
|
-
// https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-F2FAD36F-0CE3-4943-9DAD-A9BCD2AE81DA
|
|
10
|
-
export type DimStyleVariable =
|
|
11
|
-
| 'DIMPOST'
|
|
12
|
-
| 'DIMAPOST'
|
|
13
|
-
| 'DIMBLK_OBSOLETE'
|
|
14
|
-
| 'DIMBLK1_OBSOLETE'
|
|
15
|
-
| 'DIMBLK2_OBSOLETE'
|
|
16
|
-
| 'DIMSCALE'
|
|
17
|
-
| 'DIMASZ'
|
|
18
|
-
| 'DIMEXO'
|
|
19
|
-
| 'DIMDLI'
|
|
20
|
-
| 'DIMEXE'
|
|
21
|
-
| 'DIMRND'
|
|
22
|
-
| 'DIMDLE'
|
|
23
|
-
| 'DIMTP'
|
|
24
|
-
| 'DIMTM'
|
|
25
|
-
| 'DIMTXT'
|
|
26
|
-
| 'DIMCEN'
|
|
27
|
-
| 'DIMTSZ'
|
|
28
|
-
| 'DIMALTF'
|
|
29
|
-
| 'DIMLFAC'
|
|
30
|
-
| 'DIMTVP'
|
|
31
|
-
| 'DIMTFAC'
|
|
32
|
-
| 'DIMGAP'
|
|
33
|
-
| 'DIMALTRND'
|
|
34
|
-
| 'DIMTOL'
|
|
35
|
-
| 'DIMLIM'
|
|
36
|
-
| 'DIMTIH'
|
|
37
|
-
| 'DIMTOH'
|
|
38
|
-
| 'DIMSE1'
|
|
39
|
-
| 'DIMSE2'
|
|
40
|
-
| 'DIMTAD'
|
|
41
|
-
| 'DIMZIN'
|
|
42
|
-
| 'DIMAZIN'
|
|
43
|
-
| 'DIMALT'
|
|
44
|
-
| 'DIMALTD'
|
|
45
|
-
| 'DIMTOFL'
|
|
46
|
-
| 'DIMSAH'
|
|
47
|
-
| 'DIMTIX'
|
|
48
|
-
| 'DIMSOXD'
|
|
49
|
-
| 'DIMCLRD'
|
|
50
|
-
| 'DIMCLRE'
|
|
51
|
-
| 'DIMCLRT'
|
|
52
|
-
| 'DIMADEC'
|
|
53
|
-
| 'DIMUNIT'
|
|
54
|
-
| 'DIMDEC'
|
|
55
|
-
| 'DIMTDEC'
|
|
56
|
-
| 'DIMALTU'
|
|
57
|
-
| 'DIMALTTD'
|
|
58
|
-
| 'DIMAUNIT'
|
|
59
|
-
| 'DIMFRAC'
|
|
60
|
-
| 'DIMLUNIT'
|
|
61
|
-
| 'DIMDSEP'
|
|
62
|
-
| 'DIMTMOVE'
|
|
63
|
-
| 'DIMJUST'
|
|
64
|
-
| 'DIMSD1'
|
|
65
|
-
| 'DIMSD2'
|
|
66
|
-
| 'DIMTOLJ'
|
|
67
|
-
| 'DIMTZIN'
|
|
68
|
-
| 'DIMALTZ'
|
|
69
|
-
| 'DIMALTTZ'
|
|
70
|
-
| 'DIMFIT'
|
|
71
|
-
| 'DIMUPT'
|
|
72
|
-
| 'DIMATFIT'
|
|
73
|
-
| 'DIMTXSTY'
|
|
74
|
-
| 'DIMLDRBLK'
|
|
75
|
-
| 'DIMBLK'
|
|
76
|
-
| 'DIMBLK1'
|
|
77
|
-
| 'DIMBLK2'
|
|
78
|
-
| 'DIMLWD'
|
|
79
|
-
| 'DIMLWE';
|
|
80
|
-
|
|
81
|
-
export interface DimStyleVariableSchema {
|
|
82
|
-
name: string;
|
|
83
|
-
code: number;
|
|
84
|
-
defaultValue?: string | number;
|
|
85
|
-
defaultValueImperial?: string | number;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export type DimStylesTableEntry = {
|
|
89
|
-
subclassMarker: 'AcDbDimStyleTableRecord';
|
|
90
|
-
styleName: string;
|
|
91
|
-
DIMPOST?: string;
|
|
92
|
-
DIMAPOST?: string;
|
|
93
|
-
DIMBLK_OBSOLETE?: string;
|
|
94
|
-
DIMBLK1_OBSOLETE?: string;
|
|
95
|
-
DIMBLK2_OBSOLETE?: string;
|
|
96
|
-
DIMSCALE: number;
|
|
97
|
-
DIMASZ: number;
|
|
98
|
-
DIMEXO: number;
|
|
99
|
-
DIMDLI: number;
|
|
100
|
-
DIMEXE: number;
|
|
101
|
-
DIMRND: number;
|
|
102
|
-
DIMDLE: number;
|
|
103
|
-
DIMTP: number;
|
|
104
|
-
DIMTM: number;
|
|
105
|
-
DIMTXT: number;
|
|
106
|
-
DIMCEN: number;
|
|
107
|
-
DIMTSZ: number;
|
|
108
|
-
DIMALTF: number;
|
|
109
|
-
DIMLFAC: number;
|
|
110
|
-
DIMTVP: number;
|
|
111
|
-
DIMTFAC: number;
|
|
112
|
-
DIMGAP: number;
|
|
113
|
-
DIMALTRND: number;
|
|
114
|
-
DIMTOL: number;
|
|
115
|
-
DIMLIM: number;
|
|
116
|
-
DIMTIH: number;
|
|
117
|
-
DIMTOH: number;
|
|
118
|
-
DIMSE1: 0 | 1;
|
|
119
|
-
DIMSE2: 0 | 1;
|
|
120
|
-
DIMTAD: DimensionTextVertical;
|
|
121
|
-
DIMZIN: DimensionZeroSuppression;
|
|
122
|
-
DIMAZIN: DimensionZeroSuppressionAngular;
|
|
123
|
-
DIMALT: 0 | 1;
|
|
124
|
-
DIMALTD: number;
|
|
125
|
-
DIMTOFL: 0 | 1;
|
|
126
|
-
DIMSAH: 0 | 1;
|
|
127
|
-
DIMTIX: 0 | 1;
|
|
128
|
-
DIMSOXD: 0 | 1;
|
|
129
|
-
DIMCLRD: number;
|
|
130
|
-
DIMCLRE: number;
|
|
131
|
-
DIMCLRT: number;
|
|
132
|
-
DIMADEC?: number;
|
|
133
|
-
DIMUNIT?: number;
|
|
134
|
-
DIMDEC: number;
|
|
135
|
-
DIMTDEC: number;
|
|
136
|
-
DIMALTU: number;
|
|
137
|
-
DIMALTTD: number;
|
|
138
|
-
DIMAUNIT: number;
|
|
139
|
-
DIMFRAC: number;
|
|
140
|
-
DIMLUNIT: number;
|
|
141
|
-
DIMDSEP: string;
|
|
142
|
-
DIMTMOVE: undefined; // 미사용
|
|
143
|
-
DIMJUST: DimensionTextHorizontal;
|
|
144
|
-
DIMSD1: 0 | 1;
|
|
145
|
-
DIMSD2: 0 | 1;
|
|
146
|
-
DIMTOLJ: DimensionTextVertical;
|
|
147
|
-
DIMTZIN: DimensionZeroSuppression;
|
|
148
|
-
DIMALTZ: DimensionZeroSuppression;
|
|
149
|
-
DIMALTTZ: DimensionZeroSuppression;
|
|
150
|
-
DIMFIT?: number;
|
|
151
|
-
DIMUPT: number;
|
|
152
|
-
DIMATFIT: number;
|
|
153
|
-
DIMTXSTY?: string;
|
|
154
|
-
DIMLDRBLK?: string;
|
|
155
|
-
DIMBLK?: string;
|
|
156
|
-
DIMBLK1?: string;
|
|
157
|
-
DIMBLK2?: string;
|
|
158
|
-
DIMLWD: number;
|
|
159
|
-
DIMLWE: number;
|
|
160
|
-
} & CommonDxfTableEntry;
|
|
161
|
-
|
|
162
|
-
export type StyleResolver = <Name extends DimStyleVariable>(
|
|
163
|
-
variableName: Name,
|
|
164
|
-
) => DimStylesTableEntry[Name];
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createParser,
|
|
3
|
-
DXFParserSnippet,
|
|
4
|
-
Identity,
|
|
5
|
-
ToBoolean,
|
|
6
|
-
} from '../../shared/parserGenerator';
|
|
7
|
-
import { CommonTableEntryParserSnippets } from '../shared';
|
|
8
|
-
|
|
9
|
-
const LayerTableParserSnippets: DXFParserSnippet[] = [
|
|
10
|
-
{
|
|
11
|
-
code: 347,
|
|
12
|
-
name: 'materialObjectId',
|
|
13
|
-
parser: Identity,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
code: 390,
|
|
17
|
-
name: 'plotStyleNameObjectId',
|
|
18
|
-
parser: Identity,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
code: 370,
|
|
22
|
-
name: 'lineweight',
|
|
23
|
-
parser: Identity,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
code: 290,
|
|
27
|
-
name: 'isPlotting',
|
|
28
|
-
parser: ToBoolean,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
code: 6,
|
|
32
|
-
name: 'lineType',
|
|
33
|
-
parser: Identity,
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
code: 62,
|
|
37
|
-
name: 'colorIndex',
|
|
38
|
-
parser: Identity,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
code: 70,
|
|
42
|
-
name: 'standardFlag',
|
|
43
|
-
parser: Identity,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
code: 2,
|
|
47
|
-
name: 'name',
|
|
48
|
-
parser: Identity,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
code: 100,
|
|
52
|
-
name: 'subclassMarker',
|
|
53
|
-
parser: Identity,
|
|
54
|
-
},
|
|
55
|
-
...CommonTableEntryParserSnippets,
|
|
56
|
-
];
|
|
57
|
-
|
|
58
|
-
export const parseLayerTable = createParser(LayerTableParserSnippets);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ColorIndex } from '../../../types';
|
|
2
|
-
import type { CommonDxfTableEntry } from '../types';
|
|
3
|
-
|
|
4
|
-
export interface LayerTableEntry extends CommonDxfTableEntry {
|
|
5
|
-
subclassMarker: 'AcDbLayerTableRecord';
|
|
6
|
-
name: string;
|
|
7
|
-
standardFlag: number;
|
|
8
|
-
colorIndex: ColorIndex;
|
|
9
|
-
lineType: string;
|
|
10
|
-
isPlotting: boolean;
|
|
11
|
-
lineweight: number;
|
|
12
|
-
plotStyleNameObjectId?: string;
|
|
13
|
-
materialObjectId?: string;
|
|
14
|
-
}
|