-
Notifications
You must be signed in to change notification settings - Fork 57
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
surface remesh does not work properly #167
Comments
An MWE is always useful. SIGSEGVs are suspicious though, pointing towards something in CGAL itself. |
I am sorry, So you can pass all the tests by default??(by just clone repo, cd dir, run pytest |
Yeah, tests run on my system and on github-actions. CGAL behaves slightly differently from machine to machine, so perhaps you'd just have to adapt the tolerances slightly. |
big thanks for your quick response, totally agree with you, It might be some problems that happened to CGAL, cause the first two tests passed which are only call meshio APIs(if I understand the code right), while the following tests call CGAL APIs.I'll check CGAL first. thank you again for your kind advice (really useful library) |
Closing since this is probably not a CGAL bug, but feel free to continue posting here. |
Hi, Nico Schlömer, Firstly, I just figure out the problem I faced several days ago because you upload two test mesh cases as large files using git-lfs (which is not necessary right now I think, cause they are small files, probably you can fix this or point out in doc that the repo using git-lfs maintaining mesh data) Secondly, here is an MWE that crashed with SIGSEGV import meshio
import pygalmesh
import numpy as np
def init_mesh():
points = np.array(
[
[0.0, 0.0, 1.0],
[0.0, 1.0, 0.0],
[-1.0, 0.0, 0.0],
[1.0, 0.0, 0.0],
[0.0, -1.0, 0.0],
],
dtype=float,
)
triangles = np.array(
[[0, 1, 2], [0, 1, 3], [4, 0, 2], [4, 0, 3], [4, 1, 3], [4, 1, 2]], dtype=int
)
cells = [("triangle", triangles)]
return meshio.Mesh(points, cells)
if __name__ == "__main__":
temp_mesh_name = "temp_file_mesh_name"
suffix = ".obj"
temp_mesh_file = temp_mesh_name + suffix
mesh = init_mesh()
mesh.write(temp_mesh_file)
remesh = pygalmesh.remesh_surface(
temp_mesh_file,
max_edge_size_at_feature_edges=0.025,
min_facet_angle=25,
max_radius_surface_delaunay_ball=0.1,
max_facet_distance=0.001,
verbose=True,
) And a screenshot Is this an issue about parameters setting? (I am not familiar with this remeshing method, any suggestion from you would be helpful, thanks |
Alright, I also see the segfault on my machine. The full error:
That smells like a CGAL bug, perhaps @lrineau has an idea here? |
How about subdividing triangles to ensure having enough triangles, then using optimesh to upgrade the whole quality? (as another way to do remeshing)Does this idea make sense? (seems optimesh just care about the angles but the max_allowed_edge_length :)) I am afraid this procedure may break original sharp edges, am I right? |
Your initial mesh is so rough that it will be hard for any algorithm to achieve something meaningful. |
Hi, Nico Schlömer,
Am I doing something wrong? I just clone the latest pygalmesh, but I do not pass all the unit tests, here is a screenshot of the output
I just clone the repo, check into the main directory then run "pytest". Could you please help me to figure out what's wrong with the surface_remesh API? (I just got a SIGSEGV here, if necessary, I can show you an MWE, but you can just check if all the tests work properly or not
any kind of suggestion would be helpful :)
The text was updated successfully, but these errors were encountered: