Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re: Find all the intersection points between 2 line groups

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re: Find all the intersection points between 2 line groups


Chronological Thread 
  • From: Graviton <>
  • To:
  • Subject: [cgal-discuss] Re: Find all the intersection points between 2 line groups
  • Date: Wed, 7 Dec 2011 18:57:06 -0800 (PST)

Thanks, using the overlay is a good idea.

Now I want to throw one more information into the mix; what if, one of the line group is actually a polygonal mesh? Anything we can exploit from the mesh structure of this line, so that the whole process can be speed up?

On Thu, Dec 8, 2011 at 12:34 AM, Efraim Fogel [via cgal-discuss] <[hidden email]> wrote:
Using the a plane-sweep algorithm is probably the most efficient
approach. You are looking for something similar to the overlay
operation, but in your case you need only the intersections (not the
arrangements). Sometimes this is also referred to as red-blue
intersections.

The Sweep_line_2 component of CGAL is an algorithmic framework. A
concrete algorithm is implemented through a visitor. Unfortunately, we
haven't exposed the interface of the visitor yet. If you want to use
this component, you must do one of the following:
1. Use the overlay mechanism: Construct 2 arrangements, say A and B,
from the 2 sets of lines, respectively, and compute their overlay
using the overlay() function while using, what we call, an overlay
traits (the 3rd argument to the function). The answer to what you need
lies in this traits.
2. Change the visitor of the overlay (Arr_overlay_sl_visitor.h) to do
what you need.

Quoting Graviton <[hidden email]>:

> I have two groups of line segments, and I want to find the intersection
> between them. I understand that one can use
> http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Sweep_line_2/Chapter_main.html
> sweep line algorithm  to find all the intersection points within one line

> groups. But now I have 2 line segment groups, and I want to find the
> intersection between line in Group A and line in Group B ( I don't want the
> intersection point between line segments among group A and line segments
> among group B).
>
> Any idea how CGAL can help in this?
>
> --
> View this message in context:  
> http://cgal-discuss.949826.n4.nabble.com/Find-all-the-intersection-points-between-2-line-groups-tp4168063p4168063.html
> Sent from the cgal-discuss mailing list archive at Nabble.com.
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
>


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




If you reply to this email, your message will be added to the discussion below:
http://cgal-discuss.949826.n4.nabble.com/Find-all-the-intersection-points-between-2-line-groups-tp4168063p4169572.html
To unsubscribe from Find all the intersection points between 2 line groups, click here.
NAML



View this message in context: Re: Find all the intersection points between 2 line groups
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.16.

Top of Page