Assertion failures in constrained Delaunay triangulation with GTS
By : bigboss3110
Date : March 29 2020, 07:55 AM
seems to work fine The code that's using GTS needs to not crash even for bad input, so it would be nice to prevent these assertion failures, otherwise I'll have to disable the assertions.

Is it possible to enforce edges (constrained delaunay triangulation) in scipy.spatial's Delaunay?
By : user3679786
Date : March 29 2020, 07:55 AM
Does that help What you are looking for is called constrained Delaunay triangulation, and unfortunately the scipy.spatial implementation does not support it. As you pointed out, triangle does have that feature  why not use it instead?

Get a mesh_3 'off' from Projection_traits_xy_3 constrained delaunay
By : 梁冰冰
Date : March 29 2020, 07:55 AM
like below fixes the issue From @Andreas suggestion: Here comes the code for writing it into an off file code :
std::ofstream outstream("output.off");
outstream << "OFF\n" << cdt.number_of_vertices()
<< " " << cdt.number_of_faces() << " 0" << std::endl;
std::map<CDT::Vertex_handle,int> indices;
int counter = 0;
for(CDT::Finite_vertices_iterator it = cdt.finite_vertices_begin(); it != cdt.finite_vertices_end(); ++it)
{
outstream << it>point() << std::endl;
indices.insert(std::pair<CDT::Vertex_handle,int>(it, counter++));
}
for(CDT::Finite_faces_iterator it = cdt.finite_faces_begin(); it != cdt.finite_faces_end(); ++it)
{
outstream << "3 " << indices[it>vertex(0)]
<< " " << indices[it>vertex(1)]
<< " " << indices[it>vertex(2)] << std::endl;
}

Retrieve z from a constrained delaunay triangulation of Projection_traits_xy_3
By : Ken Mix
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , As @Andreas pointed out, the triangulation stores 3d points even if it uses its 2d projection. Therefore, we can retrieve the Point_3. Given the query point (x,y) = (100,100): code :
//z unknown
Point query1(100, 100, 0);
CDT::Face_handle face_handle = cdt.locate(query1);
K::Point_3 p = face_handle>vertex(0)>point();
K::Point_3 q = face_handle>vertex(1)>point();
K::Point_3 r = face_handle>vertex(2)>point();

A BruteForce Constrained Delaunay Triangulation?
By : pankaj kumar
Date : March 29 2020, 07:55 AM
Hope this helps for all the answers. I went through the process of developing a solution to this problem so thought I would share my own experience, hoping people facing the problem will find the insight useful. code :
26.9375 10.6875
32.75 9.96875
31.375 4.875
27.6562 2.0625
23.9375 0.75
18.1562 0.75
10.875 0.75
6.60938 3.73438
2.34375 8.21875
2.34375 16.3125
2.34375 24.6875
6.65627 29.3125
10.9688 33.9375
17.8438 33.9375
24.5 33.9375
28.7188 29.4062
32.9375 24.875
32.9375 16.6562
32.9375 16.1562
32.9062 15.1562
8.15625 15.1562
8.46875 9.6875
11.25 6.78125
14.0312 3.875
18.1875 3.875
21.2812 3.875
23.4687 5.5
25.6562 7.125
8.46875 19.7812
27 19.7812
26.625 23.9688
24.875 26.0625
22.1875 29.3125
17.9062 29.3125
14.0312 29.3125
11.3906 26.7188
8.75 24.125
0 1
1 3
3 5
5 7
7 9
9 11
11 13
13 15
15 17
17 19
19 20
20 22
22 24
24 26
26 0
28 29
29 31
31 33
33 35
35 28

