CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [CAD formats] .dxf to .stl converter (https://www.cfd-online.com/Forums/openfoam-meshing/79919-dxf-stl-converter.html)

colinB September 8, 2010 10:34

.dxf to .stl converter
 
Hi
I have a problem finding a program that converts dxf files into stl files.
After looking for several days at google and in this forum I basically found programs that can do this conversion the other way round, but never I got anything that did what I want.
If you know a software or a way to deal with that problem please let me know.
Over all aim is it do feed snappyHexMesh with a stl file, but our system just gives out the geometry in dxf files and we want to perform cfd calculations with this geometries.
So for the case that you know a way for this problem it would also be appreciated.
And a last note: I try not to spend any money on software.
thanks for your trouble
regards
colin

wyldckat September 8, 2010 11:23

Greetings Colin,

ParaView can open some DXF files, although sometimes it isn't able to. And it can export to STL too :)

As for SketchUp, there is a plugin that can export to DXF or STL: http://www.guitar-list.com/download-...les-dxf-or-stl
As for importing DXF, I think only SketchUp PRO can import it :(

Best regards,
Bruno

elvis September 9, 2010 07:56

Hi,

www.quick3d.com supports .dxf and .stl http://www.quick3d.com/features.html

http://www.meshlab.org/ is a nice tool as well but not .dxf => .stl but take a look

roth September 9, 2010 08:32

python
 
If Python is more your style, perhaps:

http://code.google.com/p/meshmagick/...stl/dxf2stl.py

Mike

colinB September 10, 2010 07:40

Hi guys
thanks for your quick reply and your hints:

@wyldckat: This one I also found on my search, but I forgot to mention that I don't like google. They make proper things, but I don't like the fact that they store data and I don't know where else my files are than on my computer.

@elvis: Did I get that right that quick3d is commercial? they offer a download and a purchase link and so I wasn't sure if it is freeware or not.

@roth: That sounds what I'm looking for I'm not familiar with python so far but the more I get into OF the more I recognize the help python offers also with pyFoam.
But with pyFoam I still struggle with the installation since it doesn't like my VTK... but thats a different topic.

However thank you very much for your efforts, I really appreciate it

regards Colin

colinB September 13, 2010 08:14

Hi
its me again.
I still have some troubles to get my dxf converted into a stl file.
I tried to use the python code but for some reason I didn't get along with it.

I executed as in the usage recommendation of the above linked code

Code:


dxf2stl.py infile.dxf > outfile.stl

in the python shell

and all I get is a file named for the above case outfile.stl
but in it I just find written

Code:

['infile.dxf ']
So I was wondering what I was doing wrong.
Any help is appreciated
regards Colin

wyldckat September 13, 2010 08:51

Greetings Colin,

When I saw Mike's post, I went to browse that python script... and I figured that the script was still far from being complete. But never took the time to test if it was in fact doing some sort of magic and would actually convert dxf to stl.

So, by your report, I would say that my suspicions are correct: that python script is only a layout of the code and doesn't actually do any reading from DXF files :( You can try to contact the author of the repository!

By the way, have you tried open the DXF files in ParaView to see if it can handle your files?

Best regards,
Bruno

colinB September 13, 2010 09:20

Hi Bruno

thats really annoying that it doesn't work and that it is just a layout.
I wondered actually that a converter would be just that short, but since I don't know python at all I couldn't judge whether this is just a layout or a complete program.

However I tried to use paraview for opening dxf files, but it cannot handle these.

But asking professional cfd-vendors I figured out that they also struggle with converting dxf files to a readable format for their solvers or that they just recently introduced a program with this ability, So I ask my self why nobody got that idea before, since many geometries first exist in kind of a Cad format and then are treated with a cfd solver.

regards Colin

wyldckat September 13, 2010 09:39

Hi Colin,

Well, the only two others that come to mind are also on this big list: http://en.wikipedia.org/wiki/ASCII_D...ge_file_format
In other words, BRL-CAD and Blender should be able to import DXF... although exporting is another issue, but I think these two can handle exporting to STL.

As for file conversion: there are so many standards defined by so many companies, that in 2010 we are still having issues with this simple kind of thing. The industry is pretty much money+patent oriented... just look at mobile phone chargers: brands can't even stick to one single charging system in their own phones! :rolleyes:

Best regards and good luck!
Bruno

colinB September 13, 2010 11:01

Hi Bruno,
thanks for the hint with this software list and especially the hint with these two softwares blend I quickly installed and it struggled with exporting my dxf to stl file, maybe I have to check it tomorrow again.
BRL looks good so far but I haven't tested it yet.

Apart from that I found a list where CAD Softwares are compared which I want to share:

http://en.wikipedia.org/wiki/Comparison_of_CAD_software

thank you very much for your help Bruno

best regards
Colin


All times are GMT -4. The time now is 23:03.