Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Active Contributor
zasanil
Posts: 33
Registered: ‎05-08-2007
Message 1 of 6 (270 Views)

polyline encompassing multiple ojects to one polyline

270 Views, 5 Replies
05-09-2012 06:32 AM

Hello,

I wanted to see if anyone knew of a routine that could accomplish this. I would like to take a polyline that is surrounding multiple objects (other polylines or circles) and draw 1 polyline to define them all. A before and after example is attached that might explain it better. It's going from 3 objects (one polyline and 2 circles) in the before example to one closed polyline in the after example.

Thanks for any help.

Dan Nicholson C.I.D.
PCB Design Engineer
*Expert Elite*
Kent1Cooper
Posts: 5,868
Registered: ‎09-13-2004
Message 2 of 6 (263 Views)

Re: polyline encompassing multiple ojects to one polyline

05-09-2012 06:57 AM in reply to: zasanil

zasanil wrote:

.... I would like to take a polyline that is surrounding multiple objects (other polylines or circles) and draw 1 polyline to define them all. A before and after example is attached that might explain it better. It's going from 3 objects (one polyline and 2 circles) in the before example to one closed polyline in the after example. ....


How complex might the shapes of interior Polylines be?  I can imagine something that would draw a temporary Line from the center of the bounding box of each interior object to the closest point on the perimeter Polyline, which would result in something you could run Boundary in.  If all interior objects are "simple" shapes, that should work.  But if interior Polylines could [for example] have concavities, it might sometimes not work as wanted, depending on how complex their shapes are, their orientation, etc.

Kent Cooper
Active Contributor
zasanil
Posts: 33
Registered: ‎05-08-2007
Message 3 of 6 (259 Views)

Re: polyline encompassing multiple ojects to one polyline

05-09-2012 07:08 AM in reply to: Kent1Cooper

Hi Kent,

All the objects would be simple circles, polylines, arcs or lines. They may overlap, but usually don't. They should all be closed objects though. Most of the time they would be circles. I've attached a more realistic example.

Thanks!

Dan

Dan Nicholson C.I.D.
PCB Design Engineer
*Expert Elite*
Kent1Cooper
Posts: 5,868
Registered: ‎09-13-2004
Message 4 of 6 (233 Views)

Re: polyline encompassing multiple ojects to one polyline

05-09-2012 08:38 AM in reply to: zasanil

zasanil wrote:

....

All the objects would be simple circles, polylines, arcs or lines. They may overlap, but usually don't. They should all be closed objects though. Most of the time they would be circles. I've attached a more realistic example.

....


Wow....  You appear to have a lot of situations similar to the very simplified version in the attached image.  If what it says in there is correct about the way you would want it to work, I have a hard time imagining how a routine could be made to figure all of that out in your example situation.  But I'll continue to think about it....

Kent Cooper
Active Contributor
zasanil
Posts: 33
Registered: ‎05-08-2007
Message 5 of 6 (226 Views)

Re: polyline encompassing multiple ojects to one polyline

05-09-2012 09:16 AM in reply to: Kent1Cooper

Thanks for trying Kent. The right side in your example would be what I need, but I can see where it can get out of control really fast.

Dan Nicholson C.I.D.
PCB Design Engineer
Valued Mentor
stevor
Posts: 888
Registered: ‎12-26-2005
Message 6 of 6 (171 Views)

Re: polyline encompassing multiple ojects to one polyline

05-15-2012 06:35 AM in reply to: zasanil

One way has been to connect the objects by some criteria,

like shortest distance, like the traveling salesman problem;

for cable planning, and a bunch of exotic methods.

S
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.