ieskudero / three-dxf-viewer

DXF viewer using ThreeJS
https://www.npmjs.com/package/three-dxf-viewer
MIT License
63 stars 23 forks source link

Error creating DXFViewer instance #14

Open andrelzsousa opened 3 months ago

andrelzsousa commented 3 months ago

Im using react and when i load a dxf file for testing i get the following error:

image

Im not sure whats happening, cause i did correctly ran npm install three-dxf-viewer and it is located on my package.json file. How can i solve this?

ieskudero commented 3 months ago

How are you loading the DXFViewer class? I can't see why it could break loading the class unless I see the code. However, I have made a minimun application with react & vite, based on the react example, that shows how to use it dxftest.zip

Hopes it help. Let me know if this runs or not.

andrelzsousa commented 3 months ago

Thanks for the response. So, i downloaded and tried to run the project you sent. It seems that the DXFViewer class error is gone and there isnt any TS error either. But a new error has apperead when i load a dxf file on the input: image Have you ever faced this one? Do you know how to solve it?

Thanks in advance!!!

ieskudero commented 3 months ago

Can you pass me the dxf file that gives you that error? I think it is easily fixable if I check for undefined x,y or z values, but I don't know why there are undefined values in that entity. I would need the dxf file to verify it.