fail to initialize a Polyhedron_3 using a stream and the ">>"operator

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

fail to initialize a Polyhedron_3 using a stream and the ">>"operator

BRYang
Dear CGAL users,
I would like to initialize a Polyhedron_3 object p using a file stream, but it fails. The data I used  is:

OFF
5 8 0
1.37028 1.67692 -3.33782
-3.74183 1.67692 -1.63378
-0.333759 1.67692 1.77429
-0.333759 5.05788 -1.63378
-0.333759 -1.70404 -1.63378
3 0 2 1
3 0 1 3
3 1 2 3
3 2 0 3
3 0 1 2
3 0 4 1
3 1 4 2
3 2 4 0

and I saved the data in a file with ".off" extension.

The other thing is that the code works for other polyhedral objects.

Would you mind helping to have a check? Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: fail to initialize a Polyhedron_3 using a stream and the ">>"operator

andreas.fabri
Hello,

Have a look at the edge between vertices 0 and 1
It has 3 adjacent triangles, that is it is a non-manifold
surface and not representable with a Polyhedron.

andreas

On 12/03/2016 19:26, BRYang wrote:

> Dear CGAL users,
> I would like to initialize a Polyhedron_3 object p using a file stream, but
> it fails. The data I used  is:
>
> OFF
> 5 8 0
> 1.37028 1.67692 -3.33782
> -3.74183 1.67692 -1.63378
> -0.333759 1.67692 1.77429
> -0.333759 5.05788 -1.63378
> -0.333759 -1.70404 -1.63378
> 3 0 2 1
> 3 0 1 3
> 3 1 2 3
> 3 2 0 3
> 3 0 1 2
> 3 0 4 1
> 3 1 4 2
> 3 2 4 0
>
> and I saved the data in a file with ".off" extension.
>
> The other thing is that the code works for other polyhedral objects.
>
> Would you mind helping to have a check? Thank you.
>
>
>
>
> --
> View this message in context: http://cgal-discuss.949826.n4.nabble.com/fail-to-initialize-a-Polyhedron-3-using-a-stream-and-the-operator-tp4661688.html
> Sent from the cgal-discuss mailing list archive at Nabble.com.
>

--
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912    skype: andreas.fabri

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss