X Tutup
The Wayback Machine - https://web.archive.org/web/20201203200521/https://github.com/microsoft/maker.js/issues/461
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

Model accepted by makerjs.exporter.toSVG(), but not by makerjs.exporter.toDXF() #461

Open
kristianpedersen opened this issue Mar 18, 2020 · 3 comments

Comments

@kristianpedersen
Copy link

@kristianpedersen kristianpedersen commented Mar 18, 2020

Go to https://maker.js.org/docs/basic-drawing/#Models

Change the last two lines of code to this:

var dxf = makerjs.exporter.toDXF(model);
console.log(dxf);

I would expect a string, but all I'm getting is undefined.

@danmarshall
Copy link
Contributor

@danmarshall danmarshall commented Mar 18, 2020

Hello, I got some dxf output:
image

@kristianpedersen
Copy link
Author

@kristianpedersen kristianpedersen commented Mar 19, 2020

Ah, the blue console does show the string - I didn't notice it there.
Chrome's console however just displays undefined:

image

@kristianpedersen
Copy link
Author

@kristianpedersen kristianpedersen commented Mar 19, 2020

Here's what's happening on some client work I'm doing now:

When I pass an array of lines, it's accepted by toSVG(), but not toDXF(). Are the array items missing something that's needed to be accepted by toDXF()?

Here you can see where it's failling, and the format of the lines (objects.flat()).

image

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.
X Tutup