Comments (6)
Hi,
yes if you can provide an example model and the script you are running could be helpful, thanks.
from pymeshlab.
I am experiencing a similar issue that may be related. In my case it will crash with any of several select methods, including select_small_discoennected_components(). I've enclosed an example script I am trying to use to clean up a non-manifold mesh, as well as an example mesh that can replicate the problem. Depending on how I run the script (either a python interpreter, jupyter notebook, or from within vs code), it crashes on different methods, but always on a method that is selecting vertices, and not on the first time that method is called.
examplecrash.zip
from pymeshlab.
I was trying to find a more minimal example that reliably causes a crash. Here is an example where if I first call meshset.remove_zero_area_faces()
and then call
meshset.select_small_disconnected_component()
it reliably crashes. If I just call one or the other, everything is fine. My starting mesh is kind of a mess, but I guess the goal I have is to clean them up as best I can. If I perform the same two operations in the GUI version, I do not get an error (and the disconnected component is successfully selected). In the short term, I think what I will do is try and implement things in C++ for now, but happy to try and help more to fix this for the python api if I can. I've attached the minimal example below.
examplecrash2.zip
from pymeshlab.
I was able to determine a few minor things: One, I verified that my mesh produces the same seg fault error on a mac, similarly crashing the kernel. The second thing I was able to determine is that it does not produce the error on a much simpler example of a small disconnected component. I've attached that example below, which is just a simple sphere with a few vertices deleted to disconnect some faces. The other thing that I was able to determine is that it is not a problem specifically with the .obj importer, as I get the same results with a .ply version of the file.
testhole.zip
from pymeshlab.
I was able to distill things down to a single face that can cause a fail.. it turns out that one of the problems with my mesh are some faces that are represented as quads instead of tris where one of the vertices is a duplicate vertex. Here is an obj file as text with just one of those faces:
: # Blender v2.92.0 OBJ File: 'example_bisect.blend'
# www.blender.org
mtllib right_left_left_bottom_front_bottom_back_left_right_back_less11.mtl
o right_left_left_bottom_front_bottom_back_left_right_back_example.010
v 0.452538 0.671930 -0.731709
v 0.452538 0.671930 -0.729608
v 0.452538 0.671930 -0.732187
v 0.452538 0.671930 -0.732187
vn 0.0000 0.0000 1.0000
usemtl Default_OBJ
s off
f 4//1 1//1 2//1 3//1
I suspect that what is going on in the c++ gui version vs. python, is that in c++ vgclib::compacteveryvector is called when importing a mesh, and it is somehow failing to get called when loading the mesh in Python. calling mesh.compact() after loading the mesh seems to solve the problem for me. It would be nice to fix it so that pymeshlab has the same behavior as meshlab.. it could be fixed by either figuring out why it doesn't get called in pymeshlab (it seems like it should.. gets called in afterLoadOperations, so it should be?) to make a change to the importers in vgclib to call it there (this gets done, for example, in import_fbx, but not import_obj or import_ply). To me, making a change in pymeshlab might be the better option?
from pymeshlab.
Sorry for the late reply, and thanks for the detailed report!!
I checked, and the actual issue was in the filter, since it should check every time if there are deleted faces.
You can try pymeshlab with this fix just downloading and installing the wheel generated by github actions.
This fix will be available in the next pymeshlab release!
from pymeshlab.
Related Issues (20)
- generate_polyline_from_planar_section results have incomplete sectionsurface meshes created. HOT 1
- How to use multi-threading for data processing HOT 2
- Inconsistent remesh using meshing_isotropic_explicit_remeshing
- test delete mesh is incorrectly named? HOT 1
- Connected components are quick to identify but slow to split
- how to convert the texture of a mesh to the numpy array? HOT 3
- Getting the list of existing custom arrays HOT 2
- generate_sampling_volumetric print too much info, is there any way to solve it?
- Request for ARM64 Architecture Support (e.g., Jetson AGX Orin) HOT 4
- Error exporting mesh (obj/ply) - Your MeshLab version has not plugin to save file format HOT 1
- the filter "Simplification: Quadratic Edge Collapse Decimation" creates borders HOT 1
- std::bad_alloc exception when importing HOT 1
- Export texture as JPG
- Memory issue when adding colour as a custom point attribute to mesh HOT 4
- save_current_mesh ignoring save_vertex_normal argument HOT 1
- apply_matrix_flip_or_swap_axis seems to have no effect HOT 2
- Attempting to set the matrix directly fails HOT 2
- Can't call face_face_adjacency_matrix HOT 2
- Random Seed Stuck in generate_stratified_triangle()
- undefined symbol: _ZdlPvm, version Qt_5 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymeshlab.