wimal Posted September 21, 2014 Posted September 21, 2014 (command "line"p1 p2 "") (setq[color="red"] line1[/color] (entlast)) (setq ss1 (car (entsel "\nSelect first cutting line:"))) (setq ss2 (car (entsel "\nSelect second cutting line:"))) (command "trim" ss1 ss2""":N " [color="red"]line1[/color] "" ) Please can somebody correct my code. The line 1 is generated by lisp command. Manually selecting cutting lines I need trim the outer parts of line1 and keep the middle part. Quote
Lee Mac Posted September 21, 2014 Posted September 21, 2014 The use of the TRIM command in AutoLISP can be very temperamental as it is dependent on the position at which the object is selected, and can also be affected by the current zoom. Since you are only working with lines, it would be far easier & more reliable to calculate the points of intersection using the inters function, and then modify the endpoints of the line you wish to trim. Lee Quote
wimal Posted September 21, 2014 Author Posted September 21, 2014 OK Thanks, I have never heard about this inters function. Now I can do more. Thanks again. Quote
Lee Mac Posted September 21, 2014 Posted September 21, 2014 You're most welcome - let me know if you need any help implementing the function. Lee Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.