Jump to content

how to draw line perpendicular with tops of polygon


thiemksb

Recommended Posts

Ok the way to do is depends on the yellow lines simplest is pick 2 points, get the angle add pi / 2 and subtract pi / 2 for the end angle then draw a line.

 

If its a pline can do automatically.

 

I only dabble in VBA but use this as a guide in lisp convert it to VBA, also why VBA ?

 

(defun c:test ( / dist pt1 pt2 pt3 pt4 )
(setvar 'osmode 1)
(setq dist 10)
(setq pt1 (getpoint "\nPick point 1 "))
(setq pt2 (getpoint "\nPick point 2 "))
(setq ang (angle pt1 pt2))
(setq pt3 (polar pt1 (+ ang (/ pi 2)) dist))
(setq pt4 (polar pt2 (+ ang (/ pi 2)) dist))
(command "line" pt1 pt3 "")
(command "line" pt2 pt4 "")
(princ)
)
(c:test)

This is just a start need a while added for more point picks.

Link to comment
Share on other sites

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...