马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
 - (defun xd::Geom:isArc (pts fuzz / #center #endang #normal #radius #refvec #startang ang g lst normal ret tf x)
- (if (= (type pts) 'ENAME)
- (progn
- (setq lst (xdrx_getsamplept pts 3)
- normal (xdrx_getpropertyvalue pts "normal")
- g (xdge::constructor "kcircarc3d")
- )
- (xdge::setpropertyvalue g "set" (car lst) (cadr lst) (last lst))
- (if (equal (xdrx_getpropertyvalue pts "area")
- (xdge::getpropertyvalue g "area") fuzz
- )
- (progn
- (setq tf t)
- )
- )
- )
- (progn
- (setq lst (list (car pts) (nth (fix (/ (length pts) 2.0)) pts)
- (last pts)
- )
- normal (getvar "viewdir")
- g (xdge::constructor "kcircarc3d")
- )
- (xdge::setpropertyvalue g "set" (car lst) (cadr lst) (last lst))
- (if (vl-every '(lambda (x)
- (equal (xdge::getpropertyvalue g "distanceto" x) 0.0
- fuzz
- )
- ) pts
- )
- (progn
- (setq tf t)
- )
- )
- )
- )
- (if tf
- (progn
- (setq ret (xdge::getpropertyvalue g "center" "radius" "startang"
- "endang" "refvec" "normal"
- )
- ang (xdrx_vector_angleonplane #refvec #normal)
- ret (list #center #radius (+ #startang
- ang
- ) (+ #endang
- ang
- )
- )
- )
- )
- )
- (xdge::free g)
- ret
- )
|