CommonWealthRobotics / BowlerStudio

A Full-Stack Robotics Development Environment
GNU Lesser General Public License v3.0
136 stars 29 forks source link

integrate PyMeshLab for meshing_repair_non_manifold_vertices #431

Open JansenSmith opened 2 weeks ago

JansenSmith commented 2 weeks ago

ms.meshing_repair_non_manifold_vertices(vertdispratio = 0.010000) running this twice fixes most STLs with duplicated vertices

Here is a clean pr adding SceneBuilder as an example of all the bits that need to be touched: https://github.com/CommonWealthRobotics/BowlerStudio/issues/409

Process is documented here: https://github.com/CommonWealthRobotics/BowlerStudio/pull/412

MeshLab is a utility, so it would just require an additional json in ExternalEditorsBowlerStudio and a static class call in: https://github.com/CommonWealthRobotics/bowler-script-kernel/blob/kh/add-cadoodle/src/main/java/com/neuronrobotics/bowlerstudio/util/GeometrySimplification.java

JansenSmith commented 2 weeks ago

actually..... i've found some that require multiple runs of meshing_repair_non_manifold_vertices.... instead, use PyMeshLab to find non-manifold vertices and iterate until number is zero.

JansenSmith commented 2 weeks ago

actually..... i've found some that require multiple runs of meshing_repair_non_manifold_vertices.... still researching

madhephaestus commented 2 weeks ago

You may want to look at the source of the exception you are trying to correct and see if maybe you can avoid the problem upstream of the repair: https://github.com/NeuronRobotics/JCSG/blob/development/src/main/java/eu/mihosoft/vrl/v3d/Plane.java#L106

madhephaestus commented 2 weeks ago

I need a small file <1mb that produces the problem for unit testing

madhephaestus commented 2 weeks ago

the root cause may have been fixed in this commit: https://github.com/NeuronRobotics/JCSG/commit/5974f4a3f041e91cd2872f5474e0fdba1337a0f3