See the top rated post in this thread. Click here

Results 1 to 7 of 7

Thread: Routine for creating Arc by Tangent-Tangent-Radius

  1. #1
    Member
    Join Date
    2013-02
    Posts
    49
    Login to Give a bone
    0

    Default Routine for creating Arc by Tangent-Tangent-Radius

    Good day!

    Is there's a routine for creating Arc by Tangent-Tangent-Radius?

    Thank you in advance.

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Routine for creating Arc by Tangent-Tangent-Radius

    With TRIMMODE (System Variable) set to 0 (Off) the FILLET command is all you need.

    You can add a macro to toggle TRIMMODE On/Off
    Command Name Fillet Trim
    Description Toggle TrimMode On/Off
    Macro ^P(ai_onoff "trimmode") ^P
    Image RCDATA_16_FILLET

    After adding the command macro to a Ribbon Panel set the Display name to: $(if,$(and,1,$(getvar,trimmode)),!.)Trim Fillets

  3. #3
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    559
    Login to Give a bone
    1

    Default Re: Routine for creating Arc by Tangent-Tangent-Radius

    From the very limited testing trimmode really helps but it always does a inside arc, I tried to do a outside arc and had to use Circle TTR to get correct result.
    Screenshot421.png

  4. #4
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Routine for creating Arc by Tangent-Tangent-Radius

    Quote Originally Posted by BIG-AL View Post
    From the very limited testing trimmode really helps but it always does a inside arc, I tried to do a outside arc and had to use Circle TTR to get correct result.
    That what I use your arcfill.lsp for: https://www.cadtutor.net/forum/topic...comment-500044

  5. #5
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    559
    Login to Give a bone
    0

    Default Re: Routine for creating Arc by Tangent-Tangent-Radius

    That link was based on 2 lines not 2 arcs so failed for me.

  6. #6
    All AUGI, all the time
    Join Date
    2015-10
    Location
    Belgrade, Serbia, Europe
    Posts
    564
    Login to Give a bone
    0

    Default Re: Routine for creating Arc by Tangent-Tangent-Radius

    This can be very handy, though little slow...

    HTH., M.R.
    Attached Files Attached Files

  7. #7
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Routine for creating Arc by Tangent-Tangent-Radius

    Quote Originally Posted by BIG-AL View Post
    That link was based on 2 lines not 2 arcs so failed for me.
    Sorry been a while since I looked at it, I must have modified it.
    Seems to work, give it a try.
    Code:
    ;|draws an arc between 2 lines but does not erase
       by Alan H Aug 2015  shared by BIGAL
       http://www.cadtutor.net/forum/showthread.php?96989-Connecting-lines-with-an-arc&p=662481&viewfull=1#post662481
       Macro: ^P(or C:arcfill (load "arcfill.lsp"));arcfill
       Command line: (load "arcfill.lsp") arcfill
    =============================================|;
    (defun c:arcfill ( / *Error* eend oldsnap pt1 pt2 pt3 pt4 pt5 ent1 ent2 obj1 obj2 obj3 obj4)
    
     (defun *Error* (msg) ; embedded defun
       (setvar 'osmode oldsnap)
       (setvar "qaflags" 0)
       (if (/= s "Function cancelled")
         (princ (strcat "\nError: " msg))
       )
       (princ)
     )
    
    ;  (alert "Arc drawn clockwise from 1st line to 2nd line.")
      (setq oldsnap (getvar 'osmode)
            eend (cdar(entget(entlast)))
      )
      (setvar 'Osmode 512)
      (setq pt1 (getpoint "\npick 1st line")
            ent1 (ssname (ssget pt1) 0)
            Ent1Typ (cdr(assoc 0 (cdr(entget ent1))))
            pt2 (getpoint "\npick 2nd line")
            ent2 (ssname (ssget pt2) 0)
            Ent2Typ (cdr(assoc 0 (cdr(entget ent2))))
            rad (getdist "\nEnter radius")
            obj1 (vlax-ename->vla-object ent1)
            obj2 (vlax-ename->vla-object ent2)
      )
    ;  (if(or(eq Ent1Typ "POLYLINE")(eq En1Typ "LWPOLYLINE"))
      (if(eq En1Typ "LWPOLYLINE")
        (progn
          (princ "\nGot here")
          (vla-copy obj1)
    ;      (setq ss (ssadd) ss (ssadd (entlast)))
    ;      (sssetfirst nil ss)
          (setvar "qaflags" 128)
    ;      (command-s "EXPLODE" ss)
    ;      (vl-cmdf "explode")	; Explode the copied object.
          (vl-cmdf "explode" (entlast))	; Explode the copied object.
          (princ "\nGot here")
    ;      (setq ent1 (ssname (ssget pt1 '((0 . "LINE,ARC"))) 0)
          (setq ent1 (ssname (ssget pt1) 0)
    	  obj1 (vlax-ename->vla-object ent1)
          )
        )
      )
    ;  (if(or(eq Ent2Typ "POLYLINE")(eq En2Typ "LWPOLYLINE"))
      (if(eq En2Typ "LWPOLYLINE")
        (progn
          (vla-copy obj2)
    ;      (alert "Arc drawn clockwise from 1st line to 2nd line.")
          (vl-cmdf "explode" (entlast))	; Explode the copied object.
    ;      (setq ent2 (ssname (ssget pt2 '((0 . "LINE,ARC"))) 0)
          (setq ent2 (ssname (ssget pt2) 0)
    	  obj2 (vlax-ename->vla-object ent2)
          )
        )
      ) ;
    ;  (Princ "Ent1Typ set to ")(Princ Ent1Typ)
    ;  (Princ "\nEnt2Typ set to ")(Princ Ent2Typ)
    ;  (Princ "\nRadius set to ")(Princ rad)
      (command "offset" rad ent1 pt2 "")
      (setq obj3 (vlax-ename->vla-object (entlast)))
      (command "offset" rad ent2 pt1 "")
      (setq obj4 (vlax-ename->vla-object (entlast))
            pt5 (vlax-invoke obj3 'intersectWith obj4 acExtendThisEntity) ; Arc Center
            pt3 (vlax-curve-getClosestPointto obj2 pt5)
            pt4 (vlax-curve-getClosestPointto obj1 pt5)
      )
      (vla-delete obj3)
      (vla-delete obj4)
      (command "arc" "C" pt5 pt3 pt4)
      (setvar 'osmode oldsnap)
      (setvar "qaflags" 0)
    )
    ;(c:arcfill)l

Similar Threads

  1. Arc Tangent to Line or Arc with Osnap
    By Wish List System in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2014-11-13, 12:07 PM
  2. 2015: Sketch - Tangent arc to another arc.
    By yn677298 in forum Inventor - General
    Replies: 2
    Last Post: 2014-09-24, 03:45 PM
  3. 2014: constructing an arc tangent to an arc and a line
    By aellsworth in forum AutoCAD Tips & Tricks
    Replies: 1
    Last Post: 2013-12-19, 08:40 PM
  4. Arcs by P.C., arc length, Radius, Tangent bearing, Delta
    By justinxxvii in forum AutoCAD General
    Replies: 4
    Last Post: 2006-04-29, 10:32 PM
  5. Any way to draw an arc by tangent, tangent, radius?
    By christo4robin in forum Revit Architecture - General
    Replies: 2
    Last Post: 2005-09-01, 01:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •