eric_monceaux Posted November 18, 2014 Share Posted November 18, 2014 Hello Fellow CAD users! I come to you today with a difficult task, in my opinion. I had someone help me create this LISP routine that divides a line into no greater than 48" segments and includes .375" spacers between each I have the need for a new evolution for this LISP that I don't even know if possible. What I would like it to do now is allow the user to specify the 'piece' dimension and after dividing the segment up with the user supplied dimension, take the 'left overs' and divide them evenly on the ends of the segment (please refer to final_desired_output.dwg) while still following the >48" rule. I hope I have been clear enough, and thank you all in advance for your help! final_desired_output.dwg current_out.dwg STONESEG-AUTO-AAS.lsp Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 19, 2014 Share Posted November 19, 2014 just try changingthis bit 1st (progn (if (> (setq #len (distance p1 p2)) 48.) ; 48" ~ 0.9144 (if (= (fix (setq #seg (/ #len 48.))) #seg) (progn (setq segl (getreal "\nEnter seg length")) (if (> (setq #len (distance p1 p2)) segl) ; (if (= (fix (setq #seg (/ #len segl))) #seg) Quote Link to comment Share on other sites More sharing options...
eric_monceaux Posted November 19, 2014 Author Share Posted November 19, 2014 OK. Done. That's a good start. Giving the user the ability to set the max division length. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 19, 2014 Share Posted November 19, 2014 Code wise its pretty easy get length of line dive by a length take the FIX of the length and thats how many segments. Also Lee-mac has a break pline by segments routine. Quote Link to comment Share on other sites More sharing options...
eric_monceaux Posted November 19, 2014 Author Share Posted November 19, 2014 Thank you so much BIGAL! I will check that out. And as always, thank you for your contribution to this website. Personally I think you, ReMark, and Lee-Mac are celebrities! You guys are so knowledgeable and helpful to all those seeking guidance! Quote Link to comment Share on other sites More sharing options...
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.