Author Topic: Break routine  (Read 2787 times)

0 Members and 1 Guest are viewing this topic.

TJAM51

  • Guest
Break routine
« on: January 04, 2008, 08:27:41 AM »
Does anyone have a break routine that is set to s specific distance for lines that intersect. or cross?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Break routine
« Reply #1 on: January 04, 2008, 08:40:48 AM »
I've seen several but this is all my search came up with:
http://tinyurl.com/2nmdrc
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

TJAM51

  • Guest
Re: Break routine
« Reply #2 on: January 04, 2008, 08:43:08 AM »
This does not look like a complete lisp...sorry...

... )
;;;(setq gap (getreal (strcat "\nEnter Break Gap Distance " "<" (rtos gap2)
">" ": ")))
; ...
... )
;;;(setq gap (getreal (strcat "\nEnter Break Gap Distance " "<" (rtos gap2) ">" ": ")))
; ...

daron

  • Guest
Re: Break routine
« Reply #3 on: January 04, 2008, 08:48:55 AM »
What's wrong with it?

Guest

  • Guest
Re: Break routine
« Reply #4 on: January 04, 2008, 08:51:28 AM »
What's wrong with it?
It's all commented out!!    :wink:

M-dub

  • Guest
Re: Break routine
« Reply #5 on: January 04, 2008, 10:03:42 AM »
This is one that I've had for quite a while.  It's pretty good, but your mileage may vary.  :)
From Cadalyst...


Code: [Select]
;Tip1719:  HVBA.LSP         Break crossing lines  (c)2001, Azfar Mahmood $50 Bonus Winner

(defun C:HVBA  (/ INGET FPT GETD ENAME ENAME1 ENT1 ENT2 SS1 SS2 SS3 SS4)
  (setvar
    "cmdecho"
    0)
  (initget "H V")
  (setq INGET
         (getkword
           "\n<H>orizontal <V>ertical Break <H>=> :"))
  (setq GETD
         (getreal
           "\nBreak Length ---- | ----: "))
  (prompt
    "\nNow move Crosshairs near each intersection to break <press Enter to stop> :")
  (setq ENAME "LINE")
  (setq ENAME1
         "LINE")
  (while
    GETD
     (setq FPT (osnap (cadr (grread 1)) "int"))
     (if (/= FPT
             NIL)
       (setq SS1
                  (nentselp (polar FPT 0.00 GETD))
             SS2  (nentselp (polar FPT
                                   3.14
                                   GETD))
             SS3  (nentselp (polar FPT 1.57 GETD))
             SS4  (nentselp (polar
                              FPT
                              4.71
                              GETD))
             ENT1 (ssget (polar FPT 0.00 GETD))
             ENT2 (ssget (polar FPT
                                1.57
                                GETD))))
     (if
       (and (/= ENT1 NIL) (/= ENT2 NIL))
        (progn (setq ENAME (cdr (assoc 0
                                       (entget (ssname
                                                 ENT1
                                                 0)))))
               (setq ENAME1 (cdr (assoc 0
                                        (entget (ssname ENT2
                                                        0)))))))
     (if (and (/=
                ENAME
                "LINE")
              (/= ENAME "LWPOLYLINE")
              (or (= INGET "H")
                  (= INGET
                     NIL)))
       (progn (print "Entity is not a Line or Polyline")
              (setq FPT
                     NIL)))
     (if (and
           (/= ENAME1 "LINE")
           (/= ENAME1 "LWPOLYLINE")
           (= INGET
              "V"))
       (progn (print "Entity is
             not a Line or Polyline")
              (setq FPT NIL)))
     (if (and (/= FPT NIL)
              (/=
                SS1
                NIL)
              (/= SS2
                  NIL)
              (/= SS3 NIL)
              (/= SS4 NIL)
              (or (= INGET "H")
                  (= INGET
                     NIL)))
       (command ".BREAK"
                (cadr SS1)
                (cadr SS2)))
     (if (and (/= FPT NIL)
              (= INGET "V")
              (/=
                SS1
                NIL)
              (/= SS2
                  NIL)
              (/= SS3 NIL)
              (/= SS4 NIL))
       (command ".BREAK"
                (cadr SS3)
                (cadr
                  SS4))))) ;EOF

craigr

  • Guest
Re: Break routine
« Reply #6 on: January 04, 2008, 11:29:53 AM »
Here is a macro that someone Generously gave me a few years ago. - I apologize but I don't remember who gets the credit.

It works flawless for us.

*^C^C_osnap;off;_ID;INT;\BREAK;@-.05,0;@.1,0;

craigr

deegeecees

  • Guest
Re: Break routine
« Reply #7 on: January 04, 2008, 11:34:30 AM »
For my routine, I simply pour a cup of java, then add a little hazelnut, and go talk to one of the secretaries or visit the guys in the shop. It's all automated.

daron

  • Guest
Re: Break routine
« Reply #8 on: January 04, 2008, 12:25:38 PM »

Josh Nieman

  • Guest
Re: Break routine
« Reply #9 on: January 04, 2008, 12:53:54 PM »
For my routine, I simply pour a cup of java, then add a little hazelnut, and go talk to one of the secretaries or visit the guys in the shop. It's all automated.

 :lmao: