amandaghassaei / OrigamiSimulator

Realtime WebGL origami simulator
http://origamisimulator.org/
MIT License
1.11k stars 140 forks source link

Error when saving to OBJ #8

Closed AlexanderDudek closed 5 years ago

AlexanderDudek commented 5 years ago

When trying to save the file to OBJ on Chrome, macOS 10.14.4 the following error appears in the console:

Uncaught TypeError: Cannot read property 'length' of undefined at saveOBJ (saveSTL.js:128) at controls.js:160 at HTMLButtonElement. (controls.js:753) at HTMLButtonElement.dispatch (jquery-3.2.1.min.js:3) at HTMLButtonElement.q.handle (jquery-3.2.1.min.js:3)

(Saving to STL works correctly)

dozingpip commented 5 years ago

That error is because of the change with uv coordinates, see the most recent commit... I was the one to originally request this change, but it wasn't implemented 100% correctly, and have since made a pull request that fixes it, #7 , but haven't received any response (even after emailing the author).

It works if you manually replace the changed sections with my code in the inspector. You could also use a local version of the fork, it works with the exception of examples.

edemaine commented 5 years ago

@AlexanderDudek This bug has been fixed on master, thanks to @freestraws's PR #7. It will appear in a public version of the webapp shortly. I'll update and close the issue then.

edemaine commented 5 years ago

New version is now live at http://origamisimulator.org/! Let us know if you have any issues.