Skip to Content.
Sympa Menu

cgal-discuss - Straight_Skeleton_2 Null pointer

Subject: CGAL users discussion list

List archive

Straight_Skeleton_2 Null pointer


Chronological Thread 
  • From: "sinan mutlu" <>
  • To:
  • Subject: Straight_Skeleton_2 Null pointer
  • Date: Mon, 10 Dec 2007 14:51:17 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=gstDIO2zyzGEjwcF/+ofdNHc+js7RBUcO79GIDviuaS9V19KVQMy6wIDMgov/Mo4BNnxri2rIoVgB4tcXF6MM5v2NKtYXTfNSXt79G6IQ239Z15VmqmPclcY3Dedrxda5eS7d+HqfU/2N8O4nmWlUM5/9EkSZ438yplqi/LD9Ac=

Hi,

I am reading vertices from a file and then I try to construct a straight Skeleton using the polygon
which is constructed by vertices I read from the file. But in the line "ss = ssb.construct_skeleton();" ss becomes "NULL".
I have not understood what is my mistake.

Can anyone help me for the code below. Why it returns NULL pointer.
I have attached the example.poly file.

Best Regards,

Sinan Mutlu.


    ifstream readData;
    readData.open("data/example.poly", ios::in);
    readData>>number_of_Poly;
    readData>>vertexCount;
    float x, y;
    for(int i= 0; i<vertexCount;i++)
    {
        readData>>x;
        readData>>y;
        all_pts[i] = Point_2(x,y);
    }
    std::vector<Point_2> star(all_pts,all_pts+(int)vertexCount);
    SsBuilder ssb ;
    // Enter the frame
    ssb.enter_contour (all_pts,all_pts+(int)vertexCount);
    // Construct the skeleton
    ss = ssb.construct_skeleton();
    if(ss==NULL)
        MessageBox(0, "NULL!!!!", "", 0);

Attachment: example.poly
Description: Binary data




Archive powered by MHonArc 2.6.16.

Top of Page