如何在cad中画缓和曲线(How to draw a transition curve in CAD)
如何在cad中画缓和曲线(How to draw a transition curve in CAD)
How to draw a transition curve in CAD
First, draw the tangent length in CAD
Two, running procedures: in the command line, enter HH enter
Three, select the two tangent, and then enter the curve radius, such as: 2204.5, enter
Four, enter the transition curve length, such as 270, drawing completed! Figure
Notepad format content, the new LISP language, in CAD, you must first load
Polyline simulation curve;.
Enter a stop line, radius, curve length, or design speed.
; command: HH
(defun, com_p ()
(setq, l, 0)
(command, "UCS", "O" (list (- 0, x1) 00))
(command, "pline" (list 000), "W", "0""""
(repeat 1000
(setq L (+ L (/ Ls 1000))
X (+ (- L) (/ (*, l, l, l, l, 40, C, C)) / (/ * l, l, l, l, l, l, l, l, l, C, l,, C, C, C, and)
Y (* id__ (+) (- - (/ * l, l, l, l, C, l, l, l, l, l, l,, C,,, C,, C, C, C, C, C, l, l, l, l, l, l, l, C, l, l, l, l))
Setq);
(command (list, x, y, 0))
) repaet
) command
(setq, pt5 (trans (list, x, y, 0) 10)
) com_p
(defun, ll_v ()
(setq, V (getreal, \nGive, Velocity:)
Ls1 (* V 0.85)
Ls2 (/ * 0.0357, V, V, V, R)
Ls (max, Ls1, Ls2 (/ R, 9))
Ls (* (fix (/ Ls, 10)) 10)
Setq);
(if (>, Ls, R) (setq, Ls, R))
(ll_d)
Ll_v);
(defun, ll_d ()
(setq OS (getvar "osmode"))
(setvar, "osmode", 0)
(setq, C (*, Ls, R)
Q (- (+) (/ Ls 2) (/ (*, Ls, Ls, 240, R, R)) (/ (*, Ls, Ls, Ls,
Ls, Ls, R, R, R, R)) / (/ *, Ls, Ls, Ls, Ls, Ls, Ls, Ls, Ls,,,
R, R,, R,, R, R, R))
PT1 (CDR (Assoc 10 (entget (car, P1)))
PT2 (CDR (Assoc 11 (entget (car, P1)))
Pt10 (polar, pT1 (angle, pT1, pT2) (/ / (distance, pT1, pT2)
2)
PT3 (CDR (Assoc 10 (entget (car, P2)))
PT4 (CDR (Assoc 11 (entget (car, P2)))
PT20 (polar, pT3 (angle, pT3, pT4) (/ / (distance, pT3, pT4) 2)
P (+ (- *, Ls, Ls, 24, R) (/ (*, Ls, Ls, Ls, 2688, R, R)) / (/ * Ls, Ls, Ls, Ls, Ls, Ls), R, R, R,, R, R, R, Ls)
JD (inters, pT1, pT2, pT3, pT4, Nil)
Alf1 (angle, pt10, JD)
Alf2 (angle, PT20, JD)
ALF (- (angle, JD, PT20) alf1)
Setq);
(if (or (>, ALF, PI) (and (< ALF 0)) (> ALF (- 0, PI)))
(progn
(setq, id__, -1)
(if (> alf pi) (setq alf (- (+ pi pi) alf)) (setq alf (abs alf)))
progn);
(progn
(setq id _ _ 1)
(if (< = alf (- 0 pi)) (setq alf (+ pi pi alf)))
progn);
); if
(setq x0 (/ (* (p + r) (his (/ alf 2.0))) (cos (/ alf 2.0)))
x1 + x0 q)
cl (+ (* elf r) ls)
e (- (/ (+ r p) (cos (/ elf) 2) r)
setq);
(command "uc" "o" jd)
(command "uc" "z" (/ (* 180 alf1) pi))
(com _ p) (setq pt6 pt5)
(setq
ppt
关于艾滋病ppt课件精益管理ppt下载地图下载ppt可编辑假如ppt教学课件下载triz基础知识ppt
1 (list x1 0 0))
(command "uc" "")
(command "uc" "o" jd)
(command "uc" "z" (/ (* 180 alf2) pi))
(setq id _ _ (- 0 id _ _)) (com _ p)
(setq ppt2 (list x1 0 0))
(command "uc" "")
(if (> (abs (distance jd pt1)) (abs (distance jd pt2)))
(setq ptt1 pt1)
(setq ptt1 pt2)
); if
(setq ptt2 (polar jd alf1 (0, x1)))
(thh p1 ptt1 10)
(thh p1 ptt2 11)
(if (> (abs (distance jd pt3)) (abs (distance jd pt4)))
(setq ptt3 pt3)
(setq ptt3 pt4)
); if
(setq ptt4 (polar jd alf2 (0, x1)))
(thh p2 ptt3 10)
(thh p2 ptt4 11)
(if (= id _ _ 1) (command "arc" pt5 "e" pt6 "r" s) (command "arc"
pt6 "e" pt5 "r" (r))
(setq alfd (angf alf))
(setvar "osmode" us)
(command "cmdecho" "1")
(command "text" break, break "" (strcat "偏 角," alfd))
(command "cmdecho" "0")
(command "text" "" (strcat "半 径," (rtos r 2 2)))
(command "text" "" (strcat "切 线 长," (rtos x1 2 2)))
(command "text" "" (strcat "曲 线 长," (rtos cl 2 2)))
(command "text" "" (strcat "外 距," (rtos e 2 2)))
(command "text" "" (strcat "缓和曲线长," (rtos ls 2 2)))
); ll _ d
(defun angf (alf)
(setq alff (angtos alf 1 4)
n 1
kk (strlen alff))
(repeat kk
(setq alfn (substr alff n 1))
(if (= alfn "d")
(setq nn n)); if
(setq n (n + 1))
); repeat
(strcat (substr alff 1 (- nn 1)) "%%" (substr alff nn))
angf);
(defun c: hh (p1 / p2 pt1 pt2 pt3 pt4 pt5 pt6 pt10 pt20 id _
_ r v p e p3
r1 x y l x0 x1 c jd alf alf1 alf2 q p cl ls1 ls2)
(command "ucs", "")
(setq p1 p2 nil nil)
(while (= p1 nil) (setq p1 (entsel "\ n拾取第一条直线:)))
(redraw (car p1) 3)
(while (= p2 nil) (setq p2 (entsel "\ n拾取第二条直线:)))
(redraw (car p2) 3)
(initget 1)
(setq r (getdist "\ n请输入弯道半径 r:")
(initget 1 "(v)
(setq p3 (getdist "\ n输入缓和曲线长度 (ls) 或 [设计速度
(v):")
(if (= p3 "v") (the _ v) (progn (setq (p3) (the _ d)))
(prison)
eline);
(defun thh (len pt (h)
(setq en _ date (entget (car len))
old _ date (association h en _ date)
new _ date (cons h pt)
en (subst new _ date old _ date en _ date); setq
(entmod en)
thh);