@mlightcad/data-model 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-model.js +5490 -1022
- package/dist/data-model.umd.cjs +2 -2
- package/lib/base/AcDbHostApplicationServices.d.ts +72 -6
- package/lib/base/AcDbHostApplicationServices.d.ts.map +1 -1
- package/lib/base/AcDbHostApplicationServices.js +71 -7
- package/lib/base/AcDbHostApplicationServices.js.map +1 -1
- package/lib/base/AcDbObject.d.ts +160 -25
- package/lib/base/AcDbObject.d.ts.map +1 -1
- package/lib/base/AcDbObject.js +149 -25
- package/lib/base/AcDbObject.js.map +1 -1
- package/lib/converter/AcDbBatchProcessing.d.ts +112 -10
- package/lib/converter/AcDbBatchProcessing.d.ts.map +1 -1
- package/lib/converter/AcDbBatchProcessing.js +110 -11
- package/lib/converter/AcDbBatchProcessing.js.map +1 -1
- package/lib/converter/AcDbDxfConverter.d.ts +224 -6
- package/lib/converter/AcDbDxfConverter.d.ts.map +1 -1
- package/lib/converter/AcDbDxfConverter.js +224 -6
- package/lib/converter/AcDbDxfConverter.js.map +1 -1
- package/lib/converter/AcDbDxfParseWorker.d.ts +16 -0
- package/lib/converter/AcDbDxfParseWorker.d.ts.map +1 -1
- package/lib/converter/AcDbDxfParseWorker.js +16 -0
- package/lib/converter/AcDbDxfParseWorker.js.map +1 -1
- package/lib/converter/AcDbEntitiyConverter.d.ts +118 -3
- package/lib/converter/AcDbEntitiyConverter.d.ts.map +1 -1
- package/lib/converter/AcDbEntitiyConverter.js +118 -3
- package/lib/converter/AcDbEntitiyConverter.js.map +1 -1
- package/lib/converter/AcDbObjectConverter.d.ts +52 -0
- package/lib/converter/AcDbObjectConverter.d.ts.map +1 -1
- package/lib/converter/AcDbObjectConverter.js +52 -0
- package/lib/converter/AcDbObjectConverter.js.map +1 -1
- package/lib/database/AcDbBlockTable.d.ts +35 -3
- package/lib/database/AcDbBlockTable.d.ts.map +1 -1
- package/lib/database/AcDbBlockTable.js +35 -3
- package/lib/database/AcDbBlockTable.js.map +1 -1
- package/lib/database/AcDbBlockTableRecord.d.ts +98 -15
- package/lib/database/AcDbBlockTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbBlockTableRecord.js +96 -15
- package/lib/database/AcDbBlockTableRecord.js.map +1 -1
- package/lib/database/AcDbDatabase.d.ts +303 -33
- package/lib/database/AcDbDatabase.d.ts.map +1 -1
- package/lib/database/AcDbDatabase.js +223 -39
- package/lib/database/AcDbDatabase.js.map +1 -1
- package/lib/database/AcDbDatabaseConverter.d.ts +77 -12
- package/lib/database/AcDbDatabaseConverter.d.ts.map +1 -1
- package/lib/database/AcDbDatabaseConverter.js +46 -13
- package/lib/database/AcDbDatabaseConverter.js.map +1 -1
- package/lib/database/AcDbDatabaseConverterManager.d.ts +97 -15
- package/lib/database/AcDbDatabaseConverterManager.d.ts.map +1 -1
- package/lib/database/AcDbDatabaseConverterManager.js +90 -15
- package/lib/database/AcDbDatabaseConverterManager.js.map +1 -1
- package/lib/database/AcDbDimStyleTable.d.ts +22 -2
- package/lib/database/AcDbDimStyleTable.d.ts.map +1 -1
- package/lib/database/AcDbDimStyleTable.js +22 -2
- package/lib/database/AcDbDimStyleTable.js.map +1 -1
- package/lib/database/AcDbDimStyleTableRecord.d.ts +115 -0
- package/lib/database/AcDbDimStyleTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbDimStyleTableRecord.js +44 -0
- package/lib/database/AcDbDimStyleTableRecord.js.map +1 -1
- package/lib/database/AcDbLayerTable.d.ts +39 -2
- package/lib/database/AcDbLayerTable.d.ts.map +1 -1
- package/lib/database/AcDbLayerTable.js +39 -2
- package/lib/database/AcDbLayerTable.js.map +1 -1
- package/lib/database/AcDbLayerTableRecord.d.ts +198 -18
- package/lib/database/AcDbLayerTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbLayerTableRecord.js +182 -19
- package/lib/database/AcDbLayerTableRecord.js.map +1 -1
- package/lib/database/AcDbLinetypeTable.d.ts +21 -2
- package/lib/database/AcDbLinetypeTable.d.ts.map +1 -1
- package/lib/database/AcDbLinetypeTable.js +21 -2
- package/lib/database/AcDbLinetypeTable.js.map +1 -1
- package/lib/database/AcDbLinetypeTableRecord.d.ts +46 -14
- package/lib/database/AcDbLinetypeTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbLinetypeTableRecord.js +46 -14
- package/lib/database/AcDbLinetypeTableRecord.js.map +1 -1
- package/lib/database/AcDbSymbolTable.d.ts +134 -29
- package/lib/database/AcDbSymbolTable.d.ts.map +1 -1
- package/lib/database/AcDbSymbolTable.js +133 -37
- package/lib/database/AcDbSymbolTable.js.map +1 -1
- package/lib/database/AcDbSymbolTableRecord.d.ts +47 -2
- package/lib/database/AcDbSymbolTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbSymbolTableRecord.js +40 -2
- package/lib/database/AcDbSymbolTableRecord.js.map +1 -1
- package/lib/database/AcDbTextStyleTable.d.ts +36 -2
- package/lib/database/AcDbTextStyleTable.d.ts.map +1 -1
- package/lib/database/AcDbTextStyleTable.js +36 -2
- package/lib/database/AcDbTextStyleTable.js.map +1 -1
- package/lib/database/AcDbTextStyleTableRecord.d.ts +129 -17
- package/lib/database/AcDbTextStyleTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbTextStyleTableRecord.js +127 -17
- package/lib/database/AcDbTextStyleTableRecord.js.map +1 -1
- package/lib/database/AcDbViewportTable.d.ts +22 -2
- package/lib/database/AcDbViewportTable.d.ts.map +1 -1
- package/lib/database/AcDbViewportTable.js +22 -2
- package/lib/database/AcDbViewportTable.js.map +1 -1
- package/lib/database/AcDbViewportTableRecord.d.ts +74 -9
- package/lib/database/AcDbViewportTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbViewportTableRecord.js +65 -9
- package/lib/database/AcDbViewportTableRecord.js.map +1 -1
- package/lib/entity/AcDbArc.d.ts +202 -17
- package/lib/entity/AcDbArc.d.ts.map +1 -1
- package/lib/entity/AcDbArc.js +201 -17
- package/lib/entity/AcDbArc.js.map +1 -1
- package/lib/entity/AcDbBlockReference.d.ts +147 -13
- package/lib/entity/AcDbBlockReference.d.ts.map +1 -1
- package/lib/entity/AcDbBlockReference.js +142 -13
- package/lib/entity/AcDbBlockReference.js.map +1 -1
- package/lib/entity/AcDbCircle.d.ts +145 -12
- package/lib/entity/AcDbCircle.d.ts.map +1 -1
- package/lib/entity/AcDbCircle.js +144 -12
- package/lib/entity/AcDbCircle.js.map +1 -1
- package/lib/entity/AcDbCurve.d.ts +33 -2
- package/lib/entity/AcDbCurve.d.ts.map +1 -1
- package/lib/entity/AcDbCurve.js +17 -0
- package/lib/entity/AcDbCurve.js.map +1 -1
- package/lib/entity/AcDbEllipse.d.ts +168 -16
- package/lib/entity/AcDbEllipse.d.ts.map +1 -1
- package/lib/entity/AcDbEllipse.js +167 -16
- package/lib/entity/AcDbEllipse.js.map +1 -1
- package/lib/entity/AcDbEntity.d.ts +299 -35
- package/lib/entity/AcDbEntity.d.ts.map +1 -1
- package/lib/entity/AcDbEntity.js +275 -27
- package/lib/entity/AcDbEntity.js.map +1 -1
- package/lib/entity/AcDbHatch.d.ts +60 -4
- package/lib/entity/AcDbHatch.d.ts.map +1 -1
- package/lib/entity/AcDbHatch.js +52 -4
- package/lib/entity/AcDbHatch.js.map +1 -1
- package/lib/entity/AcDbLeader.d.ts +157 -10
- package/lib/entity/AcDbLeader.d.ts.map +1 -1
- package/lib/entity/AcDbLeader.js +149 -10
- package/lib/entity/AcDbLeader.js.map +1 -1
- package/lib/entity/AcDbLine.d.ts +154 -13
- package/lib/entity/AcDbLine.d.ts.map +1 -1
- package/lib/entity/AcDbLine.js +153 -13
- package/lib/entity/AcDbLine.js.map +1 -1
- package/lib/entity/AcDbMText.d.ts +127 -11
- package/lib/entity/AcDbMText.d.ts.map +1 -1
- package/lib/entity/AcDbMText.js +112 -11
- package/lib/entity/AcDbMText.js.map +1 -1
- package/lib/entity/AcDbPoint.d.ts +86 -7
- package/lib/entity/AcDbPoint.d.ts.map +1 -1
- package/lib/entity/AcDbPoint.js +85 -7
- package/lib/entity/AcDbPoint.js.map +1 -1
- package/lib/entity/AcDbPolyline.d.ts +172 -25
- package/lib/entity/AcDbPolyline.d.ts.map +1 -1
- package/lib/entity/AcDbPolyline.js +170 -25
- package/lib/entity/AcDbPolyline.js.map +1 -1
- package/lib/entity/AcDbRasterImage.d.ts +75 -31
- package/lib/entity/AcDbRasterImage.d.ts.map +1 -1
- package/lib/entity/AcDbRasterImage.js +60 -31
- package/lib/entity/AcDbRasterImage.js.map +1 -1
- package/lib/entity/AcDbRay.d.ts +115 -9
- package/lib/entity/AcDbRay.d.ts.map +1 -1
- package/lib/entity/AcDbRay.js +113 -9
- package/lib/entity/AcDbRay.js.map +1 -1
- package/lib/entity/AcDbSpline.d.ts +106 -14
- package/lib/entity/AcDbSpline.d.ts.map +1 -1
- package/lib/entity/AcDbSpline.js +67 -4
- package/lib/entity/AcDbSpline.js.map +1 -1
- package/lib/entity/AcDbTable.d.ts +161 -44
- package/lib/entity/AcDbTable.d.ts.map +1 -1
- package/lib/entity/AcDbTable.js +135 -44
- package/lib/entity/AcDbTable.js.map +1 -1
- package/lib/entity/AcDbText.d.ts +298 -25
- package/lib/entity/AcDbText.d.ts.map +1 -1
- package/lib/entity/AcDbText.js +288 -25
- package/lib/entity/AcDbText.js.map +1 -1
- package/lib/entity/AcDbTrace.d.ts +150 -23
- package/lib/entity/AcDbTrace.d.ts.map +1 -1
- package/lib/entity/AcDbTrace.js +147 -23
- package/lib/entity/AcDbTrace.js.map +1 -1
- package/lib/entity/AcDbViewport.d.ts +122 -9
- package/lib/entity/AcDbViewport.d.ts.map +1 -1
- package/lib/entity/AcDbViewport.js +122 -9
- package/lib/entity/AcDbViewport.js.map +1 -1
- package/lib/entity/AcDbWipeout.d.ts +29 -1
- package/lib/entity/AcDbWipeout.d.ts.map +1 -1
- package/lib/entity/AcDbWipeout.js +29 -1
- package/lib/entity/AcDbWipeout.js.map +1 -1
- package/lib/entity/AcDbXline.d.ts +116 -9
- package/lib/entity/AcDbXline.d.ts.map +1 -1
- package/lib/entity/AcDbXline.js +114 -9
- package/lib/entity/AcDbXline.js.map +1 -1
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts +56 -12
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDb3PointAngularDimension.js +56 -12
- package/lib/entity/dimension/AcDb3PointAngularDimension.js.map +1 -1
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts +158 -17
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDbAlignedDimension.js +153 -17
- package/lib/entity/dimension/AcDbAlignedDimension.js.map +1 -1
- package/lib/entity/dimension/AcDbArcDimension.d.ts +58 -12
- package/lib/entity/dimension/AcDbArcDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDbArcDimension.js +58 -12
- package/lib/entity/dimension/AcDbArcDimension.js.map +1 -1
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts +99 -25
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDbDiametricDimension.js +99 -25
- package/lib/entity/dimension/AcDbDiametricDimension.js.map +1 -1
- package/lib/entity/dimension/AcDbDimension.d.ts +108 -14
- package/lib/entity/dimension/AcDbDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDbDimension.js +99 -14
- package/lib/entity/dimension/AcDbDimension.js.map +1 -1
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts +48 -16
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDbOrdinateDimension.js +48 -16
- package/lib/entity/dimension/AcDbOrdinateDimension.js.map +1 -1
- package/lib/entity/dimension/AcDbRadialDimension.d.ts +167 -24
- package/lib/entity/dimension/AcDbRadialDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDbRadialDimension.js +162 -24
- package/lib/entity/dimension/AcDbRadialDimension.js.map +1 -1
- package/lib/misc/AcDbAngleUnits.d.ts +12 -0
- package/lib/misc/AcDbAngleUnits.d.ts.map +1 -1
- package/lib/misc/AcDbAngleUnits.js +12 -0
- package/lib/misc/AcDbAngleUnits.js.map +1 -1
- package/lib/misc/AcDbConstants.d.ts +20 -0
- package/lib/misc/AcDbConstants.d.ts.map +1 -1
- package/lib/misc/AcDbConstants.js +20 -0
- package/lib/misc/AcDbConstants.js.map +1 -1
- package/lib/misc/AcDbDimArrowType.d.ts +24 -21
- package/lib/misc/AcDbDimArrowType.d.ts.map +1 -1
- package/lib/misc/AcDbDimArrowType.js +24 -21
- package/lib/misc/AcDbDimArrowType.js.map +1 -1
- package/lib/misc/AcDbObjectIterator.d.ts +42 -3
- package/lib/misc/AcDbObjectIterator.d.ts.map +1 -1
- package/lib/misc/AcDbObjectIterator.js +42 -3
- package/lib/misc/AcDbObjectIterator.js.map +1 -1
- package/lib/misc/AcDbOsnapMode.d.ts +18 -10
- package/lib/misc/AcDbOsnapMode.d.ts.map +1 -1
- package/lib/misc/AcDbOsnapMode.js +18 -10
- package/lib/misc/AcDbOsnapMode.js.map +1 -1
- package/lib/misc/AcDbRenderingCache.d.ts +107 -29
- package/lib/misc/AcDbRenderingCache.d.ts.map +1 -1
- package/lib/misc/AcDbRenderingCache.js +105 -29
- package/lib/misc/AcDbRenderingCache.js.map +1 -1
- package/lib/misc/AcDbUnitsValue.d.ts +58 -8
- package/lib/misc/AcDbUnitsValue.d.ts.map +1 -1
- package/lib/misc/AcDbUnitsValue.js +58 -8
- package/lib/misc/AcDbUnitsValue.js.map +1 -1
- package/lib/object/AcDbDictionary.d.ts +128 -30
- package/lib/object/AcDbDictionary.d.ts.map +1 -1
- package/lib/object/AcDbDictionary.js +126 -30
- package/lib/object/AcDbDictionary.js.map +1 -1
- package/lib/object/AcDbRasterImageDef.d.ts +38 -9
- package/lib/object/AcDbRasterImageDef.d.ts.map +1 -1
- package/lib/object/AcDbRasterImageDef.js +37 -9
- package/lib/object/AcDbRasterImageDef.js.map +1 -1
- package/lib/object/layout/AcDbLayout.d.ts +152 -13
- package/lib/object/layout/AcDbLayout.d.ts.map +1 -1
- package/lib/object/layout/AcDbLayout.js +146 -13
- package/lib/object/layout/AcDbLayout.js.map +1 -1
- package/lib/object/layout/AcDbLayoutDictionary.d.ts +35 -7
- package/lib/object/layout/AcDbLayoutDictionary.d.ts.map +1 -1
- package/lib/object/layout/AcDbLayoutDictionary.js +35 -7
- package/lib/object/layout/AcDbLayoutDictionary.js.map +1 -1
- package/lib/object/layout/AcDbLayoutManager.d.ts +103 -31
- package/lib/object/layout/AcDbLayoutManager.d.ts.map +1 -1
- package/lib/object/layout/AcDbLayoutManager.js +98 -31
- package/lib/object/layout/AcDbLayoutManager.js.map +1 -1
- package/package.json +8 -4
|
@@ -3,37 +3,255 @@ import { AcDbDatabase } from '../database';
|
|
|
3
3
|
import { AcDbConversionProgressCallback, AcDbDatabaseConverter } from '../database/AcDbDatabaseConverter';
|
|
4
4
|
/**
|
|
5
5
|
* Default database converter for DXF files.
|
|
6
|
+
*
|
|
7
|
+
* This class extends AcDbDatabaseConverter to provide specialized functionality
|
|
8
|
+
* for converting DXF (Drawing Exchange Format) files into AcDbDatabase objects.
|
|
9
|
+
* It handles parsing DXF data, processing entities, blocks, tables, and other
|
|
10
|
+
* DXF-specific structures.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* const converter = new AcDbDxfConverter();
|
|
15
|
+
* const database = await converter.convert(dxfData);
|
|
16
|
+
* ```
|
|
6
17
|
*/
|
|
7
18
|
export declare class AcDbDxfConverter extends AcDbDatabaseConverter<ParsedDxf> {
|
|
19
|
+
/**
|
|
20
|
+
* Parses DXF data string into a ParsedDxf object.
|
|
21
|
+
*
|
|
22
|
+
* @param data - The DXF data as a string
|
|
23
|
+
* @returns Parsed DXF object containing all the parsed data
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const parsed = converter.parse(dxfString);
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
8
30
|
protected parse(data: string): ParsedDxf;
|
|
9
31
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
32
|
+
* Gets all fonts used by entities in model space and paper space.
|
|
33
|
+
*
|
|
34
|
+
* This method analyzes the DXF data to extract all font names used by
|
|
35
|
+
* text entities, MText entities, and insert entities throughout the drawing.
|
|
36
|
+
*
|
|
37
|
+
* @param dxf - Input parsed DXF model
|
|
38
|
+
* @returns Array of font names used in the drawing
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```typescript
|
|
42
|
+
* const fonts = converter.getFonts(parsedDxf);
|
|
43
|
+
* console.log('Used fonts:', fonts);
|
|
44
|
+
* ```
|
|
13
45
|
*/
|
|
14
46
|
protected getFonts(dxf: ParsedDxf): string[];
|
|
15
47
|
/**
|
|
16
|
-
*
|
|
48
|
+
* Iterates through entities in a block to get fonts used by text, MText, and insert entities.
|
|
49
|
+
*
|
|
50
|
+
* This is a helper method that recursively processes entities to extract font information
|
|
51
|
+
* from text-based entities and block references.
|
|
52
|
+
*
|
|
53
|
+
* @param entities - Array of DXF entities to process
|
|
54
|
+
* @param blockMap - Map of block definitions
|
|
55
|
+
* @param styleMap - Map of text styles to font names
|
|
56
|
+
* @param fonts - Set to collect font names
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* const fonts = new Set<string>();
|
|
61
|
+
* converter.getFontsInBlock(entities, blocks, styleMap, fonts);
|
|
62
|
+
* ```
|
|
17
63
|
*/
|
|
18
64
|
private getFontsInBlock;
|
|
19
65
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
66
|
+
* Processes entities in batches to maintain UI responsiveness.
|
|
67
|
+
*
|
|
68
|
+
* This method breaks up the entity processing work into smaller chunks that are
|
|
69
|
+
* executed asynchronously. This is often referred to as "batch processing" or
|
|
70
|
+
* "cooperative multitasking," where the time-consuming task is broken into
|
|
22
71
|
* smaller pieces and executed in small intervals to allow the UI to remain responsive.
|
|
72
|
+
*
|
|
73
|
+
* @param dxf - Parsed DXF data
|
|
74
|
+
* @param db - Target database to add entities to
|
|
75
|
+
* @param minimumChunkSize - Minimum number of entities to process in each chunk
|
|
76
|
+
* @param startPercentage - Object containing the starting percentage for progress tracking
|
|
77
|
+
* @param progress - Optional callback for progress updates
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```typescript
|
|
81
|
+
* await converter.processEntities(dxf, database, 100, { value: 0 }, progressCallback);
|
|
82
|
+
* ```
|
|
23
83
|
*/
|
|
24
84
|
protected processEntities(dxf: ParsedDxf, db: AcDbDatabase, minimumChunkSize: number, startPercentage: {
|
|
25
85
|
value: number;
|
|
26
86
|
}, progress?: AcDbConversionProgressCallback): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Processes entities within a specific block.
|
|
89
|
+
*
|
|
90
|
+
* This method handles the conversion and addition of entities to a specific
|
|
91
|
+
* block table record.
|
|
92
|
+
*
|
|
93
|
+
* @param entities - Array of DXF entities to process
|
|
94
|
+
* @param defaultBlockTableRecord - Default block table record to use
|
|
95
|
+
* @param blockTable - Block table reference
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```typescript
|
|
99
|
+
* await converter.processEntitiesInBlock(entities, blockRecord, blockTable);
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
27
102
|
private processEntitiesInBlock;
|
|
103
|
+
/**
|
|
104
|
+
* Processes blocks defined in the DXF file.
|
|
105
|
+
*
|
|
106
|
+
* This method iterates through all blocks in the DXF data and creates
|
|
107
|
+
* corresponding AcDbBlockTableRecord objects in the database.
|
|
108
|
+
*
|
|
109
|
+
* @param model - Parsed DXF model containing block definitions
|
|
110
|
+
* @param db - Target database to add blocks to
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```typescript
|
|
114
|
+
* converter.processBlocks(parsedDxf, database);
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
28
117
|
protected processBlocks(model: ParsedDxf, db: AcDbDatabase): void;
|
|
118
|
+
/**
|
|
119
|
+
* Processes header variables from the DXF file.
|
|
120
|
+
*
|
|
121
|
+
* This method extracts and sets various header variables such as color settings,
|
|
122
|
+
* angle base, angle direction, units, and point display settings.
|
|
123
|
+
*
|
|
124
|
+
* @param model - Parsed DXF model containing header information
|
|
125
|
+
* @param db - Target database to set header variables on
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```typescript
|
|
129
|
+
* converter.processHeader(parsedDxf, database);
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
29
132
|
protected processHeader(model: ParsedDxf, db: AcDbDatabase): void;
|
|
133
|
+
/**
|
|
134
|
+
* Processes block table records from the DXF file.
|
|
135
|
+
*
|
|
136
|
+
* This method creates AcDbBlockTableRecord objects for each block record
|
|
137
|
+
* defined in the DXF tables section.
|
|
138
|
+
*
|
|
139
|
+
* @param dxf - Parsed DXF data
|
|
140
|
+
* @param db - Target database to add block table records to
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* converter.processBlockTables(parsedDxf, database);
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
30
147
|
protected processBlockTables(dxf: ParsedDxf, db: AcDbDatabase): void;
|
|
148
|
+
/**
|
|
149
|
+
* Processes objects defined in the DXF file.
|
|
150
|
+
*
|
|
151
|
+
* This method handles the conversion of DXF objects such as layouts and
|
|
152
|
+
* image definitions into their corresponding AcDb objects.
|
|
153
|
+
*
|
|
154
|
+
* @param model - Parsed DXF model containing object definitions
|
|
155
|
+
* @param db - Target database to add objects to
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* ```typescript
|
|
159
|
+
* converter.processObjects(parsedDxf, database);
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
31
162
|
protected processObjects(model: ParsedDxf, db: AcDbDatabase): void;
|
|
163
|
+
/**
|
|
164
|
+
* Processes viewport table records from the DXF file.
|
|
165
|
+
*
|
|
166
|
+
* This method creates AcDbViewportTableRecord objects for each viewport
|
|
167
|
+
* defined in the DXF tables section, including their properties like
|
|
168
|
+
* center, corners, snap settings, and grid settings.
|
|
169
|
+
*
|
|
170
|
+
* @param model - Parsed DXF model containing viewport definitions
|
|
171
|
+
* @param db - Target database to add viewport table records to
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```typescript
|
|
175
|
+
* converter.processViewports(parsedDxf, database);
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
32
178
|
protected processViewports(model: ParsedDxf, db: AcDbDatabase): void;
|
|
179
|
+
/**
|
|
180
|
+
* Processes layer table records from the DXF file.
|
|
181
|
+
*
|
|
182
|
+
* This method creates AcDbLayerTableRecord objects for each layer
|
|
183
|
+
* defined in the DXF tables section, including their properties like
|
|
184
|
+
* color, linetype, lineweight, and visibility settings.
|
|
185
|
+
*
|
|
186
|
+
* @param model - Parsed DXF model containing layer definitions
|
|
187
|
+
* @param db - Target database to add layer table records to
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* ```typescript
|
|
191
|
+
* converter.processLayers(parsedDxf, database);
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
33
194
|
protected processLayers(model: ParsedDxf, db: AcDbDatabase): void;
|
|
195
|
+
/**
|
|
196
|
+
* Processes linetype table records from the DXF file.
|
|
197
|
+
*
|
|
198
|
+
* This method creates AcDbLinetypeTableRecord objects for each linetype
|
|
199
|
+
* defined in the DXF tables section.
|
|
200
|
+
*
|
|
201
|
+
* @param model - Parsed DXF model containing linetype definitions
|
|
202
|
+
* @param db - Target database to add linetype table records to
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```typescript
|
|
206
|
+
* converter.processLineTypes(parsedDxf, database);
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
34
209
|
protected processLineTypes(model: ParsedDxf, db: AcDbDatabase): void;
|
|
210
|
+
/**
|
|
211
|
+
* Processes text style table records from the DXF file.
|
|
212
|
+
*
|
|
213
|
+
* This method creates AcDbTextStyleTableRecord objects for each text style
|
|
214
|
+
* defined in the DXF tables section.
|
|
215
|
+
*
|
|
216
|
+
* @param model - Parsed DXF model containing text style definitions
|
|
217
|
+
* @param db - Target database to add text style table records to
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* ```typescript
|
|
221
|
+
* converter.processTextStyles(parsedDxf, database);
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
35
224
|
protected processTextStyles(model: ParsedDxf, db: AcDbDatabase): void;
|
|
225
|
+
/**
|
|
226
|
+
* Processes dimension style table records from the DXF file.
|
|
227
|
+
*
|
|
228
|
+
* This method creates AcDbDimStyleTableRecord objects for each dimension style
|
|
229
|
+
* defined in the DXF tables section, including all dimension-related properties
|
|
230
|
+
* like text positioning, arrow settings, and tolerance settings.
|
|
231
|
+
*
|
|
232
|
+
* @param model - Parsed DXF model containing dimension style definitions
|
|
233
|
+
* @param db - Target database to add dimension style table records to
|
|
234
|
+
*
|
|
235
|
+
* @example
|
|
236
|
+
* ```typescript
|
|
237
|
+
* converter.processDimStyles(parsedDxf, database);
|
|
238
|
+
* ```
|
|
239
|
+
*/
|
|
36
240
|
protected processDimStyles(model: ParsedDxf, db: AcDbDatabase): void;
|
|
241
|
+
/**
|
|
242
|
+
* Processes common table entry attributes from DXF data.
|
|
243
|
+
*
|
|
244
|
+
* This helper method sets the common attributes (name, objectId, ownerId)
|
|
245
|
+
* that are shared across all table entries.
|
|
246
|
+
*
|
|
247
|
+
* @param entry - DXF table entry containing the source data
|
|
248
|
+
* @param dbEntry - AcDbSymbolTableRecord to populate with the data
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* ```typescript
|
|
252
|
+
* converter.processCommonTableEntryAttrs(dxfEntry, dbRecord);
|
|
253
|
+
* ```
|
|
254
|
+
*/
|
|
37
255
|
private processCommonTableEntryAttrs;
|
|
38
256
|
}
|
|
39
257
|
//# sourceMappingURL=AcDbDxfConverter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbDxfConverter.d.ts","sourceRoot":"","sources":["../../src/converter/AcDbDxfConverter.ts"],"names":[],"mappings":"AACA,OAAkB,EAGhB,SAAS,EAEV,MAAM,qBAAqB,CAAA;AAY5B,OAAO,EAGL,YAAY,EAab,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,EACtB,MAAM,mCAAmC,CAAA;AAK1C
|
|
1
|
+
{"version":3,"file":"AcDbDxfConverter.d.ts","sourceRoot":"","sources":["../../src/converter/AcDbDxfConverter.ts"],"names":[],"mappings":"AACA,OAAkB,EAGhB,SAAS,EAEV,MAAM,qBAAqB,CAAA;AAY5B,OAAO,EAGL,YAAY,EAab,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,EACtB,MAAM,mCAAmC,CAAA;AAK1C;;;;;;;;;;;;;GAaG;AACH,qBAAa,gBAAiB,SAAQ,qBAAqB,CAAC,SAAS,CAAC;IACpE;;;;;;;;;;OAUG;IACH,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS;IAKxC;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS;IA2BjC;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,eAAe;IA6BvB;;;;;;;;;;;;;;;;;;OAkBG;cACa,eAAe,CAC7B,GAAG,EAAE,SAAS,EACd,EAAE,EAAE,YAAY,EAChB,gBAAgB,EAAE,MAAM,EACxB,eAAe,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,EAClC,QAAQ,CAAC,EAAE,8BAA8B;IA2C3C;;;;;;;;;;;;;;OAcG;YACW,sBAAsB;IAsBpC;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY;IAsB1D;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY;IAc1D;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY;IAa7D;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY;IAuB3D;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY;IA6G7D;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY;IAqB1D;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY;IAY7D;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY;IAW9D;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY;IAmF7D;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,4BAA4B;CAQrC"}
|
|
@@ -94,20 +94,52 @@ import { AcDbEntityConverter } from './AcDbEntitiyConverter';
|
|
|
94
94
|
import { AcDbObjectConverter } from './AcDbObjectConverter';
|
|
95
95
|
/**
|
|
96
96
|
* Default database converter for DXF files.
|
|
97
|
+
*
|
|
98
|
+
* This class extends AcDbDatabaseConverter to provide specialized functionality
|
|
99
|
+
* for converting DXF (Drawing Exchange Format) files into AcDbDatabase objects.
|
|
100
|
+
* It handles parsing DXF data, processing entities, blocks, tables, and other
|
|
101
|
+
* DXF-specific structures.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* const converter = new AcDbDxfConverter();
|
|
106
|
+
* const database = await converter.convert(dxfData);
|
|
107
|
+
* ```
|
|
97
108
|
*/
|
|
98
109
|
var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
99
110
|
__extends(AcDbDxfConverter, _super);
|
|
100
111
|
function AcDbDxfConverter() {
|
|
101
112
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
102
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Parses DXF data string into a ParsedDxf object.
|
|
116
|
+
*
|
|
117
|
+
* @param data - The DXF data as a string
|
|
118
|
+
* @returns Parsed DXF object containing all the parsed data
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* const parsed = converter.parse(dxfString);
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
103
125
|
AcDbDxfConverter.prototype.parse = function (data) {
|
|
104
126
|
var parser = new DxfParser();
|
|
105
127
|
return parser.parseSync(data);
|
|
106
128
|
};
|
|
107
129
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
130
|
+
* Gets all fonts used by entities in model space and paper space.
|
|
131
|
+
*
|
|
132
|
+
* This method analyzes the DXF data to extract all font names used by
|
|
133
|
+
* text entities, MText entities, and insert entities throughout the drawing.
|
|
134
|
+
*
|
|
135
|
+
* @param dxf - Input parsed DXF model
|
|
136
|
+
* @returns Array of font names used in the drawing
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```typescript
|
|
140
|
+
* const fonts = converter.getFonts(parsedDxf);
|
|
141
|
+
* console.log('Used fonts:', fonts);
|
|
142
|
+
* ```
|
|
111
143
|
*/
|
|
112
144
|
AcDbDxfConverter.prototype.getFonts = function (dxf) {
|
|
113
145
|
var _a;
|
|
@@ -139,7 +171,21 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
139
171
|
return Array.from(fonts);
|
|
140
172
|
};
|
|
141
173
|
/**
|
|
142
|
-
*
|
|
174
|
+
* Iterates through entities in a block to get fonts used by text, MText, and insert entities.
|
|
175
|
+
*
|
|
176
|
+
* This is a helper method that recursively processes entities to extract font information
|
|
177
|
+
* from text-based entities and block references.
|
|
178
|
+
*
|
|
179
|
+
* @param entities - Array of DXF entities to process
|
|
180
|
+
* @param blockMap - Map of block definitions
|
|
181
|
+
* @param styleMap - Map of text styles to font names
|
|
182
|
+
* @param fonts - Set to collect font names
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```typescript
|
|
186
|
+
* const fonts = new Set<string>();
|
|
187
|
+
* converter.getFontsInBlock(entities, blocks, styleMap, fonts);
|
|
188
|
+
* ```
|
|
143
189
|
*/
|
|
144
190
|
AcDbDxfConverter.prototype.getFontsInBlock = function (entities, blockMap, styleMap, fonts) {
|
|
145
191
|
var _this = this;
|
|
@@ -168,9 +214,23 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
168
214
|
});
|
|
169
215
|
};
|
|
170
216
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
217
|
+
* Processes entities in batches to maintain UI responsiveness.
|
|
218
|
+
*
|
|
219
|
+
* This method breaks up the entity processing work into smaller chunks that are
|
|
220
|
+
* executed asynchronously. This is often referred to as "batch processing" or
|
|
221
|
+
* "cooperative multitasking," where the time-consuming task is broken into
|
|
173
222
|
* smaller pieces and executed in small intervals to allow the UI to remain responsive.
|
|
223
|
+
*
|
|
224
|
+
* @param dxf - Parsed DXF data
|
|
225
|
+
* @param db - Target database to add entities to
|
|
226
|
+
* @param minimumChunkSize - Minimum number of entities to process in each chunk
|
|
227
|
+
* @param startPercentage - Object containing the starting percentage for progress tracking
|
|
228
|
+
* @param progress - Optional callback for progress updates
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* ```typescript
|
|
232
|
+
* await converter.processEntities(dxf, database, 100, { value: 0 }, progressCallback);
|
|
233
|
+
* ```
|
|
174
234
|
*/
|
|
175
235
|
AcDbDxfConverter.prototype.processEntities = function (dxf, db, minimumChunkSize, startPercentage, progress) {
|
|
176
236
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -224,6 +284,21 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
224
284
|
});
|
|
225
285
|
});
|
|
226
286
|
};
|
|
287
|
+
/**
|
|
288
|
+
* Processes entities within a specific block.
|
|
289
|
+
*
|
|
290
|
+
* This method handles the conversion and addition of entities to a specific
|
|
291
|
+
* block table record.
|
|
292
|
+
*
|
|
293
|
+
* @param entities - Array of DXF entities to process
|
|
294
|
+
* @param defaultBlockTableRecord - Default block table record to use
|
|
295
|
+
* @param blockTable - Block table reference
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
* ```typescript
|
|
299
|
+
* await converter.processEntitiesInBlock(entities, blockRecord, blockTable);
|
|
300
|
+
* ```
|
|
301
|
+
*/
|
|
227
302
|
AcDbDxfConverter.prototype.processEntitiesInBlock = function (entities, defaultBlockTableRecord, blockTable) {
|
|
228
303
|
return __awaiter(this, void 0, void 0, function () {
|
|
229
304
|
var converter, entityCount, i, entity, dbEntity, blockTableRecord;
|
|
@@ -247,6 +322,20 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
247
322
|
});
|
|
248
323
|
});
|
|
249
324
|
};
|
|
325
|
+
/**
|
|
326
|
+
* Processes blocks defined in the DXF file.
|
|
327
|
+
*
|
|
328
|
+
* This method iterates through all blocks in the DXF data and creates
|
|
329
|
+
* corresponding AcDbBlockTableRecord objects in the database.
|
|
330
|
+
*
|
|
331
|
+
* @param model - Parsed DXF model containing block definitions
|
|
332
|
+
* @param db - Target database to add blocks to
|
|
333
|
+
*
|
|
334
|
+
* @example
|
|
335
|
+
* ```typescript
|
|
336
|
+
* converter.processBlocks(parsedDxf, database);
|
|
337
|
+
* ```
|
|
338
|
+
*/
|
|
250
339
|
AcDbDxfConverter.prototype.processBlocks = function (model, db) {
|
|
251
340
|
var e_1, _a;
|
|
252
341
|
var blocks = model.blocks;
|
|
@@ -275,6 +364,20 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
275
364
|
finally { if (e_1) throw e_1.error; }
|
|
276
365
|
}
|
|
277
366
|
};
|
|
367
|
+
/**
|
|
368
|
+
* Processes header variables from the DXF file.
|
|
369
|
+
*
|
|
370
|
+
* This method extracts and sets various header variables such as color settings,
|
|
371
|
+
* angle base, angle direction, units, and point display settings.
|
|
372
|
+
*
|
|
373
|
+
* @param model - Parsed DXF model containing header information
|
|
374
|
+
* @param db - Target database to set header variables on
|
|
375
|
+
*
|
|
376
|
+
* @example
|
|
377
|
+
* ```typescript
|
|
378
|
+
* converter.processHeader(parsedDxf, database);
|
|
379
|
+
* ```
|
|
380
|
+
*/
|
|
278
381
|
AcDbDxfConverter.prototype.processHeader = function (model, db) {
|
|
279
382
|
var header = model.header;
|
|
280
383
|
// TODO: Check not supported versions
|
|
@@ -287,6 +390,20 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
287
390
|
db.pdmode = header['$PDMODE'] || 0;
|
|
288
391
|
db.pdsize = header['$PDSIZE'] || 0.0;
|
|
289
392
|
};
|
|
393
|
+
/**
|
|
394
|
+
* Processes block table records from the DXF file.
|
|
395
|
+
*
|
|
396
|
+
* This method creates AcDbBlockTableRecord objects for each block record
|
|
397
|
+
* defined in the DXF tables section.
|
|
398
|
+
*
|
|
399
|
+
* @param dxf - Parsed DXF data
|
|
400
|
+
* @param db - Target database to add block table records to
|
|
401
|
+
*
|
|
402
|
+
* @example
|
|
403
|
+
* ```typescript
|
|
404
|
+
* converter.processBlockTables(parsedDxf, database);
|
|
405
|
+
* ```
|
|
406
|
+
*/
|
|
290
407
|
AcDbDxfConverter.prototype.processBlockTables = function (dxf, db) {
|
|
291
408
|
var _a;
|
|
292
409
|
var btrs = (_a = dxf.tables.BLOCK_RECORD) === null || _a === void 0 ? void 0 : _a.entries;
|
|
@@ -300,6 +417,20 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
300
417
|
});
|
|
301
418
|
}
|
|
302
419
|
};
|
|
420
|
+
/**
|
|
421
|
+
* Processes objects defined in the DXF file.
|
|
422
|
+
*
|
|
423
|
+
* This method handles the conversion of DXF objects such as layouts and
|
|
424
|
+
* image definitions into their corresponding AcDb objects.
|
|
425
|
+
*
|
|
426
|
+
* @param model - Parsed DXF model containing object definitions
|
|
427
|
+
* @param db - Target database to add objects to
|
|
428
|
+
*
|
|
429
|
+
* @example
|
|
430
|
+
* ```typescript
|
|
431
|
+
* converter.processObjects(parsedDxf, database);
|
|
432
|
+
* ```
|
|
433
|
+
*/
|
|
303
434
|
AcDbDxfConverter.prototype.processObjects = function (model, db) {
|
|
304
435
|
var objects = model.objects.byName;
|
|
305
436
|
var objectConverter = new AcDbObjectConverter();
|
|
@@ -318,6 +449,21 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
318
449
|
});
|
|
319
450
|
}
|
|
320
451
|
};
|
|
452
|
+
/**
|
|
453
|
+
* Processes viewport table records from the DXF file.
|
|
454
|
+
*
|
|
455
|
+
* This method creates AcDbViewportTableRecord objects for each viewport
|
|
456
|
+
* defined in the DXF tables section, including their properties like
|
|
457
|
+
* center, corners, snap settings, and grid settings.
|
|
458
|
+
*
|
|
459
|
+
* @param model - Parsed DXF model containing viewport definitions
|
|
460
|
+
* @param db - Target database to add viewport table records to
|
|
461
|
+
*
|
|
462
|
+
* @example
|
|
463
|
+
* ```typescript
|
|
464
|
+
* converter.processViewports(parsedDxf, database);
|
|
465
|
+
* ```
|
|
466
|
+
*/
|
|
321
467
|
AcDbDxfConverter.prototype.processViewports = function (model, db) {
|
|
322
468
|
var _this = this;
|
|
323
469
|
var _a, _b;
|
|
@@ -427,6 +573,21 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
427
573
|
});
|
|
428
574
|
}
|
|
429
575
|
};
|
|
576
|
+
/**
|
|
577
|
+
* Processes layer table records from the DXF file.
|
|
578
|
+
*
|
|
579
|
+
* This method creates AcDbLayerTableRecord objects for each layer
|
|
580
|
+
* defined in the DXF tables section, including their properties like
|
|
581
|
+
* color, linetype, lineweight, and visibility settings.
|
|
582
|
+
*
|
|
583
|
+
* @param model - Parsed DXF model containing layer definitions
|
|
584
|
+
* @param db - Target database to add layer table records to
|
|
585
|
+
*
|
|
586
|
+
* @example
|
|
587
|
+
* ```typescript
|
|
588
|
+
* converter.processLayers(parsedDxf, database);
|
|
589
|
+
* ```
|
|
590
|
+
*/
|
|
430
591
|
AcDbDxfConverter.prototype.processLayers = function (model, db) {
|
|
431
592
|
var _this = this;
|
|
432
593
|
var _a, _b;
|
|
@@ -449,6 +610,20 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
449
610
|
});
|
|
450
611
|
}
|
|
451
612
|
};
|
|
613
|
+
/**
|
|
614
|
+
* Processes linetype table records from the DXF file.
|
|
615
|
+
*
|
|
616
|
+
* This method creates AcDbLinetypeTableRecord objects for each linetype
|
|
617
|
+
* defined in the DXF tables section.
|
|
618
|
+
*
|
|
619
|
+
* @param model - Parsed DXF model containing linetype definitions
|
|
620
|
+
* @param db - Target database to add linetype table records to
|
|
621
|
+
*
|
|
622
|
+
* @example
|
|
623
|
+
* ```typescript
|
|
624
|
+
* converter.processLineTypes(parsedDxf, database);
|
|
625
|
+
* ```
|
|
626
|
+
*/
|
|
452
627
|
AcDbDxfConverter.prototype.processLineTypes = function (model, db) {
|
|
453
628
|
var _this = this;
|
|
454
629
|
var _a, _b;
|
|
@@ -462,6 +637,20 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
462
637
|
});
|
|
463
638
|
}
|
|
464
639
|
};
|
|
640
|
+
/**
|
|
641
|
+
* Processes text style table records from the DXF file.
|
|
642
|
+
*
|
|
643
|
+
* This method creates AcDbTextStyleTableRecord objects for each text style
|
|
644
|
+
* defined in the DXF tables section.
|
|
645
|
+
*
|
|
646
|
+
* @param model - Parsed DXF model containing text style definitions
|
|
647
|
+
* @param db - Target database to add text style table records to
|
|
648
|
+
*
|
|
649
|
+
* @example
|
|
650
|
+
* ```typescript
|
|
651
|
+
* converter.processTextStyles(parsedDxf, database);
|
|
652
|
+
* ```
|
|
653
|
+
*/
|
|
465
654
|
AcDbDxfConverter.prototype.processTextStyles = function (model, db) {
|
|
466
655
|
var _this = this;
|
|
467
656
|
var _a;
|
|
@@ -474,6 +663,21 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
474
663
|
});
|
|
475
664
|
}
|
|
476
665
|
};
|
|
666
|
+
/**
|
|
667
|
+
* Processes dimension style table records from the DXF file.
|
|
668
|
+
*
|
|
669
|
+
* This method creates AcDbDimStyleTableRecord objects for each dimension style
|
|
670
|
+
* defined in the DXF tables section, including all dimension-related properties
|
|
671
|
+
* like text positioning, arrow settings, and tolerance settings.
|
|
672
|
+
*
|
|
673
|
+
* @param model - Parsed DXF model containing dimension style definitions
|
|
674
|
+
* @param db - Target database to add dimension style table records to
|
|
675
|
+
*
|
|
676
|
+
* @example
|
|
677
|
+
* ```typescript
|
|
678
|
+
* converter.processDimStyles(parsedDxf, database);
|
|
679
|
+
* ```
|
|
680
|
+
*/
|
|
477
681
|
AcDbDxfConverter.prototype.processDimStyles = function (model, db) {
|
|
478
682
|
var _this = this;
|
|
479
683
|
var _a;
|
|
@@ -556,6 +760,20 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
556
760
|
});
|
|
557
761
|
}
|
|
558
762
|
};
|
|
763
|
+
/**
|
|
764
|
+
* Processes common table entry attributes from DXF data.
|
|
765
|
+
*
|
|
766
|
+
* This helper method sets the common attributes (name, objectId, ownerId)
|
|
767
|
+
* that are shared across all table entries.
|
|
768
|
+
*
|
|
769
|
+
* @param entry - DXF table entry containing the source data
|
|
770
|
+
* @param dbEntry - AcDbSymbolTableRecord to populate with the data
|
|
771
|
+
*
|
|
772
|
+
* @example
|
|
773
|
+
* ```typescript
|
|
774
|
+
* converter.processCommonTableEntryAttrs(dxfEntry, dbRecord);
|
|
775
|
+
* ```
|
|
776
|
+
*/
|
|
559
777
|
AcDbDxfConverter.prototype.processCommonTableEntryAttrs = function (entry, dbEntry) {
|
|
560
778
|
dbEntry.name = entry.name;
|
|
561
779
|
dbEntry.objectId = entry.handle;
|