CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   .stl from calculated quad-points (https://www.cfd-online.com/Forums/openfoam-programming-development/157757-stl-calculated-quad-points.html)

Phil_ August 7, 2015 05:18

.stl from calculated quad-points
 
Dear Foamers,

is there an easy way to create an .stl-file from calculated points in the domain?

The calculated points describe quadFaces, so I tried splitting them with the triangles() function from the face-class (src/OpenFOAM/meshes/meshShapes/face/face.C). This function expects a pointField as an argument.

How can such a pointField be defined by the calculated quad points? Is it necessary to create a whole new mesh-instance?

Kind regards

Philip

Phil_ August 7, 2015 06:52

Just found out how points can be added to the pointField. It's only possible component wise:

Code:

vector pTest = vector(1.0, 2.0, 3.0);

// points[0][0] = pTest; //does not work
points[0].x() = pTest.x();
points[0].y() = pTest.y();
points[0].z() = pTest.z();



All times are GMT -4. The time now is 17:36.