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
12
votes
1 answer

Can't use a library installed with VCPKG in CLion

I followed the tutorial described in the VCPKG github site and then installed OpenMesh 8.0, and after, i linked the toolchain -DCMAKE_TOOLCHAIN_FILE=/home/diolante/vcpkg/scripts/buildsystems/vcpkg.cmake in Clion toolchain settings and when I…
FourZeroFive
  • 145
  • 1
  • 12
8
votes
3 answers

Python autocomplete in VS Code not working with external libraries in conda environment

I have installed several libraries into a conda environment named "foo". I am using Visual Studio Code as my IDE. Autocomplete works fine for almost all packages, except for the library "openmesh" (see below): I have selected the correct python…
tlk13
  • 113
  • 5
6
votes
2 answers

addface::complex edge error in OpenMesh

I've been following the OpenMesh tutorial First Steps - Building a Cube with a few modifications, I'm using a TriMesh instead of a PolyMesh and am building a pyramid instead of a cube. Somehow, I'm getting the error PolymeshT::add_face:complex edge…
Cecilia
  • 4,512
  • 3
  • 32
  • 75
6
votes
1 answer

OpenMesh Random Access

I thought OpenMesh would support random access to faces edges vertices. All I can find are iterators and circulators: for( auto v : mesh->vertices() ) mesh->point(v).data(); How can I do something like this: mesh->vertices(42);
3
votes
0 answers

Do OpenMesh circulators guarantee a specific order?

OpenMesh provides circulators to iterate over neighboring elements. The FaceVertex iterator is an example, which iterates over the vertices of a given face. My question is, does this circulator provide a specific, reproducible order of the face's…
Botond
  • 2,640
  • 6
  • 28
  • 44
3
votes
1 answer

Add edges to Openmesh mesh

Just starting out with OpenMesh, and I have so far been able to add vertices, and make faces. I now have a problem with understanding how i should add an edge to the mesh. I am aware of the Half-edge datastructure that openMesh uses, but i can't…
johnk
  • 108
  • 1
  • 9
2
votes
2 answers

How do I use openmesh and igl libraries in Python if both are not available for python2.7 or python3.9?

I have been trying to use some code which is uses openmesh and igl libraries. Unfortunately, the only way to install igl I found was via conda into its Python 3.9 environment (conda install -c conda-forge igl). Openmesh on the other hand I could…
tlk13
  • 113
  • 5
2
votes
2 answers

How to color faces in OpenMesh?

There is no example in OpenMesh documentation for coloring faces. Which function should I use to color fh0 to green? (I tried mesh.set_color but could not succeed. You can see my attempt on second part of code) import openmesh as om import numpy as…
Lyrk
  • 1,936
  • 4
  • 26
  • 48
2
votes
2 answers

Are OpenMesh iterators changed when adding elements?

Do existing OpenMesh iterators change, when I add elements? Example code: auto vh1 = mesh.vertex_handle(0); auto vh2 = mesh.vertex_handle(1); auto vh3 = mesh.vertex_handle(2); for(auto fh: mesh.faces()) { mesh.add_face(vh1, vh2, vh3); } I did…
allo
  • 3,955
  • 8
  • 40
  • 71
2
votes
2 answers

OpenMesh skipping circulators

OpenMesh has its skipping iterators which skips elements marked for deletion. Is there an equivalent in circulators? I'm thinking circulators which treat mesh elements marked deleted as if they were not there any more. Note that this is not as…
Botond
  • 2,640
  • 6
  • 28
  • 44
2
votes
1 answer

OpenMesh: Get handle to a boundary halfedge

I have a quite simple question on the C++ library OpenMesh. Surprisingly, I haven't found anywhere an answer on it. For a given mesh I'd like to iterate along the mesh boundary. From the documentation I know: You can iterate along boundaries by…
Chris87
  • 33
  • 6
2
votes
2 answers

How to save custom vertex properties with openmesh in Python?

I am working with openmesh installed in Python 3.6 via pip. I need to add custom properties to vertices of a mesh in order to store some data at each vertex. My code goes as follows : import openmesh as OM import numpy as np mesh =…
CDuvert
  • 367
  • 1
  • 3
  • 14
2
votes
1 answer

Openmesh: How to modify mesh faces? (And how to random access component handles?)

I just started using OpenMesh in Python. I started off by trying to make a PolyMesh consisting of a single quad. This is what I did: from openmesh import * mesh = PolyMesh(); vh0 = mesh.add_vertex(PolyMesh.Point(0,0,0)); vh1 =…
student
  • 21
  • 4
2
votes
1 answer

How to run program using OpenMesh

I have read through most of OpenMesh's documentation, and am lost in how to run a simple program using OpenMesh. I followed the tutorial for making a basic cube and building the project:…
2
votes
1 answer

Openmesh: updating face normals faster with Python than with C++?

I have created the following simple C++ script with OpenMesh: #include #include #include struct MyTraits : OpenMesh::DefaultTraits{ typedef OpenMesh::Vec3d…
GLR
  • 1,070
  • 1
  • 11
  • 29
1
2 3 4 5