3D CAD to OpenGL

懵懂的女人 提交于 2021-02-10 13:35:27

问题


I was wondering if anyone knew of a program that can take a 3D drawing of an object and then convert it into the required OpenGL points and normals.

Basically I have an AutoCAD drawing of that I want to be able to display in a program I am creating for iPhone. Any suggestions?


回答1:


If you have AutoCAD itself, you could export the object into a mesh format, like STL. Reading STL files is straightforward.

If you don't have AutoCAD you may also try FreeCAD, which is based on OpenCascade, which exports quite nice meshes (also into STL format). However the AutoCAD file format is in constant flux, so YMMV when reading the original file.




回答2:


This is gonna be a bit of a downer, but DWG file formats explore a deep dark road I'm not sure even AutoDesk has control over. The format doesn't even belong to them (they bought it a while ago) and even if you could manage it, the format is updated every 3 years or so (and is set to update again soon). For now, they have all the power. Sorry.

All I can say, is explore the references and take a look here (no code, sorry)



来源:https://stackoverflow.com/questions/8277117/3d-cad-to-opengl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!