artem-ogre / CDT

Constrained Delaunay Triangulation (C++)
https://artem-ogre.github.io/CDT/
Mozilla Public License 2.0
1.08k stars 136 forks source link

Get boundary edges #76

Closed stla closed 2 years ago

stla commented 2 years ago

Hello,

Is there a built-in way to get the boundary edges? Otherwise I can do it myself, by taking the edges of all the triangles and then the boundary edges are those which are unique. Maybe there's a better way?

mdsumner commented 2 years ago

there is rgl::boundary3d fwiw

stla commented 2 years ago

@mdsumner Thanks. I found getBoundary3d in rgl. Once you have a R mesh3d, there's also Rvcg::vcgGetEdge. It returns all the edges with an indicator of whether the edge is boundary.

artem-ogre commented 2 years ago

@stla What do you need the boundary edges for?

stla commented 2 years ago

@artem-ogre For plotting, I want to have the possibility to choose the color and the width of the boundary edges.

face

mdsumner commented 2 years ago

oh and sorry, I thought this was the @stla repo when I replied (not relevant here what R has )

artem-ogre commented 2 years ago

I see. There is no ready-to-use method for getting the boundary edges. So you will have to do it yourself.

If you would like to do it in the most efficient way here are some ideas:

stla commented 2 years ago

Thanks. I finally use R to get them, with the Rvcg package, which has a function for doing that. This package is based on the C++ library VCGLIB and it is very fast.