找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 520|回复: 1

[求助] [求助]:对vlax-curve系列涵数的解释中的“参数”具体是指什么?

[复制链接]
发表于 2004-10-5 21:54:38 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
vlax-curve-getendparam 函数是指获得曲线终点的“参数”,请问这个“参数”具体是指什么?是指这一点的切线的斜率吗?
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
发表于 2004-10-5 23:34:52 | 显示全部楼层
对不同类型的曲线,param代表的意义不尽相同,但肯定不是斜率。
Doug Broad 有这段回复,希望对你有用,他没有解释spline,但据我观察,对spline来说,param值和knots属性值有关。我觉得param参数只是起一个过渡作用,没有必要深究其几何意义。制定的人可能也是图个方便,对各种曲线找出一种单调对应的关系就行。当然也方便使用者的理解,比如对园来说param是从0到2*pi就是对应圆周角度。下面是Doug Broad对Mark类似问题的答复。

Re: What is a param? as in vlax-get-param-xxx
Mark,
If you want to stay with activeX,
1. The parameter for any point on an arc is the angle of the ray in
radians drawn from the center of the arc to that point with east being
0.
For a line, the start param is 0, the end param is its length
For a polyline, the start param is 0, the end param is the number
of verticies-1.
For a circle, the start param is 0 and the end param is 2*pi.

2. To get the start param for an arc use:
(setq arcstartparam (vlax-curve-getparamatdist <arcobject> 0))
or
(setq arcstartparam(vlax-curve-getstartparam <arcobject>))

3. To get the first derviative (slope of the arc) at that point, use
(setq arcstartslope (vlax-curve-get-firstderiv <arcobject> arcstartparam)
The return value is a pseudo vector (sort of a deltax, deltay, deltaz).
I am not sure what the exact quantities mean. For instance,
(vlax-curve-get-firstderiv <arcobject> 0) would give ( 0.0 <positive number> 0.0)

4. To get the start point of the arc (in list form)
(vlax-curve-getpointatparam <arcobject> startparam)
or
(vlax-get <arcobject> "startpoint")
or
(vlax-safearray->list(variant-value(vla-get-startpoin t <arcobject>)))

5. To get the other endpoint of the line, use
(polar <startpt> (+ pi (atan (car <firstderiv>) (cadr <firsderiv>))) <linelength>)

To use regular command methods to draw the stuff is much simpler. For
instance, hitting the return for the first prompt in the line command after
an arc, locks the line tangent to the end of the arc. You need only enter
the distance.

(command "arc" <start> "c" <center> <end> "line" "" <length> "")
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2025-9-27 11:53 , Processed in 0.159746 second(s), 32 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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