Does anyone know if there's a parser for autocad/cad formatted files in javascript? Or perhaps something server side which can translate cad files to collada so that three.js (and some of the other engines) could read them?
Thanks very much for any links and pointers.
Does anyone know if there's a parser for autocad/cad formatted files in javascript? Or perhaps something server side which can translate cad files to collada so that three.js (and some of the other engines) could read them?
Thanks very much for any links and pointers.
Share Improve this question asked Nov 21, 2012 at 6:03 AlexAlex 3,7915 gold badges40 silver badges60 bronze badges 5- Just a side note, JavaScript is the perfect choice for rendering. Consider using WebGL. – Bakudan Commented Nov 21, 2012 at 6:16
- sadly one of the targets is IE9... so no webgl :-( – Alex Commented Nov 26, 2012 at 11:42
- Yup. 10, finally actually does something and surprisingly is working quite good. – Bakudan Commented Nov 26, 2012 at 12:34
- @Bakudan huh? webgl in IE10? really? – Alex Commented Dec 1, 2012 at 12:29
- Ups, this was not not IE. Wow, Win8 with IE10, still don't have webgl support... – Bakudan Commented Dec 1, 2012 at 19:54
2 Answers
Reset to default 2Python has an autocad lib http://pypi.python/pypi/pyautocad/ It provides json export. It works on Windows.
I think it can be a server-side solution if Python running on a Windows server is acceptable for you.
You can take a look at OpenCascade and the munity edition developed in C++. There seems to be an experimental COLLADA exporter done by the munity edition.
If you prefer working with Python, you should see the pythonOCC project and particularly what they've done with Three.js: article and sources.