Hello Madam or Sir,
I am the user of OpenMesh, and I want ask some questions about the parallel code with OpenMesh, exactly, the parallel code is based on OpenMP on the VS2013.
The first question: When I use the OpenMP on the VS2013 to speed up the program which write with OpenMesh, for example, I add the code: #pragma omp parallel for num_threads(7) , just like the following:
and the errors follow, and I do not know why.
and the second question: Could the code with iterator of OpenMesh be paralleled by OpenMP just like " for (TriMesh::FaceIter f_it = mesh.faces_begin(); f_it != mesh.faces_end(); f_it++) " in the above picture? or How can I parallel the code with iterator of OpenMesh?
Thank you for your time! And I am looking forward to your reply.
Sincerely
LuWang
Hello again,
I am trying to add a float data type to each face in my mesh. I am
following the storing custom properties tutorial but I am a little confused
on how to assign each face with an actual value.
For example:
OpenMesh::FPropHandleT<float> fprop_float;
mesh.add_property(fprop_float, "fprop_float");
mesh.property(fprop_float).set_persistent(true);
mesh.face(mesh.face_handle(1)) = 1.12;
Thank you very much for your help and quick responses.
- William
Hello,
I am just getting started with OpenMesh and learning the halfedge
structure. I am trying to split a face and then split it again to
ultimately create areas of different densities that looks something similar
to the picture below.
I have tried to use the following code:
int main(){
MyMesh mesh;
// generate vertices
MyMesh::VertexHandle vhandle[5];
vhandle[0] = mesh.add_vertex(MyMesh::Point(0, 0, 0));
vhandle[1] = mesh.add_vertex(MyMesh::Point( 0, 10, 0));
vhandle[2] = mesh.add_vertex(MyMesh::Point( 10, 10, 0));
vhandle[3] = mesh.add_vertex(MyMesh::Point(10, 0, 0));
vhandle[4] = mesh.add_vertex(MyMesh::Point(5,5,0));
mesh.add_face(vhandle[2], vhandle[1], vhandle [0]);
mesh.add_face(vhandle[2], vhandle[0], vhandle [3]);
mesh.split(mesh.face_handle(0), vhandle[4]);
mesh.split(mesh.face_handle(1), vhandle[4]);
// This face_handle is generated from the previous split// and is the
one causing errors
mesh.split(mesh.face_handle(2), vhandle[1]);
However when I try to load the output.off file into a mesh viewer I get the
error, "warning mesh contains 0 vertices with NAN coordinates and two
degenerated faces". Do you have any recommendations on how to create a mesh
with a large amount of faces? I am relatively new to c++ as well as mesh
generating so I feel like I'm taking the most difficult approach to this.
Thank you in advance for your help and I apologize if something like this
has been answered in the documentation but I could not find it.
- William
Hi,
Is there any methods or functions in OpenMesh which one can call to
join/combine two meshes so that it becomes one and hopefully the ability to
have a resulting mesh with the minimum number of edges ?
Cheers
--
Nicholas Yue
Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
http://au.linkedin.com/in/nicholasyuehttps://vimeo.com/channels/naiadtools