How to drawing a perpendicular line from a point on the line ?
Solved! Go to Solution.
Solved by BeKirra. Go to Solution.
Solved by ВeekeeCZ. Go to Solution.
Solved by imadHabash. Go to Solution.
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
@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
@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.]
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
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.
A two command drafting solution.
Place new line using deferred Perpendicular object snap. Move new line to desired location.
3. If necessary use LENGTHEN, TRIM, EXTEND or FILLET to adjust length of new line.
@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.
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.
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:
Dave
Dave Stoll
Las Vegas, Nevada
@GrantsPirate Thank you. Very useful! Special for a beginner 🙂
Automate? I like that. It is like 'newobj = obj.method()' ?
Cheers.
@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.
Can't find what you're looking for? Ask the community or share your knowledge.