Dwg precision and Osnap

Discussion in 'AutoCAD' started by Marc'Antonio Alessi, Jan 26, 2005.

  1. I have 2 line with common endpoint with a very
    little Y difference:

    (for the functions see below)

    Comando: ALE_SHOWPRECISION
    Select object: <<< select 1° line
    55.24999997642098 - 21.50000000003609 <<< PtX
    134.2499999764369 - 21.50000000003609

    Comando: ALE_SHOWPRECISION
    Select object: <<< select 2° line
    55.24999997642098 - 15.5
    55.24999997642098 - 21.5 <<< PtX

    Comando: _line
    First point: _int <<< intersec of 2 lines (PtX)
    Next point: 0,0

    Comando: ALE_SHOWPRECISION
    Select object: <<< select new line (3°)
    55.24999997642098 - 21.50000000003609 <<< PtX
    0 - 0

    Y 1° line = 21.50000000003609
    Y 2° line = 21.5
    Y 3° line = 21.50000000003609

    --

    Questions:

    1) what is the minimum distance to get an osnap error

    2) why the new line (3°) has the Y of 1° line and
    not the Y of 2° line

    --

    (defun C:ALE_ShowPrecision ( / EntNam EntDat Pnt001 Pnt002)
    (setq
    EntNam (car (nentsel "\nSelect object: "))
    EntDat (entget EntNam)
    Pnt001 (cdr (assoc 10 EntDat))
    )
    (princ (strcat "\n" (rtos (car Pnt001) 2 16)))
    (princ (strcat " - " (rtos (cadr Pnt001) 2 16)))
    (cond
    ( (wcmatch (DXF 0 EntDat) "LINE,TEXT,ATTRIB,ATTDEF")
    (setq Pnt002 (cdr (assoc 11 EntDat)))
    (princ (strcat "\n" (rtos (car Pnt002) 2 16)))
    (princ (strcat " - " (rtos (cadr Pnt002) 2 16)))
    )
    ( (= (DXF 0 EntDat) "LWPOLYLINE")
    (foreach ForElm (cdr (ALE_Massoc 10 EntDat))
    (princ (strcat "\n" (rtos (car ForElm) 2 16)))
    (princ (strcat " - " (rtos (cadr ForElm) 2 16)))
    )
    )
    )
    (princ)
    )
    ; Orginal by M. Puckett
    (defun ALE_MAssoc (DxfKey ImpLst / TmpLst OutLst)
    (while (setq TmpLst (assoc DxfKey ImpLst))
    (setq OutLst (cons (cdr TmpLst) OutLst)
    ImpLst (cdr (member TmpLst ImpLst))
    )
    )
    (reverse OutLst)
    )


    --

    Marc'Antonio Alessi
    http://xoomer.virgilio.it/alessi
    (strcat "NOT a " (substr (ver) 8 4) " guru.")

    --
     
    Marc'Antonio Alessi, Jan 26, 2005
    #1
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.