now it can work on a variety of cases. Known bug: due to current design of primitive, some primitives with sharp rounding may not be detected, so that their integrand may not be correct, as well as their output mesh.