Author Topic: Specify boundary set for Editor.TraceBoundary  (Read 2818 times)

0 Members and 1 Guest are viewing this topic.

zoltan

  • Guest
Specify boundary set for Editor.TraceBoundary
« on: June 06, 2012, 05:56:45 PM »
The Editor.TraceBoundary method creates a Polyline boundary from a picked point with the option to specify if it should do island detection.  What is missing is the ability to specify the set of objects used to find the boundary; it uses all of the visible objects.

Short of doing something kludgy, like putting the objects on a temporary layer and isolate it, is there another method of getting a polygon boundary?

I know in the past, LE had created GbPoly, which seems to no longer be available.  Is there any libraries that are similar?

If I wanted to roll my own formula for doing this, what sort of mathematics would I use?  Does anyone have any links that can guide me in the right direction?  I have searched extensively for terms like "Polygon Boundary Detection" and "Boundary Tracing" but all I can find are algorithms for raster image edge detection.  What is the proper name of the algorithm for doing this?

Luis, any help here?

TheMaster

  • Guest
Re: Specify boundary set for Editor.TraceBoundary
« Reply #1 on: June 06, 2012, 07:59:39 PM »
The Editor.TraceBoundary method creates a Polyline boundary from a picked point with the option to specify if it should do island detection.  What is missing is the ability to specify the set of objects used to find the boundary; it uses all of the visible objects.

Short of doing something kludgy, like putting the objects on a temporary layer and isolate it, is there another method of getting a polygon boundary?

I know in the past, LE had created GbPoly, which seems to no longer be available.  Is there any libraries that are similar?

If I wanted to roll my own formula for doing this, what sort of mathematics would I use?  Does anyone have any links that can guide me in the right direction?  I have searched extensively for terms like "Polygon Boundary Detection" and "Boundary Tracing" but all I can find are algorithms for raster image edge detection.  What is the proper name of the algorithm for doing this?

Luis, any help here?

TraceBouindary() is what amounts to parlor trick. It uses the BOUNDARY command under the hood, provides no option for creating regions when the bounding objects are ACIS curves, and hence, is not terribly useful.

You could just use the BOUNDARY command yourself directly via acedCmd(), but have to be careful when you specify objects that require a region boundary, because (if I recall correctly) the prompting sequence changes. You may be able to use various input events of the Editor class, and/or the LASTPROMPT sysvar to detect differing prompting sequences.

zoltan

  • Guest
Re: Specify boundary set for Editor.TraceBoundary
« Reply #2 on: June 06, 2012, 08:57:11 PM »
TraceBouindary() is what amounts to parlor trick. It uses the BOUNDARY command under the hood...

I figured that out when it echos "Selecting Everything Visible..." to the text window.  So if it is just calling the boundary command, why are there no parameters to specify a boundary set, or Polygon vs. Region?

Very disappointing...

TheMaster

  • Guest
Re: Specify boundary set for Editor.TraceBoundary
« Reply #3 on: June 14, 2012, 10:53:00 PM »
TraceBouindary() is what amounts to parlor trick. It uses the BOUNDARY command under the hood...

I figured that out when it echos "Selecting Everything Visible..." to the text window.  So if it is just calling the boundary command, why are there no parameters to specify a boundary set, or Polygon vs. Region?

Very disappointing...

I don't think that API was written by a person with much experience, given the obvious shortcomings