BREAK lines with gap

Discussion in 'AutoCAD' started by Matt W, Oct 27, 2004.

  1. Matt W

    Matt W Guest

    A while ago I saw some code that would BREAK with a gap multiple lines that
    intersected a selected line.
    Does anyone know where I might find it or would someone be willing to
    share??

    Thanks in advance!
     
    Matt W, Oct 27, 2004
    #1
  2. Matt W

    Matt W Guest

    That would be ideal.


    --
    I support two teams: the Red Sox and whoever beats the Yankees.


    Do you want one that breaks anything that it crosses?

    Yes and no.
    Sort of on the right track.

    I'd like to be able to select one line, pline, arc, etc... then select
    multiple lines, plines, arcs, etc... to be broken and NOT have to enter a
    distance or pick any other points on screen.

    Maybe these images will help.





    --
    I support two teams: the Red Sox and whoever beats the Yankees.


    | Hi Matt
    |
    | Did you mean this one?
    |
    | Cheers
    | --
    | Juerg Menzi
    | MENZI ENGINEERING GmbH, Switzerland
    | http://www.menziengineering.ch
     
    Matt W, Oct 27, 2004
    #2
  3. Matt W

    Adesu Guest

    Hi Matt,you can try my code

    ; bcl is stand for break cross a line
    ; Design by Ade Suharna <>
    ; 24 October 2004
    ; Program no.126/10/2004
    ; Edit by
    (defun c:bcl (/ ent entdata data10 data11 len
    e edata edata10 edata11 elen entang
    eang ent1 ent2 e1 e2 inter space
    p1 p2 p3)
    (while
    (setq ent (car (entsel "\nSELECT A LINE: "))
    entdata (entget ent)
    data10 (cdr (assoc 10 entdata))
    data11 (cdr (assoc 11 entdata))
    len (distance data10 data11)
    entang (angle data10 data11))
    (while
    (setq e (car (entsel "\nSELECT A LINE TO WOULD BREAK: "))
    edata (entget e)
    edata10 (cdr (assoc 10 edata))
    edata11 (cdr (assoc 11 edata))
    elen (distance edata10 edata11)
    eang (angle edata10 edata11)
    ent1 data10
    ent2 data11
    e1 edata10
    e2 edata11
    inter (inters ent1 ent2 e1 e2 nil)
    opt 2 ; set here break distance
    space (/ opt 2.0)
    p1 inter
    p2 (polar p1 (* (+ eang pi) -1) space)
    p3 (polar p2 (+ eang pi) opt))
    (command "_break" e p2 p3 "")
    (princ)
    )
    )
    )
     
    Adesu, Oct 28, 2004
    #3
  4. Matt W

    Matt W Guest

    Thanks Juerg.
    Looks like this will do the trick!
     
    Matt W, Oct 28, 2004
    #4
  5. Matt W

    Jürg Menzi Guest

    Welcome...¦-)

    Cheers
     
    Jürg Menzi, Oct 29, 2004
    #5
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.