Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support xdata #72

Closed
FishOrBear opened this issue Apr 11, 2023 · 4 comments · Fixed by #82
Closed

support xdata #72

FishOrBear opened this issue Apr 11, 2023 · 4 comments · Fixed by #82

Comments

@FishOrBear
Copy link
Contributor

For example, the extended data of the font style

1001
ACAD
1000
YouYuan
1071
34353
@FishOrBear
Copy link
Contributor Author

Or we should also export more basic types, such as Entity,
Or DxfDimStyle, so that users can inherit it, modify it, and expand it

@tarikjabiri
Copy link
Member

Not sure I will see

@FishOrBear
Copy link
Contributor Author

I suggest adding a base class for DxfObject, which all objects inherit from, like this:

import { Dxfier } from "../Internals/Dxfier";
import DxfInterface from "../Internals/Interfaces/DxfInterface";

export abstract class DxfObject implements DxfInterface {
    otherData: [number, string | number][] = [];
    dxfy(dx: Dxfier): void {
        this._dxfy(dx)
        for (let [code, value] of this.otherData)
            dx.push(code, value)
    }
    _dxfy(dx: Dxfier): void {
    }
}

@tarikjabiri
Copy link
Member

See https://dxf.vercel.app/tutoriels/xdata.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants