Skip to Content.
Sympa Menu

cgal-discuss - Re: Re: Re: [cgal-discuss][Polyhedron] Simple program problem

Subject: CGAL users discussion list

List archive

Re: Re: Re: [cgal-discuss][Polyhedron] Simple program problem


Chronological Thread 
  • From: Peter Hachenberger <>
  • To:
  • Subject: Re: Re: Re: [cgal-discuss][Polyhedron] Simple program problem
  • Date: Tue, 08 Jan 2008 13:58:03 +0100

Oh, that was not my brightest idea. Unfortunately, the output function
does not give me the desired information, because it uses the same
problematic call to show the desired information.

I still think that it is not a problem of my code, but of your CGAL
installation, but I don't want you to go fishing for problems with your
installation before I did not have good evidence for this assumption. To
provemy assumption, kick out the new line in polyhedron_to_nef3.h and
replace it with

std::cerr << "test first sedge "
<< SM.shalfedges_begin()->source()->point()
<< std::endl;

typename SNC_structure::Object_list ol;
ol.push_back(SM.shalfedges_begin());
typename SNC_structure::SFace_cycle_iterator sfci(ol.begin());
CGAL_assertion(sfci.is_shalfedge());

That fourth line is the same call that causes the problem. The
is_shalfedge() command calls a dynamic cast that decides whether the
Object_handle sfci points to can be cast to an shalfedge. With the lines
above I put a valid shalfege into sfci. I know that it's valid from the
output generated by the first lines. So, if you know get a correct
output by the first line and then got a fault in the assertion line (not
a thrown assertion, but the same error as before), then I'm right and
there is some problem with the installation.

Peter


On Tue, 2008-01-08 at 09:12 +0800, LoadCom wrote:
> Hello Peter Hachenberger
>
> I've made change as you suggested to polyhedron_3_to_nef_3.h(not
> polyhedron_to_nef_3.h).
>
> The program's output before error occur is as dos.png.
> The context at the stop point is as snapshot.png.
>
> The 2 files are as attached.
> Thanks for your help.
>
> B/Rgds
> Max
>
> ----- Original Message ----
> From: Peter Hachenberger
> To:
>
> Sent: 2008-01-07 20:49:42
> Subject: Re: Re: Re: [cgal-discuss][Polyhedron] Simple program problem
>
> >
> Hi Max,
>
> Looking at the latest debug picture 1.png, we can try the following
> stuff:
>
> The programm stops at an integrity check of the data structure. I want
> to check whether the data structure really lacks integrity or whether
> its something else. Please add the line
>
> CGAL::SM_io_parser<SM_decorator>::dump(SM, std::cerr);
>
> in front of the fifth line from the end in polyhedron_to_nef_3.h, which
> looks as follows:
>
> SM.check_integrity_and_topological_planarity();
>
> So that it looks like
>
> CGAL::SM_io_parser<SM_decorator>::dump(SM, std::cerr);
> SM.check_integrity_and_topological_planarity();
> }
>
> index_adder.resolve_indexes();
> }
>
> at the end of the file. Then compile and execute your program again and
> send me the output, please.
>
> Peter
>
>
> On Fri, 2008-01-04 at 16:25 +0800, LoadCom wrote:
> > Hello Mahmood NT,
> >
> > This time the point the program stoped at is different.
> > The location as well as the call stack is captered as
> > attached.
> >
> > Thanks for your help.
> > Max
> >
> >
> > Re: Re: [cgal-discuss][Polyhedron] Simple program problem
> >
> > >Thank you very much for your reply.
> >
> > >My environment:
> > >CGAL 3.3.1
> > >Windows XP/SP2
> > >VS 2003
> >
> > >The program causes a runtime error, see the attached 1.png. (debug mode)
> >
> > Did you set project properties properly. check your project propeties
> > with a simple example or demo (if you use QT).
> >
> > Also it would be helpful to post the call stack.
> >
> >
> > Mahmood NT
> >
> --
> 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