HighTechTalks DotNet Forums  

Getting a path from the intersection of two regions

Dotnet Framework (Drawing) microsoft.public.dotnet.framework.drawing


Discuss Getting a path from the intersection of two regions in the Dotnet Framework (Drawing) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Valerie Hough
 
Posts: n/a

Default Getting a path from the intersection of two regions - 10-27-2006 , 01:48 PM






Hi,
I would like to be able to determine the outline of the intersection of two
polygons, even in the case where more than one polygon might result.

My strategy was to create a graphicsPath object for each polygon, create a
region from each of those, then apply Region.Intersect().

Once I have done that, is it possible to find out the outline(s) of this
created intersection?

In particular, if I take two polygons whose intersection produces multiple
polygonal intersections, I would like to be able to have the result set of
points for each resultant polygon.

Thanks in advance.
Chris Hough



Reply With Quote
  #2  
Old   
Joergen Bech
 
Posts: n/a

Default Re: Getting a path from the intersection of two regions - 10-27-2006 , 03:12 PM







Region + GraphicsPath seem to be one-way streets only.
All the interesting stuff takes place in GDI+, below the
managed portion. GetRegionData and GetRegionScans
are not what you are looking for.

Have you looked at something like this library:
http://www.cs.man.ac.uk/~toby/alan/software/

Full source code and .Net wrappers available.
Perhaps you can get a bit closer to the required bits
and pieces that way?

/JB



On Fri, 27 Oct 2006 13:48:32 -0400, "Valerie Hough"
<sales (AT) pcTrans (DOT) com> wrote:

Quote:
Hi,
I would like to be able to determine the outline of the intersection of two
polygons, even in the case where more than one polygon might result.

My strategy was to create a graphicsPath object for each polygon, create a
region from each of those, then apply Region.Intersect().

Once I have done that, is it possible to find out the outline(s) of this
created intersection?

In particular, if I take two polygons whose intersection produces multiple
polygonal intersections, I would like to be able to have the result set of
points for each resultant polygon.

Thanks in advance.
Chris Hough



Reply With Quote
  #3  
Old   
Valerie Hough
 
Posts: n/a

Default Re: Getting a path from the intersection of two regions - 10-27-2006 , 03:27 PM



Thanks for your reply - I had sort of reached that conclusion but was hoping
it was not true. The URL you suggested looks promising.



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.