Draw a line with a certain angle

Draw a line with a certain angle

Anonymous
Not applicable
21,940 Views
9 Replies
Message 1 of 10

Draw a line with a certain angle

Anonymous
Not applicable

 

Good afternoon

 

A quick way of drawing a line at 90 degrees (for example) starting from a line with any angle X?

0 Likes
Accepted solutions (1)
21,941 Views
9 Replies
Replies (9)
Message 2 of 10

Kent1Cooper
Consultant
Consultant

One way for that particular example is PerFrom.lsp with its (pf) function [attached].  Load it up, start a Line at some point on the one you want to draw perpendicular from, and type (pf) [with the parentheses].  The direction of your Line from there will be locked into perpendicular to whatever you started your Line on.

 

[It also finds and locks into the directions perpendicular from other things, such as Arcs, Circles, Polylines, Ellipses, Splines, Rays, Xlines, at the last point, which means that with those that curve, unlike when drawing perpendicular from a Line, the locked-in direction differs depending on exactly where on it you're drawing perpendicular from.]

Kent Cooper, AIA
0 Likes
Message 3 of 10

oswaldodcb
Advisor
Advisor
Accepted solution

Hi @Anonymous

 

You must activate the option of Polar tracking that allows to make the reference of relative form instead of absolute,

 

I attached an image so you can see how to activate it:

 

1.png2.PNG

 

If my publication solved your concern Accept the SOLUTION

 

Oswaldo Caballero

Instructor ATC

AutoCAD Certified User



Oswaldo Caballero
Project Engineer / Autodesk Certified Instructor / Autodesk AutoCAD Certified User and Professional
Maracaibo, Venezuela
LinkedIn


Da un Me Gusta si la publicación ha sido de utilidad y si ha resuelto tu duda presiona ACEPTAR SOLUCIÓN

Message 4 of 10

Kent1Cooper
Consultant
Consultant

@oswaldodcb wrote:

... the option of Polar tracking that allows to make the reference of relative form instead of absolute,

 

....

I had thought that the "Relative to last segment" wording of that option would mean that it wouldn't work relative to some other pre-drawn object that you [for example] start a Line on, but only as a next segment after you've drawn one already.  But it turns out that it doesn't mean that -- you can start a Line somewhere on another not-the-latest Line [or Polyline line segment or Ray or Xline*], and with Polar tracking on with that option, it does snap to the directions perpendicular to it when you get close to them, in typical Polar-tracking fashion.  So where that's workable, it's better than my (pf) function, since it does it without your needing to type anything in [or pick from a menu item or something], and with other angle-multiple settings, you can get additional relative angles, not just perpendicular.

 

* For some reason it doesn't work from an Xline if you have MIDpoint Osnap running and snap to the Xline's origin point with it, and maybe in some other specific circumstances [I just happened on that one accidentally].  But it does work if you start a Line at a NEArest point on an Xline.  [2017 here, if that makes any difference]

 

However, (pf) does have potential advantages over relative Polar tracking, depending on your specific way of working.  It doesn't just snap to the perpendicular directions when you get close, but locks you into only the perpendicular directions, so you can't do some other angle accidentally [Polar tracking lets you draw at any angle that's not too close to a specified multiple, and just snaps onto the specified ones when you get close enough].  And it works to go perpendicular from curved things [relative Polar tracking only works relative to straight things], as well as from Xlines in the * circumstance described above.

Kent Cooper, AIA
0 Likes
Message 5 of 10

Mark_C_123
Advocate
Advocate

SANPANG

0 Likes
Message 6 of 10

Kent1Cooper
Consultant
Consultant

@Mark_C_123 wrote:

SANPANG


Setting SNAPANG to align with something, and having ORTHO On, can be better under the right circumstances, and there are routines out there to simplify that, such as AlignSnapAng.lsp, available here.  It's probably worthwhile if you want to draw multiple things oriented perpendicular/parallel to the same existing object.  But you do then have to set it back.

 

On the other hand, with (pf) you can change the perpendicular direction repeatedly to different directions as you go along.  For instance, you can start a Polyline from some point on an existing object, use (pf) to draw the first segment perpendicular to that, draw a few more segments in directions determined by whatever other criteria you may have [Snap to object locations, orthogonal in the current plane, etc.] and at any time use (pf) to draw the next segment perpendicular to the latest one, whatever direction it had, not tied to the starting perpendicular direction at all.  It doesn't change the SNAPANG setting, but only locks the direction for the one Line or Polyline segment or Move/Copy displacement or whatever, so there's nothing to set back to a previous value.

 

Another difference, if it matters in some situations, is that setting SNAPANG and with ORTHO On, you can draw both perpendicular and parallel to the direction of the object that SNAPANG was set to match.  With (pf), you are truly locked onto the perpendicular directions only -- you can't go in the parallel directions.

Kent Cooper, AIA
0 Likes
Message 7 of 10

Mark_C_123
Advocate
Advocate

Just loaded your lisp and 'AS' and 'ASB' did nothing? Am I missing something.. 

0 Likes
Message 8 of 10

Mark_C_123
Advocate
Advocate

All good - Doesnt like UCS rotation. 

0 Likes
Message 9 of 10

Kent1Cooper
Consultant
Consultant

@Mark_C_123 wrote:

... Doesnt like UCS rotation. 


I don't very often use Coordinate Systems other than the World, so I didn't have that in mind when writing that routine.  Something to put on my list to modify....

Kent Cooper, AIA
0 Likes
Message 10 of 10

Kent1Cooper
Consultant
Consultant

@Kent1Cooper wrote:

One way for that particular example is PerFrom.lsp with its (pf) function .....


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
0 Likes