Subject: CGAL users discussion list
List archive
- From: Everton Constantino <>
- To:
- Subject: Re: [cgal-discuss] Intersecting Arrangement_2's edges
- Date: Tue, 17 May 2016 11:59:42 -0300
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:CPb2XBc2oSCWOK4gt898kDmdlGMj4u6mDksu8pMizoh2WeGdxc+8YB7h7PlgxGXEQZ/co6odzbGG4ua6CSdQud6oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLDjvceDKFUQzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRuJN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IAu3Heb8lR+lYECg+KDJyo9b6sAHKCwqJ/HoVFGsM1QFZBhDMqxD8UJC2uSTzsq9x2TKRINbtHo0yQimouqd3VAfz2mBALC886GiRi8pqjasdrgjmvA1624eTYYebM711carZON8bXmFcRd0CaysUCYy1a84DDvEKIP1Dh4j7vVoH6xWkVie2A+a65yFFnGPx2+UR1OI6DQjAwA0mGJpavWrZtsnyMuEZVuau0KDO0TTFaNtTyDT67IHCNBsmpKffDvpLbcPNxBx3REv+hVKKpNm9Mg==
Oh ok, here is the part where I do the intersection:
Arrangement_2 res;
vector<Kernel::Segment_2> bounding_roads;
for( Edge_const_iterator eit = output_arr.edges_begin(); eit !=
output_arr.edges_end(); ++eit){
bool found = false;
for( Edge_const_iterator envit = env.edges_begin(); envit !=
env.edges_end() && !found; ++envit ){
if( envit->source()->point().x() == eit->source()->point().x() &&
envit->source()->point().y() == eit->source()->point().y() &&
envit->target()->point().x() == eit->target()->point().x() &&
envit->target()->point().y() == eit->target()->point().y() ){
found = true;
}else if(envit->source()->point().x() == eit->target()->point().x() &&
envit->source()->point().y() == eit->target()->point().y() &&
envit->target()->point().x() == eit->source()->point().x() &&
envit->target()->point().y() == eit->source()->point().y() ){
found = true;
}
}
if( found ) {
Kernel::Segment_2 seg( eit->source()->point(), eit->target()->point()
);
bounding_roads.push_back(seg);
}
}
CGAL::insert(res, bounding_roads.begin(), bounding_roads.end());
On 16:26, Sebastien Loriot (GeometryFactory) wrote:
> Sorry I meant a minimal code example to see where the pb could be.
> The problem was clear.
>
> Sebastien.
>
> On 05/17/2016 04:22 PM, Everton Constantino wrote:
> > Hi Sebastien,
> > you can find a file at http://braindump.com.br/arr.pdf with sets of 3
> > images, one is a map of roads, the 'raw' shows the computed visibility
> > Arrangement (for the point on the image, there's also a not shown square
> > drawn around the point) and the other shows the intersection of edges
> > form by the roads and the visibility region.
> >
> > What I want to do is to calculate the roads that belong to the
> > visibility of a certain point. You will notice that some roads that are
> > present both on the 'raw' image and on the full map are not present on
> > the intersection.
> >
> > The way I'm calculating right now is iterating through edges of both
> > arrangements and comparing source() and target() points (since they are
> > directed segments I compare both directions because I don't care).
> >
> > Hope that clarifies something.
> >
> > Thanks,
> > E.
> >
> > On 16:02, Sebastien Loriot (GeometryFactory) wrote:
> > > Please share a minimal example showing what is not working correctly.
> > >
> > > Thanks,
> > >
> > > Sebastien.
> > >
> > > On 05/17/2016 03:52 PM, Everton Constantino wrote:
> > > > Hi,
> > > > I'm trying to intersect two Arrangement_2 edge's but iterating through
> > > > both sets of edges and checking the source(), target() is not only
> > > > slow
> > > > but wrong (some edges are missing). Is there a canonical way to do
> > > > this?
> > > >
> > > > Thanks,
> > > >
> > >
> > >
> > > --
> > > You are currently subscribed to cgal-discuss.
> > > To unsubscribe or access the archives, go to
> > > https://sympa.inria.fr/sympa/info/cgal-discuss
> > >
> > >
> >
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>
--
Everton R. Constantino
<>
"Success is overrated"
Attachment:
signature.asc
Description: PGP signature
- [cgal-discuss] Intersecting Arrangement_2's edges, Everton Constantino, 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Sebastien Loriot (GeometryFactory), 05/17/2016
- <Possible follow-up(s)>
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Everton Constantino, 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Sebastien Loriot (GeometryFactory), 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Everton Constantino, 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Sebastien Loriot (GeometryFactory), 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Everton Constantino, 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Sebastien Loriot (GeometryFactory), 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Everton Constantino, 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Efi Fogel, 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Everton Constantino, 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Efi Fogel, 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Everton Constantino, 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Efi Fogel, 05/18/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Sebastien Loriot (GeometryFactory), 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Everton Constantino, 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Sebastien Loriot (GeometryFactory), 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Everton Constantino, 05/17/2016
- Re: [cgal-discuss] Intersecting Arrangement_2's edges, Sebastien Loriot (GeometryFactory), 05/17/2016
Archive powered by MHonArc 2.6.18.