You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been testing the viewer with different DXF files, and it always breaks with the same error in the DxfViewer.Load(url) step:
Uncaught (in promise) Error: Unexpected end of input: EOF group not read before end of file. Ended on code
at DxfArrayScanner.next (bundle.js:95279:19)
at parseAll (bundle.js:97136:32)
at DxfParser._parse (bundle.js:97725:5)
at DxfParser.parseSync (bundle.js:97058:21)
at DxfFetcher.Fetch (bundle.js:97786:23)
at async DxfWorker._Load (bundle.js:165347:21)
at async DxfViewer.Load (bundle.js:166831:23)
My code is the following:
import { DxfViewer } from "dxf-viewer";
var dxfCanvas = document.getElementById("dxf-canvas");
dxfCanvas.width = window.innerWidth;
dxfCanvas.height = window.innerHeight;
var dxfViewer = new DxfViewer(dxfCanvas);
dxfViewer.SetSize(dxfCanvas.width, dxfCanvas.height);
async function loadDxfUrl() {
await dxfViewer.Load(dxfUrl);
}
loadDxfUrl();
dxfUrl is a blob url. I've been trying with different dxf files and all of them return the same error. The DXF files open in other viewers.
The files can be also parsed correctly using DxfFetcher with the following code:
import { DxfFetcher } from "dxf-viewer";
var dxfFetcher = new DxfFetcher(dxfUrl);
dxfFetcher.Fetch()
.then(res => {
console.log(res);
});
The text was updated successfully, but these errors were encountered:
Hello, dxfViewer.Load() expects parameters in form of batch object. So proper invokation should be dxfViewer.Load({url: dxfUrl}).
Seems it needs both better disgnostics (to handle missing required parameter) and may be typescript interface definition file (such issue is open and waits for fix).
I've been testing the viewer with different DXF files, and it always breaks with the same error in the DxfViewer.Load(url) step:
My code is the following:
dxfUrl
is a blob url. I've been trying with different dxf files and all of them return the same error. The DXF files open in other viewers.The files can be also parsed correctly using DxfFetcher with the following code:
The text was updated successfully, but these errors were encountered: