TriangleMesh.jl
TriangleMesh.jl copied to clipboard
`refine_rg` introduces boundary points into the interior
Love the package and am using it for a class, but I observed something odd aboutrefine_rg
. I can usually extract boundary points using mesh.point_marker
using Plots
mesh = create_mesh(polygon_unitSquare(), quality_meshing=true, add_switches="penva0.05q") # switches
x,y = mesh.point[1,:],mesh.point[2,:]
scatter(x,y)
scatter!(x[mesh.point_marker .== 1],y[mesh.point_marker .== 1],leg=false,mark=:square,ms=3)
which gives the following
If I refine the mesh once using refine_rg
mesh = refine_rg(mesh)
x,y = mesh.point[1,:],mesh.point[2,:]
scatter(x,y)
scatter!(x[mesh.point_marker .== 1],y[mesh.point_marker .== 1],leg=false,mark=:square,ms=3)
mesh.point_marker
seems to introduce extra interior boundary points.
I noticed that refine_rg
does most of the setup in Julia - is it known why mesh.point_marker
includes interior points in addition to boundary points?
Dear @jlchan, I honestly don't remember since it is some time ago that I did some work on this mesh generator. You could have a look at what happens here.
Could of course be that there is a little bug. Please note that this is just an interface to a C-library and it is not very clean. If you could come up with a fix that would be great. I, unfortunately, will not have time to go into that.
Best, Konrad
Sure, I'll take a look. Thanks for the heads up!
Sorry @jlchan for being not more helpful with that. I am recently more focused on other languages and I have moved away from triangular meshes
No problem, I understand that situation well! I've got some workarounds for it, so it's not pressing.