.NET

Reply
Active Contributor
WWFreeman
Posts: 27
Registered: ‎09-02-2012
Message 1 of 3 (328 Views)
Accepted Solution

Getting minimal polygon that contains given point

328 Views, 2 Replies
11-09-2012 10:50 AM

Hello again. This time I would like to have chat about a problem that resembles to what the hatch command is doing.

 

I am about to implement an algorithm that takes a point and gives minimal polygon that contains it. (or null, be there no such polygon)

 

Observing the hatch command, one would think there is already functionality that covers this. But I fail to get on its track.To materialize the question: does someone know whether the functioanlity is expsed and where to find it? In case there is such a thing yet, I would not mind elaborating the solution here. Thanks!

Hi, 

 

Check the TraceBoundary method of the editor class.

 

Gaston Nunez

Valued Mentor
gasty1001
Posts: 478
Registered: ‎04-11-2010
Message 2 of 3 (299 Views)

Re: Getting minimal polygon that contains given point

11-09-2012 04:07 PM in reply to: WWFreeman

Hi, 

 

Check the TraceBoundary method of the editor class.

 

Gaston Nunez

Active Contributor
WWFreeman
Posts: 27
Registered: ‎09-02-2012
Message 3 of 3 (291 Views)

Re: Getting minimal polygon that contains given point

11-09-2012 09:51 PM in reply to: gasty1001

Yay, that was fast, and does work. Articles on the topic can be found once one knows how the feature is called.

 

There is an example of getting the traced boundaires with isles, and drawing them back:

http://through-the-interface.typepad.com/through_the_interface/2010/06/tracing-a-boundary-defined-by...

 

Just one more related question: is there a way to trace a boundary on a specified layer? So far I figure it is possible to turn off all unwanted layers and restore their visibility back as soon as the boundary has been traced. Is that the only solution?

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.