马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
XD::Entity:XDIR函数见:http://bbs.xdcad.net/thread-704544-1-1.html
[sell=2] - (defun c:xdtb_dimjoin (/ base e1 e2 ints xdir1 xdir2 xLine xLine1 xLine2)
- (if (and
- (setq e1 (xdrx_entsel "\n选取第一个标注<退出>:" '((0 . "dimension")
- (-4 . "<or")
- (70 . 32)
- (70 . 33)
- (-4 . "or>")
- )
- )
- )
- (setq e2 (xdrx_entsel "\n选取第二个标注<退出>:" '((0 . "dimension")
- (-4 . "<or")
- (70 . 32)
- (70 . 33)
- (-4 . "or>")
- )
- )
- )
- (setq e1 (car e1)
- e2 (car e2)
- xLine1 (mapcar
- 'car
- (xd::dim:xLine e1)
- )
- xLine2 (mapcar
- 'car
- (xd::dim:xline e2)
- )
- xLine (append
- xLine1
- xLine2
- )
- xdir1 (xd::entity:xdir e1)
- xdir2 (xd::entity:xdir e2)
- )
- (xdrx_vector_IsParallel xdir1 xdir2)
- )
- (progn
- (xdrx_begin)
- (setq base (xd::dim:basepoints e1)
- ints (mapcar
- 'cadr
- (xdrx_points_sortoncurve base xLine)
- )
- p1 (nth 1 ints)
- p2 (nth 2 ints)
- )
- (if (> (distance p1 p2) 0.0)
- (progn
- (xdrx_dimension_makerotate (nth 1 ints) (nth 2 ints) (car base)
- (xd::dim:angle e1)
- )
- (xdrx_entity_matchprop (entlast) e1)
- )
- )
- (xdrx_end)
- )
- (if (and
- e1
- e2
- )
- (xdrx_prompt "\n两尺寸方向不一致,不能连接.")
- )
- )
- (princ)
- )
[/sell]
|