Skip to content

Conversation

@sloriot
Copy link
Member

@sloriot sloriot commented Sep 12, 2025

You can now do:

  Random_points_in_triangle_mesh_3<TriangleMesh> g(mesh, r);
  Point c = *g;
  face_descriptor fc = g.last_item_picked();

to get the normal of the picked point

cc @huang46u

@MaelRL MaelRL added Not yet approved The feature or pull-request has not yet been approved. Small feature labels Sep 12, 2025
@MaelRL MaelRL added this to the 6.2-beta milestone Sep 12, 2025
@afabri
Copy link
Member

afabri commented Sep 15, 2025

"picked_item" sounds strange. Could the value type be a struct with a conversion operator to point/face_descriptor/pair<point/face_descriptor> ?

@afabri
Copy link
Member

afabri commented Sep 15, 2025

Do we want the equivalent functionality for tetrahedral mesh boundaries ?
On this page the word Mesh_complex_3_in_triangulation_3 should be replaced with MeshComplexWithFeatures_3

@sloriot
Copy link
Member Author

sloriot commented Sep 16, 2025

"picked_item" sounds strange. Could the value type be a struct with a conversion operator to point/face_descriptor/pair<point/face_descriptor> ?

what's the problem with the value type?

The function is available only for generators that first need to select an item within a range and then sample the point in the picked item. I'm OK with whatever better name you could come up with.

@sloriot
Copy link
Member Author

sloriot commented Sep 16, 2025

Do we want the equivalent functionality for tetrahedral mesh boundaries ? On this page the word Mesh_complex_3_in_triangulation_3 should be replaced with MeshComplexWithFeatures_3

It is already here. See https://github.com/CGAL/cgal/pull/9066/files#diff-0d2d36f802470003ce212fc13d25eddff587acac6c3864488f104e31aaec8f75R692

@sloriot
Copy link
Member Author

sloriot commented Sep 17, 2025

what @afabri meant is to make operator* return a struct that will have an operator to convert to Point type.

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

Labels

Enhancement Not yet approved The feature or pull-request has not yet been approved. Pkg::Generators Small feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants