缓和曲线cad画法

上传人:F****n 文档编号:100119384 上传时间:2019-09-22 格式:DOCX 页数:7 大小:560.01KB
返回 下载 相关 举报
缓和曲线cad画法_第1页
第1页 / 共7页
缓和曲线cad画法_第2页
第2页 / 共7页
缓和曲线cad画法_第3页
第3页 / 共7页
缓和曲线cad画法_第4页
第4页 / 共7页
缓和曲线cad画法_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《缓和曲线cad画法》由会员分享,可在线阅读,更多相关《缓和曲线cad画法(7页珍藏版)》请在金锄头文库上搜索。

1、在AutoCAD中缓和曲线的几种画法2011-06-25 20:32 在AutoCAD中画缓和曲线比较困难,目前常用的画法有AutoLISP程序法(需要已知曲线要素)、坐标脚本法(需事先计算好各特征点及其他点为的坐标)、曲线命令法(需事先准备各特征点坐标),现分别介绍如下:画法一:缓和曲线AutoLISP 应用程序一、制作缓和曲线AutoLISP 应用程序 复制AutoLISP程序源代码,打开“记事本”,粘贴进去后,另存为文件名“缓和曲线.LSP”,保存类型为“所有文件”(AutoLISP程序源代码见附件)二、加载缓和曲线AutoLISP应用程序在命令行输入“appload”打开自动加载对话框

2、。在对话框的“查找范围”里找到“缓和曲线.LSP”的那个程序,选中后,点击【加载】,显示“已成功加载缓和曲线.LSP”后,关闭对话框,ok你那个程序自动启动加载了。三、在CAD中画出切线长四、运行程序在命令行中输入hh回车五、选择两条切线,然后输入曲线半径如:2204.5回车六、输入缓和曲线长,如270,绘图完成!画法二:坐标脚本法1.现做一个CAD脚本,会的人跳过(用Windows 文本 另存为“.scr”文件)2.脚本编辑输入“SPLINE+空格键+Y坐标+,+X坐标+空格键+Y坐标+,+X坐标” 以此类推!点输的越密,线条越平滑。也可以用EXCEL算出各个点的坐标后粘贴进去,然后按照“S

3、PLINE+空格键+Y坐标+,+X坐标+空格键+Y坐标+,+X坐标”格式编辑。3.进入CAD,运行脚本,就行了!注意:你可能输入了100个点,而出现的确只有几个点,这个很正常,你把图像删除了,多运行几次就行,一般不超过4次。画法三:使用真样条曲线命令举例如下:输入导线:pline命令绘制1、2、3各点,其对应坐标如下x1=213.7748 y1=92.1117x2=313.7748 y2=92.1117x3=399.6787 y3=143.3026绘制通过ZH、HZ、QZ、HY和YH各点的与路线导线相切的含缓和曲线的平曲线。通过计算,五个点的直角坐标为:ZH:X=232.9548 Y=92.1

4、117HY:X=285.3608 Y=94.4667QZ:X=311.8101 Y=99.2371YH:X=336.9780 Y=108.6801HZ:X=383.6319 Y=133.7401使用真样条曲线命令绘制含缓和曲线的平曲线的基本操作步骤如下:Command(命令): Spline(启动真样条曲线命令)object/(指定起点):232.9548,92.1117(通过ZH)Enter point :285.3608,94.4667Close/Fit Tolerance/(指定下一个点):311.8101,99.2371Close/Fit Tolerance/ (指定下一个点) :33

5、6.9708,108.6801Close/Fit Tolerance/(指定下一个点):383.6319,133.7401Close/Fit Tolerance/(指定下一个点):(选择输入切点的模式)Enter star tangent(指定起点切向):232.9548,92.1117 (输入起点切点)Enter star tangent(指定端点切向):383.6319,133.7401 (输入终点的切点)附件:缓和曲线AutoLISP 程序源代码;多义线摹拟缓和曲线。;输入起止直线、半径、缓和曲线长或设计车速。;命令:HH(defun com_p() (setq l 0) (comman

6、d ucs o (list (- 0 x1) 0 0) (command pline (list 0 0 0) w 0 (repeat 1000 (setq l (+ l (/ Ls 1000) x (+ (- l (/ (* l l l l l) 40 C C) (/ (* l l l l l l l l l) 3456 C C C C) y (* id_ (+ (- (/ (* l l l) 6 C) (/ (* l l l l l l l) 336 C C C) (/ (* l l l l l l l l l l l) 42240 C C C C C) );setq (command (

7、list x y 0) );repaet );command (setq pt5 (trans (list x y 0) 1 0) );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.0) );setq (if ( Ls R) (setq Ls R) (ll_d);ll_v(defun ll_d() (setq os (getvar osmode) (setv

8、ar osmode 0) (setq C (* Ls R) q (- (+ (- (/ Ls 2) (/ (* Ls Ls Ls) 240 R R) (/ (* Ls Ls Ls Ls Ls) 34560 R R R R) (/ (* 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

9、(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 Ls) 2688 R R R) (/ (* Ls Ls Ls Ls Ls Ls) R R R R R) jd (inters pt1 pt2 pt3 pt4 nil) alf1(angle pt10 jd) alf2(angle pt20 jd) alf (- (angle jd pt20) al

10、f1) );setq (if (or ( alf pi) (and ( 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 ( (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) (

11、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 R) (command arc pt6 e pt5 r R) (setq alfd (angf alf) (setvar osmode os) (command cmdecho

12、1) (command text pause pause (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)

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 教学/培训

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号