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

targets.source_cloud_from_shape() function missing #13

Open
generein opened this issue Jun 5, 2024 · 1 comment
Open

targets.source_cloud_from_shape() function missing #13

generein opened this issue Jun 5, 2024 · 1 comment
Assignees

Comments

@generein
Copy link

generein commented Jun 5, 2024

In v0.0.7, the source_cloud_from_shape function has been removed from targets. I can read a mesh in with meshio.read(path_to_stl_file), but there is no stochastic sampling possible from this file. Will this be re-introduced in a future release?

@LyceanEM LyceanEM self-assigned this Jun 6, 2024
@LyceanEM
Copy link
Owner

LyceanEM commented Jun 6, 2024

source_cloud_from_shape was removed from the library as it gives inconsistent results in terms of the geodesic separation of points across a surface. The points it produces using the Poisson sampling algorithm are regularly spaced in world coordinates, but sharp edges are not captured well, often producing points either side but none on the edge itself. The recommended approach is to use pygmsh or gmsh to import CAD files such as .step files, and then generate a mesh file using this approach. The benefit of this method is a greater degree of control over the size of the triangles, and the vertices can then be used as the source, sink, or scattering points.

We do intend to implement an improved stochastic sampling method for arbitrary mesh files, but it may not be soon.

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

No branches or pull requests

2 participants