I'm trying to add an existing TriMesh into scene but got some error.
The TriMesh object is generated by myself (not by the core of
OpenFlipper) to store the result of my algorithm. I would like to add
it into scene but found no suitable functions.
I tried to use LoadSaveInterface::addEmptyObject to create an empty
TriMeshObject first and then change its underlying data using
MeshObject<MeshT>::mesh(). This seems fine until I called
OpenMesh::PolyMeshT<Kernel>::update_face_normals(). My debugger showed
that the assertion in
const PropertyT<T>& property(BasePropHandleT<T> _h) in
PropertyContainer.hh failed when accessing point_ property. The point_
property is fine and I did call request_face_normals() before
update_face_normals(). I also tested this mesh with TriMesh.point()
and got no errors. Unlike previous case, it use static_cast so no
assertion error occurs.
For dependency reason, I need to separate algorithm from UI-related
codes. So I would like to avoid using
LoadSaveInterface::addEmptyObject in my algorithm class. And it's not
possible for me to use LoadSaveInterface::addEmptyObject before my
algorithm because I don't know how many meshes will be created.
Any suggestion? Thank you.
I am writing a plugin in which I would like to create a simple mesh (a cube
for example) and display it, by clicking on a push button.
Right now, I can create my mesh and save it to a file but I cannot display
Do you know which function I should call in order to display the mesh?