Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
See more:
Hello everyone,
Looking for some ideas about how to find contour lines from intersecting lines set.

Line set for example looks like this :
+----+----------+
|    |     2    |
| 1  +----------+
|    |
+----+


where
|
|
|
is one line, and
|
|
is also one line. From this picture I have 6 lines which are not in any order.

Box 1 and box 2, each made up of 4 line segments, share a common side.

In result what i would like to get is such contour, made up of 6 line segments:
+---------------+
|               |
|    +----------+
|    |
+----+

Maybe someone has some ideas of how to achieve this?
Posted
Updated 20-Dec-10 4:40am
v2

1 solution

Find line segements that overlap. Erase the portions of them that are part of the overlap. If an entire line segment is overlapped by another, then that entire line segment will be erased.
 
Share this answer
 
Comments
AspDotNetDev 20-Dec-10 17:06pm    
I see my answer was univoted. Were you looking for something more specific, nestor0424?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900