Subject: CGAL users discussion list
List archive
RE: [cgal-discuss] Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFF input.
Chronological Thread
- From: Stephen Wong <>
- To: "" <>
- Subject: RE: [cgal-discuss] Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFF input.
- Date: Sun, 13 Jan 2008 14:15:37 -0800
- Accept-language: en-US, en-CA
- Acceptlanguage: en-US, en-CA
Hi Gilbert,
I don't believe that my input file is non-manifold. The facets that you were
describing as "shared facets" between the inner and outer triangular prism -
those facets are non-convex and have the inner prism removed (you can see
that in the attached OFF file, which I describe later in this post). There
are two facets in the input file which are not convex.
I have tried converting the OFF file into a Nef_polyhedron using the function
OFF_to_nef_3() as you have described. When executing the
complex_construction.cpp with that file, I get the following output:
Nef vertices: 12
Nef edges: 21
Nef facets: 11
Nef volumes: 2
number of discarded facets: 0
That seems to indicate that the input file is not degenerate.
I converted the resultant Nef_polyhedron_3 that is generated to a
polyhedron_3 using convert_to_Polyhedron_3(), and then wrote the polyhedron
to OFF. I have attached this file here - you can see that the solid is
identical to the input, except with the facets triangulated.
So, I still believe that there is something awry during the conversion
between Polyhedron_3 and Nef_polyhedron_3 for this input OFF file.
Stephen
-----Original Message-----
From: Gilbert Bernstein
[mailto:]
Sent: January-12-08 6:47 PM
To:
Subject: Re: [cgal-discuss] Crash on converting Polyhedron_3 to
Nef_polyhedron_3 on an OFF input.
Stephen,
The mesh you're trying to read in is non-manifold. This is probably
why it is not working. Inside of the triangular prism is a second
triangular prism sharing part of a face. The surface represented
itself is non-manifold, and your data file contains T-Junctions, so
the connectivity of the mesh isn't made explicit. One or both of
these problems might be the cause of a bad conversion.
If you check the examples folder, there is a program called
"complex_construction.cpp" It demonstrates the use of the following
function:
#include<CGAL/OFF_to_nef_3.h>
Nef_3 N;
std::size_t discarded = CGAL::OFF_to_nef_3 (std::cin, N, true);
discarded contains the number of facets of the model which were
discarded by the conversion process. You might want to try running
the model through complex_construction and see what happens.
-- Gilbert
On Jan 12, 2008, at 7:47 PM, Stephen Wong wrote:
Hi there,
On this seemingly innocent input solid in the form of a OFF file,
CGAL's Nef_polyhedron_3 constructor using Polyhedron_3 crashes. I
believe that the solid represented by the OFF file is valid based on
the specification (you can see the model in geomview or any other OFF
viewer). I caused this crash by modifying the Nef_3.sln's
interface_polyhedron:
Polyhedron P ;
std::ifstream fin( "Triangle - Copy.off" ) ;
fin >> P ;
if ( P.is_closed() && P.is_valid() )
{
Nef_polyhedron_3 N1( poly ) ;
}
Thanks,
Stephen
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
<Triangle - Copy.off>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
Attachment:
Triangle - copyOut.off
Description: Triangle - copyOut.off
- Re: [cgal-discuss][Nef_polyhedron] How to convert a Nef_polyhedron_3 into a Nef_polyhedron_2 if meaningful, (continued)
- Re: [cgal-discuss][Nef_polyhedron] How to convert a Nef_polyhedron_3 into a Nef_polyhedron_2 if meaningful, Peter Hachenberger, 01/08/2008
- Re: Re: [cgal-discuss][Nef_polyhedron] How to convert aNef_polyhedron_3 into a Nef_polyhedron_2 if meaningful, LoadCom, 01/09/2008
- Re: Re: [cgal-discuss][Nef_polyhedron] How to convert aNef_polyhedron_3 into a Nef_polyhedron_2 if meaningful, Peter Hachenberger, 01/10/2008
- Re: [cgal-discuss][Nef_polyhedron] How to convertaNef_polyhedron_3 into a Nef_polyhedron_2 if meaningful, Max, 01/11/2008
- [cgal-discuss]Aff_transformation_3 Plane_3::transform_to_2d() const;, Max, 01/12/2008
- Re: [cgal-discuss]Aff_transformation_3 Plane_3::transform_to_2d() const;, Ashwin Nanjappa, 01/16/2008
- Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFF input., Stephen Wong, 01/13/2008
- Re: [cgal-discuss] Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFFinput., Max, 01/13/2008
- Re: [cgal-discuss] Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFF input., Gilbert Bernstein, 01/13/2008
- RE: [cgal-discuss] Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFF input., Stephen Wong, 01/13/2008
- Re: [cgal-discuss] Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFF input., Gilbert Bernstein, 01/14/2008
- RE: [cgal-discuss] Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFF input., Stephen Wong, 01/14/2008
- RE: [cgal-discuss] Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFF input., Stephen Wong, 01/13/2008
- Re: [cgal-discuss] Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFF input., Peter Hachenberger, 01/14/2008
- Re: [cgal-discuss] Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFF input., Gilbert Bernstein, 01/14/2008
- Re: Re: [cgal-discuss][Nef_polyhedron] How to convert aNef_polyhedron_3 into a Nef_polyhedron_2 if meaningful, Peter Hachenberger, 01/10/2008
- Re: Re: [cgal-discuss][Nef_polyhedron] How to convert aNef_polyhedron_3 into a Nef_polyhedron_2 if meaningful, LoadCom, 01/09/2008
- Re: [cgal-discuss][Nef_polyhedron] How to convert a Nef_polyhedron_3 into a Nef_polyhedron_2 if meaningful, Peter Hachenberger, 01/08/2008
Archive powered by MHonArc 2.6.16.