Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] outer boundary with degenerate polygons

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] outer boundary with degenerate polygons


Chronological Thread 
  • From: Efraim Fogel <>
  • To:
  • Subject: Re: [cgal-discuss] outer boundary with degenerate polygons
  • Date: Mon, 15 Mar 2010 14:54:07 +0200

One thing you can do is insert your objects into an two dimensional
arrangement data-structure and check whether they are not degenerate. If
you do that, you can continue and use the arrangement data-structure to
complete your task.

Obergude wrote:
> Hi guys,
>
> i am really new to CGAL and i have some problems with it. So here it is:
> I am trying to get the maximal outer boundary of a 3d-house-model and using:
>
> vector<Polygon_2> polygonList;
> Polygon_set_2 S;
>
> for(int i = 0; i<polygonCounter; i++){
> S.join (polygonListe[i]);
> }
>
> to generate the outer boundary.
>
> For the outer boundary of the house, i don't need to store the z-coordinate
> of the polygon-vertices - only need to get a 2d-stamp of the house.
> So i just create some "Polygon_2 p (Point_2(x,y))" and store the
> x-y-coordinate. The problem is that i get some degenerated polygons because
> of some vertical polygons in my 3d-model - like the walls of the house. The
> vertices are like: Point_2(0,0), Point_2(1,0), Point_2(1,0), Point_2(0,0).
> The problem is, that i get this error when a start the application:
>
> CGAL error: precondition violation!
> Expression: ! is_degen
> File: \cgal-3.5.1\include\cgal\arr_segment_traits_2.h
> Line: 125
>
> because of the degenerate polygons.
>
> So how can i test, if a polygon is degenerated? Or superiorly - how can i
> get the outer boundary with a degeneratet polygon (like a wall (without
> size) that is not under a roof).
>
> I am really sorry about my bad english and i hope you get what i mean.
> Thank you for help.
>
> Cheers Obergude
>

--
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/




Archive powered by MHonArc 2.6.16.

Top of Page