Dear Jan Möbius & other OpenFlipper team,
That OpenFlipper source code comes in such an organized way that it was much less of a pain to get it compiling - and finally even adding another plugin for DXF I/O: It was a question of some train trips to/from my work to get it running!
Now for me and my colleagues the OpenFlipper is doing exactly what we want (which is much less than the OpenFlipper can actually do):
- Read a topographic surface as a triangluar mesh from a DXF file
- Reduce the number of triangles with the Decimater, and check the result with Mesh Compare
- Write the result back to a DXF file, with enough precision so that coordinates in the millions of meters are still good down to cm level
Now as I said already, I would like to feed this added plugin back into the OpenFlipper project - if this is welcome! This would include making a slightly adapted DIME library also part of the OpenFlipper project. But the point is that I am not at all familiar with the CMake system, so I just added the DIME library by first compiling it as a LIB separately, then added it to the DXF file plugin not from CMake, but only in the Visual Studio, after having generated the project with CMake. Which means: With a new CMake run, the DIME linking will have disappeared! So if somebody wants to do this job more seriously, I would love to send all my sources (including adapted DIME) for integrating into the "official" SVN and CMake system.
Some technical remarks:
DIME library ==========
Initially this worked internally only with float, but they were defined with typedef as dxfdouble, so just changing this typedef already switched the library to using double - except that still a few occurrencies had to be fixed where this concept was not really followed 100%.
Furthermore I added a "precision" parameter to the output class that works in much the same way as it is now introduced in the OpenFlipper system. Before the format was fixed with 3 decimals after the point, unchangeably, but I actually like the concept that is now in OpenFlipper, because it allows everybody, from the km to the nm modeller, to become happy in his/her own way!
Although it is technically possible to also use the DIME library as a DLL, I decided to statically link it into the DXF plugin. However, I have no objections if somebody would change this.
File DXF plugin =============
This plugin reads triangulated meshes, and nothing else. All other information that may be included in the DXF file will be simply ignored, like colors, polylines, points, texts, whatever... Furthermore it relies on the capabilities of the DIME library. This is just a word of cautiousness: The DXF format has been updated during the years, features added etc. etc., while the DIME library is already pretty old. I can say that we are using it in our company for many years already and mostly we were happy with the results, but I would not exclude cases where some features may not be recognized because they are too recent.
On the other hand, the DIME library reads much more than just triangle meshes from the DXF file, so if somebody wants to add more, like supporting colors or other geometric features, it is not a big thing to add this as well to the plugin, with little extra effort.
The plugin has one output parameter that can be set by the user: precision. As I found out that the ImportT/ExportT template classes are actually changing the internal double precision of data to float, I decided not to use them (although I have learned from reading in other file plugins that they are the intended way for generating/exporting geometry data).
Regards - and thanks to all the contributers to the entire OpenFlipper software: I really like it very much! Cornelis Bockemühl
PS: If this is welcome, I propose to simply zip the adapted DIME sources and the DXF plugin sources into two packages and send it to whoever is ready to take care for their integration into the OpenFlipper project SVN!
_____________________
Cornelis Bockemühl Holcim Group Support Ltd Cement Manufacturing Services Materials Technology Reserve Evaluation and Quarry Planning Im Schachen CH-5113 Holderbank Phone +41 58 858 51 30 Fax +41 58 858 51 51 cornelis.bockemuehl@holcim.com www.holcim.com
Holcim – 100 years of Strength. Performance. Passion.
This e-mail is confidential and intended only for the use of the above named addressee. If you have received this e-mail in error, please delete it immediately and notify us by e-mail or telephone.