Juergen Posted April 6, 2023 Share Posted April 6, 2023 Hi, a found some offset lisp, but is it possible to offset e.g. the long side with a distance and the short side with an another distance. Offset: Layer as current and exlode the of line. Thanks for help. Quote Link to comment Share on other sites More sharing options...
Steven P Posted April 6, 2023 Share Posted April 6, 2023 Is the rectangle drawn as a polyline? in which case yes you can: - Ask user for offset values - Select rectangle - Use Entity details to get the corner points (entget and assoc value 10) - calculation rotation of the rectangle (or angle) - calculate long sides (distance) - use polar calculation to work out new points - entmod the original rectangle Have a go and see how you do with that - am sure you can do some of this yourself, asking advice where you need it Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 7, 2023 Share Posted April 7, 2023 This is get the co-ordinates. (setq plent (entsel "\nPick rectang")) (if plent (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent)))))) (princ co-ord) 2 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.