Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Export 3d delaunay triangulation

Subject: CGAL users discussion list

List archive

[cgal-discuss] Export 3d delaunay triangulation


Chronological Thread 
  • From: mozendi <>
  • To:
  • Subject: [cgal-discuss] Export 3d delaunay triangulation
  • Date: Fri, 12 May 2017 15:25:37 -0700 (PDT)
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=SoftFail ; spf=None
  • Ironport-phdr: 9a23:+IniaBTxnkus9kpv4NIpN80oIdpsv+yvbD5Q0YIujvd0So/mwa69YhWN2/xhgRfzUJnB7Loc0qyN4vymATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSijewZbx/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4KB3RRLmiSoKMyc1/HzLhsdtiK5Wrg6tqwB6z4PSfYqbNudxfrnFcN0URWRPQMVfWTFODYygYIUCFPYBMORCooXhu1cCsQWyCA+xD+3v0D9IgXr20LU/0+QmEADJwgogEM8PsH/Jq9j1MaASUOGrw6nO0DrDbuhb2Tj46IfScxAhpeuAUq53ccrU0EQiER7OgFuXqYzgJTyV1+INvnCd7+V6Tu2gkGonpB9rrjezwccsj4/EjZ8WxFDc7Sh13Yc4KcOiREJlYdOpHoFcuzyUOoZ4WM8vTG9ltD4nxrAHp5K3ZjYGxZQpyhLFdvCKfYaF7gjjWeuTJzpzmWhrd6ilhxmo9Eit0u38Wdew0FZNtidFl9fNtncX1xzQ8MSHTOFy8Vy61jaLyQ/f8P1LIUcxlabDKp4hxKA/loYLvEjeHyL6hl/6gLGWe0gq4OSk9urqb7v8qpKTOYJ4kgT+Pb4vmsy7D+Q4KA8OX22D9OS5073i/FP2QLNXgf03iaTZv5XaKt4apq69GQNazoEj6xOnAze8zNsYhWUHLE5CeB+fk4fpNEvBIPThAfiiglSsiytkx+3dPr36GZjNNXjCkLL5fbln8UJcyQwzzcpe551OEL0BLujzCQfNs4nTARY9dgC12O36E85V14UEWGvJDLXKHrnVtAqN4fAiJeWNLNsQvyTwLfQkz/HrhH4931QaeP/6jtMsdHmkE6E/cA2ian32j4JaST8H

Dear CGAL users,
I am a new CGAL user. My objective is to create 3d delaunay triangulation
from terrestrial LIDAR points clouds. So that, each point of the cloud will
be set as a vertex.
After some efforts on CGAL I came up with the code below:

// types
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point;
typedef Kernel::Vector_3 Vector;
typedef CGAL::Triangulation_vertex_base_with_info_3<unsigned, Kernel> Vb;
typedef CGAL::Triangulation_data_structure_3<Vb> Tds;
typedef CGAL::Delaunay_triangulation_3<Kernel, Tds, CGAL::Fast_location>
Delaunay;
typedef Delaunay::Point Point;


int main(int argc, char*argv[])
{
// Reads a .xyz point set file in points[].
std::vector<Point> points;
std::vector<Vector> normals;
const char* fname = (argc>1) ? argv[1] :
"data/SIL_ARKA_1cm_POINTS_NORMALS.xyz";
std::ifstream stream(fname);
Point p;
Vector v;
while (stream >> p >> v) {
points.push_back(p);
normals.push_back(v);
}

std::vector<std::size_t> indices(points.size());
for (std::size_t i = 0; i < points.size(); ++i) {
indices[i] = i;
}
std::cout << "Point Cloud is Loaded" << std::endl;
std::cout << points.size() << " input points" << std::endl;
std::cout << " -------------------------------" << std::endl;
std::cout << " START BUILDING THE TRIANGULATION" << std::endl;
Delaunay T(points.begin(), points.end());
std::cout << " TRIANGULTION COMPLETED" << std::endl;
std::cout << " -------------------------------" << std::endl;
std::ofstream oFileT("testFile1", std::ios::out);
oFileT << T;

return EXIT_SUCCESS;
}

As a result of this program I get the txt file "testFile1". However, I could
not find any description for this file. Is it possible to convert this file
to well known file formats such as .ply, .stl or .obj. Moreover, do you
think is it the correct way of creating 3D delaunay triangulation from point
clouds that are stored in .xyz file?
I am looking forward to hearing from you
Regards






--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Export-3d-delaunay-triangulation-tp4662725.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page