|
[Sponsors] |
[mesh manipulation] extrudeMesh from STL Surface |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 19, 2012, 16:32 |
extrudeMesh from STL Surface
|
#1 |
New Member
Join Date: Sep 2010
Posts: 16
Rep Power: 17 |
EDIT: Solved below.
Hi everyone, I'm having a problem when running extrudeMesh from an STL surface. I'm doing this because I'm having problems with running the tandem snappyHexMesh+extrudeMesh, but that is another whole story (that I may post about in the future). This is a test surface I wrote quickly in order to test: ./constant/triSurface/mesh.stl Code:
solid mesh facet normal 0.0 0.0 1.0 outer loop vertex 1.0 1.0 0.0 vertex 0.0 1.0 0.0 vertex 1.0 0.0 0.0 endloop endfacet facet normal 0.0 0.0 1.0 outer loop vertex 0.0 0.0 0.0 vertex 0.0 1.0 0.0 vertex 1.0 0.0 0.0 endloop endfacet facet normal 0.0 0.0 1.0 outer loop vertex 1.0 -1.0 0.0 vertex 0.0 -1.0 0.0 vertex 1.0 0.0 0.0 endloop endfacet facet normal 0.0 0.0 1.0 outer loop vertex 0.0 0.0 0.0 vertex 0.0 -1.0 0.0 vertex 1.0 0.0 0.0 endloop endfacet facet normal 0.0 0.0 1.0 outer loop vertex -1.0 1.0 0.0 vertex 0.0 1.0 0.0 vertex -1.0 0.0 0.0 endloop endfacet facet normal 0.0 0.0 1.0 outer loop vertex 0.0 0.0 0.0 vertex 0.0 1.0 0.0 vertex -1.0 0.0 0.0 endloop endfacet facet normal 0.0 0.0 1.0 outer loop vertex -1.0 -1.0 0.0 vertex 0.0 -1.0 0.0 vertex -1.0 0.0 0.0 endloop endfacet facet normal 0.0 0.0 1.0 outer loop vertex 0.0 0.0 0.0 vertex 0.0 -1.0 0.0 vertex -1.0 0.0 0.0 endloop endfacet endsolid mesh ./system/extrudeMeshDict Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object extrudeProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // constructFrom surface; surface "./constant/triSurface/mesh.stl"; flipNormals false; extrudeModel linearNormal; nLayers 1; expansionRatio 1.0; linearNormalCoeffs { thickness 5.0; } mergeFaces false; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Code:
[...] Extruding surface with : points : 9 faces : 8 normals[0] : (0 0 1) Mesh bounding box : (-1 -1 -5) (1 1 5) with span : (2 2 10) Merge distance : 0.0002 Collapsing edges < 0.0002 ... Merging edge (3 12) since length 0 << 0.0002 Merging edge (1 10) since length 0 << 0.0002 Merging edge (2 11) since length 0 << 0.0002 Merging edge (5 14) since length 0 << 0.0002 Merging edge (7 16) since length 0 << 0.0002 Cell:1 uses faces:5(0 1 2 17 25) of which too many are marked for removal: 0 1 2 Cell:3 uses faces:5(1 3 4 19 27) of which too many are marked for removal: 1 3 4 [...] Thanks in advance. //************************************************** ****** EDIT: I noticed that the problem was caused because OpenFOAM calculates the normal by applying the right-hand rule to the vertices, and not with the facet normal entry. I should have taken this into account. By sorting the vertices accordingly the mesh is generated OK. The .stl file should read: ./constant/triSurface/mesh.stl Code:
solid mesh facet normal 0.0 0.0 1.0 outer loop vertex 1.0 1.0 0.0 vertex 0.0 1.0 0.0 vertex 1.0 0.0 0.0 endloop endfacet facet normal 0.0 0.0 1.0 outer loop vertex 0.0 0.0 0.0 vertex 1.0 0.0 0.0 vertex 0.0 1.0 0.0 endloop endfacet facet normal 0.0 0.0 1.0 outer loop vertex 1.0 -1.0 0.0 vertex 1.0 0.0 0.0 vertex 0.0 -1.0 0.0 endloop endfacet facet normal 0.0 0.0 1.0 outer loop vertex 0.0 0.0 0.0 vertex 0.0 -1.0 0.0 vertex 1.0 0.0 0.0 endloop endfacet facet normal 0.0 0.0 1.0 outer loop vertex -1.0 1.0 0.0 vertex -1.0 0.0 0.0 vertex 0.0 1.0 0.0 endloop endfacet facet normal 0.0 0.0 1.0 outer loop vertex 0.0 0.0 0.0 vertex 0.0 1.0 0.0 vertex -1.0 0.0 0.0 endloop endfacet facet normal 0.0 0.0 1.0 outer loop vertex -1.0 -1.0 0.0 vertex 0.0 -1.0 0.0 vertex -1.0 0.0 0.0 endloop endfacet facet normal 0.0 0.0 1.0 outer loop vertex 0.0 0.0 0.0 vertex 0.0 -1.0 0.0 vertex -1.0 0.0 0.0 endloop endfacet endsolid mesh
__________________
Terrassa Rocket Team Blog: http://terrassarocketteam.blogspot.com/ Last edited by TRT; April 20, 2012 at 08:25. Reason: Solved |
|
March 26, 2018, 08:15 |
|
#2 |
Member
Luís Tiago Ferreira Fernandes
Join Date: Mar 2018
Posts: 30
Rep Power: 8 |
hello,
what do you mean by changing the vertices? When you draw the geometry and later save in stl format, you have to draw each vertice in the same order as you drew the base block mesh? Thanks Tiago |
|
Tags |
extrudemesh, merging, stl, surface |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Surface triangulation using snappyHexMesh | shaileshbg | OpenFOAM Meshing & Mesh Conversion | 4 | October 17, 2019 05:42 |
[ICEM] cannot set boundary after split STL surface | guohf | ANSYS Meshing & Geometry | 0 | June 11, 2018 01:33 |
[Gmsh] Extrude stl surface for building a prismatic layer | KateEisenhower | OpenFOAM Meshing & Mesh Conversion | 12 | April 21, 2016 17:54 |
[snappyHexMesh] STL surface ignored -snappyhexmesh | Ananthakrishnan | OpenFOAM Meshing & Mesh Conversion | 4 | July 9, 2015 06:31 |
[snappyHexMesh] Experimentally obtained STL file for internal Flow SnappyHexMesh | Irish09 | OpenFOAM Meshing & Mesh Conversion | 9 | April 7, 2012 09:50 |