Sanaxen / mesh2cad

MeshToCad_Surface(IGES) IGES
MIT License
14 stars 1 forks source link

Very very long processing on simple case #3

Closed yvanblanchard closed 1 month ago

yvanblanchard commented 1 month ago

Hello,

I tried to apply segmentation on my OBJ mesh file (in order to generate IGES CAD file). The shape is simple, but it contains 60K triangles and almost 200K vertices. The algorithm continues working for almost one hour (console logs), and I decided to stop processing before end.

I would like to know if it's normal or not ?

Here is image of the mesh: image

And the input OBJ file: subset.zip

Thank you !

Sanaxen commented 1 month ago

Hello. Segmentation failure. This may be a bug, but the OBJ used for input is not a solid (closed shape), so it does not create a closed curve (loop). Therefore, if I skip the segmentation, the process proceeds normally to the end.

6519_Segment_1.zip

mesh2cad_.batの ..\bin\aut_segmentation.exe %tmp_id%.obj -lambda %2 -clusters %3 You can comment out this portion and add the following two lines

copy %tmp_id%.obj %tmp_id%_Segment_1.obj
copy %tmp_id%.obj %tmp_id%_Segment_1

It will look like this

: ..\bin\aut_segmentation.exe %tmp_id%.obj -lambda %2 -clusters %3
copy %tmp_id%.obj %tmp_id%_Segment_1.obj
copy %tmp_id%.obj %tmp_id%_Segment_1
yvanblanchard commented 1 month ago

Thank you @Sanaxen Does the segmentation process works on watertight meshes only ?

Sanaxen commented 1 month ago

Yes, it does. I would have to take a closer look to be sure, but it could be a bug.

yvanblanchard commented 1 month ago

Since my mesh is not watertight , I think it’s Normal that the algorithm does not work. So u don’t understand why you have to investigate for a potential bug?

Sanaxen commented 1 month ago

Possible bug If the input is not a watertight mesh, the behavior is incorrect. Perhaps the segmentation resulted in the decomposition of the mesh into its component triangles.