Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] New to CGAL

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] New to CGAL


Chronological Thread 
  • From: Philipp Moeller <>
  • To:
  • Subject: Re: [cgal-discuss] New to CGAL
  • Date: Mon, 27 Feb 2012 16:19:24 +0100
  • Organization: GeometryFactory

This should get you started to read a PLY file into a Polyhedron using
RPly [1] and CGAL::Incremental_builder_3 [2]

It requires ply files with the following structure:

- a "vertex" element has the properties "x", "y", and "z" specifying its
coordinates
- a "face" element has a property list "index_vertices" specifying the
indices of the face

The program itself reads from a ply file and writes to an off file.

It hasn't been extensively tested and I'm not much of a C programmer. If
it breaks you get to keep both pieces ;)

[1] : http://w3.impa.br/~diego/software/rply/#ply_get_next_element
[2] :
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Polyhedron_ref/Class_Polyhedron_incremental_builder_3.html

Attachment: CGALply.zip
Description: CGALply example with incremental builder


HTH,
Philipp

Sweety Pie
<>
writes:

> Thank you very much fr the reply. If you don't have something that reads
> .ply files then what file format does CGAL read in terms of point cloud
> files??
> Thank again and waiting for your reply
>
> On 27 February 2012 09:47, Sebastien Loriot (GeometryFactory) <
> >
> wrote:
>
>> On 02/25/2012 08:49 PM, Sweety Pie wrote:
>>
>>> Hi,
>>> Am new to CGAL Library and the documentation is very big and difficult
>>> to follow. I wanted to ask if someone can guide me how to read .ply file
>>> since I want to use CGAL to convert point cloud to mesh triangles. Any
>>> help or guide will be appreciated. Am using Microsoft visual studio 2010
>>> with win x64 bit OS.
>>> Thank you
>>> Candy
>>>
>>
>> You might be interested by this package:
>>
>> http://www.cgal.org/Manual/**latest/doc_html/cgal_manual/**
>> Surface_reconstruction_points_**3/Chapter_main.html<http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Surface_reconstruction_points_3/Chapter_main.html>
>>
>> For the ply file format I don't think we have something to read them.
>>
>> Sebastien.
>>
>> --
>> You are currently subscribed to cgal-discuss.
>> To unsubscribe or access the archives, go to
>> https://lists-sop.inria.fr/**wws/info/cgal-discuss<https://lists-sop.inria.fr/wws/info/cgal-discuss>
>>
>>



Archive powered by MHonArc 2.6.16.

Top of Page