PDA

View Full Version : Draw a Box around an Ellipse



greypaw
2007-01-23, 04:14 PM
Can someone please explain why, when trying to draw a box around a rotated ellipse - per the attached drawing, I have a lot of difficulty in getting "tangent" snaps to work?

I start with the rotated ellipse and then draw a vertical line to the right.
I now want to draw a tangent from the ellipse to a perpendicular snap on the line...
If I cannot get a "tangent" snap, I draw any line to intersect the ellipse. Now I can get a tangent, but not a TRUE tangent, just some point on the ellipse. If I continue drawing more and more lines as tangents, in the end I get the desired effect (it generally takes about six lines). Does anyone have any similar experience of ellipses?

BTW I know that I can draw an approximated "polyline" ellipse, but this is not what I want.

Many thanks

gp. (aka "confused of ellipseville"!)

madcadder
2007-01-23, 05:51 PM
I don't have it... but I'd swear that I've seen a lisp that draws a rectangle around selected objects. Maybe someone here has this timesaver and will upload it.

jaberwok
2007-01-23, 08:20 PM
I suppose the math is just too complicated since the ellipse is an arc of constantly varying radius so it doesn't have a single, locatable centre at each end. :-( It's just a pity you can't use the polyline version.

bmonk
2007-01-23, 10:04 PM
Can someone please explain why, when trying to draw a box around a rotated ellipse - per the attached drawing, I have a lot of difficulty in getting "tangent" snaps to work?

I start with the rotated ellipse and then draw a vertical line to the right.
I now want to draw a tangent from the ellipse to a perpendicular snap on the line...
If I cannot get a "tangent" snap, I draw any line to intersect the ellipse. Now I can get a tangent, but not a TRUE tangent, just some point on the ellipse. If I continue drawing more and more lines as tangents, in the end I get the desired effect (it generally takes about six lines). Does anyone have any similar experience of ellipses?

BTW I know that I can draw an approximated "polyline" ellipse, but this is not what I want.

Many thanks

gp. (aka "confused of ellipseville"!)


GP, I tried DL'ing the dwg, but it didn't work, however, I think I replicated the example well enough from your description. I drew a rotated ellipse, with a vertical line to the right.

The only way to get a line tangent to ellipse and perp to line is to:

1) copy ellipse to other side of line.
2) type "xline" (construction line)
3) snap tangent from ellipse to ellipse.
4) trim appropriately.

and if its a box your after, then just copy in all 4 directions, rinse and repeat.

HTH

Brian

greypaw
2007-01-24, 09:53 AM
Brian.
Hi.
Thanks for your interest.
I'm sorry the dwg didn't work. (It was an ACAD2007 format file...)
- if you are still interested, I've saved the file as a 2004 format now. attached here.
I tried what you describe, but still cannot get "tangent" snaps to work!
In fact although I can get (some sort of a) tangent using the line command, xline does not work at all.
I guess this may become one of life's unsolved mysteries!

madcadder
2007-01-24, 01:49 PM
SOLUTION!

Yesterday, I didn't think BOXTEXT.lsp would work on anything but text. Today, I actually tried it on a 50x25 ellipse rotated 45 and it worked.

This is my modified copy of the routine.
It will create and use a layer called Z-ANNO-NPLT.
There should be no ill effects other than the added layer.

bmonk
2007-01-24, 02:58 PM
Brian.
Hi.
Thanks for your interest.
I'm sorry the dwg didn't work. (It was an ACAD2007 format file...)
- if you are still interested, I've saved the file as a 2004 format now. attached here.
I tried what you describe, but still cannot get "tangent" snaps to work!
In fact although I can get (some sort of a) tangent using the line command, xline does not work at all.
I guess this may become one of life's unsolved mysteries!

Sorry to hear you still had problems. For me to get it to work, I had to snap tangent to first ellipse, and then when I snapped tangent to the second ellipse, I had to move the cursor PAST the point of where the tangent would actually be. If that makes any sense.

Anyway, maybe its a 2007 issue, I am using '06.

However, Madcadder's lisp routine seems to work great. Thanks MC, I will be adding it to my Lisproutines.

greypaw
2007-01-24, 03:16 PM
Thanks to both of you!
Unfortunately at THIS place of work (I work elsewhere too!), I use LT2007, which clearly won't be able to try the lisp!
I'll report back on Friday, when I'm at a "full-AutoCAD" office!
Further, I tried the xline solution in LT2005 and still cannot get any tangent snaps to work...
Maybe full-ACAD is different --
I think ellipse geometry is just a bit too complex for CAD to cope with predictably.
Still, if MC's lisp works I'll be a "Happy Bunny"!

gp (aka slightly less confused of ellipseville!!)

greypaw
2007-01-26, 12:55 PM
The lisp works great!
Just one question...
Does the box actually TOUCH the ellipse? I can't get an intersect snap to work...
With my laborious method, I can, and when I try to trim the ellipse, the command line tells me that it doesn't intersect the line(s) twice -- which is what I'd expect.
Not being "picky", here, guys, just curious!
Thanks again for the help.

gp

madcadder
2007-01-28, 07:06 PM
The lisp works great!
Just one question...
Does the box actually TOUCH the ellipse? I can't get an intersect snap to work...
With my laborious method, I can, and when I try to trim the ellipse, the command line tells me that it doesn't intersect the line(s) twice -- which is what I'd expect.
Not being "picky", here, guys, just curious!
Thanks again for the help.

gp

It's off 0.00000001. :?

The box has a z el of -0.00000001
:dunno:

Help file was no help; will have to look into it more.

[EDIT: apparent intersection works for now]

greypaw
2007-02-02, 10:06 AM
That explains it...

:-)

Thanks.
I'd be interested in WHY the z difference.
Sorry for delay in response. Been working elsewhere!

madcadder
2007-02-05, 02:38 PM
Mine is playing on the 0 z now. I changed nothing.

Tested on rectangle, trapezoid, circle, and ellipse. then rotated all 45 and tried again.

nothing.

All are on a 0 z.

:?:

madcadder
2007-02-12, 05:35 PM
Still looking into this one.

it appears that it only has an issue when units are set to DECIMAL.
I've tried ARCHITECTURAL and FRACTION and both always come out on "zero z"
Decimal always comes out on "-1 z".

Still working on it...