马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
使用(entmake)制作线段中遇到个极其奇怪的bug:
插入一个带属性(ATTDEF)的块后,但删除该块的时候,就很容易出现(entmake)无效的bug。
但不是每时候都会出现。
哪位大侠知道为何原因?

- [FONT=courier new]
- ;;; 制造 LINE ; input: 起始 pt1 终止pt2
- ;;; m_line:3D线;m_line2:2D线。
- (defun #m_line (pt1 pt2 lay color ltype / e0)
- (if (chengs_IsUcs)
- (setq pt1 (trans pt1 1 0)
- pt2 (trans pt2 1 0)
- )
- )
- (if ltype
- (setq e0 (list (cons 0 "LINE") (cons 8 lay) (cons 10 pt1) (cons 11 pt2)
- (cons 6 ltype)
- )
- )
- (setq e0 (list (cons 0 "LINE") (cons 8 lay) (cons 10 pt1) (cons 11 pt2)))
- )
- (if (= (type color) 'STR)
- (setq color (atoi color))
- )
- (if (/= -1 color)
- (setq e0 (append
- e0
- (list (cons 62 color))
- )
- )
- )
- (if (entmake e0)
- (entlast)
- )
- )
- ;;; endfun #m_line
- [/FONT]
|