Open himcraft opened 2 years ago
Seen this, will try to find some time next week to address this. Meanwhile could you please prepare code for an MWE?
Thanks for your reply. Looking forward to seeing the issue gets solved.
The MWE is the following, I omitted the REPL prompts.
# Using the function TetGen.voronoi() provided in the doc.
# The points are the vertices of a cube and randomly distribute a few points within the cube.
# However the function returns some triangles represented by those known input points, which are more like Delaunay tetrahedralizations rather than Voronoi diagrams.
using TetGen,GeometryBasics
points=Point.(vcat(rand(10),0,0,0,0,1,1,1,1),vcat(rand(10),0,0,1,1,0,0,1,1),vcat(rand(10),0,1,0,1,0,1,0,1))
@show TetGen.voronoi(points);
# ---------------
# The following codes mimic the behavior of the function TetGen.voronoi()
# It says "writing Voronoi vertices/edges/faces/cells. But I cannot see them represented in the result, in this case, vo.
using TetGen:JLTetGenIO
vo=tetrahedralize(JLTetGenIO(points),"v")
@show fieldnames(typeof(vo));
I do not know if it helps, If you need more information, I am willing to provide it.
Hi, thanks - I checked the issue.
Currently, we don't pass the Voronoi cell information to the C wrapper called by Julia. So there currently is no way to access this information from Julia.
This needs an update for TetGen_jll.jll which will have to wait a bit as I am quite busy at work for the next 2 weeks. Once this is done, may be @SimonDanisch can help with updating the JLTetGenIO struct.
Thanks for the update! I managed to use the original C++ TetGen and pass data through files to other Julia scripts for an urgent need. My problem is solved.
The function
TetGen.voronoi()
seems giving wrong results. I think Voronoi diagram should contain no nodes from the input by definition.I want to generate a Voronoi diagram of points distributed in a cube, but the function gives this result:
It is clearly not a correct Voronoi diagram. I tried
vo=tetrahedralize(JLTetGenIO(points),"v")
, it promptsWriting Voronoi edges.
But I cannot see any Voronoi-related data in the struct ofvo
.So could you please help me with how I can find the correct Voronoi edges information?