Hi everyone,
I was wondering whether anyone uses the "o2" option. This adds mid-faces nodes (o2 nodes) to the list of points.
I have tried this option with Triangulate.jl and it seems that using the "o2" option messes up the triangle to node numbering.
The usual behaviour of Triangle is that when o2 is not parsed in, the triangle list has a size of 3n_triangles (n_triangles being the number of triangles in the mesh). If o2 is parse in then the size of the triangle list 6n_triangles as it also includes the o2 nodes. From what I see, using the o2 option with Triangulate.jl does result in having o2 nodes in the point list but the triangle list remains of size 3*n_triangles and mixes indices of vertex nodes with those of mid-face nodes.
Can you please let me know if I'm doing anything wrong there?
Below is a minimum example:
Cheers
using Triangulate
# Without second order triangles
triin=Triangulate.TriangulateIO()
triin.pointlist=Matrix{Cdouble}([0.0 0.0 ; 1.0 0.0 ; 1.0 1.0; 0.0 1.0]')
triin.segmentlist=Matrix{Cint}([1 2 ; 2 3 ; 3 4 ; 4 1 ]')
triin.segmentmarkerlist=Vector{Int32}([1, 2, 3, 4])
(triout, vorout)=triangulate("pq", triin)
x = triout.pointlist[1,:]
y = triout.pointlist[2,:]
display(x)
display(y)
display(triout.trianglelist)
# With second order triangles
triin=Triangulate.TriangulateIO()
triin.pointlist=Matrix{Cdouble}([0.0 0.0 ; 1.0 0.0 ; 1.0 1.0; 0.0 1.0]')
triin.segmentlist=Matrix{Cint}([1 2 ; 2 3 ; 3 4 ; 4 1 ]')
triin.segmentmarkerlist=Vector{Int32}([1, 2, 3, 4])
(triout, vorout)=triangulate("pqo2", triin) # <------- here o2 is parsed in as input argument
x = triout.pointlist[1,:]
y = triout.pointlist[2,:]
display(x') # <------- correct size and point positions
display(y') # <------- correct size and point positions
display(triout.trianglelist) # <------- wrong size and mixed up numbering
Hi everyone, I was wondering whether anyone uses the "o2" option. This adds mid-faces nodes (o2 nodes) to the list of points. I have tried this option with Triangulate.jl and it seems that using the "o2" option messes up the triangle to node numbering. The usual behaviour of Triangle is that when o2 is not parsed in, the triangle list has a size of 3n_triangles (n_triangles being the number of triangles in the mesh). If o2 is parse in then the size of the triangle list 6n_triangles as it also includes the o2 nodes. From what I see, using the o2 option with Triangulate.jl does result in having o2 nodes in the point list but the triangle list remains of size 3*n_triangles and mixes indices of vertex nodes with those of mid-face nodes. Can you please let me know if I'm doing anything wrong there? Below is a minimum example: Cheers