How to joint it

Discussion in 'AutoCAD' started by Adesu, May 4, 2004.

  1. Adesu

    Adesu Guest

    (setq loc (list 25 20 0.0))
    (setq cir1 10)
    (setq cir2 8)
    ;-------------------------------------
    (setq thi (/ (- cir1 cir2)2))
    ;-------------------------------------
    (command ".circle" loc cir1 "")
    (command ".circle" (list loc thi) cir2 "") ; this here I confuse
    (command ".circle" loc cir3 "")

    Dear Alls,
    How to joint "loc" ( list 25 20 0.0) and add with "thi" to become (list 25
    20 1.0),any suggest
    Best regards
    Ade Suharna
     
    Adesu, May 4, 2004
    #1
  2. change -
    (command ".circle" (list loc thi) cir2 "")
    to -
    (command ".circle" (list (car loc) (cadr loc) thi) cir2 "")

    (car loc) returns X coordinate of loc
    (cadr loc) returns Y coordinate of loc
    (caddr loc) returns Z coordinate of loc - not necessary for your routine
    (just for your information)

    Notes -
    I do not believe you need "" at the end of the circle command.
    Also, according to your program, where is cir3 variable set?
     
    Alan Henderson @ A'cad Solutions, May 4, 2004
    #2
  3. Adesu

    PG. Guest

    (subst 1.0 0.0 loc) ;; => (25 20 1.0)

     
    PG., May 4, 2004
    #3
  4. Adesu

    Adesu Guest

    Hi Alan,you are right,thanks a lot
    this my program not yet ready,next if finish I 'll send you
     
    Adesu, May 5, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.