Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: how to discern whether a point is entered by clicking with the mouse or direct distance.

  1. #11
    Member
    Join Date
    2012-08
    Posts
    8
    Login to Give a bone
    0

    Default Re: how to discern whether a point is entered by clicking with the mouse or direct distance.

    I cant find the solution ussing getkword and getpoint at once. What about ussing grread. Do you know how grread must be used?.
    Last edited by jordigort; 2012-08-19 at 06:13 AM.

  2. #12
    Member
    Join Date
    2012-08
    Posts
    8
    Login to Give a bone
    0

    Default Re: how to discern whether a point is entered by clicking with the mouse or direct distance.

    Hi,
    I can't say that i found the solution but i'm satisfied with what I have got.
    In my case rarely the user will need to point a point in a free place of the screen with the mouse because he will know the exact measure. So, he will introduce the distance with a "direct distance". What i have solved is the common situation in which the user has to point a point in the screen in the reduction angle and in a " final point " "mid point" ... of an entity. In this situation I'm already able to reduce the distance.

    if you are so kind to look at the application and give me your opinion I appreciate it

    The new command "da" loads the angles of a "din5 perspective" whith a reduccion of 0.66.
    The new command "xx" allows you to draw in the proper angles and reduction.

    If you don't understand how the aplication runs I can show you.

    Thanks
    ------------------------------------------------------------------------------------------
    ;; da Dibuix de perspectives axonomètriques.


    (defun c:da ()

    (setq ;; exemple d'una perspectiva Din5 amb reducció a de l'esquerre de 0.666
    c_red 0.666
    ang1 90
    ang2 270
    ang3 172.819
    ang4 352.819
    ang5 41.41 dred1 ang5
    ang6 221.41 dred2 ang6
    )






    (setvar "auprec" 3)
    (setvar "polarmode" 6)
    (setvar "autosnap" 63)
    (setvar "polaraddang" (strcat (rtos ang1 2 3) ";"
    (rtos ang2 2 3) ";"
    (rtos ang3 2 3) ";"
    (rtos ang4 2 3) ";"
    (rtos ang5 2 3) ";"
    (rtos ang6 2 3)
    )
    )
    )

    (defun cx()
    (setvar "aperture" 15)
    (terpri)
    (setq p1 (getpoint "punt d'inici"))
    (terpri)
    (setq ctr t)

    (while ctr
    (setq p2 (getpoint p1 "punt següent"))
    (setq ang_1_2 (/ (* (angle p1 p2) 180)PI) )

    (if (or (<= (abs (- ang_1_2 dred1)) 0.01)
    (<= (abs (- ang_1_2 dred2)) 0.01))
    (progn
    (terpri)
    (setq x1 (car p1) y1 (cadr p1))
    (setq x2 (car p2) y2 (cadr p2))
    (setq x3 (+ (* (- x2 x1) c_red) x1))
    (setq y3 (+ (* (- y2 y1) c_red) y1))
    (setq x4 (+ x2 (/(- x2 x1 )10000)))
    (setq y4 (+ y2 (/(- y2 y1 )10000)))
    (setq p3 (list x3 y3))
    (setq p4 (list x4 y4))
    (command "punto" p4)
    (setq p5 (cdr (assoc 10 (entget (entlast)))))
    (entdel (entlast))
    (setq dist_2_5 (distance p2 p5))
    (if (= 0 dist_2_5)()
    (setq p2 p3)
    )
    )
    )

    (setq v_aperture (getvar "aperture"))
    (setvar "aperture" 1)
    (command "linea" p1 p2 "")
    (setvar "aperture" v_aperture)
    (setq p1 p2)

    )
    )

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 19
    Last Post: 2014-01-17, 11:16 AM
  2. 2013: Move/Copy direct distance cause random results
    By mick1963 in forum AutoCAD LT - General
    Replies: 1
    Last Post: 2013-12-20, 01:06 PM
  3. Replies: 1
    Last Post: 2013-11-19, 07:33 PM
  4. direct distance entry
    By mdsalman2003 in forum AutoCAD General
    Replies: 3
    Last Post: 2010-06-10, 10:37 PM
  5. Object snap tracking problem with direct distance entry
    By Jeff Lyon in forum AutoCAD LT - General
    Replies: 4
    Last Post: 2007-08-20, 07:11 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
  •