-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. facd3D 2. solid3D 3. surface 4. body ownerdictionaryHardId -> ownerDictionaryHardId
- Loading branch information
1 parent
db13c50
commit b9874af
Showing
16 changed files
with
292 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './types'; | ||
export * from './parser'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import type DxfArrayScanner from '../../DxfArrayScanner'; | ||
import type { ScannerGroup } from '../../DxfArrayScanner'; | ||
import { | ||
createParser, | ||
DXFParserSnippet, | ||
Identity, | ||
PointParser, | ||
} from '../../shared/parserGenerator'; | ||
import { CommonEntitySnippets } from '../shared'; | ||
import { Body } from './types'; | ||
|
||
const DefaultBodyEntity = { | ||
type: 'Body', | ||
subclassMarker: 'AcDbModelerGeometry', | ||
modelerFormatVersion: 1, | ||
}; | ||
|
||
|
||
const BodyEntityParserSnippets: DXFParserSnippet[] = [ | ||
{ | ||
code: 100, | ||
name: 'subclassMarker', | ||
parser: Identity, | ||
}, | ||
{ | ||
code: 70, | ||
name: 'modelerFormatVersion', | ||
parser: Identity, | ||
}, | ||
{ | ||
code: 1, | ||
name: 'proprietarData', | ||
parser: Identity, | ||
}, | ||
{ | ||
code: 3, | ||
name: 'AdditionalLines', | ||
parser: Identity, | ||
}, | ||
...CommonEntitySnippets, | ||
]; | ||
|
||
export class BodyEntityParser { | ||
static ForEntityName = 'Body'; | ||
private parser = createParser(BodyEntityParserSnippets, DefaultBodyEntity); | ||
|
||
parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup) { | ||
const entity = {} as any; | ||
this.parser(curr, scanner, entity); | ||
return entity as Body; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import type { CommonDxfEntity } from '../shared'; | ||
|
||
export interface Body extends CommonDxfEntity { | ||
type: 'Body'; | ||
subclassMarker: 'AcDbModelerGeometry'; | ||
proprietarData: any; | ||
AdditionalLines: any; | ||
modelerFormatVersion: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './types'; | ||
export * from './parser'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import type DxfArrayScanner from '../../DxfArrayScanner'; | ||
import type { ScannerGroup } from '../../DxfArrayScanner'; | ||
import { | ||
createParser, | ||
DXFParserSnippet, | ||
Identity, | ||
PointParser, | ||
} from '../../shared/parserGenerator'; | ||
import { CommonEntitySnippets } from '../shared'; | ||
import { Face3D } from './types'; | ||
const DefaultFace3DEntity = { | ||
type: 'face3D', | ||
subclassMarker: 'AcDbFace', | ||
invisibleEdgeFlag: 0, | ||
}; | ||
|
||
const Face3DEntityParserSnippets: DXFParserSnippet[] = [ | ||
{ | ||
code: 100, | ||
name: 'subclassMarker', | ||
parser: Identity, | ||
}, | ||
{ | ||
code: 10, | ||
name: 'firstCorner', | ||
parser: PointParser, | ||
}, | ||
{ | ||
code: 11, | ||
name: 'secondCorner', | ||
parser: PointParser, | ||
}, | ||
{ | ||
code: 12, | ||
name: 'thirdCorner', | ||
parser: PointParser, | ||
}, | ||
{ | ||
code: 13, | ||
name: 'fourthCorner', | ||
parser: PointParser, | ||
}, | ||
{ | ||
code: 70, | ||
name: 'invisibleEdgeFlag', | ||
parser: Identity, | ||
}, | ||
...CommonEntitySnippets, | ||
]; | ||
|
||
export class Face3DEntityParser { | ||
static ForEntityName = 'Facd3D'; | ||
private parser = createParser(Face3DEntityParserSnippets, DefaultFace3DEntity); | ||
|
||
parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup) { | ||
const entity = {} as any; | ||
this.parser(curr, scanner, entity); | ||
return entity as Face3D; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import type { Point3D } from '../../../types'; | ||
import type { CommonDxfEntity } from '../shared'; | ||
|
||
export interface Face3D extends CommonDxfEntity { | ||
type: 'Face3D'; | ||
subclassMarker: 'AcDbFace'; | ||
firstCorner: Point3D; | ||
secondCorner: Point3D; | ||
thirdCorner: Point3D; | ||
fourthCorner: Point3D; | ||
invisibleEdgeFlag: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './types'; | ||
export * from './parser'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import type DxfArrayScanner from '../../DxfArrayScanner'; | ||
import type { ScannerGroup } from '../../DxfArrayScanner'; | ||
import { | ||
createParser, | ||
DXFParserSnippet, | ||
Identity, | ||
PointParser, | ||
} from '../../shared/parserGenerator'; | ||
import { CommonEntitySnippets } from '../shared'; | ||
import { Solid3D } from './types'; | ||
|
||
const DefaultSolid3DEntity = { | ||
type: 'Solid3D', | ||
subclassMarker: 'AcDb3dSolid', | ||
modelerFormatVersion: 1, | ||
}; | ||
|
||
|
||
const Solid3DEntityParserSnippets: DXFParserSnippet[] = [ | ||
{ | ||
code: 100, | ||
name: 'subclassMarker', | ||
parser: Identity, | ||
}, | ||
{ | ||
code: 70, | ||
name: 'modelerFormatVersion', | ||
parser: Identity, | ||
}, | ||
{ | ||
code: 1, | ||
name: 'proprietarData', | ||
parser: Identity, | ||
}, | ||
{ | ||
code: 3, | ||
name: 'AdditionalLines', | ||
parser: Identity, | ||
}, | ||
{ | ||
code: 350, | ||
name: "historyObjectHandle", | ||
parser: Identity | ||
}, | ||
...CommonEntitySnippets, | ||
]; | ||
|
||
export class Solid3DEntityParser { | ||
static ForEntityName = 'Facd3D'; | ||
private parser = createParser(Solid3DEntityParserSnippets, DefaultSolid3DEntity); | ||
|
||
parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup) { | ||
const entity = {} as any; | ||
this.parser(curr, scanner, entity); | ||
return entity as Solid3D; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { CommonDxfEntity } from '../shared'; | ||
|
||
export interface Solid3D extends CommonDxfEntity { | ||
type: 'Solid3D'; | ||
subclassMarker: 'AcDb3dSolid'; | ||
proprietarData: any; | ||
AdditionalLines: any; | ||
modelerFormatVersion: number; | ||
historyObjectHandle: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './types'; | ||
export * from './parser'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import type DxfArrayScanner from '../../DxfArrayScanner'; | ||
import type { ScannerGroup } from '../../DxfArrayScanner'; | ||
import { | ||
createParser, | ||
DXFParserSnippet, | ||
Identity, | ||
PointParser, | ||
} from '../../shared/parserGenerator'; | ||
import { CommonEntitySnippets } from '../shared'; | ||
import { Surface } from './types'; | ||
|
||
const DefaultSurfaceEntity = { | ||
type: 'Surface', | ||
subclassMarker: 'AcDbSurface', | ||
modelerFormatVersion: 1, | ||
}; | ||
|
||
|
||
const SurfaceEntityParserSnippets: DXFParserSnippet[] = [ | ||
{ | ||
code: 100, | ||
name: 'subclassMarker', | ||
parser: Identity, | ||
}, | ||
{ | ||
code: 70, | ||
name: 'modelerFormatVersion', | ||
parser: Identity, | ||
}, | ||
{ | ||
code: 1, | ||
name: 'proprietarData', | ||
parser: Identity, | ||
}, | ||
{ | ||
code: 3, | ||
name: 'AdditionalLines', | ||
parser: Identity, | ||
}, | ||
{ | ||
code: 71, | ||
name: 'UIsolines', | ||
parser: Identity, | ||
}, | ||
{ | ||
code: 72, | ||
name: 'VIsolines', | ||
parser: Identity, | ||
}, | ||
...CommonEntitySnippets, | ||
]; | ||
|
||
export class SurfaceEntityParser { | ||
static ForEntityName = 'Surface'; | ||
private parser = createParser(SurfaceEntityParserSnippets, DefaultSurfaceEntity); | ||
|
||
parseEntity(scanner: DxfArrayScanner, curr: ScannerGroup) { | ||
const entity = {} as any; | ||
this.parser(curr, scanner, entity); | ||
return entity as Surface; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { CommonDxfEntity } from '../shared'; | ||
|
||
export interface Surface extends CommonDxfEntity { | ||
type: 'Surface'; | ||
subclassMarker: 'AcDbSurface'; | ||
proprietarData: any; | ||
AdditionalLines: any; | ||
modelerFormatVersion: number; | ||
UIsolines: number; | ||
VIsolines: number; | ||
} |