LiangliangNan / Easy3D

A lightweight, easy-to-use, and efficient C++ library for processing and rendering 3D data
GNU General Public License v3.0
1.35k stars 243 forks source link

[Feature request] - DXF file read/write #177

Closed Kraj413 closed 7 months ago

Kraj413 commented 7 months ago

Can I import and output Autocad DXF file in Easy3D? Easy3D is really a perfect rendering solution and I appreciate I entered new opengl rendering field. I am using Mapple sample project and I am going to import dxf file and do some processing and finally export again.

I tried libdxfrw library but have there is no way of constructing Easy3D surfaces and edges using that library.

LiangliangNan commented 7 months ago

Currently Easy3D only supports piecewise planar/linear representations of volumes, surfaces, and lines (i.e., polyhedral meshes, polygonal surface meshes, and graphs). The purpose of Easy3D is for quick prototyping ideas for research and educational actitivities that aim at process such geometries. The Autocad DXF format supports way more types of entities that are beyond the scope of this project. Besides, the support of all such entities needs tremendous efforts and time investment. Thus, it seems there is not sufficient motivation to implement DXF support). However, one may still find Easy3D useful by exporting DXF files (using other software tools) to other formats (e.g., obj) that Easy3D can handle.

Kraj413 commented 7 months ago

Thank you for your feedback. I think Easy3D is actually the easist 3D processing and rendering engine. I used Easy3D with CGAL and found more interesting possibilities for CAD support. Many thanks to You and Easy3D contributers. As well as I tried to load dxf in Easy3D using libdxfrw library for only rendering and basic mesh processing on surfaces and graphs. Finally I have loaded essential faces of DXF and merged into one surface by reducing dural entities. All of these advance is the result of introducing Easy3D and I think I dont need any other gemetry engine for me as going forward. I appreciate again for your support. Can I contact with you directly for the future technical support? My mail address: berndgroger87@gmail.com I hope we could have a successful collaboration before long ago. Thank you.

LiangliangNan commented 7 months ago

Yes, of course. If you really think your DXF loader can benefit many other users, it will also be interesting to incorporate your loader to Easy3D. So basically two files: dxf_loader.h and dxf_loader.cpp, with a few APIs taking the file name as argument and output the pointer to the model (i.e., a surface mesh).

Kraj413 commented 7 months ago

Thanks for your response. But my loader is not completed yet so it is not handling all of dxf section and entities. Once I finish the loader, I will share it.

LiangliangNan commented 7 months ago

No warries and no hurries. Looking forward to that.