Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

drawing a perpendicular line from a point on the line

15 REPLIES 15
SOLVED
Reply
Message 1 of 16
Anonymous
73525 Views, 15 Replies

drawing a perpendicular line from a point on the line

How to drawing a perpendicular line from a point on the line ?

15 REPLIES 15
Message 2 of 16
imadHabash
in reply to: Anonymous

Hi and Welcome to AutoDesk forum,

 

the solution exist on turning on your ortho F8 . But if you have oblique lines first you have to make your UCS with that oblique line.

 

Command: UCS
Current ucs name: *WORLD*
Specify origin of UCS or [Face/NAmed/OBject/Previous/View/World/X/Y/Z/ZAxis] <World>:

 

 

 

Imad Habash

EESignature

Message 3 of 16
ВeekeeCZ
in reply to: Anonymous

Or you can draw XLINE.
Message 4 of 16
BeKirra
in reply to: Anonymous


@Anonymous wrote:

How to drawing a perpendicular line from a point on the line ?


You may try this:

1) Setup "Object Snap" on you drawing by using command osnap. Then tick the "Perpendicular" box in the pop up dialog.

2) Draw a line starting from a point then move your cursor slowly to an existing line. click the point on the line where you see a green mark indicating your drawing line is now perpendicular to the existing line.

 

HTH

Please mark "Accept as Solution" and "Like" if my reply resolves the issue and it will help when others need helps.
= ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ =
A circle is the locus of a cursor, starting and ending at the same point on a plane in model space or in layout such that its distance from a given coordinates (X,Y) is always constant.
X² + Y² = C²
Message 5 of 16
Anonymous
in reply to: Anonymous

Dear Mr. ah2m67

 

Please find the attached screen cast for your reference

 

To enable the osnap mode hold shift key and right click to enable the option

 

Hope this could help you

 

Regards

Di****h.MC

Message 6 of 16
Kent1Cooper
in reply to: Anonymous


@Anonymous wrote:

How to drawing a perpendicular line from a point on the line ?


I think most other Replies have misunderstood what you want to do.  Several are about the ordinary PERpendicular Object Snap mode, which is PERpendicular to something.  As I read it [it seems pretty clear from your wording], you want to draw perpendicular from something, and without necessarily anything else around that you can go PERpendicular to.  You can do that without needing to change the UCS as has been suggested, by using the "<angle" format and feeding in the angle perpendicular to the object [in your request, a Line, but any appropriate object] at the specified point.  Try this:

(defun pf ()
  (strcat
    "<"
    (angtos
      (+
        (angle
          '(0 0 0)
          (vlax-curve-getFirstDeriv
            (setq ent (car (nentselp (getvar 'lastpoint)))); entity
            (vlax-curve-getParamAtPoint
              ent
              (osnap (getvar 'lastpoint) "_nea")
            ); ...Param
          ); ...FirstDeriv
        ); angle
        (/ pi 2); [perpendicular]
      ); +
      (getvar 'aunits) 8
    ); rtos
  ); strcat
); defun
(vl-load-com)

 

 

Include that in your acaddoc.lsp file if you have one, or save that to a file with a .lsp filetype ending, named whatever you want [I would call it something like PerFrom.lsp], and APPLOAD it.

 

It is written to be used after you have given whatever you're drawing a first point.  It's not restricted to drawing a Line, but can be used in drawing a Polyline, or for a Text rotation, or for the second point of a Move or Copy displacement, or for other purposes.  And it doesn't need to be a point on a Line that you start from , but can be on anything with linearity [Line, Polyline, Arc, Circle, Spline, Ellipse] -- anything that qualifies in the "curve" class for (vlax-curve-...) functions.

 

Usage:  in the case of your request -- drawing a Line perpendicular from another Line -- call up the Line command and give it a starting point at the place you want to draw perpendicular from on the existing Line [whether using NEArest or ENDpoint or MIDpoint Object Snap, or with Snap on if the existing Line was drawn that way, or whatever].  Then, when it's asking for the next point, type in (pf) [with the parentheses], which stands for "perpendicular from".  That will lock in the direction for drawing the new Line to perpendicular [in either direction] from the existing one.

 

Use it similarly for the other purposes mentioned -- any time it's asking for a next point when the previous point was on some object with linearity.  In drawing a Line or Polyline, it can also be used for the next Line or Polyline segment, and will lock the direction in to perpendicular from the latest segment.

 

If that works for you, you can put it into a menu item to pick on, if that's easier than typing it in.

 

[By the way, it isn't written to account for, and I haven't tried it in, other-than-World Coordinate Systems, but could probably be adjusted for that, if necessary.  It also wants the from point to be unambiguous, that is, if you pick at something like an INTersection, I don't think you can control which intersecting object it's going to find the perpendicular direction from.]

Kent Cooper, AIA
Message 7 of 16
GrantsPirate
in reply to: Anonymous

Rotating the UCS is very quick and easy.  UCS, OB, (pick line).  Draw with ortho on.  UCS, W to get back.  This can be easily automated to UO for object and UW for World and it is handy for lots of other scenarios as well. 


GrantsPirate
Piping and Mech. Designer
EXPERT ELITE MEMBER
Always save a copy of the drawing before trying anything suggested here.
----------------------------------------------------------------------------
If something I wrote can be interpreted two ways, and one of the ways makes you sad or angry, I meant the other one.

Message 8 of 16
wwork
in reply to: Anonymous

A two command drafting solution.

Place new line using deferred Perpendicular object snap. Move new line to desired location.

 

  1. Invoke the LINE command
    1. Specify the PERpendicular object snap (Shift+right-click-->Perpendicular).
    2. Touch existing line (See Deferred Perpendicular cursor badge.)
    3. Click to begin new line.
    4. Specify the NONe object snap (Shift+right-click-->None).
    5. Click endpoint of new line. (This line will be perpendicular to existing line.)
  2. MOVE new line to desired location.

3. If necessary use LENGTHEN, TRIM, EXTEND or FILLET to adjust length of new line.

Message 9 of 16
Kent1Cooper
in reply to: GrantsPirate


@GrantsPirate wrote:

Rotating the UCS is very quick and easy.  UCS, OB, (pick line).  Draw with ortho on.  .... 


That will serve for the specific situation in the OP's question [perpendicular from a Line], as well as to draw perpendicular from a Polyline line segment or a Circle at the given point.  But not for an Arc, Polyline arc segment, Ellipse, or Spline, any of which (pf) can handle.  Also, in addition to not needing to play with the UCS, (pf) is totally unaffected by whether or not Ortho is on.  And the UCS approach can't be used if you want to use something like this in mid-command [e.g. within a Line or Move or Copy or whatever command], because you'd have to get out of the command to change the UCS.

Kent Cooper, AIA
Message 10 of 16
BeKirra
in reply to: Anonymous

Oops! Kent is right and I didn't read the post carefully…

Apart from Kent and Imad's solutions, the command ".MoCoRo" from Express Tools also works as the 1st point on the existing line was specified.

Please mark "Accept as Solution" and "Like" if my reply resolves the issue and it will help when others need helps.
= ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ =
A circle is the locus of a cursor, starting and ending at the same point on a plane in model space or in layout such that its distance from a given coordinates (X,Y) is always constant.
X² + Y² = C²
Message 11 of 16
Pointdump
in reply to: Anonymous

A,

 

Welcome to the Autodesk Forum.

 

"...perpendicular line from a point on the line..."

 

The big question: are you wanting this in 2D or 3D? If 2D, then Object Snap Tracking will make it happen. Hover over the first line before making the second point of your new perpendicular line:

 

OST1.png

 

 

 

Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
Message 12 of 16
Anonymous
in reply to: Anonymous

Take polar settings and check " relative to last segment" instead of absolute by default 

Message 13 of 16
Shaun-CityofKelso
in reply to: wwork

Thanks!

Message 14 of 16

Thank you so so much! Works like a charm.

Message 15 of 16
Anonymous
in reply to: GrantsPirate

@GrantsPirate Thank you. Very useful! Special for a beginner 🙂

Automate? I like that. It is like 'newobj = obj.method()' ?

Cheers.

Message 16 of 16
Kent1Cooper
in reply to: Kent1Cooper


@Kent1Cooper wrote:

@Anonymous wrote:

How to drawing a perpendicular line from a point on the line ?


....  You can do that without needing to change the UCS as has been suggested, by using the "<angle" format and feeding in the angle perpendicular to the object ... at the specified point.  Try this:
.... save that to a file with a .lsp filetype ending, named whatever you want [I would call it something like PerFrom.lsp]....


I found that it doesn't work right when what you are trying to go Perpendicular From is a "heavy" Polyline, whether 2D or 3D.  Attached is an update that corrects that.

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


AutoCAD Beta