JuliaGeometry / DelaunayTriangulation.jl

Delaunay triangulations and Voronoi tessellations in two dimensions.
https://juliageometry.github.io/DelaunayTriangulation.jl/
MIT License
62 stars 5 forks source link

Re-enable `deepcopy` on `PolygonTree`s #129

Open DanielVandH opened 2 months ago

DanielVandH commented 2 months ago

Haven't been able to get a proper MWE yet. Running the polygon_hierarchy test file just sometimes segfaults in the first code block. Going to disable deepcopy temporarily, but a better fix is needed. (deepcopy isn't really the best thing to do on triangulations anyway [and probably is broken somewhere anyway due to some aliasing between fields], so I don't even hate the idea of throwing if someone tries to deepcopy a Triangulation but too late.)

DanielVandH commented 1 month ago

I think a solution to this is to just make deepcopy rebuild the PolygonTree directly? No need for recursive deepcopying. I think.