Author Topic: 2 or 3 centered curves - LISP or VBA?  (Read 5925 times)

0 Members and 1 Guest are viewing this topic.

Leafrider

  • Guest
2 or 3 centered curves - LISP or VBA?
« on: January 31, 2011, 01:00:50 PM »
I've been working with 2 and 3 centered curves a lot lately and I can't seem to find a method that works best and for that matter identically geometrically each time I complete the 2 or 3 centered curves. I use this mainly for establishing curve radius for intersections and there are software packages that can do this for you.

Does anyone have a method, LISP or VBA that would provide a tool to basically fillet between two lines while entering 3 separate radii with an end result having all 3 radii tangent to each other while radii 1 and 3 being completely symmetrical. See attachment for mathematical reference.

Thank you

did.ave

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #1 on: February 01, 2011, 09:44:54 AM »
Coucou

on the pdf, you say you know : delta, O, R1 and R2
Delta, R1 and R2, it's OK but...
where is the point O ? :-o

amicalement

SOFITO_SOFT

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #2 on: February 01, 2011, 09:59:05 AM »
Hello people of the swamp:
Didier: The "O" is a very small dimension of the horizontal text just above  "EDGE OF PAVEMENT. It took me 10 minutes to find it.
Contruccion interesting, right?
Greetings.

Leafrider

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #3 on: February 01, 2011, 10:24:55 AM »
The PDF is intended for a field layout of the 3 centered curves. This should help with the math within LISP or VBA or .Net for that matter. The "O" value would be the perpendicular distance between the Tangent of R2 to R1. Thanks again!

did.ave

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #4 on: February 01, 2011, 11:03:44 AM »
coucou

Quote
The "O" value would be the perpendicular distance between the Tangent of R2 to R1

sorry, I don't understand where is the distance O ...

amicalement

Leafrider

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #5 on: February 01, 2011, 11:20:00 AM »
Image attached for "O".

did.ave

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #6 on: February 01, 2011, 11:41:54 AM »
coucou

the image does not explain anything more, impossible to apply the distance equation
in the drawing put the distance O

amicalement

SOFITO_SOFT

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #7 on: February 02, 2011, 09:47:15 AM »
Didier ... you use the tables on page 2 to determine the values that you are missing?
Salutations.

did.ave

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #8 on: February 02, 2011, 10:12:44 AM »
Coucou

I'm on the right path  :lol:
but I work slowly. my job is very busy  :cry:

amicalement

did.ave

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #9 on: February 07, 2011, 02:47:56 AM »
coucou

Like I said I work slowly,
here is a first solution, at least as I understood the problem.

at first you must change the values of O,delta, R1 et R2 in the code,
but you can make a dcl.

I still do not understand the value of "O"

it is possible to do better, no doubt, but I am an eternal beginner

amicalement

Code: [Select]
(defun tan (arg)
  (/ (sin arg)(cos arg))
)
;
(defun acos (arg)
(if (<= -1 arg 1)
(atan (sqrt (- 1 (aucarré arg))) arg)
)
)
;
(defun aucarré (arg)
(if (numberp arg)
(* arg arg)
)
)
;
(setq delta 1.84
      O 0.9
      R1 11.5
      R2 5.9
      )

(defun test (delta o r1 r2 / pdep t1 alpha t0 t2 e  cr1 angint pligne2 cr2 cr3 y y1 y2)
  (setq osmodeori (getvar "osmode"))
  (setvar "osmode" 0)

  (setq pdep '(0 0)
      T1 (* (+ R2 O)(tan (/ delta 2)))
      alpha (acos (/ (- R1 R2 O)(- R1 R2)))
      T0 (+ t1 (* (- r1 r2) (sin alpha)))
      t2 (- t1 (* r2 (sin alpha)))
      e (- (/ (+ r2 o) (cos (/ delta 2))) r2)
      cr1 (list T0 R1)
      angint (- pi delta)
      pligne2 (list (* (cos angint) 20) (* (sin angint) 20))
      cr2 (polar (polar pdep angint T0) (- angint (/ pi 2)) r1)
      cr3 (polar pdep (/ angint 2) (+ e r2))
      y (- (+ r2 o)(* r2 (cos alpha)))
      y1 (list t2 y)
      y2 (polar (polar pdep angint T2) (- angint (/ pi 2)) y)
      )
  (command "_line" pdep (polar pdep 0 20) "")
  (command "_line" pdep pligne2 "")

  (setvar "cecolor" "1")
  (command "arc" "ce" cr3 y2 y1)
  (setvar "cecolor" "3")
  (command "arc" "ce" cr1 y1 (list t0 0))
  (command "arc" "ce" cr2 (polar pdep angint T0) y2)
  (setvar "cecolor" "256")
  (setvar "osmode" osmodeori)
  )


(test delta O R1 R2)
(command "_zoom" "_E")






SOFITO_SOFT

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #10 on: February 09, 2011, 05:53:23 AM »
Hello people of the swamp
Indeed: O seems to be clear from the angle and the two radios ...
Is unclear. :|
Didier good job.
Greetings. :-)

did.ave

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #11 on: February 09, 2011, 07:59:04 AM »
Coucou

merci, thank you for the "good job",  

Maybe you want to do better ? it's possible to create a dcl
let me know if want to go further

amicalement
« Last Edit: February 09, 2011, 11:36:09 AM by didier »

Leafrider

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #12 on: February 09, 2011, 08:45:38 AM »
This does look to be the answer. Unfortunately i'm more of an amateur at LISP than probably most. I can't seem to program this for user prompts that would select each tangent line, and prompt for entering a 2 or 3 centered radius value. I will toss it around and post something if I can get this to work. Thanks again!!

SOFITO_SOFT

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #13 on: February 10, 2011, 10:15:53 PM »
Hello everyone
I think that before making a DCL would have to make this construction is carried out in any pair of lines .... not only with the first line in the direction of the X axis
Now is certainly poor. :-(
Just an idea.
Greetings from Madrid. :-)

did.ave

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #14 on: February 14, 2011, 04:18:25 AM »
coucou

I'm working on a new version but I want to know precisely what that value "O" ?
I still do not know what it is exactly.
.
angle, dimension, tangent ...

soon on The Swamp

amicalement

Leafrider

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #15 on: February 14, 2011, 11:35:12 AM »
After reviewing this further, I do appologize for not clarifying these values in greater detail earlier on. The type of design vehicle determines the offset value. You can find tables within the AASHTO - Geometric Design for Highways and Streets (pg. 589). I've attached the document from the TAC manual, table isn't attached.

The easist way to define this "symetrical offset" value would be to prompt the user for a value, if no default value is chosen (enter) than default to 3.0 meters (value for a WB 20 @ 90degress). Hope this helps.

did.ave

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #16 on: February 14, 2011, 11:46:23 AM »
coucou

thank you for these explanations, I'll watch but I lack free time.
I can send the new version in progress?

amicalement

SOFITO_SOFT

  • Guest
Re: 2 or 3 centered curves - LISP or VBA?
« Reply #17 on: February 15, 2011, 08:57:28 AM »
coucou

I'm working on a new version but I want to know precisely what that value "O" ?
I still do not know what it is exactly.
.
angle, dimension, tangent ...<<<<<<  as it is drawn is a longitudinal dimenion

soon on The Swamp

amicalement
Greetings