Subject: CGAL users discussion list
List archive
- From: Marko Kukovec <>
- To:
- Subject: Re: [cgal-discuss] 2D Regularized Boolean Set-Operations
- Date: Wed, 30 Apr 2008 12:52:52 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=mkgoIMr6wu9hIO/YP+Z/WxIMPGmNUOWkOFdwLMFERSzNBzm+ZNr5a+9NMtNHRLttfnviKqAeDrYhtG6U8k+Ab6nZjZwWoMX1o1rtvyqQiCuBrfxbM6YCWNu+J4gS8Loa7HGnEPhY/ND6cErwh9wOqsUHT41wAs9ZgtZ1UXjJasY=
Your guess was right! I can't belief I didn't see it by myself.
Thank you again!
Marko
-----Original Message-----
From: Ophir Setter <>
Reply-To:
To:
Subject: Re: [cgal-discuss] 2D Regularized Boolean Set-Operations
Date: Wed, 30 Apr 2008 13:43:45 +0300
The constructor of Circle_2 usually gets the squared radius and not the radius itself.
My guess is that this is the problem.
On Wed, Apr 30, 2008 at 12:22 PM, Marko Kukovec <> wrote:
Hello!
I'm new to the usage of the CGAL library. I'm especially interested in
the "2D Regularized Boolean Set-Operations" so I went trough all the
examples in the documentation. I have a question regarding example in
the "14.3.2 Operating on Polygons with Circular Arcs"
http://www.cgal.org/Manual/3.3/examples/Boolean_set_operations_2/circle_segment.cpp
when I execute the example with the values presented I get correct
result:
{ Outer boundary =
[ 8 curves:
start (0, 5) --> end (0, 1)
start (0, 1) --> end (1, 0)
circle center(1, 1), radious(1), orientation(1)
start (1, 0) --> end (5, 0)
start (5, 0) --> end (6, 1)
circle center(5, 1), radious(1), orientation(1)
start (6, 1) --> end (6, 5)
start (6, 5) --> end (5, 6)
circle center(5, 5), radious(1), orientation(1)
start (5, 6) --> end (1, 6)
start (1, 6) --> end (0, 5)
circle center(1, 5), radious(1), orientation(1)
1 holes:
Hole #1 = [ 4 curves:
start (2, 4) --> end (4, 4)
start (4, 4) --> end (4, 2)
start (4, 2) --> end (2, 2)
start (2, 2) --> end (2, 4)
}
Picture:
http://img138.imageshack.us/img138/5940/goodresultsrf7.jpg
but when I multiply input data by 100, result is wrong
circ1 = construct_polygon(Circle_2(Point_2(100, 100), 100));
S.insert(circ1);
circ2 = construct_polygon(Circle_2(Point_2(500, 100), 100));
S.insert(circ2);
circ3 = construct_polygon(Circle_2(Point_2(500, 500), 100));
S.insert(circ3);
circ4 = construct_polygon(Circle_2(Point_2(100, 500), 100));
S.insert(circ4);
// Compute the union with four rectangles incrementally.
Polygon_2 rect1, rect2, rect3, rect4;
rect1 = construct_polygon(Point_2(100, 0), Point_2(500, 0),
Point_2(500, 200), Point_2(100, 200));
S.join (rect1);
rect2 = construct_polygon(Point_2(100, 400), Point_2(500, 400),
Point_2(500, 600), Point_2(100, 600));
S.join (rect2);
rect3 = construct_polygon(Point_2(0, 100), Point_2(200, 100),
Point_2(200, 500), Point_2(0, 500));
S.join (rect3);
rect4 = construct_polygon(Point_2(400, 100), Point_2(600, 100),
Point_2(600, 500), Point_2(400, 500));
Result:
{ Outer boundary =
[ 16 curves:
start (600, 500) --> end (510, 500)
start (510, 500) --> end (500, 510)
circle center(500, 500), radious(10), orientation(1)
start (500, 510) --> end (500, 600)
start (500, 600) --> end (100, 600)
start (100, 600) --> end (100, 510)
start (100, 510) --> end (90, 500)
circle center(100, 500), radious(10), orientation(1)
start (90, 500) --> end (0, 500)
start (0, 500) --> end (0, 100)
start (0, 100) --> end (90, 100)
start (90, 100) --> end (100, 90)
circle center(100, 100), radious(10), orientation(1)
start (100, 90) --> end (100, 0)
start (100, 0) --> end (500, 0)
start (500, 0) --> end (500, 90)
start (500, 90) --> end (510, 100)
circle center(500, 100), radious(10), orientation(1)
start (510, 100) --> end (600, 100)
start (600, 100) --> end (600, 500)
1 holes:
Hole #1 = [ 4 curves:
start (200, 400) --> end (400, 400)
start (400, 400) --> end (400, 200)
start (400, 200) --> end (200, 200)
start (200, 200) --> end (200, 400)
}
Picture:
http://img138.imageshack.us/img138/7459/wrongresultslz1.jpg
I don't understand why? Shouldn't I get the same number of curves in the
result but proportionally bigger?
Thank you for all the help.
Regards,
Marko Kukovec
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- 2D Regularized Boolean Set-Operations, Marko Kukovec, 04/30/2008
- Re: [cgal-discuss] 2D Regularized Boolean Set-Operations, Ophir Setter, 04/30/2008
- Re: [cgal-discuss] 2D Regularized Boolean Set-Operations, Marko Kukovec, 04/30/2008
- Re: [cgal-discuss] 2D Regularized Boolean Set-Operations, Ophir Setter, 04/30/2008
Archive powered by MHonArc 2.6.16.