Break command: a way to be faster breacking line in te same point without selecting "F" "@"??
Hello all,
please can you help me finding a way to break lines just in 2 clicks, without selecting "f" a then "@" to split line in the same point?
I really don't know why it is so complex...
are there variables about break command where you can define how I would break the line??
Thanks!
Riccardo
please can you help me finding a way to break lines just in 2 clicks, without selecting "f" a then "@" to split line in the same point?
I really don't know why it is so complex...
are there variables about break command where you can define how I would break the line??
Thanks!
Riccardo
0
Comments
-
One mouse click to select the entity, and then a single click at the break point.
Even if you remove the second line of code, it still won't accept pre-selection, which always annoys me.
(defun c:aBreak ()
(sssetfirst nil nil)
(setq ent1 (entsel "Select Object: "))
(setq bp1 (getpoint "Break point: "))
(setq bp2 bp1)
(command "Break" ent1 "F" "_non" bp1 "_non" bp2)
)0 -
The OP, like me, wants to split the line at one point, with no bit of line chopped out. Anthony's method chops out the line between the two clicks.Anthony Apostolaros said:One mouse click to select the entity, and then a single click at the break point.
0 -
@Anthony Apostolaros:
(defun c:aBreak ( / bp1 ent1 ss) (setq ent1 (if (setq ss (ssget "_I")) (list (ssname ss 0) '(0 0 0)) (entsel "Select Object: ") ) ) (setq bp1 (getpoint "Break point: ")) (command "_.break" ent1 "_first" "_non" bp1 "_non" bp1) (princ) )
0 -
For me, in an older version of Bricscad, it breaks only at one point. I don't see how it could break at two points. The first mouse click only selects the entity to be broken. The point clicked for that selection isn't used by the code. The second click point is passed to the Break command as both of the break points that are allowed after the F option is selected.Tom Foster said:.... Anthony's method chops out the line between the two clicks.
But that's a moot point, since Roy's version is much better. It allows pre-selection of the entity to be broken, though I don't understand why it does. Thank you, Roy!
0 -
If only! Not for me, forever in both Acad and Bcad. Acad used to have a separate icons for Break at Point vs Break incl chop a bit out of the line - AFAIK the latter is 'standard' and the former takes extra clicks.Anthony Apostolaros said:The first mouse click only selects the entity to be broken
Or the latter is unreliable if trying to do it by the standard two clicks, because which of two intersecting lines is being selected (at the intersection) with the first click, before the second click defines the break point at the same intersection point?
0 -
"which of two intersecting lines is being selected"
Yes 2 picks breaking/cut line, line to be broken. A pretty simple lisp that works out the intersection point and makes 2 objects. Can be arc, line or pline. Circle may have 2 solutions.
Sure I have seen break using @.
(setq ent (car (entsel)))
Select entity: picked line to be broken
: BREAK
Select entity to break: !ent
1 found.
pick int pt twice
First break point:
Second break point:
2 lines now0 -
Tom, I wonder if we're talking about the same thing. Of course the built-in Break command works the way you described. Are you saying that the custom aBreak command posted above works the same way? I don't see how it could.Tom Foster said:
If only! Not for me, forever in both Acad and Bcad. Acad used to have a separate icons for Break at Point vs Break incl chop a bit out of the line - AFAIK the latter is 'standard' and the former takes extra clicks.Anthony Apostolaros said:The first mouse click only selects the entity to be broken
Or the latter is unreliable if trying to do it by the standard two clicks, because which of two intersecting lines is being selected (at the intersection) with the first click, before the second click defines the break point at the same intersection point?
I created my now-obsolete version of it probably at least 30 years ago, for use in AC, and have used it ever since, up to BC v17. It just passes the "F" option to the built-in command, and then passes a single user-selected point to it as both break points. If it breaks at two different points, where does it get the other point?
The (entsel) function returns a point as well as an entity name, but the first click in the built-in Break command does that too. The point is ignored if you use the "F" option. So passing that option to the command should make the command ignore the point returned by (entsel).
Roy's version does the same thing. His version also provides an alternative of getting the entity name via the (ssget) and (ssname) functions, which doesn't return a point and doesn't suppress pre-selection. As I've just learned, entsel doesn't accept pre-selection. But Roy's version doesn't change anything else. Do you get chopping between 2 points with Roy's version of aBreak? Even with pre-selection?0 -
Sorry, Anthony, wasn't commenting on your or Roy's admirable (but incomprenensible to me) lisp above, and I'm not sure what kind of thing AlanH's (setq ent (car (entsel))) etc is.
At last taking the time to decipher current dumbed-down Help (pre-dumbing v18 saved pdf no better, unusually) I finally get how to use * to break at point; BR>click to select>Enter>F>click to choose break point>@ - 6 steps - like OP originally said - but has hitherto confused because the option to choose @ has by then disappeared from the command line. Is proving revolutionary already - such is the progress to CAD guruship!
Compare with BR>click to select and choose first point>click to choose second point to break with gap - 3 steps.
Pity we don't have separate icons (and separate type-at-CommandLine) for Break at Point vs Break with Gap, like in Acad. Not even on the Quad.
Another revolutionary discovery is Lengthen Dynamically on the Quad, which works a dream compared with multi-step LEN on the Command line.
0 -
You don't have to understand lisp code in order to use it. I don't understand all of Roy's code. You can just copy his version of aBreak and paste it into a plain text file in Notepad, and then save it as aBreak.lsp. Or download the attached file.Tom Foster said:... incomprenensible ...
Then pull down Tools > Load Application, click on the "Add application file" icon, browse to aBreak.lsp, and tick the Autoload box next to the aBreak.lsp entry that will appear in the chart. After that, it will always be available as a command, and in Tools > Customize you can assign a Toolbar icon, Keyboard shortcut, or Command alias to it.
0 -
I do love 'for idiots' step-by-step instructions like that - life-changing!0
-
here is a lisp that brake a line in a selected point without deleiting any part of it.
1. run the lisp.
2. select a line or polyline.
3. pick the braking point & enter.
(defun c:Brk_Fp ()
(if (and
(setq ss (ssget ":S"))
(setq pt (getpoint "\nSelect break point: "))
)
(progn
(setq ename (ssname ss 0))
(command "_.break" ename "_none" pt "_none" pt)
)
)
(princ)
)0