Author Topic: Anyone have a lisp which divides units into rise / run  (Read 2891 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Anyone have a lisp which divides units into rise / run
« on: June 06, 2005, 05:14:33 PM »
Did not know if anyone had anything like this...

EX.

I have a distance with rise / run.

the point i begin is a station 0 ft and the elevation is 0 feet

the next point is (lets say) 500 ft and elevation is 10 feet

I want to pick a spot in between the two (2) points where it calcs or gives me a number with the rise / run.

station 250 ft and then it calc the rise be saying elevation is 5 feet.


is this capible?!

thanks!
Civil3D 2020

CADaver

  • Guest
Anyone have a lisp which divides units into rise / run
« Reply #1 on: June 06, 2005, 05:20:29 PM »
Look HERE that may give you a start.

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Anyone have a lisp which divides units into rise / run
« Reply #2 on: June 07, 2005, 02:07:02 PM »
I was chking it out, but how does this apply. I can see it works with slopes, but since the I am picking x,y,z and then x2,y2,z2 and picking in between to calc the new x,y,z of that point
Civil3D 2020

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Anyone have a lisp which divides units into rise / run
« Reply #3 on: June 07, 2005, 03:59:58 PM »
Here is a crude beginning with no error checking.
Code: [Select]
(defun c:getelev (/ p1 p2 p3 e1 e2 e3 dst slp)
  (setq p1  (getpoint "\nPick starting point p1. ")
        e1  (getdist "\nEnter elevation for p1. ")
        p2  (getpoint "\nPick another point p2. ")
        e2  (getdist "\nEnter elevation for p2. ")
        p3  (getpoint "\nPick point p3 to determine elevation. ")
        dst (distance p1 p3)
        slp (/ (- e2 e1) (distance p1 p2))
        e3  (* dst slp)
  )
  (prompt (strcat "\nDistance from p1 to p3 is "
                  (rtos dst)
                  "\nElevation at p3 is "
                  (rtos e3)
          )
  )
  (princ)
)
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.

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Anyone have a lisp which divides units into rise / run
« Reply #4 on: June 07, 2005, 05:43:28 PM »
CAB SAVED THE DAY!

thank you!

simple too...


thats like the easiest lisp I have seen lately.
Civil3D 2020

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Anyone have a lisp which divides units into rise / run
« Reply #5 on: June 07, 2005, 05:52:29 PM »
I believe the correct phrase is --

CAB SAVED THE DAY AGAIN!

(Good on ya Mr. Butler).
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Anyone have a lisp which divides units into rise / run
« Reply #6 on: June 07, 2005, 05:54:50 PM »
You're welcome.

Quote from: MSTG007
thats like the easiest lisp I have seen lately.


That's a mater of perspective, you must be learning. :)
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.