Skip to Content.
Sympa Menu

cgal-discuss - Problem with push_back on a polyline

Subject: CGAL users discussion list

List archive

Problem with push_back on a polyline


Chronological Thread 
  • From: "Olivier Tournaire" <>
  • To:
  • Subject: Problem with push_back on a polyline
  • Date: Tue, 4 Mar 2008 18:59:51 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=c0gN/PKFPKkzjPrWkhK3sueXACv83dvVU2uRbpS+28Wdkc/B8+rZCNFsE6kxkYgJ2jvB+JKo9BOyoxMXiV41Bi3bBsVLytDqLJulKB+GUIqo0mVhljMCv6xzPpRER3ljoHr02iMTcGd14vAnzM1GmcloUwhJp7m7k1JB6kEV+XA=

Hi all,

I have a problem with a push_back on a polyline. Here are some samples of my code :

typedef CGAL::Arr_polyline_traits_2< CGAL::Arr_segment_traits_2< CGAL::Cartesian<int> > >::Curve_2 polyline_int;

// ...

polyline_int polyline;
chains.push_back( polyline ); // chains is a std::vector< polyline_int >
MakeAChain( *copy , NLD[iNode].position , iDirection , chains[chains.size()-1] , FinalNode , FinalDirection );

// MakeAChain
void MakeAChain( itk::Image<unsigned char,2> &image , CGAL_Point2i BeginPoint , unsigned char BeginDirection , polyline_int &CurrentPolyline , CGAL_Point2i EndPoint , unsigned char EndDirection )
{
    // ...
    CurrentPolyline.push_back( BeginPoint ); // crashes because CurrentPolyline.segments is NULL (from the debugger)
    // ...
}

I do not understand why CurrentPolyline.segments is NULL. Could you please help ?

Regards.

Olivier



Archive powered by MHonArc 2.6.16.

Top of Page