Author Topic: break at point question  (Read 5412 times)

0 Members and 1 Guest are viewing this topic.

ELOQUINTET

  • Guest
break at point question
« on: September 29, 2004, 04:03:29 PM »
just out of curiousity, when i use the break at point command it works fine but if i hit enter to do it again it screws up the line like this:

             |
 line 1    |   gap  line 2
   ______|   _________
             |
             |
forgive the crude drawing :oops:

ELOQUINTET

  • Guest
break at point question
« Reply #1 on: September 29, 2004, 04:04:53 PM »
ah not what my screen showed basically it doesn't break it clean it puts a gap on one side

Dommy2Hotty

  • Swamp Rat
  • Posts: 1127
break at point question
« Reply #2 on: September 29, 2004, 04:08:36 PM »
Not that this is what you're looking for, but here's the Menu Macro I made...I could change it to a LISP for ya if you wanted, so that you could hit "ENTER" to re-initiate it.

Code: [Select]

[Break @ Selected Point]^C^C^C^P(setq ent(entsel "Select Object to Break...")) \(setq pt(getpoint "Select Break Point...")) \break;!ent;f;!pt;!pt;^P

Kate M

  • Guest
break at point question
« Reply #3 on: September 29, 2004, 04:41:10 PM »
I think that's just how macros work -- you can't re-initiate "break at point" without hitting the button again.

Dommy, a lisp would be cool, though. :-)

CADaver

  • Guest
Re: break at point question
« Reply #4 on: September 29, 2004, 04:48:59 PM »
Quote from: eloquintet
just out of curiousity, when i use the break at point command it works fine but if i hit enter to do it again it screws up the line like this:

             |
 line 1    |   gap  line 2
   ______|   _________
             |
             |
forgive the crude drawing :oops:
The macro issues the BREAK command and fills in the second point for you.  When you hit the enter key it just repeats the BREAK command.  You'll need a lisp function for it to repeat ant the enter key.

whdjr

  • Guest
break at point question
« Reply #5 on: September 29, 2004, 04:52:52 PM »
Here's a lisp I wrote to do just that:
Code: [Select]
(defun c:bk (/ ent)
  (command "break"
  (setq ent (entsel "\nPick point to break Object:  "))
  (cadr ent)
  )
  (princ)
)

Try it you might like it.

Dommy2Hotty

  • Swamp Rat
  • Posts: 1127
break at point question
« Reply #6 on: September 29, 2004, 04:56:47 PM »
Quote from: Kate M
Dommy, a lisp would be cool, though. :-)

Download BAP.LSP

Code: [Select]
;;***********************************************
;;                  BAP.lsp                     *
;;           Break At selected Point            *
;;          Created by Dominic Cesare           *
;;             Dommy2Hotty@aol.com              *
;;                 09.29.2004                   *
;;***********************************************

(prompt "\nType BAP to run.....")

;;**********************
;;Start of Routine     *
;;**********************

(defun c:BAP (/ oldecho ent pt)

  ;error trapping
  (setq temperr *error*)
  (setq *error* trap1)

  ;current variables
  (setq oldecho (getvar "cmdecho"))

  ;turning off echo
  (setvar "cmdecho" 0)

  ;setting undo beginning
  (command "undo" "begin")

  ;user supplied information
  (setq ent (entsel "Select Object to Break....."))
  (setq pt (getpoint "Select Break Point....."))

  ;break command using user information
  (command "break" ent "f" pt pt)

  ;error trapping
  (setq *error* temperr)

  ;setting undo end
  (command "undo" "end")
 
  ;resetting echo
  (setvar "cmdecho" oldecho)
  (princ)
  )

;defining error trapping
(defun trap1 (errmsg)
  (command "u")
  (setvar "cmdecho" oldecho)
  (setq *error* temperr)
  (prompt "Resetting System Variables...")
  (princ)
  )

;;**********************
;;End of Routine       *
;;**********************

ELOQUINTET

  • Guest
break at point question
« Reply #7 on: September 30, 2004, 11:22:41 AM »
ah i had forgotten i's posted this question so busy yesterday. works great dommy just what the doctor ordered thanks a bunch that's goin in my nostromo 52  :wink:

Dommy2Hotty

  • Swamp Rat
  • Posts: 1127
break at point question
« Reply #8 on: September 30, 2004, 11:25:11 AM »
Quote from: eloquintet
ah i had forgotten i's posted this question so busy yesterday. works great dommy just what the doctor ordered thanks a bunch that's goin in my nostromo 52  :wink:


No problem...nothing fancy at all, really...

ELOQUINTET

  • Guest
break at point question
« Reply #9 on: September 30, 2004, 11:34:17 AM »
K.I.S.S.

keep it simple stoopid  :P

Dommy2Hotty

  • Swamp Rat
  • Posts: 1127
break at point question
« Reply #10 on: September 30, 2004, 11:46:32 AM »
Quote from: eloquintet
K.I.S.S.

keep it simple stoopid  :P


 :lol: Changed the order in the LISP...set the echo back too soon...so all you'll see now (if you re-download it) would be the prompts for the line and the point...

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
break at point question
« Reply #11 on: September 30, 2004, 01:46:50 PM »
Here is another simple one.

Code: [Select]
(defun C:BRAT(/ user)
  ;(setvar "CMDECHO" 0)
  (setq user (getvar "OSMODE"))
  (command "OSNAP" "int")
  (command "_.BREAK" pause "F" pause "@")
  (setvar "OSMODE" user)
  ;( setvar "CMDECHO" 1)
)
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.

whdjr

  • Guest
break at point question
« Reply #12 on: September 30, 2004, 03:56:29 PM »
Quote from: CAB
Here is another simple one.

Wasn't mine simple enough????
Quote from: whdjr
Here's a lisp I wrote to do just that:
Code:
(defun c:bk (/ ent)
  (command "break"
      (setq ent (entsel "\nPick point to break Object:  "))
      (cadr ent)
  )
  (princ)
)

Try it you might like it.

PDJ

  • Guest
break at point question
« Reply #13 on: September 30, 2004, 07:16:56 PM »
OK CAB, that's SCARY!!  Here's the code I use:

Code: [Select]
(defun C:BRAT()
  (setq user (getvar "OSMODE"))
  (command "OSNAP" "int")
  (command "BREAK" pause "F" pause "@")
  (setvar "OSMODE" user)
)



Great minds think alike I reckon..

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
break at point question
« Reply #14 on: September 30, 2004, 09:53:41 PM »
Quote from: PDJ
OK CAB, that's SCARY!!  Here's the code I use:

Code: [Select]
(defun C:BRAT()
  (setq user (getvar "OSMODE"))
  (command "OSNAP" "int")
  (command "BREAK" pause "F" pause "@")
  (setvar "OSMODE" user)
)



Great minds think alike I reckon..

Paul,
Did we steal it from the same place? :)  Or maybe I stole yours. :D
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
break at point question
« Reply #15 on: September 30, 2004, 10:04:47 PM »
Quote from: whdjr
Quote from: CAB
Here is another simple one.

Wasn't mine simple enough????
Quote from: whdjr
Here's a lisp I wrote to do just that:
Code:
(defun c:bk (/ ent)
  (command "break"
      (setq ent (entsel "\nPick point to break Object:  "))
      (cadr ent)
  )
  (princ)
)

Try it you might like it.


It was fine, I was just sharing my old routine.
Yours works with one click, very nice. But Osnaps will foil it.
I think I would do it this way.
Code: [Select]
(defun c:bk (/ ent)
  (and (setq ent (entsel "\nPick point to break Object: "))
       (command ".break" ent "non" (cadr ent)) )
  (princ)
)


I like the two pick because it assure the correct line is broken when picking
at an intersection.
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
break at point question
« Reply #16 on: September 30, 2004, 10:38:55 PM »
Here is another one point pick that uses crosshair ILO pick box.
Code: [Select]
;;  Break at pick point with cross hair
;;  Pick point is osnaps sensitive, can cause selection
;;  of wrong object or point, press F3 if needed
(defun c:bk (/ pt ent)
  (and (setq pt (getpoint "\nPick point to break Object: "))
       (setq ent (nentselp pt))
       (command ".break" ent "non" pt))
  (princ)
)
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.

whdjr

  • Guest
break at point question
« Reply #17 on: October 01, 2004, 09:05:48 AM »
Quote from: CAB
It was fine, I was just sharing my old routine.
Yours works with one click, very nice. But Osnaps will foil it.
I think I would do it this way.


Running osnaps don't work while using entsel unless you type it in, at least in A2K.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
break at point question
« Reply #18 on: October 01, 2004, 09:17:35 AM »
With MID on select a point very close to the mid point on a line.
In ACAD2000 a small gap is removed because the picked point is
not at the mid point and the second point (cadr ent) is affected
by the snap and goes to the mid point of the line.
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.

whdjr

  • Guest
break at point question
« Reply #19 on: October 01, 2004, 09:44:01 AM »
Quote from: CAB
With MID on select a point very close to the mid point on a line.
In ACAD2000 a small gap is removed because the picked point is
not at the mid point and the second point (cadr ent) is affected
by the snap and goes to the mid point of the line.

I was talking my code.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
break at point question
« Reply #20 on: October 01, 2004, 10:03:37 AM »
Quote from: whdjr
Quote from: CAB
With MID on select a point very close to the mid point on a line.
In ACAD2000 a small gap is removed because the picked point is
not at the mid point and the second point (cadr ent) is affected
by the snap and goes to the mid point of the line.

I was talking my code.

So am I :)
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.