Jump to content

Recommended Posts

Posted

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.

 

 

example.thumb.jpg.f7ef0585d6ab0f9b99a2fd5ddb98f01b.jpg

Posted

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

Posted

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)

 

  • Like 2

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...