马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
 - (defun XD::Geom:getPolyBox (e offset / box el pts1 pts2)
- (if (and
- (= 'ENAME (type e))
- (not (xdrx_curve_isclosed e))
- )
- (progn
- (setq e (xdrx_getsamplept e))
- )
- )
- (if (= (type e) 'LIST)
- (if (> (length e) 1)
- (progn
- (setq e (cons (polar (car e) (angle (car e) (cadr e)) (- offset))
- (cdr e)
- )
- e (append
- (xd::list:removeTail e)
- (list (polar (last e) (angle (nth (- (length e) 2) e)
- (last e)
- ) offset
- )
- )
- )
- pts1 (apply
- 'xdrx_points_offset
- (cons offset e)
- )
- pts2 (apply
- 'xdrx_points_offset
- (cons (- offset) e)
- )
- )
- (append
- pts2
- (reverse pts1)
- )
- )
- (progn
- (setq el (xdrx_circle_make (car e) (abs offset))
- box (XD::Pnts:ElementZero (xdrx_entity_box el) 1e-3)
- )
- (xdrx_entity_delete el)
- box
- )
- )
- )
- )
|