dxf-json 0.0.14 → 0.0.17

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.
Files changed (158) hide show
  1. package/dist/consts/block.d.ts +10 -0
  2. package/dist/consts/color.d.ts +5 -0
  3. package/dist/consts/config.d.ts +2 -0
  4. package/dist/consts/dimension.d.ts +61 -0
  5. package/dist/consts/hatch.d.ts +44 -0
  6. package/dist/consts/header.d.ts +9 -0
  7. package/dist/consts/index.d.ts +9 -0
  8. package/dist/consts/lineweight.d.ts +5 -0
  9. package/dist/consts/measurement.d.ts +4 -0
  10. package/dist/consts/obscuredLineTypes.d.ts +21 -0
  11. package/dist/consts/scene.d.ts +2 -0
  12. package/dist/consts/viewport.d.ts +56 -0
  13. package/dist/index.d.ts +6 -0
  14. package/dist/parser/AutoCadColorIndex.d.ts +8 -0
  15. package/dist/parser/DxfArrayScanner.d.ts +38 -0
  16. package/dist/parser/DxfParser.d.ts +11 -0
  17. package/dist/parser/ParseHelpers.d.ts +21 -0
  18. package/dist/parser/blocks/blocks.test.d.ts +1 -0
  19. package/dist/parser/blocks/index.d.ts +4 -0
  20. package/dist/parser/blocks/types.d.ts +14 -0
  21. package/dist/parser/entities/arc/index.d.ts +2 -0
  22. package/dist/parser/entities/arc/parser.d.ts +7 -0
  23. package/dist/parser/entities/arc/types.d.ts +12 -0
  24. package/dist/parser/entities/attdef/consts.d.ts +11 -0
  25. package/dist/parser/entities/attdef/index.d.ts +3 -0
  26. package/dist/parser/entities/attdef/parser.d.ts +8 -0
  27. package/dist/parser/entities/attdef/types.d.ts +17 -0
  28. package/dist/parser/entities/attribute/consts.d.ts +6 -0
  29. package/dist/parser/entities/attribute/index.d.ts +3 -0
  30. package/dist/parser/entities/attribute/parser.d.ts +8 -0
  31. package/dist/parser/entities/attribute/types.d.ts +30 -0
  32. package/dist/parser/entities/circle/index.d.ts +2 -0
  33. package/dist/parser/entities/circle/parser.d.ts +8 -0
  34. package/dist/parser/entities/circle/types.d.ts +10 -0
  35. package/dist/parser/entities/dimension/common.d.ts +6 -0
  36. package/dist/parser/entities/dimension/index.d.ts +6 -0
  37. package/dist/parser/entities/dimension/types.d.ts +48 -0
  38. package/dist/parser/entities/ellipse/index.d.ts +2 -0
  39. package/dist/parser/entities/ellipse/parser.d.ts +7 -0
  40. package/dist/parser/entities/ellipse/types.d.ts +12 -0
  41. package/dist/parser/entities/entities.test.d.ts +1 -0
  42. package/dist/parser/entities/hatch/boundaryPathData/edge.d.ts +6 -0
  43. package/dist/parser/entities/hatch/boundaryPathData/index.d.ts +5 -0
  44. package/dist/parser/entities/hatch/boundaryPathData/polyline.d.ts +2 -0
  45. package/dist/parser/entities/hatch/boundaryPathData/shared.d.ts +2 -0
  46. package/dist/parser/entities/hatch/index.d.ts +8 -0
  47. package/dist/parser/entities/hatch/patternData.d.ts +3 -0
  48. package/dist/parser/entities/hatch/types/boundaryPath.d.ts +59 -0
  49. package/dist/parser/entities/hatch/types/definitionLine.d.ts +8 -0
  50. package/dist/parser/entities/hatch/types/hatch.d.ts +38 -0
  51. package/dist/parser/entities/hatch/types/index.d.ts +3 -0
  52. package/dist/parser/entities/index.d.ts +8 -0
  53. package/dist/parser/entities/insert/index.d.ts +2 -0
  54. package/dist/parser/entities/insert/parser.d.ts +8 -0
  55. package/dist/parser/entities/insert/types.d.ts +18 -0
  56. package/dist/parser/entities/leader/consts.d.ts +6 -0
  57. package/dist/parser/entities/leader/index.d.ts +3 -0
  58. package/dist/parser/entities/leader/parser.d.ts +8 -0
  59. package/dist/parser/entities/leader/types.d.ts +23 -0
  60. package/dist/parser/entities/line/index.d.ts +2 -0
  61. package/dist/parser/entities/line/parser.d.ts +8 -0
  62. package/dist/parser/entities/line/types.d.ts +10 -0
  63. package/dist/parser/entities/lwpolyline/consts.d.ts +4 -0
  64. package/dist/parser/entities/lwpolyline/index.d.ts +3 -0
  65. package/dist/parser/entities/lwpolyline/parser.d.ts +7 -0
  66. package/dist/parser/entities/lwpolyline/types.d.ts +19 -0
  67. package/dist/parser/entities/mtext/consts.d.ts +5 -0
  68. package/dist/parser/entities/mtext/index.d.ts +3 -0
  69. package/dist/parser/entities/mtext/parser.d.ts +10 -0
  70. package/dist/parser/entities/mtext/types.d.ts +33 -0
  71. package/dist/parser/entities/point/index.d.ts +2 -0
  72. package/dist/parser/entities/point/parser.d.ts +6 -0
  73. package/dist/parser/entities/point/types.d.ts +9 -0
  74. package/dist/parser/entities/polyline/consts.d.ts +16 -0
  75. package/dist/parser/entities/polyline/index.d.ts +3 -0
  76. package/dist/parser/entities/polyline/parser.d.ts +7 -0
  77. package/dist/parser/entities/polyline/types.d.ts +19 -0
  78. package/dist/parser/entities/section/index.d.ts +2 -0
  79. package/dist/parser/entities/section/parser.d.ts +7 -0
  80. package/dist/parser/entities/section/types.d.ts +19 -0
  81. package/dist/parser/entities/shared.d.ts +35 -0
  82. package/dist/parser/entities/solid/index.d.ts +2 -0
  83. package/dist/parser/entities/solid/parser.d.ts +8 -0
  84. package/dist/parser/entities/solid/types.d.ts +9 -0
  85. package/dist/parser/entities/spline/consts.d.ts +8 -0
  86. package/dist/parser/entities/spline/index.d.ts +3 -0
  87. package/dist/parser/entities/spline/parser.d.ts +8 -0
  88. package/dist/parser/entities/spline/types.d.ts +21 -0
  89. package/dist/parser/entities/text/consts.d.ts +19 -0
  90. package/dist/parser/entities/text/index.d.ts +3 -0
  91. package/dist/parser/entities/text/parser.d.ts +26 -0
  92. package/dist/parser/entities/text/types.d.ts +20 -0
  93. package/dist/parser/entities/vertex/consts.d.ts +10 -0
  94. package/dist/parser/entities/vertex/index.d.ts +3 -0
  95. package/dist/parser/entities/vertex/parser.d.ts +8 -0
  96. package/dist/parser/entities/vertex/types.d.ts +16 -0
  97. package/dist/parser/entities/viewport/index.d.ts +5 -0
  98. package/dist/parser/entities/viewport/types.d.ts +51 -0
  99. package/dist/parser/filterDummyBlocks.d.ts +2 -0
  100. package/dist/parser/header/index.d.ts +3 -0
  101. package/dist/parser/objects/common.d.ts +8 -0
  102. package/dist/parser/objects/dictionary.d.ts +20 -0
  103. package/dist/parser/objects/index.d.ts +6 -0
  104. package/dist/parser/objects/layout.d.ts +30 -0
  105. package/dist/parser/objects/plotSettings.d.ts +64 -0
  106. package/dist/parser/objects/treefy.d.ts +2 -0
  107. package/dist/parser/objects/types.d.ts +15 -0
  108. package/dist/parser/shared/index.d.ts +7 -0
  109. package/dist/parser/shared/parsePoint.d.ts +7 -0
  110. package/dist/parser/shared/parserGenerator.d.ts +15 -0
  111. package/dist/parser/shared/parserGenerator.test.d.ts +1 -0
  112. package/dist/parser/shared/xdata/index.d.ts +3 -0
  113. package/dist/parser/shared/xdata/interpreter.d.ts +20 -0
  114. package/dist/parser/shared/xdata/interpreter.test.d.ts +1 -0
  115. package/dist/parser/shared/xdata/parser.d.ts +6 -0
  116. package/dist/parser/shared/xdata/parser.test.d.ts +1 -0
  117. package/dist/parser/shared/xdata/types.d.ts +9 -0
  118. package/dist/parser/tables/blockRecord/index.d.ts +2 -0
  119. package/dist/parser/tables/blockRecord/parser.d.ts +1 -0
  120. package/dist/parser/tables/blockRecord/types.d.ts +10 -0
  121. package/dist/parser/tables/dimStyle/consts.d.ts +2 -0
  122. package/dist/parser/tables/dimStyle/index.d.ts +3 -0
  123. package/dist/parser/tables/dimStyle/parser.d.ts +1 -0
  124. package/dist/parser/tables/dimStyle/types.d.ts +83 -0
  125. package/dist/parser/tables/index.d.ts +2 -0
  126. package/dist/parser/tables/layer/index.d.ts +2 -0
  127. package/dist/parser/tables/layer/parser.d.ts +1 -0
  128. package/dist/parser/tables/layer/types.d.ts +13 -0
  129. package/dist/parser/tables/ltype/consts.d.ts +6 -0
  130. package/dist/parser/tables/ltype/index.d.ts +3 -0
  131. package/dist/parser/tables/ltype/parser.d.ts +1 -0
  132. package/dist/parser/tables/ltype/types.d.ts +21 -0
  133. package/dist/parser/tables/parser.d.ts +2 -0
  134. package/dist/parser/tables/shared.d.ts +2 -0
  135. package/dist/parser/tables/style/index.d.ts +2 -0
  136. package/dist/parser/tables/style/parser.d.ts +1 -0
  137. package/dist/parser/tables/style/types.d.ts +14 -0
  138. package/dist/parser/tables/types.d.ts +14 -0
  139. package/dist/parser/tables/vport/index.d.ts +2 -0
  140. package/dist/parser/tables/vport/parser.d.ts +1 -0
  141. package/dist/parser/tables/vport/types.d.ts +43 -0
  142. package/dist/parser/types.d.ts +29 -0
  143. package/dist/types/color.d.ts +3 -0
  144. package/dist/types/dxfHeader.d.ts +16 -0
  145. package/dist/types/entity.d.ts +6 -0
  146. package/dist/types/index.d.ts +24 -0
  147. package/dist/utils/binarySearch.d.ts +1 -0
  148. package/dist/utils/disjointSet.d.ts +6 -0
  149. package/dist/utils/flooding.d.ts +8 -0
  150. package/dist/utils/functional.d.ts +17 -0
  151. package/dist/utils/graph.d.ts +19 -0
  152. package/dist/utils/index.d.ts +30 -0
  153. package/dist/utils/queue.d.ts +19 -0
  154. package/dist/utils/triangle.d.ts +2 -0
  155. package/package.json +2 -2
  156. package/src/index.ts +3 -1
  157. package/tsconfig.json +1 -0
  158. package/webpack.config.js +7 -0
@@ -0,0 +1,59 @@
1
+ import type { BoundaryPathEdgeType } from '../../../../consts/hatch';
2
+ import type { Point2D } from '../../../../types';
3
+ interface BoundaryPathBase {
4
+ boundaryPathTypeFlag: number;
5
+ numberOfSourceBoundaryObjects: number;
6
+ sourceBoundaryObjects: string[];
7
+ }
8
+ export interface PolylineBoundaryPath extends BoundaryPathBase {
9
+ hasBulge: boolean;
10
+ isClosed: boolean;
11
+ numberOfVertices: number;
12
+ vertices: (Point2D & {
13
+ bulge: number;
14
+ })[];
15
+ }
16
+ export interface EdgeBoundaryPath<EdgeType extends BoundaryPathEdge> extends BoundaryPathBase {
17
+ numberOfEdges: number;
18
+ edges: EdgeType[];
19
+ }
20
+ interface BoundaryPathEdgeCommon {
21
+ type: BoundaryPathEdgeType;
22
+ }
23
+ export type BoundaryPath = PolylineBoundaryPath | EdgeBoundaryPath<BoundaryPathEdge>;
24
+ export interface LineEdge extends BoundaryPathEdgeCommon {
25
+ start: Point2D;
26
+ end: Point2D;
27
+ }
28
+ export interface ArcEdge extends BoundaryPathEdgeCommon {
29
+ center: Point2D;
30
+ radius: number;
31
+ startAngle: number;
32
+ endAngle: number;
33
+ isCCW?: boolean;
34
+ }
35
+ export interface EllipseEdge extends BoundaryPathEdgeCommon {
36
+ center: Point2D;
37
+ end: Point2D;
38
+ lengthOfMinorAxis: number;
39
+ startAngle: number;
40
+ endAngle: number;
41
+ isCCW?: boolean;
42
+ }
43
+ export interface SplineEdge extends BoundaryPathEdgeCommon {
44
+ degree: number;
45
+ splineFlag: number;
46
+ isPeriodic?: boolean;
47
+ numberOfKnots: number;
48
+ numberOfControlPoints: number;
49
+ knots: number[];
50
+ controlPoints: (Point2D & {
51
+ weight?: number;
52
+ })[];
53
+ numberOfFitData: number;
54
+ fitDatum: Point2D[];
55
+ startTangent: Point2D;
56
+ endTangent: Point2D;
57
+ }
58
+ export type BoundaryPathEdge = LineEdge | ArcEdge | EllipseEdge | SplineEdge;
59
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Point2D } from '../../../../types';
2
+ export interface HatchDefinitionLine {
3
+ angle: number;
4
+ base: Point2D;
5
+ offset: Point2D;
6
+ numberOfDashLengths: number;
7
+ dashLengths: number[];
8
+ }
@@ -0,0 +1,38 @@
1
+ import type { HatchAssociativity, HatchGradientColorFlag, HatchGradientFlag, HatchPatternType, HatchSolidFill, HatchStyle } from '../../../../consts/hatch';
2
+ import type { Point3D } from '../../../../types';
3
+ import type { CommonDxfEntity } from '../../shared';
4
+ import type { BoundaryPath } from './boundaryPath';
5
+ import type { HatchDefinitionLine } from './definitionLine';
6
+ interface HatchEntityBase extends CommonDxfEntity {
7
+ type: 'HATCH';
8
+ subclassMarker: 'AcDbHatch';
9
+ elevationPoint: Point3D;
10
+ extrusionDirection?: Point3D;
11
+ patternName: string;
12
+ solidFill: HatchSolidFill;
13
+ patternFillColor: any;
14
+ associativity: HatchAssociativity;
15
+ numberOfBoundaryPaths: number;
16
+ boundaryPaths: BoundaryPath[];
17
+ hatchStyle: HatchStyle;
18
+ patternType: HatchPatternType;
19
+ patternAngle?: number;
20
+ patternScale?: number;
21
+ numberOfDefinitionLines: number;
22
+ definitionLines: HatchDefinitionLine[];
23
+ pixelSize: number;
24
+ numberOfSeedPoints: number;
25
+ offsetVector?: Point3D;
26
+ seedPoints?: Point3D[];
27
+ gradientFlag?: HatchGradientFlag;
28
+ }
29
+ export interface GradientHatchEntity extends HatchEntityBase {
30
+ gradientFlag: HatchGradientFlag.Gradient;
31
+ gradientColorFlag: HatchGradientColorFlag;
32
+ numberOfColors: 0 | 2;
33
+ gradientRotation?: number;
34
+ gradientDefinition: number;
35
+ colorTint?: number;
36
+ }
37
+ export type HatchEntity = GradientHatchEntity | HatchEntityBase;
38
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './boundaryPath';
2
+ export * from './definitionLine';
3
+ export * from './hatch';
@@ -0,0 +1,8 @@
1
+ import type DxfArrayScanner from '../DxfArrayScanner';
2
+ import { ScannerGroup } from '../DxfArrayScanner';
3
+ import { CommonDxfEntity } from './shared';
4
+ /**
5
+ * Is called after the parser first reads the 0:ENTITIES group. The scanner
6
+ * should be on the start of the first entity already.
7
+ */
8
+ export declare function parseEntities(curr: ScannerGroup, scanner: DxfArrayScanner): CommonDxfEntity[];
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './parser';
@@ -0,0 +1,8 @@
1
+ import type DxfArrayScanner from '../../DxfArrayScanner';
2
+ import type { ScannerGroup } from '../../DxfArrayScanner';
3
+ import type { InsertEntity } from './types';
4
+ export declare class InsertEntityParser {
5
+ static ForEntityName: string;
6
+ private parser;
7
+ parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): InsertEntity;
8
+ }
@@ -0,0 +1,18 @@
1
+ import type { Point3D } from '../../../types';
2
+ import type { CommonDxfEntity } from '../shared';
3
+ export interface InsertEntity extends CommonDxfEntity {
4
+ type: 'INSERT';
5
+ subclassMarker: 'AcDbBlockReference';
6
+ isVariableAttributes?: boolean;
7
+ name: string;
8
+ insertionPoint: Point3D;
9
+ xScale: number;
10
+ yScale: number;
11
+ zScale: number;
12
+ rotation: number;
13
+ columnCount: number;
14
+ rowCount: number;
15
+ columnSpacing: number;
16
+ rowSpacing: number;
17
+ extrusionDirection: Point3D;
18
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum LeaderCreationFlag {
2
+ TextAnnotation = 0,
3
+ ToleranceAnnotation = 1,
4
+ BlockReferenceAnnotation = 2,
5
+ NoAnnotation = 3
6
+ }
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './parser';
3
+ export * from './consts';
@@ -0,0 +1,8 @@
1
+ import type DxfArrayScanner from '../../DxfArrayScanner';
2
+ import type { ScannerGroup } from '../../DxfArrayScanner';
3
+ import type { LeaderEntity } from './types';
4
+ export declare class LeaderEntityParser {
5
+ static ForEntityName: string;
6
+ private parser;
7
+ parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): LeaderEntity;
8
+ }
@@ -0,0 +1,23 @@
1
+ import type { Point3D } from '../../../types';
2
+ import type { CommonDxfEntity } from '../shared';
3
+ import type { LeaderCreationFlag } from './consts';
4
+ export interface LeaderEntity extends CommonDxfEntity {
5
+ type: 'LEADER';
6
+ subclassMarker: 'AcDbLeader';
7
+ styleName: string;
8
+ isArrowheadEnabled: boolean;
9
+ isSpline: boolean;
10
+ leaderCreationFlag: LeaderCreationFlag;
11
+ isHooklineSameDirection: boolean;
12
+ isHooklineExists: boolean;
13
+ textHeight?: number;
14
+ textWidth?: number;
15
+ numberOfVertices?: number;
16
+ vertices: Point3D[];
17
+ byBlockColor?: number;
18
+ associatedAnnotation?: string;
19
+ normal?: Point3D;
20
+ horizontalDirection?: Point3D;
21
+ offsetFromBlock?: Point3D;
22
+ offsetFromAnnotation?: Point3D;
23
+ }
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './parser';
@@ -0,0 +1,8 @@
1
+ import type DxfArrayScanner from '../../DxfArrayScanner';
2
+ import type { ScannerGroup } from '../../DxfArrayScanner';
3
+ import type { LineEntity } from './types';
4
+ export declare class LineEntityParser {
5
+ static ForEntityName: string;
6
+ private parser;
7
+ parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): LineEntity;
8
+ }
@@ -0,0 +1,10 @@
1
+ import type { Point3D } from '../../../types';
2
+ import type { CommonDxfEntity } from '../shared';
3
+ export interface LineEntity extends CommonDxfEntity {
4
+ type: 'LINE';
5
+ subclassMarker: 'AcDbLine';
6
+ thickness: number;
7
+ startPoint: Point3D;
8
+ endPoint: Point3D;
9
+ extrusionDirection: Point3D;
10
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum LWPolylineFlag {
2
+ IS_CLOSED = 1,
3
+ PLINE_GEN = 128
4
+ }
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './consts';
3
+ export * from './parser';
@@ -0,0 +1,7 @@
1
+ import type DxfArrayScanner from '../../DxfArrayScanner';
2
+ import type { ScannerGroup } from '../../DxfArrayScanner';
3
+ import type { LWPolylineEntity } from './types';
4
+ export declare class LWPolylineParser {
5
+ static ForEntityName: string;
6
+ parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): LWPolylineEntity;
7
+ }
@@ -0,0 +1,19 @@
1
+ import type { Point2D, Point3D } from '../../../types';
2
+ import type { CommonDxfEntity } from '../shared';
3
+ export interface LWPolylineEntity extends CommonDxfEntity {
4
+ type: 'LWPOLYLINE';
5
+ subclassMarker: 'AcDbPolyline';
6
+ numberOfVertices: number;
7
+ flag: number;
8
+ constantWidth?: number;
9
+ elevation: number;
10
+ thickness: number;
11
+ extrusionDirection: Point3D;
12
+ vertices: LWPolylineVertex[];
13
+ }
14
+ export interface LWPolylineVertex extends Point2D {
15
+ id: number;
16
+ startWidth?: number;
17
+ endWidth?: number;
18
+ bulge: number;
19
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum MTextDrawingDirection {
2
+ LEFT_TO_RIGHT = 1,
3
+ TOP_TO_BOTTOM = 3,
4
+ BY_STYLE = 5
5
+ }
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './consts';
3
+ export * from './parser';
@@ -0,0 +1,10 @@
1
+ import type DxfArrayScanner from '../../DxfArrayScanner';
2
+ import type { ScannerGroup } from '../../DxfArrayScanner';
3
+ import { DXFParserSnippet } from '../../shared/parserGenerator';
4
+ import type { MTextEntity } from './types';
5
+ export declare const MTextEntityParserSnippets: DXFParserSnippet[];
6
+ export declare class MTextEntityParser {
7
+ static ForEntityName: string;
8
+ private parser;
9
+ parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): MTextEntity;
10
+ }
@@ -0,0 +1,33 @@
1
+ import type { AttachmentPoint } from '../../../consts';
2
+ import type { Point3D } from '../../../types';
3
+ import type { CommonDxfEntity } from '../shared';
4
+ import type { MTextDrawingDirection } from './consts';
5
+ export interface MTextEntity extends CommonDxfEntity {
6
+ type: 'MTEXT';
7
+ subclassMarker: 'AcDbMText';
8
+ insertionPoint: Point3D;
9
+ height: number;
10
+ width: number;
11
+ attachmentPoint: AttachmentPoint;
12
+ drawingDirection: MTextDrawingDirection;
13
+ text: string;
14
+ styleName: string;
15
+ extrusionDirection: Point3D;
16
+ direction: Point3D;
17
+ rotation: number;
18
+ lineSpacingStyle: number;
19
+ lineSpacing: number;
20
+ backgroundFill: number;
21
+ backgroundColor: number;
22
+ fillBoxScale: number;
23
+ backgroundFillColor: number;
24
+ backgroundFillTransparency: number;
25
+ columnType: number;
26
+ columnCount: number;
27
+ columnFlowReversed: number;
28
+ columnAutoHeight: number;
29
+ columnWidth: number;
30
+ columnGutter: number;
31
+ columnHeight: number;
32
+ annotationHeight: number;
33
+ }
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './parser';
@@ -0,0 +1,6 @@
1
+ import DxfArrayScanner, { ScannerGroup } from '../../DxfArrayScanner';
2
+ export declare class PointEntityParser {
3
+ static ForEntityName: string;
4
+ private parser;
5
+ parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): any;
6
+ }
@@ -0,0 +1,9 @@
1
+ import { Point3D } from '../../../types';
2
+ import type { CommonDxfEntity } from '../shared';
3
+ export interface PointEntity extends CommonDxfEntity {
4
+ type: 'POINT';
5
+ position: Point3D;
6
+ thickness: number;
7
+ extrusionDirection: Point3D;
8
+ angle: number;
9
+ }
@@ -0,0 +1,16 @@
1
+ export declare enum PolylineFlag {
2
+ CLOSED_POLYLINE = 1,
3
+ CURVE_FIT = 2,
4
+ SPLINE_FIT = 4,
5
+ POLYLINE_3D = 8,
6
+ POLYGON_3D = 16,
7
+ CLOSED_POLYGON = 32,
8
+ POLYFACE = 64,
9
+ CONTINUOUS = 128
10
+ }
11
+ export declare enum SmoothType {
12
+ NONE = 0,
13
+ QUADRATIC = 5,
14
+ CUBIC = 6,
15
+ BEZIER = 8
16
+ }
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './consts';
3
+ export * from './parser';
@@ -0,0 +1,7 @@
1
+ import type DxfArrayScanner from '../../DxfArrayScanner';
2
+ import type { ScannerGroup } from '../../DxfArrayScanner';
3
+ export declare class PolylineParser {
4
+ static ForEntityName: string;
5
+ private parser;
6
+ parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): any;
7
+ }
@@ -0,0 +1,19 @@
1
+ import type { Point3D } from '../../../types';
2
+ import { CommonDxfEntity } from '../shared';
3
+ import { VertexEntity } from '../vertex/types';
4
+ import type { SmoothType } from './consts';
5
+ export interface PolylineEntity extends CommonDxfEntity {
6
+ type: 'POLYLINE';
7
+ subclassMarker: 'AcDb2dPolyline | AcDb3dPolyline';
8
+ thickness: number;
9
+ flag: number;
10
+ startWidth: number;
11
+ endWidth: number;
12
+ meshMVertexCount: number;
13
+ meshNVertexCount: number;
14
+ surfaceMDensity: number;
15
+ surfaceNDensity: number;
16
+ smoothType: SmoothType;
17
+ extrusionDirection: Point3D;
18
+ vertices: VertexEntity[];
19
+ }
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './parser';
@@ -0,0 +1,7 @@
1
+ import type DxfArrayScanner from '../../DxfArrayScanner';
2
+ import type { ScannerGroup } from '../../DxfArrayScanner';
3
+ export declare class SectionEntityParser {
4
+ static ForEntityName: string;
5
+ private parser;
6
+ parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): any;
7
+ }
@@ -0,0 +1,19 @@
1
+ import type { Point3D } from '../../../types';
2
+ import type { CommonDxfEntity } from '../shared';
3
+ export interface SectionEntity extends CommonDxfEntity {
4
+ type: 'SECTION';
5
+ subclassMarker: 'AcDbSection';
6
+ state: number;
7
+ flag: number;
8
+ name: string;
9
+ verticalDirection: Point3D;
10
+ topHeight: number;
11
+ bottomHeight: number;
12
+ indicatorTransparency: number;
13
+ indicatorColor: number;
14
+ numberOfVertices: number;
15
+ vertices: Point3D[];
16
+ numberOfBackLineVertices: number;
17
+ backLineVertices: Point3D[];
18
+ geometrySettingHardId: string;
19
+ }
@@ -0,0 +1,35 @@
1
+ import type { ColorIndex, ColorInstance } from '../../types';
2
+ import DxfArrayScanner, { ScannerGroup } from '../DxfArrayScanner';
3
+ import { DXFParserSnippet } from '../shared/parserGenerator';
4
+ import { XData } from '../shared/xdata';
5
+ export interface CommonDxfEntity {
6
+ type: string;
7
+ handle: string;
8
+ ownerBlockRecordSoftId?: string;
9
+ isInPaperSpace?: boolean;
10
+ layer: string;
11
+ lineType?: string;
12
+ materialObjectHardId?: string;
13
+ colorIndex?: ColorIndex;
14
+ lineweight?: number;
15
+ lineTypeScale?: number;
16
+ isVisible?: boolean;
17
+ proxyByte?: number;
18
+ proxyEntity?: string;
19
+ color?: ColorInstance;
20
+ colorName?: string;
21
+ transparency?: number;
22
+ plotStyleHardId?: string;
23
+ shadowMode?: ShadowMode;
24
+ xdata?: XData;
25
+ ownerdictionaryHardId?: string | number | boolean;
26
+ ownerDictionarySoftId?: string | number | boolean;
27
+ }
28
+ export declare enum ShadowMode {
29
+ CAST_AND_RECEIVE = 0,
30
+ CAST = 1,
31
+ RECEIVE = 2,
32
+ IGNORE = 3
33
+ }
34
+ export declare const CommonEntitySnippets: DXFParserSnippet[];
35
+ export declare function skipApplicationGroups(curr: ScannerGroup, scanner: DxfArrayScanner): void;
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './parser';
@@ -0,0 +1,8 @@
1
+ import type DxfArrayScanner from '../../DxfArrayScanner';
2
+ import type { ScannerGroup } from '../../DxfArrayScanner';
3
+ import type { SolidEntity } from './types';
4
+ export declare class SolidEntityParser {
5
+ static ForEntityName: string;
6
+ private parser;
7
+ parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): SolidEntity;
8
+ }
@@ -0,0 +1,9 @@
1
+ import { Point3D } from '../../../types';
2
+ import type { CommonDxfEntity } from '../shared';
3
+ export interface SolidEntity extends CommonDxfEntity {
4
+ type: 'SOLID';
5
+ subclassMarker: 'AcDbTrace';
6
+ points: Point3D[];
7
+ thickness: number;
8
+ extrusionDirection: Point3D;
9
+ }
@@ -0,0 +1,8 @@
1
+ export declare enum SplineFlag {
2
+ NONE = 0,
3
+ CLOSED = 1,
4
+ PERIODIC = 2,
5
+ RATIONAL = 4,
6
+ PLANAR = 8,
7
+ LINEAR = 16
8
+ }
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './consts';
3
+ export * from './parser';
@@ -0,0 +1,8 @@
1
+ import type DxfArrayScanner from '../../DxfArrayScanner';
2
+ import type { ScannerGroup } from '../../DxfArrayScanner';
3
+ import type { SplineEntity } from './types';
4
+ export declare class SplineEntityParser {
5
+ static ForEntityName: string;
6
+ private parser;
7
+ parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): SplineEntity;
8
+ }
@@ -0,0 +1,21 @@
1
+ import type { Point3D } from '../../../types';
2
+ import type { CommonDxfEntity } from '../shared';
3
+ export interface SplineEntity extends CommonDxfEntity {
4
+ type: 'SPLINE';
5
+ subclassMarker: 'AcDbSpline';
6
+ normal?: Point3D;
7
+ flag: number;
8
+ degree: number;
9
+ numberOfKnots: number;
10
+ numberOfControlPoints: number;
11
+ numberOfFitPoints: number;
12
+ knotTolerance: number;
13
+ controlTolerance: number;
14
+ fitTolerance: number;
15
+ startTangent?: Point3D;
16
+ endTangent?: Point3D;
17
+ knots: number[];
18
+ weights?: number[];
19
+ controlPoints: Point3D[];
20
+ fitPoints: number[];
21
+ }
@@ -0,0 +1,19 @@
1
+ export declare enum TextGenerationFlag {
2
+ NONE = 0,
3
+ MIRRORED_X = 2,
4
+ MIRRORED_Y = 4
5
+ }
6
+ export declare enum TextHorizontalAlign {
7
+ LEFT = 0,
8
+ CENTER = 1,
9
+ RIGHT = 2,
10
+ ALIGNED = 3,
11
+ MIDDLE = 4,
12
+ FIT = 5
13
+ }
14
+ export declare enum TextVerticalAlign {
15
+ BASELINE = 0,
16
+ BOTTOM = 1,
17
+ MIDDLE = 2,
18
+ TOP = 3
19
+ }
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './consts';
3
+ export * from './parser';
@@ -0,0 +1,26 @@
1
+ import type DxfArrayScanner from '../../DxfArrayScanner';
2
+ import type { ScannerGroup } from '../../DxfArrayScanner';
3
+ import { DXFParserSnippet } from '../../shared/parserGenerator';
4
+ import { TextHorizontalAlign, TextVerticalAlign } from './consts';
5
+ import { TextEntity } from './types';
6
+ export declare const DefaultTextEntity: {
7
+ thickness: number;
8
+ rotation: number;
9
+ xScale: number;
10
+ obliqueAngle: number;
11
+ styleName: string;
12
+ generationFlag: number;
13
+ halign: TextHorizontalAlign;
14
+ valign: TextVerticalAlign;
15
+ extrusionDirection: {
16
+ x: number;
17
+ y: number;
18
+ z: number;
19
+ };
20
+ };
21
+ export declare const TextEntityParserSnippets: DXFParserSnippet[];
22
+ export declare class TextEntityParser {
23
+ static ForEntityName: string;
24
+ private parser;
25
+ parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): TextEntity;
26
+ }
@@ -0,0 +1,20 @@
1
+ import type { Point3D } from '../../../types';
2
+ import type { CommonDxfEntity } from '../shared';
3
+ import { TextHorizontalAlign, TextVerticalAlign } from './consts';
4
+ export interface TextEntity extends CommonDxfEntity {
5
+ type: 'TEXT';
6
+ subclassMarker: 'AcDbText';
7
+ text: string;
8
+ thickness: number;
9
+ startPoint: Point3D;
10
+ endPoint: Point3D;
11
+ textHeight: number;
12
+ rotation: number;
13
+ xScale: number;
14
+ obliqueAngle: number;
15
+ styleName: string;
16
+ generationFlag: number;
17
+ halign: TextHorizontalAlign;
18
+ valign: TextVerticalAlign;
19
+ extrusionDirection: Point3D;
20
+ }
@@ -0,0 +1,10 @@
1
+ export declare enum VertexFlag {
2
+ CREATED_BY_CURVE_FIT = 1,
3
+ TANGENT_DEFINED = 2,
4
+ NOT_USED = 4,
5
+ CREATED_BY_SPLINE_FIT = 8,
6
+ SPLINE_CONTROL_POINT = 16,
7
+ FOR_POLYLINE = 32,
8
+ FOR_POLYGON = 64,
9
+ POLYFACE = 128
10
+ }
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './consts';
3
+ export * from './parser';
@@ -0,0 +1,8 @@
1
+ import type DxfArrayScanner from '../../DxfArrayScanner';
2
+ import type { ScannerGroup } from '../../DxfArrayScanner';
3
+ import { VertexEntity } from './types';
4
+ export declare class VertexParser {
5
+ static ForEntityName: string;
6
+ private parser;
7
+ parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup): VertexEntity;
8
+ }