JU_getboundingpoly

JU_getboundingpoly

john.uhden
Mentor Mentor
837 Views
6 Replies
Message 1 of 7

JU_getboundingpoly

john.uhden
Mentor
Mentor

Maybe it's because I'm now gainfully employed more than I am frittering my time away here giving everything away to needy people, but since I doubt that Autodesk will provide us such a function, I am feeling inspired to write one myself.

Why?  Because vl-getboundingbox returns only the LL and UR corners of a rectangle surrounding an entity.  You should know that, especially with MTEXT, the real life outline can have a lot of ins and outs what with short lines and long lines.  So I have already figured that if you explode a copy of mtext, you could assemble the textbox of each line of resulting text entities into a jagged outline that you could turn into a polyline.  But alas, imagine all the ins and outs of a block insertion especially with curved features included.  And the result (if I could do it) would be nothing more than a polyline.  Okay, that would be cool for hatching, but I couldn't make it help background filling (well unless I were Owen Wengerd or some other super power).  Anyway, all I know is AutoLisp and that I had better follow my wife's instructions to get off the computer and tend things in and around the house.

BTW, why does this place underline in red words like polyline and mtext?  This IS an AutoCAD forum, isn't it?

John F. Uhden

Accepted solutions (3)
838 Views
6 Replies
Replies (6)
Message 2 of 7

Sea-Haven
Mentor
Mentor
Accepted solution

There is a commercial product out there to do complex boundaries. Takes into account all the ins and outs of objects don't know if it does mtext. 

 

Maybe have a look at Lee-mac complex hull may be useful.

0 Likes
Message 3 of 7

Kent1Cooper
Consultant
Consultant
Accepted solution

Search [both here and in the base AutoCAD Forum] for SHRINKWRAP, and you may find something that does what you want.

Kent Cooper, AIA
0 Likes
Message 4 of 7

CodeDing
Advisor
Advisor
Accepted solution

@john.uhden ,

 

Like Kent said, there is a command for this already.

 

Last I recall, I think you said you are working with C3D now right? If that is the case, C3D has a command called LINEWORKSHRINKWRAP. I can not find documentation for the command itself but it is mentioned in other help areas in C3D.

 

Also worth noting, for users who are not using a vertical, Lee Mac's OUTLINE command accomplishes this also. So, somebody has already gone through the heartache of creating a custom function for this.

 

Lee's command:

http://www.lee-mac.com/outlineobjects.html 

 

Best,

~DD

0 Likes
Message 5 of 7

john.uhden
Mentor
Mentor

@Sea-Haven , @Kent1Cooper , @CodeDing ,

 

Well at least I don't have to be the subject of an event on The Misery Index, but why can't Autodesk include such tools?

Over the years they have confiscated a number of mine like Layer Status and Chgspace and SSFilter, etc.

At least I think they paid Peter Petrov for Vital Lisp and perhaps Robert Bou for SoftEngine, though Bob himself probably had no programming experience whatsover.  But at least he bought me a prime strip steak dinner once in Philadelphia.

Anyway, thanks guys for your sharing your knowledge as usual.  I like having smart people up to which I look.

John F. Uhden

0 Likes
Message 6 of 7

Sea-Haven
Mentor
Mentor

Hi John, GOTO where is it ? I just want to jump to layout 20. Its in Word etc.

 

Like you wrote one.

 

Any one wants it just go to Cadtutor downloads.

0 Likes
Message 7 of 7

john.uhden
Mentor
Mentor
What? Are you talking Australian or something?
I haven't seen GOTO since the early days of Basic.
You can't get to Layout 20 without passing through Layout 19; it's a rule.

John F. Uhden

0 Likes