BDYCAD
发表于 2005-1-24 17:19:00
; 提取圆弧的 < 起点 > < 中点 > < 终点 > <BR>;用法例子:<BR>;;; (SETQ EB (CAR (ENTSEL "选择圆弧:")))<BR>;;; (SETQ ARC3P (BDY-GetArc-3P EB))
; 编写 包达勇<BR>; 时间: 2005-01-24
(DEFUN BDY-GetArc-3P (EB / EX)<BR> (VL-LOAD-COM)<BR> (SETQ EX (VLAX-ENAME->VLA-OBJECT EB))<BR> (LIST (vlax-safearray->list(vlax-variant-value(VLA-GET-STARTPOINT EX)))<BR> (vlax-curve-getPointAtDist EX (* 0.5 (VLA-GET-ARCLENGTH EX)))<BR> (vlax-safearray->list(vlax-variant-value(VLA-GET-ENDPOINT EX)))<BR> )<BR> )
无痕
发表于 2005-2-20 15:08:00
;功能同上,适用所有曲线.(DEFUN xl-3p (e / ps pe pm)
(setq ps (vlax-curve-getstartparam e)
pe (vlax-curve-getendparam e)
pm (/ (- pe ps) 2))
(mapcar 'vlax-curve-getpointatparam (list e e e) (list ps pm pe))
)
li809
发表于 2005-2-22 22:08:00
精彩
无痕
发表于 2005-2-25 14:08:00
;|求点集中最远,最近点表.<BR>返回:(最远两点 最近两点)<BR> (xpts-lensort (while (setq pt(getpoint)) (setq plst (cons pt plst)))))<BR> ->(((14857.8 -599.932 0.0) (26695.2 -3687.68 0.0)) ((15733.8 -3687.68 0.0) (15630.7 -3842.07 0.0)))<BR>|;<BR>(defun xpts-lensort (ptlst / pt d maxd mind maxl minl)<BR> (setq minl (list (car ptlst)(cadr ptlst)) maxd 0 mind (apply 'distance minl))<BR> (while (setq pt (car ptlst) ptlst (cdr ptlst))<BR> (foreach n ptlst<BR> (setq d (distance n pt))<BR> (cond ((< maxd d)(setq maxd d maxl (list n pt)))<BR> ((> mind d)(setq mind d minl (list n pt)))<BR> )<BR> )<BR> )(list maxl minl)<BR>)
<BR>
BDYCAD
发表于 2005-2-25 16:38:00
测三个点的夹角. 充下数
;;;(setq p1(getpoint) p2(getpoint) p3(getpoint))<BR> ;(ThreePoint-Angle 起点 中点 终点)<BR>(defun ThreePoint-Angle(p1 p2 p3 / a1 a2 a3)<BR> (setq a1 (angle p2 p3) a2 (angle p2 p1)a3 (abs (- a1 a2)))<BR> (/ (* a3 180) pi)<BR> )
changch
发表于 2005-5-2 18:57:00
太历害了
cwjheihei
发表于 2005-7-1 00:43:00
要有流程图
mmmjjj
发表于 2005-8-15 16:22:00
高手出招,百看不厌,受益良多,有无三维转平面的程序,即将Z值统统变为0?
hulei_accp
发表于 2005-10-23 21:18:00
<P>王帮主,有一日一练吗?</P>
love_hate
发表于 2005-12-11 15:44:00
<P>非常好啊,好东西大家分享嘛!!!!</P>
页:
1
2
3
4
5
[6]
7
8
9
10
11
12
13
14
15