Author Topic: arc challenge  (Read 16168 times)

0 Members and 1 Guest are viewing this topic.

Kate M

  • Guest
arc challenge
« on: January 22, 2004, 10:18:33 AM »
Okay, I admit there's motive behind this other than just giving you guys something to do... :-)

I need to draw an arc (or a circle), defined by two tangents and a point on the circle -- not a radius like TTR.

Sorta like this:



Make sense? I know it's a little nutty...think there's a command in vanilla AutoCAD that might do this? If not....have fun... ;-)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
arc challenge
« Reply #1 on: January 22, 2004, 10:26:42 AM »
could you modify the image to show the arc/circle, maybe a dotted line.
TheSwamp.org  (serving the CAD community since 2003)

Kate M

  • Guest
arc challenge
« Reply #2 on: January 22, 2004, 10:36:33 AM »


I actually found a way to do it, but it's a little complicated -- I'm not even sure I could describe it. Has to do with the fact that if you hit enter after starting the arc command, it starts the arc tangent to the last line you drew. Then it's a matter of knowing how far your point of contact is from the intersection of the two "tangent" lines...give me a few and I'll post what I actually did.

SMadsen

  • Guest
arc challenge
« Reply #3 on: January 22, 2004, 10:37:20 AM »
Kate, excellent challenge :)
Just one question: is the point that the circle must pass thru the tangent point? In other words, is the point always located on one of the tangents?

Kate M

  • Guest
arc challenge
« Reply #4 on: January 22, 2004, 10:42:32 AM »
Stig,

Yes, the point is always on one of the tangents.

Here's what I ended up doing:



The geometry's pretty simple, it's just forcing the tangents to behave...for some reason, you can't draw arcs tangent to other lines...using the TAN osnap doesn't give anything.

hendie

  • Guest
arc challenge
« Reply #5 on: January 22, 2004, 11:01:20 AM »
am I missing something here.
Quote
Command: _circle Specify center point for circle or [3P/2P/Ttr (tan tan
radius)]: _3p Specify first point on circle: _tan to
Specify second point on circle: _tan to
Specify third point on circle:

selecting a 3 point circle, then just using tangent snaps for the first two points (on the lines) and then picking a third point gives a circle  as required
or are you just looking for a lisp routine to save using the snap menu

Kate M

  • Guest
arc challenge
« Reply #6 on: January 22, 2004, 11:18:07 AM »
Hendie,

Sort of...I guess maybe what I'm looking for is a fillet with a defined endpoint and an unspecified radius -- the 3P circle doesn't always stay "between" the tangent lines -- see my 2nd picture.

rude dog

  • Guest
arc challenge
« Reply #7 on: January 22, 2004, 11:51:52 AM »
I use start,end,direction from arc pull down menu
turn on ortho first....when it prompts you for direction point pick the
intersection of the two lines[/img]

Kate M

  • Guest
arc challenge
« Reply #8 on: January 22, 2004, 12:55:00 PM »
RD,

Not quite, I only know where the angle starts, not where it ends.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
arc challenge
« Reply #9 on: January 22, 2004, 01:16:02 PM »
I give up............. I had the same answer as hendie. I would like to see the calculations for solving that arc.
TheSwamp.org  (serving the CAD community since 2003)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
arc challenge
« Reply #10 on: January 22, 2004, 01:37:27 PM »
Kate,
This is off the subject, but how did you capture that image on you system?
I can't get a clear image using PrintScreen then pasting into an image program, save as jpg of tiff.
CAB
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

SMadsen

  • Guest
arc challenge
« Reply #11 on: January 22, 2004, 02:05:55 PM »
Here are some basic calculations but it does not calculate the proper order of points.
For it to work, lines have to be drawn in CCW orientation. Otherwise it will produce unexpected results.

I don't have time to calculate orientations so I'll just toss it out there.
Basically, it just finds the perpendicular from the picked point, "mirrors" it to the other line and where they intersect is the center point. The perpendiculars then become legs of the start and end angles. Simple.

Code: [Select]
(defun make-arc (cpt pt pt2)
  (setq lst (list '(0 . "ARC")
                  '(100 . "AcDbEntity")
                  '(100 . "AcDbCircle")
                  (cons 10 cpt)
                  (cons 40 (distance pt cpt))
                  '(210 0.0 0.0 1.0)
                  '(100 . "AcDbArc")
                  (cons 50 (angle cpt pt2))
                  (cons 51 (angle cpt pt))
            )
  )
  (entmake lst)
)

(defun C:TANARC (/ cp1 cp2 cpt e1 e2 idist ip n o obj1 obj2
               p1 p2 p3 p4 pt pt2)
  (setq e1 (entsel "\nPick first line: ")
        e2 (entsel "\nPick second line: ")
        pt (getpoint "\nPick start point on line: ")
  )
  (cond
    ((and e1 e2 pt)
     (setq obj1 (vlax-ename->vla-object (car e1))
           obj2 (vlax-ename->vla-object (car e2))
     )
     (mapcar (function (lambda (n o) (set n (vlax-curve-getstartpoint o))))
             '(p1 p3) (list obj1 obj2)
     )
     (mapcar (function (lambda (n o) (set n (vlax-curve-getendpoint o))))
             '(p2 p4) (list obj1 obj2)
     )
     (cond ((setq ip (inters p1 p2 p3 p4 nil))
            (setq idist (distance ip pt)
                  cp1   (polar pt (+ (angle p1 p2) (/ pi 2.0)) idist)
                  pt2   (polar ip (angle p3 p4) (distance ip pt))
                  cp2   (polar pt2 (+ (angle p3 p4) (/ pi 2.0)) idist)
                  cpt   (inters pt cp1 pt2 cp2 nil)
            )
            (make-arc cpt pt pt2)
           )
     )
    )
  )
)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
arc challenge
« Reply #12 on: January 22, 2004, 02:15:51 PM »
- CAB
If your are using 2004 do a pngout or a jpgout

edited
nevermind........... i see you're using 2000  :oops:
TheSwamp.org  (serving the CAD community since 2003)

Kate M

  • Guest
arc challenge
« Reply #13 on: January 22, 2004, 02:26:53 PM »
CAB,

Just ctrl+alt+print screen, into Paint, save as JPG...nothin' special. WMFOUT is good too.

Kate M

  • Guest
arc challenge
« Reply #14 on: January 22, 2004, 02:36:34 PM »
Pretty nifty, Stig. :-) It's a little tricky where it places the arc, but I got it do what I needed. Orientation would be great, but I won't get greedy. ;-)

Thanks guys!