Saturday 5 November 2011

DXF in GRASS (v.in.dxf)

I got some emails regarding problems some users have found trying to import a dxf in GRASS, so i think it is better to do a new post about this topic.
At this page you can find the image below, which shows our first attempt to import a 3D object modeled in Blender inside GRASS through the DXF file format (and i have to say that without the help of Markus Neteler it would not have been successful).


It regards pretty old data from my thesis (2006) and the object is not really complex (just a simple solid of revolution).
When i tried again to import a 3D object inside GRASS i wanted to choose a more difficult test, so i planned to start some experiments with a human skeleton (the one you can see in the image below) and i exported the model from Blender in a dxf file...


... but when i tried to import it in GRASS i could not even recognize its shape inside Map Display. To understand what happened i decide to import again the model inside Blender, to try at least to visualize it and check if everything was in order, and this was what the software showed me:


When i saw the result i could not stop laughing for some minuets, but finally i found out there were some problems with the dxf file.
After this experience, when i want to export a dxf file from Blender and import it in GRASS i "clean it" before with MeshLab, because i discovered that MeshLab exports a dxf file more readable for GRASS parameters.
If you want to try, you can download this blender file. It is the GRASS logo, which i modeled in Blender, as you can see in this image.


You should load the file in Blender, export it as a ply, import it in MeshLab...


... export it in a dxf and import it in GRASS (v.in.dxf), like in the image below


I hope this post was useful, if are still problems just reply with a post or send me an email.

No comments:

Post a Comment

BlogItalia - La directory italiana dei blog Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.