明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 9037|回复: 13

加急!!有谁知道如何在cad中画缓和曲线

  [复制链接]
发表于 2004-3-5 20:23:00 | 显示全部楼层 |阅读模式
急需在cad中画缓和曲线的方法,各位高人帮帮我吧。多谢!!
发表于 2004-3-5 20:28:00 | 显示全部楼层
缓和曲线?没听过,样条曲线?抛物线?
发表于 2004-3-5 20:36:00 | 显示全部楼层
你是否问spline
发表于 2004-3-5 20:38:00 | 显示全部楼层
晕                 什么是缓和曲线?
 楼主| 发表于 2004-3-5 20:51:00 | 显示全部楼层
缓和曲线是用于公路上的一种曲线,曲线上每一点的半径都不相同。曲线特点是:从缓和曲线与直线的衔接点开始算起,缓和曲线的长度L与长度所对应的点的半径R的乘积为常数。即L*R=A(A为常数)
发表于 2004-3-5 21:06:00 | 显示全部楼层
这个没有直接的画法。


河伯做的市政软件提供了这方面的程序(可能现在叫“天正市政”吧)。
发表于 2004-3-5 21:08:00 | 显示全部楼层
这个我就不知道了,不是搞哪个专业的
发表于 2004-3-5 21:10:00 | 显示全部楼层
;;; 3DSPIRAL.LSP
;;; Copyright (C) 1993 by Autodesk, Inc.
;;;
;;; Permission to use, copy, modify, and distribute this software
;;; for any purpose and without fee is hereby granted, provided
;;; that the above copyright notice appears in all copies and that
;;; both that copyright notice and this permission notice appear in
;;; all supporting documentation.
;;;
;;; THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
;;; WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR
;;; PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
;;; --------------------------------------------------------------------------;
;;; DESCRIPTION
;;;
;;; This is a programming example.
;;;
;;; Designed and implemented by Kelvin R. Throop in January 1985
;;;
;;; This program constructs a spiral. It can be loaded and called
;;; by typing either "spiral", "3dspiral" or the following:
;;; (cspiral <# rotations> <base point> <horiz growth per rotation>
;;; <points per circle> <start radius>
;;; <vert growth per rotation>).
;;;
;;; --------------------------------------------------------------------------; (defun myerror (s) ; If an error (such as CTRL-C) occurs
; while this command is active...
(if (/= s "Function cancelled")
(princ (strcat "\nError: " s))
)
(setvar "cmdecho" ocmd) ; Restore saved modes
(setvar "blipmode" oblp)
(setq *error* olderr) ; Restore old *error* handler
(princ)
) (defun cspiral (ntimes bpoint hfac lppass strad vfac
/ ang dist tp ainc dhinc dvinc circle dv) (setvar "blipmode" 0) ; turn blipmode off
(setvar "cmdecho" 0) ; turn cmdecho off
(setq circle (* 3.1415926535 2))
(setq ainc (/ circle lppass))
(setq dhinc (/ hfac lppass))
(if vfac (setq dvinc (/ vfac lppass)))
(setq ang 0.0)
(if vfac
(setq dist strad dv 0.0)
(setq dist 0.0)
)
(if vfac
(command "_3dpoly") ; start spiral ...
(command "_pline" bpoint) ; start spiral from base point and...
)
(repeat ntimes
(repeat lppass
(setq tp (polar bpoint (setq ang (+ ang ainc))
(setq dist (+ dist dhinc))
)
)
(if vfac
(setq tp (list (car tp) (cadr tp) (+ dv (caddr tp)))
dv (+ dv dvinc)
)
)
(command tp) ; continue to the next point...
)
)
(command "") ; until done.
(princ)
) ;;;
;;; Interactive spiral generation
;;; (defun C:SPIRAL (/ olderr ocmd oblp nt bp cf lp)
(setq olderr *error*
*error* myerror)
(setq ocmd (getvar "cmdecho"))
(setq oblp (getvar "blipmode"))
(setvar "cmdecho" 0)
(initget 1) ; bp must not be null
(setq bp (getpoint "\nCenter point: "))
(initget 7) ; nt must not be zero, neg, or null
(setq nt (getint "\nNumber of rotations: "))
(initget 3) ; cf must not be zero, or null
(setq cf (getdist "\nGrowth per rotation: "))
(initget 6) ; lp must not be zero or neg
(setq lp (getint "\nPoints per rotation <30>: "))
(cond ((null lp) (setq lp 30)))
(cspiral nt bp cf lp nil nil)
(setvar "cmdecho" ocmd)
(setvar "blipmode" oblp)
(setq *error* olderr) ; Restore old *error* handler
(princ) ) ;;;
;;; Interactive spiral generation
;;; (defun C:3DSPIRAL (/ olderr ocmd oblp nt bp hg vg sr lp)
(setq olderr *error*
*error* myerror)
(setq ocmd (getvar "cmdecho"))
(setq oblp (getvar "blipmode"))
(setvar "cmdecho" 0)
(initget 1) ; bp must not be null
(setq bp (getpoint "\nCenter point: "))
(initget 7) ; nt must not be zero, neg, or null
(setq nt (getint "\nNumber of rotations: "))
(initget 7) ; sr must not be zero, neg, or null
(setq sr (getdist bp "\nStarting radius: "))
(initget 1) ; cf must not be zero, or null
(setq hg (getdist "\nHorizontal growth per rotation: "))
(initget 3) ; cf must not be zero, or null
(setq vg (getdist "\nVertical growth per rotation: "))
(initget 6) ; lp must not be zero or neg
(setq lp (getint "\nPoints per rotation <30>: "))
(cond ((null lp) (setq lp 30)))
(cspiral nt bp hg lp sr vg)
(setvar "cmdecho" ocmd)
(setvar "blipmode" oblp)
(setq *error* olderr) ; Restore old *error* handler
(princ) ) ;;; --------------------------------------------------------------------------;
(princ "\n\tC:SPIRAL and C:3DSPIRAL loaded. ")
(princ)
发表于 2004-3-5 21:15:00 | 显示全部楼层
你是什么单位的,搞道路的吧,我的qq66832783,有什么可以共同探讨一下吧
发表于 2004-3-10 11:57:00 | 显示全部楼层
可以用Lisp编一个,用Align可以代替坐标变换的编程。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-26 01:56 , Processed in 0.218866 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表