Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lisp program

Status
Not open for further replies.

bigplc

Civil/Environmental
Jan 26, 2005
21
0
0
i have found a lisp program that breaks a line at a intersection but when that happens it puts a space between where it use to be. i guess what im looking for is how to use this same lisp but i don't want it to break i want it to stay connected but in two segments like a boundary break. here is the lisp thxs

;To cut one line at intersection
;created by Claude Breden sept. 99
;tous droits reserves

(defun rtd (a)
(/ (* a 180.0) pi)
)

(defun dtr (a)
(* pi (/ a 180.0))
)

(defun c:Coupint()

(setvar "osmode" 512)
(setq p1 (getpoint "\nPick line to cut"))

(setvar "osmode" 32)
(setq p2 (getpoint "\nPick intersection")
an (angle p1 p2)
txh (getvar "textsize")
p3 (polar p2 (+ an (dtr 180)) (/ txh 1.5))
p4 (polar p2 an (/ txh 1.5)))
(setvar "osmode" 0)

(command "break" p1 "f" p3 p2 "break" p4 "f" p4 p2)


)


 
Replies continue below

Recommended for you

Here is a short one that does what you want (set your OSNAP to INT first):
(DEFUN C:BR2 () (COMMAND "BREAK" PAUSE "F" PAUSE "@0,0" ) (PRINC)) ; Break at a single point
 
In AutoCAD, under the "Modify" toolbar (pull-down or button bar, whichever you prefer) is a command called 'break at point" that does the same thing. It breaks any line or polyline at a point you select.
 
Status
Not open for further replies.
Back
Top