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
Hi,
I was wondering if you can explain exactly how the `add_face` function in
the poly connectivity class works.
I've been trying to understand how it works by reading the code, but I
can't figure all the corner cases.
I've also posted a question here (
https://computergraphics.stackexchange.com/questions/8771/halfedge-data-str…)
which
also points the specific bit I don't understand.
Can you help?
Thank you so much.
Hello!
I am trying to make use of OpenMesh inside of a Visual Studio 2017 project, but I am running into compile errors that arise from trying to include files from OpenMesh. Here are a couple images illustrating this:
Includes:
Errors:
For context, I downloaded the OpenMesh (7.1) binary for Windows. I thought that all I would need to do is set values in the project settings to point to the lib, headers, and dlls.
Thanks,
Robert
Hi,
I am new to OpenMesha and currently working with the python bindings to build a quick prototype of my code before moving to c++.
attached a simple icosahedron structure. I defined 12 vertices and 20 faces.
When using the vf circulator I experience that not all neighbouring face of a vertex are found. I also found that the number of faces is sensitive to the order of the vertex handles when defining a face.
when looking at the indices some are set to -1.
Is this expected behavior or am I missing something fundamental?
Please find the minimal example below.
Any help or comments would be greatly appreciated!
Best regards,
Marc Siggel
import OpenMesh as om
import numpy as np
mesh = om.TriMesh()
mesh_notebook = {}
face_notebook = {}
radius = 3.0/4.0/np.pi
phi = 0.5*(1+np.sqrt(5))
a = radius / np.sqrt(phi*np.sqrt(5))
mesh_notebook[0,"handle"] = mesh.add_vertex([a*phi,0,a])
mesh_notebook[1,"handle"] = mesh.add_vertex([a*phi,0,-a])
mesh_notebook[2,"handle"] = mesh.add_vertex([-a*phi,0,-a])
mesh_notebook[3,"handle"] = mesh.add_vertex([-a*phi,0,a])
mesh_notebook[4,"handle"] = mesh.add_vertex([a,a*phi,0])
mesh_notebook[5,"handle"] = mesh.add_vertex([-a,a*phi,0])
mesh_notebook[6,"handle"] = mesh.add_vertex([-a,-a*phi,0])
mesh_notebook[7,"handle"] = mesh.add_vertex([a,-a*phi,0])
mesh_notebook[8,"handle"] = mesh.add_vertex([0,a,a*phi])
mesh_notebook[9,"handle"] = mesh.add_vertex([0,-a,a*phi])
mesh_notebook[10,"handle"] = mesh.add_vertex([0,-a,-a*phi])
mesh_notebook[11,"handle"] = mesh.add_vertex([0,a,-a*phi])
face_notebook[0,"handle"] = mesh.add_face(mesh_notebook[7,"handle"], mesh_notebook[0,"handle"], mesh_notebook[9,"handle"])
face_notebook[1,"handle"] = mesh.add_face(mesh_notebook[9,"handle"], mesh_notebook[7,"handle"], mesh_notebook[6,"handle"])
face_notebook[2,"handle"] = mesh.add_face(mesh_notebook[9,"handle"], mesh_notebook[6,"handle"], mesh_notebook[3,"handle"])
face_notebook[3,"handle"] = mesh.add_face(mesh_notebook[7,"handle"], mesh_notebook[1,"handle"], mesh_notebook[10,"handle"])
face_notebook[4,"handle"] = mesh.add_face(mesh_notebook[7,"handle"], mesh_notebook[10,"handle"], mesh_notebook[6,"handle"])
face_notebook[5,"handle"] = mesh.add_face(mesh_notebook[10,"handle"], mesh_notebook[6,"handle"], mesh_notebook[2,"handle"])
face_notebook[6,"handle"] = mesh.add_face(mesh_notebook[0,"handle"], mesh_notebook[1,"handle"], mesh_notebook[7,"handle"])
face_notebook[7,"handle"] = mesh.add_face(mesh_notebook[6,"handle"], mesh_notebook[3,"handle"], mesh_notebook[2,"handle"])
face_notebook[8,"handle"] = mesh.add_face(mesh_notebook[0,"handle"], mesh_notebook[4,"handle"], mesh_notebook[8,"handle"])
face_notebook[9,"handle"] = mesh.add_face(mesh_notebook[8,"handle"], mesh_notebook[4,"handle"], mesh_notebook[5,"handle"])
face_notebook[10,"handle"] = mesh.add_face(mesh_notebook[8,"handle"], mesh_notebook[3,"handle"], mesh_notebook[5,"handle"])
face_notebook[11,"handle"] = mesh.add_face(mesh_notebook[1,"handle"], mesh_notebook[4,"handle"], mesh_notebook[11,"handle"])
face_notebook[12,"handle"] = mesh.add_face(mesh_notebook[4,"handle"], mesh_notebook[5,"handle"], mesh_notebook[11,"handle"])
face_notebook[13,"handle"] = mesh.add_face(mesh_notebook[5,"handle"], mesh_notebook[11,"handle"], mesh_notebook[2,"handle"])
face_notebook[14,"handle"] = mesh.add_face(mesh_notebook[0,"handle"], mesh_notebook[1,"handle"], mesh_notebook[4,"handle"])
face_notebook[15,"handle"] = mesh.add_face(mesh_notebook[3,"handle"], mesh_notebook[2,"handle"], mesh_notebook[5,"handle"])
face_notebook[16,"handle"] = mesh.add_face(mesh_notebook[0,"handle"], mesh_notebook[8,"handle"], mesh_notebook[9,"handle"])
face_notebook[17,"handle"] = mesh.add_face(mesh_notebook[9,"handle"], mesh_notebook[8,"handle"], mesh_notebook[3,"handle"])
face_notebook[18,"handle"] = mesh.add_face(mesh_notebook[1,"handle"], mesh_notebook[10,"handle"], mesh_notebook[11,"handle"])
face_notebook[19,"handle"] = mesh.add_face(mesh_notebook[2,"handle"], mesh_notebook[10,"handle"], mesh_notebook[11,"handle"])
print(len(mesh.faces())) # should be 20
for edge in mesh.vf(mesh_notebook[0,"handle"]):
print(edge.idx()) # should be 5
for j,i in face_notebook:
print(face_notebook[j,i].idx()) # some are defined as -1 - default behavior?