QuinnL Posted January 6, 2023 Posted January 6, 2023 Hey guys, Any ideas on making a custom script or block to calculate pipe deflection given two pipe slopes. We are currently use an excel sheet that works great, but I am curious if I could somehow convert it to work with Civil3D. I will include snips of the excel sheet we are currently using as reference. Quote
BIGAL Posted January 7, 2023 Posted January 7, 2023 Its just a formula converted to a lisp calc. Two common functions are RTD and DTR ;The dtr function converts degrees to radians ;The rtd function converts radians to degrees (defun dtr (a) (* pi (/ a 180.0)) ) ; (defun rtd (a) (/ (* a 180.0) pi) ) These are always handy to have and most experienced coders will have these in an autoload lisp. So your request becomes (setq def (rtd (atan (/ (abs (- in out)) 100.)))) So input, in and out and get a result. Or (setq def (rtd (atan (/ (abs (- (getreal "\nEnter in value ")(getreal "\nEnter out value " ))) 100.)))) 1 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.