Closed onuralpszr closed 2 years ago
Hi,
Your code appears fine but for one detail, which is that the second for-loop assumes that each face is defined with exactly 3 vertices. This will be a problem e.g. if your input .stl file does not represent a triangle mesh.
I also recommend that you enable debug mode, which you can do while creating an mcut context. This will enable logging.
How may I enable that debug mode ? Any pointer ?
Hi,
Your code appears fine but for one detail, which is that the second for-loop assumes that each face is defined with exactly 3 vertices. This will be a problem e.g. if your input .stl file does not represent a triangle mesh.
I also recommend that you enable debug mode, which you can do while creating an mcut context. This will enable logging.
- Floyd
I enabled debug mode but still can't see much of it. I know that error code is "-4" but that's it. I had to debug myself to find each step where is the crash point.
Actual error was;
ctxtPtr->log(McDebugSource::MC_DEBUG_SOURCE_API, McDebugType::MC_DEBUG_TYPE_ERROR, 0, McDebugSeverity::MC_DEBUG_SEVERITY_HIGH, "found duplicate vertex in face - " + std::to_string(i));
I read STL file via "libigl STL read" but how can I do a proper cut because, when I read with STL file and convert Eigen matrix into vectors it can't cut it. After I convert the Eigen Matrix it still gives me error code "-4" and not do a cut until I convert them into obj via blender then it does do the cut.
My conversion snippet code is;
` // V is "MatrixXd" and F is "MatrixXi"
`