马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 newer 于 2016-7-27 17:12 编辑
 - (defun XD::Polyline:ResetFirstVertex (ent pnt / e1 e2 lst1 lst2 pos ss typ)
- (setq typ (type ent))
- (cond
- ((= typ 'ENAME)
- (if (xdrx_getpropertyvalue ent "isClosed")
- (progn
- (setq typ (xdrx_object_classname ent))
- (if (= "POLYLINE" (car typ))
- (setq ent (xdrx_polyline_convertfrom ent))
- )
- (if (and
- (xdrx_point_ison pnt ent)
- (setq ss (xdrx_curve_getsplitcurves ent pnt))
- )
- (progn
- (ssdel (entlast) ss)
- (setq e1 (entlast)
- e2 (ssname ss 0)
- )
- (xdrx_curve->polyline e1 e2)
- (xdrx_object_swapid ent e1)
- )
- )
- )
- )
- )
- ((= typ 'LIST)
- (if (setq pos (XD::List:Position pnt ent))
- (progn
- (setq lst1 (xd::list:n+ ent pos)
- lst2 (xd::list:n- ent pos)
- )
- (append
- lst1
- lst2
- )
- )
- )
- )
- )
- )
|