Skip to Content.
Sympa Menu

cgal-discuss - Re: Re: [cgal-discuss] 3D mesh generation and gcc version/optimisation level

Subject: CGAL users discussion list

List archive

Re: Re: [cgal-discuss] 3D mesh generation and gcc version/optimisation level


Chronological Thread 
  • From: "Garth N. Wells" <>
  • To:
  • Subject: Re: Re: [cgal-discuss] 3D mesh generation and gcc version/optimisation level
  • Date: Mon, 13 Feb 2012 19:12:38 +0000

On 13 February 2012 19:08, Laurent Rineau (GeometryFactory)
<>
wrote:
> Le lundi 13 février 2012 19:03:21 Garth N. Wells a écrit :
>> On 8 February 2012 19:17, Garth N. Wells
>> <>
>> wrote:
>> > On 8 February 2012 10:43, Laurent Rineau (GeometryFactory)
>> >
>> > <>
>> > wrote:
>> >> Le mardi 07 février 2012 12:22:52 Garth Wells a écrit :
>> >>> I've been running into some issues with mesh generation in 3D. I'm
>> >>> creating
>> >>> meshes of rather simple polyhedra (tetrahedra, cubes), but have been
>> >>> finding that the generation randomly fails at times. I'm also seeing a
>> >>> dependency on the gcc version and optimisation level. The code at the
>> >>> end of this message, taken from
>> >>>
>> >>>
>> >>> http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Mesh_3/Chapter_ma
>> >>> in.h tml#Subsection_50.3.5
>> >>>
>> >>> runs without error with g++ 4.6.1, but with g++ 4.4.6 and the -O2 or
>> >>> -O3
>> >>> flag I get the error
>> >>>
>> >>>     terminate called after throwing an instance of
>> >>> 'CGAL::Precondition_exception'
>> >>>       what():  CGAL ERROR: precondition violation!
>> >>>     Expr: index != Subdomain_index()
>> >>>     File:
>> >>> /usr/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h
>> >>>     Line: 160
>> >>>     Aborted
>> >>>
>> >>> I've tested with CGAL 3.8 and 3.9. The code is compiled using
>> >>>
>> >>>     g++ -O2 -frounding-math  test.cpp -lCGAL -lboost_thread -lmpfr
>> >>> -lgmp
>> >>>
>> >>> Any help with this would be greatly appreciated.
>> >>
>> >> Can you please add:
>> >>
>> >> #define CGAL_MESH_3_VERBOSE 1
>> >>
>> >> as the first line of your cpp file, recompile, and give us the output of
>> >> the run, when it fails?
>> >
>> > It get:
>> >
>> > Inserting protection balls...
>> > insert_corners() done. Nb of points in triangulation: 25
>> > insert_balls_on_edges() done. Nb of points in triangulation: 610
>> > refine_balls() done. Nb of points in triangulation: 616
>> >
>> > Start surface scan...end scan. [Bad facets:1202]
>> >
>> > Refining Surface...
>> > Legende of the following line: (#vertices,#steps,#facets to
>> > refine,#tets to refine)
>> > (1741,1124,0,0) (328.6 vertices/s)))
>> > Total refining surface time: 3.42021s
>> >
>> > Start volume scan...end scan. [Bad tets:2643]
>> >
>> > Refining...
>> > Legende of the following line: (#vertices,#steps,#facets to
>> > refine,#tets to refine)
>> > (1742,1,0,2642) (250.0 vertices/s)terminate called after throwing an
>> > instance of 'CGAL::Precondition_exception'
>> >  what():  CGAL ERROR: precondition violation!
>> > Expr: index != Subdomain_index()
>> > File: /usr/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h
>> > Line: 160
>> > Aborted
>>
>> Considering that the failing example code comes from the CGAL
>> examples, I suppose that it should be considered a CGAL bug. Is there
>> a bug tracker where I can report it as a bug?
>
> Sorry, I forgot your mail.
>
> It seems you have modified the example. What off file have you used?
>

The example file has two examples and some ifdefs - my post has just
the simple part.

The off file is the fandisk.off file that is in

CGAL-3.9/examples/Mesh_3/data/fandisk.off

Garth

> --
> Laurent Rineau, PhD
> R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
> Release Manager of the CGAL Project       http://www.cgal.org/
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>



Archive powered by MHonArc 2.6.16.

Top of Page