×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to Draw a Perpendicular Line to the end of another line
2

How to Draw a Perpendicular Line to the end of another line

How to Draw a Perpendicular Line to the end of another line

(OP)
Dear all,

Could somebody please advise how to draw a perpendicular and have it snap to the end of another line?  I can draw a perpendicular line with the "perp" (is there another way to draw a perpendicular line, icon, perhaps?) but it snaps to somewhere along the line and not at the end.  Thanks.

RE: How to Draw a Perpendicular Line to the end of another line

I have arrayed the line 90 degrees about the end point
and this will you a perpendicular line.

RE: How to Draw a Perpendicular Line to the end of another line

You could set your snap angle to match the line, then draw orthogonaly from the endpoint, then reset your snap angle.  A macro could easily be written and associated with a button.  Here's a lisp program to do it.  Save it as a text file with a .lsp extension, in AutoCAD load it and use the new command AE to run it.

(DEFUN C:AE (/ osm otm sa a) ; Set snap angle using endpoints
 (setq osm (getvar "osmode")
       otm (getvar "orthomode")
       sa (getvar "snapangle")
 )
 (setvar "osmode" 1)
 (setvar "orthomode" 1)
 (setq a (getangle "\nSelect line ENDpoints to set new SNAP angle: "))
 (setvar "snapang" a)
 (command "line" pause pause "")
 (setvar "osmode" osm)
 (setvar "orthomode" otm)
 (setvar "snapang" sa)
 (PRINC)
)


RE: How to Draw a Perpendicular Line to the end of another line

The only problem with IFR's routine is that your variables aren't reset after you are done.

Flores

RE: How to Draw a Perpendicular Line to the end of another line

This resets the variables back:

(DEFUN C:AE (/ osm otm sa a)        ; Set snap angle using endpoints
  (setq    osm (getvar "osmode")
    otm (getvar "orthomode")
    sa  (getvar "snapang")
  )
  (setvar "osmode" 1)
  (setvar "orthomode" 1)
  (setq a (getangle "\nSelect line ENDpoints to set new SNAP angle: "))
  (setvar "snapang" a)
  (command "line" pause pause "")
  (setvar "osmode" osm)
  (setvar "orthomode" otm)
  (setvar "snapang" sa)
  (PRINC)
)

Surprisingly, ACAD changed the variable "snapang" even though the original code was mispelled "snapangLE".  


Flores

RE: How to Draw a Perpendicular Line to the end of another line

Hi,

I use "_ucs"-> _object -> click the line -> "_line" -> snap the endpoint -> and draw the line (Don't forget "F8")

Lothar

RE: How to Draw a Perpendicular Line to the end of another line

(OP)
Thanks, everyone for their wonderful suggestions.  They were all very useful.  Since I am not much of a "programmer" and not familiar with writing "routines" yet, the suggestion from Lothar using "UCS Object" was the most practical one for me.  Have a great day!

RE: How to Draw a Perpendicular Line to the end of another line

I use OFFSET tru the point and the join by a line from  to both ends.

Pardal

RE: How to Draw a Perpendicular Line to the end of another line

The @distance<direction is the easy way to do this type of task. The explanation to this is the @ sign starts the function then the length of line is next then< serves as the direction. example @4<30 give you a line 4" long at 30 deg. your next line would be a length then <120 deg. giving you a perpendicluar line at the end of the first line, this can continue to complete your project.

RE: How to Draw a Perpendicular Line to the end of another line


Try this lisp:

; RITEANG.LSP         
; ------------------------------------------------------------------------
; Description: create a line 90 degrees anywhere along an existing line.
; ------------------------------------------------------------------------
(prompt "\nType RA2 to run.")(graphscr)(princ)
(defun C:RA2(/ P1 P2)
  (setq OMODE(getvar "ORTHOMODE"))
  (setq SANG (getvar "SNAPANG"))
  (setvar "OSMODE" 512)
  (setq P1 (getpoint "\nPick a point on the existing line for the start of the new line."))
  (setq P2 (getpoint "\nPick a second point on the existing line."))
  (prompt "\nPick a point for the end of the new line.")
  (setvar "ORTHOMODE" 1); ortho on
  (setvar "SNAPANG" (+(angle P2 P1)(/ pi 2)) ); set snapang to angle of line
  (command "line" P1 pause "");  draw the line
  (setvar "ORTHOMODE" OMODE)
  (setvar "SNAPANG" SANG)
  (princ)
); End of Program
; ------------------------------------------------------------------------

RE: How to Draw a Perpendicular Line to the end of another line

GAEngr:
        In Mechanical Desktop there is a simpler method: type AMCOPYRM, then pick the line in the snap point wanted, answer yes to copy prompt and enter 90 (degrees) or the angle you want.
Explore AMCOPYRM, is a great order.
If you does not have Mec desktop, there are Lisp programs that do the same the order does.
Try Google or write a request.
Excuse my english.
Xan.
      

RE: How to Draw a Perpendicular Line to the end of another line

Draw the line using "perp" osnap, this will draw the line perpendicular to the one you choose.

Then use move "end" point of new line at intersection to "end" point of original line.

Unless I am missing something?

RE: How to Draw a Perpendicular Line to the end of another line

Maybe a little easier is to try this.

Grip the line
Hot grip the endpoint of the line
Space
Space (For rotate)
C (for copy)
90 or -90
Esc
Esc (to get out of grip)

RE: How to Draw a Perpendicular Line to the end of another line

I use this simple routine in my lisp file:

(defun c:1 ()(command "ucs" "ob"))

It sets the '1' as a command for the ucs<object like Exxit's explanation.

It is quick and I use this command constantly having to deal with roof pitches (3:12, etc.)  The end of the object you select that is closest, will become the origin and the x-axis will align down the part.

RE: How to Draw a Perpendicular Line to the end of another line

Or how about this:

Start drawing the line from the other end? i.e. Make sure you have a running OSNAP set to (at least) endpoint, and voila - no programming required.

I MUST be missing something, or it would not seem this trivial...

RE: How to Draw a Perpendicular Line to the end of another line

OK, I just realized what I was missing:

The lines are not necessarily oriented with the UCS.

IN that case, some of the above answers (not involving programming) would be my choice.  Another option, is to temporarily re-orient the UCS and use F8 (ortho).

Oops...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources