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

failed to load dxf with image in it #64

Open
jshenguru opened this issue Mar 25, 2023 · 8 comments
Open

failed to load dxf with image in it #64

jshenguru opened this issue Mar 25, 2023 · 8 comments

Comments

@jshenguru
Copy link

jshenguru commented Mar 25, 2023

When loading a DXF file with linked image in it, the viewer gets stuck at "Loading 45.00%". Please help. The console output is below

image

The same issue happens when loading a DXF file with OLE image in it.

@pattern-x
Copy link
Owner

Is the image an xref? It doesn't support xref yet.

@jshenguru
Copy link
Author

jshenguru commented Mar 26, 2023

NOT XREF. Just the IMAGE entity.

It is highly appreciated if you could support IMAGE entity. My CAD drawings have a lot of IMAGE entity.

As I expressed before, I would love to spend time making contribution to the gemini-viewer-threejs if you folks can add me into your development team.

Based on the following discussion, it is safe to say that implementing this feature should not be a rocket science.

https://stackoverflow.com/questions/60200623/how-can-i-load-a-local-image-in-three-js

@yanzexuan1
Copy link
Collaborator

yanzexuan1 commented Mar 27, 2023

Could you share the dxf file with image? Loading images in dxf is supported, there maybe a bug for your case.

We beleive that is the direction to open it source, and there is still no decision yet. And, even if we decided, we should spend some time to refine, cleanup current code.

@jshenguru
Copy link
Author

Here you go.

Drawing1.zip

@yanzexuan1
Copy link
Collaborator

Got it. Well, as I can see that the image is actually an xref. You can check it with "xref" command. But we'll think about if we can support it... The major trouble is that an xref is another file, we need to think about how to handle the url.

image

@jshenguru
Copy link
Author

When you mentioned, as quoted, "Loading images in dxf is supported", what did you mean exactly? Is there another way of inserting image in dxf?

@yanzexuan1
Copy link
Collaborator

yanzexuan1 commented Mar 28, 2023

Sorry, what I said is wrong. I checked again and image is not supported yet!

Let's talk with my colleagues for how it is possible to support images. The major trouble is that an image is another file rather than embeded into dxf.

@yanzexuan1
Copy link
Collaborator

We can load image as x-ref now, but there are some limitations. The problem is that, as a web page, we cannot read any file from local disk, so we need to use file explorer to select the dxf and image files.

It support the case when your dxf and images are under the same folder (the are under the same folder when you create the x-ref in AutoCAD), and you upload these files via file explorer. You can try it with https://pattern-x.github.io/gemini-viewer-examples/#/Upload_your_local_dxf

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

3 participants