Line hops...

Discussion in 'AutoCAD' started by Dave, Dec 14, 2004.

  1. Dave

    Dave Guest

    Does ACAD have the ability to do automatic "line hops"?
    This is where one line crosses another and a little half circle is drawn to
    show they don't intersect.
     
    Dave, Dec 14, 2004
    #1
  2. Not automatically, but you could probably create one using LISP - post in
    the customization newsgroup for more info
     
    Casey Roberts, Dec 14, 2004
    #2
  3. Dave

    TomDe Guest

    This is a copy of my menu item, it could be modified for a button by the
    removal of the "+" and making it all one line.
    [Line
    Leap]^C^C_line;_nea;\_int;\;_erase;_last;;_break;@-3.5<$M=$(angtos,$(getvar,+
    lastangle));@7.0<$M=$(angtos,$(getvar,lastangle));_arc;@;_e;@-7.0<$M=$(angtos,$(getvar,lastangle));_a;-180;
    [ (NOTE: Select the Leap Lines Color before]
    [ invoking Leap Line Command)]
    Please note that this macro will deliver a line hop with an arc diameter
    of 7, this can be changed.
    To invoke:
    1. Select the line that will have the "hop".
    2. Select the intersection.

    Many thanks to Steph Yoder who helped me work this out several years ago.
     
    TomDe, Dec 15, 2004
    #3
  4. As long as you do not have a running OSMODE...
     
    Tracy W. Lincoln, Dec 19, 2004
    #4
  5. Dave

    Walt Engle Guest

    I got a lisp routin for this a long time ago from Cadalyst.
     
    Walt Engle, Dec 19, 2004
    #5
  6. Care to post or point to or recite the issue?
     
    Tracy W. Lincoln, Dec 19, 2004
    #6
  7. Try these on either a toolbar icon as a macro or tool pallette... (assuming
    1/8th unit arc or break) the * repeats the command, the osmode;0; clear up
    the prolem with the listed code... someone might want to chirp in and add
    the code to capture & reset the users OSMODE before and after running this.

    Hooper

    *^c^c_osmode;0;_line;_nea;\_int;\;_erase;_last;;_break;@-.0625<$M=$(angtos,$(getvar,lastangle));@0.125<$M=$(angtos,$(getvar,lastangle));_arc;@;_e;@-0.125<$M=$(angtos,$(getvar,lastangle));_a;180;

    Breaker

    *^c^c_osmode;0;_line;_nea;\_int;\;_erase;_last;;_break;@-.0625<$M=$(angtos,$(getvar,lastangle));@0.125<$M=$(angtos,$(getvar,lastangle));

    And yes, many thanks to Steph Yoder on a variety of levels/subjects of help.
     
    Tracy W. Lincoln, Dec 19, 2004
    #7
  8. Dave

    Walt Engle Guest

    I have no idea now - something about line hops used in elec circutry.
     
    Walt Engle, Dec 19, 2004
    #8
  9. Dave

    Walt Engle Guest

    I found it for you. See below:

    ; LCR.LSP
    ; PRODUCES ONE-EIGHT RADIUS HUMPS ON CROSSING LINES
    ; FROM CADALYST, JUNE 1997
    ;
    (defun c:lcr (/ ar ln ol os in p1 p2 p3 p4 line1 line2 ent1 ent2 an
    bpt1 bpt2)
    (setvar "cmdecho" 0)
    (setq ar 0.125) ;RADIUS OF HUMPS
    (setq os (getvar "osmode"))
    (setvar "osmode" 0)
    (setq ol (getvar "clayer"))
    (setq ent1 (car (entsel "\nSelect line for half cirle (HUMP): ")))
    (setq line1 (entget ent1))
    (setq ln (cdr (assoc 8 line1)))
    (setq p1 (cdr (assoc 10 line1)))
    (setq p2 (cdr (assoc 11 line1)))
    (setq an (angle p1 p2))
    (setq ent2 (car (entsel "\nSelect line to cross over: ")))
    (setq line2 (entget ent2))
    (setq p3 (cdr (assoc 10 line2)))
    (setq p4 (cdr (assoc 11 line2)))
    (setq in (inters p1 p2 p3 p4))
    (setq bpt1 (polar in an (* ar (getvar "dimscale"))))
    (setq bpt2 (polar in (+ an pi) (* ar (getvar "dimscale"))))
    (command "break" ent1 bpt1 bpt2)
    (if (or (> (car bpt1)(car bpt2))(> (cadr bpt1)(cadr bpt2)))
    (command "arc" bpt1 "e" bpt2 "r" (* ar (getvar "dimscale")))
    (command "arc" bpt2 "e" bpt1 "r" (* ar (getvar "dimscale")))
    )
    (setvar "osmode" os)
    (princ)
    )
     
    Walt Engle, Dec 19, 2004
    #9
  10. Dave

    hendie Guest

    You could also try the XCR routine available from the free downloads section of www.resourcecad.com
     
    hendie, Dec 20, 2004
    #10
  11. Dave

    JMT Guest

    Should have become a standard Express Tool. Thanks for posting the Lisp.

    Jack Talsky
     
    JMT, Dec 24, 2004
    #11
  12. Dave

    Walt Engle Guest

    You're welcome
     
    Walt Engle, Dec 24, 2004
    #12
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.