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

How to mesh domain with surface inside in python? #273

Open
ebird7 opened this issue Jul 18, 2024 · 0 comments
Open

How to mesh domain with surface inside in python? #273

ebird7 opened this issue Jul 18, 2024 · 0 comments

Comments

@ebird7
Copy link

ebird7 commented Jul 18, 2024

Hello, I am wondering how to replicate this example in python swig bindings of CGAL:

https://doc.cgal.org/latest/Mesh_3/Mesh_3_2mesh_polyhedral_domain_with_surface_inside_8cpp-example.html

In it, they use Polyhedral_mesh_domain_with_features_3 to specify the inside polyhedral and the bounding polyhedral. However when I try to execute this in python swig bindings, I try something like:

domain = Polyhedral_mesh_domain_3(P,Pbounding)

but this fails because one input was expected. I am using Polyhedral_mesh_domain_3 instead of "with_features", but the documentation appears to allow the bounding_domain for Polyhedral_mesh_domain_3:

""From Documentation:
https://doc.cgal.org/latest/Mesh_3/classCGAL_1_1Polyhedral__mesh__domain__3.html
CGAL::Polyhedral_mesh_domain_3< Polyhedron, IGT, TriangleAccessor >::Polyhedral_mesh_domain_3 | ( | const Polyhedron & | polyhedron,|   | const Polyhedron & | bounding_polyhedron  | )

Construction from a polyhedral surface, and a bounding polyhedral surface,.

The first polyhedron must be entirely included inside bounding_polyhedron, which must be closed and free of intersections. Using this constructor allows to mesh a polyhedral surface which is not closed, or has holes. The inside of bounding_polyhedron will be meshed.
""

I was wondering if subdomain_index has anything to do with this, like if i can specify a mesh "cell" in polyhedron as the bounding box? But I don't really understand this. Something like:

domain = Polyhedral_mesh_domain_3(P)
domain.subdomain_index(domain.index_from_subdomain_index(1))

This doesn't appear to do anything probably because the subdomain index was not set. I don't really know what this is anyways.

Is it possible to specify the polyhedron and the bounding_polyhedron in python swig bindings? Thanks for your help.

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

1 participant