Results 1 to 2 of 2

Thread: command Circle>Tan Tan Radius Autolisp

  1. #1
    Member
    Join Date
    2012-10
    Posts
    5
    Login to Give a bone
    0

    Default command Circle>Tan Tan Radius Autolisp

    ;; I just want to draw a circle, which is tangent to the other two known circles.

    (defun c:crl_ttr ()

    (command "circle" '(0 0) 30 "")
    (command "circle" '(5 5) 50 "")
    (setvar "osmode" 256)
    (command "circle" "ttr" pause pause 40 "")
    )
    ;; Yes, we can draw that circle easily, just by the "pause" command and find the point
    ;; on the AutoCAD screen.
    ;; The problem is that i just want to use the autolisp codes create that circle automatically through
    ;; the control of those parameters.

    ;; I'm always wondering whether i can utlise the command listed below:

    (defun c:crl_ttr()
    (command "circle" '(0 0) 30 "")
    (setq c_1 (entlast))
    (command "circle" '(5 5) 50 "")
    (setq c_2 (entlast))
    (command "circle" "ttr" c_1 c_2 40 "")
    )

    ;; However, it was turned out that these commands was not effctive. They always noted me that "it requires
    ;; an osnap object and select a circle"

    ;; I think i have selected an circle. You see, i give the entity name of the circle to the command and set
    ;; set the osmode to be tangent.

    ;; Now, i'm puzzled with the "circle>ttr" command. Maybe someone can give me some opinions with it.

    ;;Thanks in advance.

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

    Default Re: command Circle>Tan Tan Radius Autolisp

    You have 2 solutions and ACAD doesn't know witch solution to draw - you specified enames instead of nearest points on circles... I suggest if you want to perform this operation automatically that you construct solution you want and that way it'll work... Find intersection points of circles with center of defined circles and with radius greater by radius of result circle... You can use 2 circle intersection subroutine, or do it through vlisp with 'Intersectwith method of 2 VLA-OBJECT (circles with radius enlarged by 40 - radius of result circle - helpcircles)... When you obtain points than you have to decide witch solution you want and in the end just draw circle from point of intersection with radius 40... Of course (entdel helpcircle1) and (entdel helpcircle2)...

Similar Threads

  1. Replies: 6
    Last Post: 2016-11-04, 03:11 PM
  2. Use Wipeout command with a Circle
    By jgwallace in forum AutoCAD General
    Replies: 23
    Last Post: 2014-10-21, 09:30 PM
  3. 2013: Aligning center point of circle and changing its radius
    By engamrsalah in forum Revit Architecture - Families
    Replies: 7
    Last Post: 2013-01-29, 05:10 PM
  4. circle command
    By fls_gold in forum AutoCAD General
    Replies: 8
    Last Post: 2010-04-15, 09:20 AM
  5. Undo Within the Tan-Tan-Radius Circle Command
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2009-02-01, 05:11 PM

Tags for this Thread

Posting Permissions

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