I noticed that whenever a slider (e.g. the one in the 'Slice' plugin) is
moved using the arrow keys or page up/down keys, it doesn't trigger
updates. This probably means that the sliderMoved() signal is used instead
of the valueChanged() signal, which does react to both mouse and key input.
Is the use of sliderMoved() a deliberate choice?
I hope that I send this email to the right place and that my question will be clear enough.
I am currently working on a plugin where I cut some triangles, for some reasons I choose to code my own split function to split faces correctly when the splitting point is on one edge.
Basically, the function delete the face to split (but not the vertices because I use "mesh->delete_face(fh,false);" and then create 2 or 3 new faces depending on the case ( with "mesh->add_face(vh,vh,vh_split);" , I reuse the vertex handles of the old vertices and use the vertex handle of the new vertex that was added to the mesh with "mesh->add_vertex(p0);". I do this several times in my algorithm.
At the end I call "mesh->garbage_collection(); > and it seems to work fine. I then emit the updatedObject signal for topology update and create a backup. If I stop here the result is fine visually . But when I delete faces one by one, the last one won't delete but trigger a segfault :
File: C:/Programmes_Perso/msys64/home/philip/OpenFlipper-2.1/libs_required/OpenMesh/src/OpenMesh/Core/Mesh/ArrayKernel.hh, Line 176
So it seems that there is an issue with the half edge structure. If I understand well it must be a boundary halfedge that try to access to his face which is invalid. I checked and none of my remaining or created faces is invalid. I also request correctly the halfedge status and texcoords2D.
Moreover I have a function that computes per face per vertex texture coordinates. So for all faces I iterate over halfedges and do this :
for (typename T::FaceHalfedgeIter fh_it = mesh->fh_iter(*f_it); fh_it!=mesh->fh_end(*f_it); ++fh_it)
Vec2f uv = ... (computation here);
If I call this function directly after the garbage_collection() of the triangle cutting, it also triggers a seg fault. If I call it later in another function it fails too. What is strange is that the function will go to its end and then send the segfault.
From what I read it really seems that one of the boundary halfedge that is not on a face try to access his face. But I don't know which function is doing that and why. It may be one of the updatedObject(object->id(), UPDATE_GEOMETRY); or updatedObject(object->id(), UPDATE_TOPOLOGY); but I am not sure and don't know what I am doing wrong.
Could you please help me with this issue ?
Ce courriel (incluant ses eventuelles pieces jointes) peut contenir des informations confidentielles et/ou protegees ou dont la diffusion est restreinte. Si vous avez recu ce courriel par erreur, vous ne devez ni le copier, ni l'utiliser, ni en divulguer le contenu a quiconque. Merci d'en avertir immediatement l'expediteur et d'effacer ce courriel de votre systeme. Airbus Defence and Space et les sociétés Airbus Group declinent toute responsabilite en cas de corruption par virus, d'alteration ou de falsification de ce courriel lors de sa transmission par voie electronique.
This email (including any attachments) may contain confidential and/or privileged information or information otherwise protected from disclosure. If you are not the intended recipient, please notify the sender immediately, do not copy this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Airbus Defence and Space and Airbus Group companies disclaim any and all liability if this email transmission was virus corrupted, altered or falsified.
Airbus Defence and Space SAS (393 341 516 RCS Versailles) - Capital: 16.587.728 EUR - Siege social: 51-61 Route de Verneuil, 78130 Les Mureaux, France