Automatic Line Break

Discussion in 'AutoCAD' started by ardrinj, Jul 10, 2003.

  1. ardrinj

    ardrinj Guest

    Hi,
    Anyone Please who could share a sample AutoLisp on how to break several intersecting lines.

    Thanks,
    Ardrinj
     
    ardrinj, Jul 10, 2003
    #1
  2. ardrinj

    gbednar Guest

    I have AutoCAD 2000 w/ Mechanical Power Pak. It has an Icon in a tool bar that may do what your asking. the command is ^C^Cambreakatpt . It lets you select an a snap point and then select which lines you want to break. Hope this helps.

    George
     
    gbednar, Jul 10, 2003
    #2
  3. ardrinj

    alex Guest

    perhaps this will work. 



     



    ;brl.lsp by alex konieczka
    ; breaks a bunch of lines across a line you draw.



     



    (defun c:brl ()
    (setq p1 (getpoint "Pick first point on breakline: "))
    (setq p2 (getpoint p1 "Pick second point on breakline: ") P3 (* 0.005 (GETVAR "VIEWSIZE")))
    (perpen p1 p2 P3)
    (command "line" tpt3 tpt6 "")(setq e1 (entlast))
    (command "line" tpt4 tpt5 "")(setq e2 (entlast))
    (command "trim" e1 e2 "" "f" p1 p2 "" "" "erase" e1 e2 "")
    (princ))



     



    ; perpen returns the perpendicular offset points (tpt3 tpt4 tpt5 tpt6) of two points and distance (di) passed to it
    (defun perpen (tpt1 tpt2 offst / )
    (setq tpt3 (polar tpt1 (+ (angle tpt1 tpt2) (/ pi 90)) offst))
    (setq tpt4 (polar tpt2 (+ (angle tpt1 tpt2) (/ pi 90)) offst))
    (setq tpt3 (polar tpt1 (- (angle tpt1 tpt2) (/ pi 2)) offst))
    (setq tpt4 (polar tpt1 (+ (angle tpt1 tpt2) (/ pi 2)) offst))
    (setq tpt5 (polar tpt2 (- (angle tpt2 tpt1) (/ pi 2)) offst))
    (setq tpt6 (polar tpt2 (+ (angle tpt2 tpt1) (/ pi 2)) offst))
    )




     



    "ardrinj" <> wrote in message news:...

    Hi,
    Anyone Please who could share a sample AutoLisp on how to break several intersecting lines.

    Thanks,
    Ardrinj
     
    alex, Jul 10, 2003
    #3
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.