Closed feifeizuo closed 1 month ago
Hello!
Thanks for the suggestion and the link (unfortunately it is 404, could you please update it). We will research into this and discuss with the team.
Thanks for the suggestion. We have implemented it in MeshLib, see MeshLib\source\MRMesh\MRMeshThickness.h
:
/// returns the thickness at each vertex as the diameter of the inscribed sphere
[[nodiscard]] MRMESH_API std::optional<VertScalars> computeInSphereThicknessAtVertices( const Mesh& mesh,
const InSphereSearchSettings & settings, const ProgressCallback & progress = {} );
Comparison. Ray method:
Maximum inscribed sphere method:
Hi @Fedr this looks great. Any chance of exposing this to python also? Are there any downsides to this function as opposed to the original ray-casting method?
Hi @tobias-scheepers,
Both methods are already exposed to python, please look for computeRayThicknessAtVertices
and computeInSphereThicknessAtVertices
functions there.
Ray-casting method always returns same or larger value compared to inscribed-sphere method, and ray-casting is typically much faster. And the difference is drastic in peak-like vertices, where inscribed-sphere method returns very small number (where the sphere touches the nearest neighbour vertex). So please select one of the methods based on your need.
Hi, Thank you very much for providing the ray method to calculate the mesh thickness in the computeThicknessAtVertices function. In general, a more accurate method of maximum inscribed sphere (MIS) can also be used to calculate the mesh thickness, refer to the Paper https://www.cad-journal.net/files/vol_13/CAD_13 (2) _2016_199 -207.pdf . At the same time, both the MIS method and the ray method are implemented in the trimesh library. It would be very helpful if the MIS method could be implemented.
thanks