Author Topic: Perpendicular at midpoint  (Read 3336 times)

0 Members and 1 Guest are viewing this topic.

DanB

  • Bull Frog
  • Posts: 367
Perpendicular at midpoint
« on: October 05, 2012, 11:09:56 AM »
Every time I do this I think there might be a "better" way. Draw a line, any angle. Draw a second line perpendicular to the first line where the second line starts at the midpoint of the first line. This should create a "T" of sorts, lengths are not important for the excercise. I've always drawn the second line by starting a distance away from first, then back, perpendicular snap to the first line, move to midpoint. I'm not looking for a lisp routine or coding, just curious if there's a..different way..

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Perpendicular at midpoint
« Reply #1 on: October 05, 2012, 11:19:30 AM »
Maybe not 'better', but another way might be to set UCS to object and turn Orthomode on.

Rob...

  • King Gator
  • Posts: 3824
  • Take a little time to stop and smell the roses.
Re: Perpendicular at midpoint
« Reply #2 on: October 05, 2012, 11:23:21 AM »
Object snap tracking and polar tracking.
CAD Tech

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: Perpendicular at midpoint
« Reply #3 on: October 05, 2012, 11:25:47 AM »
Code: [Select]
Command: line
Specify first point:
Specify next point or [Undo]:
Specify next point or [Undo]:

Command: SNAPANG
Enter new value for SNAPANG <0>:  Specify second point:

Command: line

Specify first point: mid
of
Specify next point or [Undo]:  <Ortho on>
Specify next point or [Undo]:
TheSwamp.org  (serving the CAD community since 2003)

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Perpendicular at midpoint
« Reply #4 on: October 05, 2012, 11:29:57 AM »
I know you said you weren't looking for code, but here is a short snippet which may streamline the process a little:

Code: [Select]
(defun c:per ( / *error* e o p )
    (defun *error* ( m )
        (if o (progn (setvar 'orthomode o) (command "_.ucs" "_p")))
        (princ)
    )
    (if (and
            (setq p (getpoint "\nSpecify first point: "))
            (setq e (car (nentselp p)))
        )
        (progn
            (setq p (trans p 1 0))
            (command "_.ucs" "_ob" e)
            (setq o (getvar 'orthomode))
            (setvar 'orthomode 1)
            (command "_.line" "_non" (trans p 0 1))
            (while (< 0 (getvar 'cmdactive)) (command "\\"))
            (setvar 'orthomode o)
            (command "_.ucs" "_p")
        )
    )
    (princ)
)

« Last Edit: October 05, 2012, 11:34:23 AM by Lee Mac »

DanB

  • Bull Frog
  • Posts: 367
Re: Perpendicular at midpoint
« Reply #5 on: October 05, 2012, 01:21:34 PM »
Thanks all, always good to have a fresh look at some different methods. I like the snapang idea, going to try out Lee's code now.

danallen

  • Guest
Re: Perpendicular at midpoint
« Reply #6 on: October 05, 2012, 01:22:23 PM »
grips!

pick line to highlight grips
pick midpoint
enter
enter (to get rotate)
c for copy
90 to rotate
enter

done!

Every time I do this I think there might be a "better" way. Draw a line, any angle. Draw a second line perpendicular to the first line where the second line starts at the midpoint of the first line. This should create a "T" of sorts, lengths are not important for the excercise. I've always drawn the second line by starting a distance away from first, then back, perpendicular snap to the first line, move to midpoint. I'm not looking for a lisp routine or coding, just curious if there's a..different way..

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Perpendicular at midpoint
« Reply #7 on: October 05, 2012, 02:06:38 PM »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.