Hi All,
I have generated a binary .om file where I also save basic edge and face properties (both integers). The file is generated by C++.
Then I am trying to read the same file with Python, however, I'm getting a version error:
In [2]: import openmesh as om
In [3]: om.read_trimesh('omtest10000.om')
File uses .om version 2.1 but reader only supports up to version 2.0.
Please update your OpenMesh.
Is there an easy fix to this? Is there a newer version of the Python bindings which support .om version 2.1?
Thank you,
Botond
Hi,
I am looking at OpenMesh as a possible in-memory polygonal mesh
representation for a library I am writing.
However, there will be instances where some of the computation are more
easily done in C++ but some are easier in Python hence the need to pass
data between them.
Is OpenMesh suitable for such use case ?
Is there some code I can see where the bidirectional passing of such
OpenMesh data is happening so that I can learn from it?
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
Dear OpenMesh Team,
today I wanted to access OpenMesh Git repository (https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh.git). Unfortunately when trying to clone it, I get a timeout error.
Can you please check if the Git server is running? I also tried to change the network, in order to exclude our firewall to deny the access.
I hope you can help me with this issue.
Best Regards,
JULIAN PEGORARO
Junior Research Engineer
Sensing & Vision Solutions
Center for Digital Safety & Security
AIT Austrian Institute of Technology GmbH
Giefinggasse 4 | 1210 Vienna | Austria
M +43 664 88904307
julian.pegoraro(a)ait.ac.at<mailto:julian.pegoraro@ait.ac.at> | www.ait.ac.at<https://www.ait.ac.at/>
FN: 115980 i HG Wien | UID: ATU14703506
www.ait.ac.at/Email-Disclaimer<https://www.ait.ac.at/Email-Disclaimer>
Hi to all.
Before asking my question I would like to state two important things:
1) My goal is to work with 2d triangular/polygonal meshes, from which i don't see any examples in the documentation. As a starting point I want to create and export (to a .vtk file) a simple 2d polygonal mesh, i.e. just a square.
2) I'm new to the library so this might be a rather broad/general question.
Now, here's what i have tried.
1) I've started with the tutorial "Building a cube". There i have managed to export the mesh to a .vtk file doing the following (variable names follow from the tutorial):
//
typedef OpenMesh::IO::ExporterT<MyMesh> BaseExporter;
BaseExporter be = BaseExporter(mesh);
OpenMesh::IO::Options opt = OpenMesh::IO::Options::Default;
OpenMesh::IO::_VTKWriter_ mywriter;
mywriter.write("output.vtk",be,opt,sizeof(double));
//
2) Now i want to modify this tutorial example to have a single square. To be clear, I want a 2d geometry, not a 3d geometry whose vertices have constant z=0 coordinate. This is how i define the mesh:
//
MyMesh::VertexHandle vhandle[4];
vhandle[0] = mesh.add_vertex(MyMesh::Point(-1, -1));
vhandle[1] = mesh.add_vertex(MyMesh::Point( 1, -1));
vhandle[2] = mesh.add_vertex(MyMesh::Point( 1, 1));
vhandle[3] = mesh.add_vertex(MyMesh::Point(-1, 1));
std::vector<MyMesh::VertexHandle> face_vhandles;
face_vhandles.clear();
face_vhandles.push_back(vhandle[0]);
face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[2]);
face_vhandles.push_back(vhandle[3]);
mesh.add_face(face_vhandles)
//
When i try to compile the code last code i get the following error, amongst many others:
no matching function for call to ‘OpenMesh::VectorT<float, 3>::VectorT(int, int)’ vhandle[0] = mesh.add_vertex(MyMesh::Point(-1, -1));
Now, these are my questions:
1) How can i create a 2d polygonal mesh? I guess i have to give the proper template parameter to type definition on
typedef OpenMesh::PolyMesh_ArrayKernelT<> MyMesh;
but i don't know what to put in there exactly.
2) How is that going to affect the BaseExporter that i use to create the .vtk file? I am asking this because i already manage to create a 2d mesh following what i found in one of the unit tests, namely unittests_polymesh_vec2i.cc, but then i cannot export the mesh following the approach i had used for the cube. So, just in case anyone would suggest that piece of code as an answer to my question.
Any thoughts or suggestions will be greatly appreciated :)
Kind regards,
Hi,
OpenMesh has implemented the functionalities to s/r custom property of
vector<T> in
OpenMesh/Core/IO/SR_binary_vector_of_fundamentals.inl.
However it seems to expect the size to be known in advance when restoring.
Is there a way to restore the size dynamically?
I think maybe it's better to store the size as well?
Kind regards
Hi there,
I stumbled across a pretty infuriating bug in OpenMesh 8.0 (I think it still might exist in 8.1) in the `restore` function for `PropertyT<bool>` (`Property.hh`) (though this issue may exist elsewhere quite possibly...).
The issue occurs at the beginning of the for loop where the bit packing happens (around line 313). The problematic statement is `_istr >> bits;`
The problem is `std::istream` by default skips white space characters (https://en.cppreference.com/w/cpp/io/manip/skipws), so if one of the bytes in the stream being restored happens to be 0x20 (32 - 'space' character), it will be skipped, leading to the stream getting out of sync with the bytes read (I was able to track this down using lots of `_is.tellg();` calls).
I've made a minimal change in Property.hh to ensure white space characters aren't skipped: `_istr >> std::noskipws;` right before the for loop. There might be a better more central place to enable this setting but it resolves the bug for us for now. If anyone has any feedback on the best place for this fix I'd love to know!
Thanks!
Tom
Hello,
I really like that your cmake file now supports exported targets. I
wanted to require OpenMesh 8.1 so I can be sure that I am able to use
them using
find_package(OpenMesh 8.1 REQUIRED)
But this requires a package version file, like described here, which is
not generated by your cmake files:
https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html#c…
It would be great, if you can add this.
with kind regards,
Alexander Schier
Hi,
Is it possible in OpenMesh C++ to set the vertex positions from an stl
container or from another object directly instead of looping on the mesh
using the vertex iterators.
Thanks,
Best Regards,
Sinan
Hello there!
I wanted to let people know that a new tool released as part of the Lumberyard Editor called the White Box Tool is built using the Open Mesh library.
We have an announcement video showing off the MVP - https://youtu.be/nV2tm19FmYI?t=130
For more information please find the documentation here - https://docs.aws.amazon.com/lumberyard/latest/userguide/gem-white-box.html
The Release Notes for the latest release can be found here - https://aws.amazon.com/about-aws/whats-new/2020/07/lumberyard-beta-1-25-ava…
And finally if you want to have a look at the code it’s available on GitHub - https://github.com/aws/lumberyard/tree/master/dev/Gems/WhiteBox (a gotcha is looking on GitHub it might seem that some of the OpenMesh files are missing but that’s because Lumberyard is so large we can’t keep all the files on GitHub – if you sync the repo and then run git_bootstrap.exe it’ll download the remaining files).
Thanks again for an excellent library, the docs were fantastic and we're hoping to be able to merge our minimal updates back soon if you're interested!
Kind regards,
Tom