cutdigital / mcut

A library for detecting and resolving intersections between two surface meshes.
https://cutdigital.github.io/mcut.site
Other
413 stars 76 forks source link

tutorials error and other bugs #19

Closed prashant-saxena closed 1 year ago

prashant-saxena commented 1 year ago

Hi, The three tutorials are producing errors:

VertexNormals >> MCUT error: faceVertexOffset != -1
TextureCoordinates >> MCUT error: faceVertexOffset != -1
FaceNormals >> MCUT error: faceVertexOffset != -1

I have tested on several other meshes but most of the time mcut is ending up with some message. There are two meshes in the attached zip file. The csgboolean.cpp is producing this error:

csgboolean.exe source.obj cutter.obj -i

or

csgboolean.exe source.obj cutter.obj -ds

compute INTERSECTION
operator()(...) -> max perturbation iteratons reached (EventID=00000000000decb0)
MCUT error: err == MC_NO_ERROR

Although when working it's producing a very fine cut that's why I'm interested in this library.

Cheers data.zip

chitalu commented 1 year ago

The vertices defining some (or possibly all) of your faces are not coplanar. See for example the vertices defining face 0 of `source.obj'.

Either make sure your quad-face vertices are coplanar, or consider converting to triangle meshes.