TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Leafrider 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
-
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
-
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.
-
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!
-
coucou
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
-
Image attached for "O".
-
coucou
the image does not explain anything more, impossible to apply the distance equation
in the drawing put the distance O
amicalement
-
Didier ... you use the tables on page 2 to determine the values that you are missing?
Salutations.
-
Coucou
I'm on the right path :lol:
but I work slowly. my job is very busy :cry:
amicalement
-
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
(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")
-
Hello people of the swamp
Indeed: O seems to be clear from the angle and the two radios ...
Is unclear. :|
Didier good job.
Greetings. :-)
-
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
-
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!!
-
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. :-)
-
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
-
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.
-
coucou
thank you for these explanations, I'll watch but I lack free time.
I can send the new version in progress?
amicalement
-
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