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] create an STL file (https://www.cfd-online.com/Forums/openfoam-meshing/116771-create-stl-file.html)

Pj. April 25, 2013 00:59

create an STL file
 
Hi everybody,

it's an easy question, but i couldn't find an answer on the forum:

i need to create and stl file (for snappyHex) of a rectangular parallelepiped keeping the surfaces separated to allow force coeffs to gives me the force coefficient of each face.

I'm able to use AutoCAD, but when i create the stl it asks me to use a volume, so all the faces got "merged" in one surface.

Is there a way to do this with AutoCAD? Or have I to use another program? In case, can you tell me an easy one to use?

Thank you very much

Phicau April 25, 2013 03:58

Hi

for such a simple case you can do it by hand or set up a script. Find here the stl file for 2 faces:

Code:

solid face1
facet normal -0.000000 0.0 1.000000
  outer loop
      vertex 0.000000 1.000000 0.500000
      vertex 0.000000 -1.000000 0.500000
      vertex 10.000000 -1.000000 0.500000
  endloop
endfacet
facet normal -0.000000 0.0 1.000000
  outer loop
      vertex 0.000000 1.000000 0.500000
      vertex 10.000000 1.000000 0.500000
      vertex 10.000000 -1.000000 0.500000
  endloop
endfacet
endsolid face1
solid face2
facet normal -0.000000 0.0 1.000000
  outer loop
      vertex 0.000000 1.000000 -0.500000
      vertex 0.000000 -1.000000 -0.500000
      vertex 10.000000 -1.000000 -0.500000
  endloop
endfacet
facet normal -0.000000 0.0 1.000000
  outer loop
      vertex 0.000000 1.000000 -0.500000
      vertex 10.000000 1.000000 -0.500000
      vertex 10.000000 -1.000000 -0.500000
  endloop
endfacet
endsolid face2

Best,

Pablo

Pj. April 25, 2013 05:51

Thank you very much. For this first phase I'll try to do what you say.

For more complex cases (that i'll have to face later) instead, how can i do?

JR22 April 25, 2013 07:12

CAD software for generating STLs
 
It has to be a solid, not just a collection of edges. Its been a while since I've used AutoCAD, but I think by default you just get a collection of edges. You can do solids with AutoCAD, but Inventor (also Autodesk), solidworks, etc, are made for solids modeling. There are many open source and free options for solids modeling CAD software, here are some (from this thread):In the case of many of these packages, you make the solid, then create a mesh from that solid, then export that mesh as a ASCII-STL.


All times are GMT -4. The time now is 19:57.