cg3hci / HexBox

HexBox is an intuitive modeling method and interactive tool for creating and editing hexahedral meshes. Hexbox brings the major and widely validated surface modeling paradigm of surface box modeling into the world of hex meshing.
Other
53 stars 7 forks source link

Error if a block is cut it several times #9

Closed otaolafranc closed 10 months ago

otaolafranc commented 10 months ago

Hello, If I cut several times the same block using 'j' command, the app will crash and the gui closes and I get an error message in the terminal: WARNING: adding duplicated poly! gui: /home/franco/Programs/HexBox/build/_deps/cinolib-src/include/cinolib/meshes/abstract_mesh.tpp:712: int cinolib::AbstractMesh<M, V, E, P>::edge_id(unsigned int, unsigned int) const [with M = cinolib::Mesh_std_attributes; V = cinolib::Vert_std_attributes; E = cinolib::Edge_std_attributes; P = HMP::Meshing::Mesher::PolyAttributes]: Assertionvid0 != vid1' failed. Aborted ` best regards

gcherchi commented 10 months ago

Hi, There could be an implementation bug. Could you try to explain to me what results you are looking for?

otaolafranc commented 10 months ago

Hello, first of all thanks for the help, I have just downloaded HexBox and I am playing around to see if it could fit my applications, that being said, for the moment I am just learning how to use it. what I encountered was that if I divide several time a block, at one point it will simply crash and everything that has been done will be lost at least get a simple error message without the window crashing.

gcherchi commented 10 months ago

Ok, it could be a bug. BTW, the J command is relatively uncommon to use as you are doing. The tool is intended to mainly work with global refinement (2-refinement on all the cells, with command ctrl+0) or local refinement (3-refinement in a selected cell, with command H). This should better fit the intended use of HexBox.

In the meantime, thank you for reporting the bug. We will try to fix it in the future. Of course, if you find a fix, feel free to open a pull request. Best regards