Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control 3D mesh densities for multiple sharp edges/features? I.e. graded tet-mesh densities. #4026

Closed
tcdoe opened this issue Jun 23, 2019 · 4 comments

Comments

@tcdoe
Copy link

tcdoe commented Jun 23, 2019

Hello, I need to have graded 3D mesh densities (from polyhedral object(s) OFF, not image). I'm making good progress with "domain.detect_features();" to identify the creases/edges, but all edges then have same density (first criteria fedge i think). For example, here (fig below) is a simple cylinder result. What I need is finer mesh at the top of the cylinder, or ideally control mesh density for both lower and upper (or multiple) edge 1-d polyline(s) that are found by detect_features.

image

Is that possible? I hope I haven't missed something obvious I'm new to cpp/cgal. FYI I'm just using the simple cpp example mesh_polyhedral_domain_with_features.

Also I think there may be a possibility of controlling using the mesh generator criteria, because when I read this man page, it says, "- cell_size. This parameter controls the size of mesh tetrahedra. It is either a scalar or a spatially variable scalar field. It provides an upper bound on the circumradii of the mesh tetrahedra."

So maybe I can use edge-detected nodes or facets to make/compute this scalar field?
A related question is that I would like to be able to manipulate the polylines generated by detect_features( ) but I can't figure out where the function definition is. I'm very new to cpp so again very sorry if this is obvious where I should "see" and control the detected polylines or related code. There is a lot of other interesting things I would like to do in detect_features(). Maybe I could duplicate that into a stand-alone function if that is possible.

Thank you for any help/info.

System info: Intel i7, Win 10, VS 17, CGAL 4.14

@lrineau
Copy link
Member

lrineau commented Jun 24, 2019

There are examples if the documentation of Mesh_3 about that subject. Let me know if that is sufficient for you.

As this issue is not really a bug but a question, I close it for book-keeping. But we can continue and discuss here, and even reopen the issue if it converges to a real issue...

@tcdoe
Copy link
Author

tcdoe commented Jun 24, 2019

Hello thanks. I've looked at the examples carefully, and have them all working, but there is nothing there that enables me to figure out how to prescribe mesh density on specific nodes/facets/polylines, or otherwise addresses my other question about how to access/manipulate the polylines that are identified by the 'detect_features()'.
Apologies for any confusion, this is not a 'bug' but is a question and feature interest.

@lrineau
Copy link
Member

lrineau commented Jun 26, 2019

As for detect_features, the function starts here:

detect_features(FT angle_in_degree, std::vector<Polyhedron>& poly)

and it relies a lot on CGAL::PMP::sharp_edges_segmentation:
sharp_edges_segmentation(PolygonMesh& pmesh,

@lrineau
Copy link
Member

lrineau commented Jun 26, 2019

The examples of Mesh_3 show how to specify a different density depending on the spatial location (it depends on the point p passes as argument). There are also ways to make the density depend on the "surface patch id" of facets, or on the "curve id" of sharp edges. But it is true that, using detect_features, you have no feedback on the indices of sharp 1D curves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants