Hello,
Here is a a sample of some saved Delaunay Triangulaiton data using the "write_to_file" function:
4366 8728 2
-932.286 -456.86
-949.082 -399.486
-951.241 -190.631
...
...
-841.686 -490.896
-841.689 -520.968
-841.689 -522.191
793 794 3
2 804 805
783 784 20
...
...
8484 8487 8724
8727 8682 8519
8 8686 8726
...
For a particular application, however, I needed more precision.
I tried modifying line 181 in SWIG_CGAL/Triangulations_2/Triangulation_2.h from:
else out << get_data();
to,
else out << std::fixed << std::setprecision(15) << get_data();
and the result looks promising:
4366 8728 2
-932.286071777343750 -456.860137939453125
-949.081542968750000 -399.486114501953125
-951.240783691406250 -190.631210327148438
...
...
-841.686491834052504 -490.895905242047320
-841.689236670315040 -520.967833910861259
-841.689348307647606 -522.190912295210637
793 794 3
2 804 805
783 784 20
...
...
8484 8487 8724
8727 8682 8519
8 8686 8726
...
Is there a way to make this a keyword option of "write_to_file" rather than a 'hard coded' mod?
Maybe something with the flavor,
dt.write_to_file(filename, prec=15)
or
dt.write_to_file(filename, prec=1e-15)
or
dt.write_to_file(filename, prec=machine_precision)
Thoughts?
-Will Maddox