banner



How To Draw A Perpendicular Line


@ah2m67 wrote:

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


I think almost 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 articulate from your diction], y'all want to draw perpendicular from something, and without necessarily anything else effectually that you lot can go PERpendicular to.  You tin can do that without needing to change the UCS equally has been suggested, by using the "<angle" format and feeding in the bending perpendicular to the object [in your request, a Line, but whatsoever appropriate object] at the specified indicate.  Try this:

(defun pf ()   (strcat     "<"     (angtos       (+         (bending           '(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) viii     ); rtos   ); strcat ); defun (vl-load-com)

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

It is written to be used subsequently yous have given whatever y'all're cartoon a kickoff point.  It's not restricted to cartoon a Line, but can be used in cartoon a Polyline, or for a Text rotation, or for the 2nd signal of a Move or Copy displacement, or for other purposes.  And information technology doesn't need to be a betoken on a Line that you kickoff from , simply tin 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 -- recall the Line command and requite it a starting point at the place yous 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 any].  Then, when it's asking for the next point, type in (pf) [with the parentheses], which stands for " p erpendicular f rom".  That volition lock in the direction for drawing the new Line to perpendicular [in either direction] from the existing i.

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

If that works for y'all, you lot tin can put information technology into a menu item to choice on, if that's easier than typing it in.

[By the fashion, it isn't written to business relationship for, and I haven't tried information technology in, other-than-World Coordinate Systems, just could probably be adapted for that, if necessary.  It besides wants the from point to be unambiguous, that is, if yous pick at something like an INTersection, I don't recollect you can control which intersecting object it's going to detect the perpendicular direction from.]

Kent Cooper, AIA

Source: https://forums.autodesk.com/t5/autocad-forum/drawing-a-perpendicular-line-from-a-point-on-the-line/td-p/6670460

Posted by: brittfrok2001.blogspot.com

0 Response to "How To Draw A Perpendicular Line"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel