Hatch Like AutoCad
![]() 11/13/2008 11:11 AM
|
---|
Hi Wout, I want to implement hatch like AutoCad ( on screen , by clicking point inside any close object). In my Case there are n number of lines forming x number of polygons whose coordinates I dont know. How can I identify close polygon surrounding mouse click point..? Regards, Suhas |
![]() 11/13/2008 11:27 AM
|
---|
Hi Suhas, See if you can use method WW.Math.Geometry.Polygon2D.IsInside(), which returns whether a point is inside a polygon. Wout |
![]() 11/13/2008 11:36 AM
|
---|
Hi Wout, Thanks for quick reply, But to use that function I need to know polygon points, which I dont know bcoz , polygons get form at run time by intersection of lines. Regards, suhas |
![]() 11/13/2008 11:40 AM
|
---|
Hi Suhas, You can use Segment2D.GetIntersection and Line2D.GetIntersection to calculate intersection points. Wout |
![]() 11/13/2008 11:46 AM
|
---|
Hi Wout, But in that case I will get n intersections points, how I will determine which points are forming close polygon..? Regards, Suhas |
![]() 11/13/2008 11:57 AM
|
---|
I don't know... the stakeholders that requested you this feature probably can explain you what they want exactly. If not, then you can't build it! Wout |
![]() 11/13/2008 12:01 PM
|
---|
Ok. Thanks... Regards, Suhas |