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

Some SVGs are partially broken #63

Open
ColinSchmale opened this issue Oct 9, 2020 · 3 comments
Open

Some SVGs are partially broken #63

ColinSchmale opened this issue Oct 9, 2020 · 3 comments

Comments

@ColinSchmale
Copy link

I've been looking for a library to convert dxf floor plans to svg or pdf. Your project is the only one I've found that almost works and that does not cost a fortune.

Unfortunately, some of the converted files have artifacts like for example a big black ellipse or a big grey rectangle in it.

Any help appreciated.

artifact2

artifact1

@bjnortier
Copy link
Collaborator

You will have to send me the files... can send it to me privately if you don't want them shared

@bjnortier
Copy link
Collaborator

I've had a look. It's a "stroke-width" issue.

There are some inserts that are scaled and I think the line widths are multiplied by 1000 as the insert has a 1000x scale factor.

The exported SVG created by this lib just uses stroke-width="0.1%" which seems to work for most cases but not for these DXF files.

There is no proper support for line width as defined by the layers in this library, although I don't think that's the issue.

I'm not using this lib for work anymore so unfortunately I don't have the time/income to implement a proper solution and figure out the scaling issue. Happy to accept and test a pull request from someone who wants to add support.

@ColinSchmale
Copy link
Author

Thanks. 🙂 It was easy to improve the result by just setting all the big scale factors in the dxf file to 1 before using your lib. Maybe I'll look for a better solution later but I'm not that good with Javascript.

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

No branches or pull requests

2 participants