Questions tagged [openmesh]

OpenMesh is a library implementing a generic and efficient data structure for representing and manipulating polygonal meshes. It is written in C++ and also has experimental Python bindings. Use this tag for questions regarding OpenMesh or its usage in either C++ or Python.

Also refer to the OpenMesh Web Site for a more detailed documentation of OpenMesh.

75 questions
2
votes
1 answer

Mesh Simplification with Assimp and OpenMesh

For days ago, I ask a question on how to use the edge collapse with Assimp. Smooth the obj and remove duplicated vertices in software are sloved the basic problem that could make edge collapse work, I mean it work because it could be simplicated by…
Tokenyet
  • 4,063
  • 2
  • 27
  • 43
2
votes
1 answer

OpenMesh edge index after reopening a modified mesh

I modified a mesh, and some edges were added. Then I saved the modified mesh to a .obj file. When I open this .obj file using OpenMesh read function, the indices of edges are different from the indices of edges when I saved the mesh, because the…
Uksin
  • 96
  • 1
  • 4
2
votes
1 answer

OpenMesh Decimater does not reduce vertex number

I am trying to decimate a mesh using OpenMesh. I followed the very example that is stated in the doc: cout << "Vertices: " << mesh->n_vertices() << endl; DecimaterT decimater(*mesh); // a decimater object, connected to a mesh …
Lake
  • 4,072
  • 26
  • 36
2
votes
2 answers

Splitting mesh into connected components in Openmesh

I have an obj file mesh and I want to extract connected components from it through OpenMesh. I can find boundary vertices and edges, but is there a way to directly split mesh into connected components in Openmesh ?
Rishabh
  • 25
  • 1
  • 6
2
votes
1 answer

Compute vertex valence of a mesh OpenMesh

It's the first time I use OpenMesh and I am trying to do a very simple function to compute the valence of all vertex in a mesh. My first attempt looks like this Mesh::VertexIter vIterator, vBegin, vEnd; Mesh::HalfedgeHandle initialEdge,…
BRabbit27
  • 6,333
  • 17
  • 90
  • 161
1
vote
1 answer

How to delete faces from mesh using openmesh?

Pretty much the title I am trying to delete a few faces of a mesh using open mesh, like this: MyMesh mesh; char fname[1024]; sprintf(fname, "box_%i.obj", 0); if (!OpenMesh::IO::read_mesh(mesh, std::string(fname))) { …
Makogan
  • 8,208
  • 7
  • 44
  • 112
1
vote
1 answer

OpenMesh random access to a face attribute

I can output coordinates of a point in code below but can not access face attribute. Am I using the wrong method? import openmesh as om import numpy as np mesh = om.TriMesh() # add a a couple of vertices to the mesh vh0 = mesh.add_vertex([0, 1,…
Lyrk
  • 1,936
  • 4
  • 26
  • 48
1
vote
1 answer

How to get a MeshHandle from a mesh instance in OpenMesh?

I am trying to use this function to compute the center of mass of a mesh structure. This is the signature: Point calc_centroid (MeshHandle _mh) const So it takes a MeshHandle object as a parameter. My question is, how to get such a MeshHandle…
Botond
  • 2,640
  • 6
  • 28
  • 44
1
vote
1 answer

Problem with reading neighboring vertices and faces for a vertex in OpenMesh

I have a 3D mesh of reconstructed scene with closed holes (regions with missing geometry) in obj file. I used Close Holes filter in MeshLab to recover geometry in hole regions. This mesh has 7728 vertices and 2864 faces. For manipulating with mesh…
user2976612
  • 145
  • 1
  • 8
1
vote
1 answer

Remove a property by name in OpenMesh

In OpenMesh, once a named property is added to an element, it will be permanent in the sense that the property survives the scope of the property manager as explained here. My question is, how to remove such a property by its name? So far I tried…
Botond
  • 2,640
  • 6
  • 28
  • 44
1
vote
2 answers

OpenMesh: fast search of common neighbor vertices

I have a function which finds the common neighbors of two vertices v1 and v2, i.e. those vertices that are connected to both v1 and v2: std::vector find_common_neighbors(MyMesh & mesh, MyMesh::VertexHandle & v1,…
Botond
  • 2,640
  • 6
  • 28
  • 44
1
vote
1 answer

Calculate signed dihedral angle

OpenMesh has the calc_dihedral_angle() function to calculate the dihedral angle between two faces. Is there a signed/directed equivalent of this function? Halfedges of faces are directed, thus normals of faces are well defined. It is thus meaningful…
Botond
  • 2,640
  • 6
  • 28
  • 44
1
vote
1 answer

OpenMesh geometric vector operations

OpenMesh has its VectorT class which I believe is used to carry out all sorts of position vector operations (additions/subtractions, inner and outer products, etc.). Are there any examples available on how to actually use it? I would be in…
Botond
  • 2,640
  • 6
  • 28
  • 44
1
vote
1 answer

OpenMesh copy_all_properties() between elements belonging to different meshes

Is there a way in OpenMesh to copy element properties in between different mesh instances? copy_all_properties() does copy all element properties from one element to another as described here, however, it is bound to a mesh instance and does not…
Botond
  • 2,640
  • 6
  • 28
  • 44
1
vote
0 answers

OpenMesh restore deleted elements

According to the documentation, calling delete (delete_face(), delete_vertex(), delete_edge()) on mesh elements only deletes them internally by setting the appropriate status flag. These elements are permanently deleted only when the garbage…
Botond
  • 2,640
  • 6
  • 28
  • 44