Closed kasunJKD closed 12 months ago
Yes:
The code:
#include <geogram/mesh/mesh.h> #include <geogram/mesh/mesh_geometry.h> #include <geogram/mesh/mesh_surface_intersection.h> .... Mesh* mesh = ...; compute_normals(*mesh); vector<vec3> N(mesh->vertices.nb()); for(index_t v: mesh->vertices) { N[v] = howmuch * normalize( Geom::mesh_vertex_normal(*mesh, v) ); } for(index_t v: mesh->vertices) { double* p = mesh->vertices.point_ptr(v); p[0] += N[v].x; p[1] += N[v].y; p[2] += N[v].z; } mesh->update(); MeshSurfaceIntersection I(*mesh); I.set_radial_sort(true); I.intersect(); I.remove_internal_shells();
Thank you so much
Yes:
The code: