用法
评论
建议
取 消
确 定
(defun curve:rectanglep (ent) "测试一个多段线是否为矩形,判断矩形" "T or nil" (and (= (quote ename) (type ent)) (wcmatch (entity:getdxf ent 0) "*POLYLINE") (or (and (= (entity:getdxf ent 90) 4) (= (entity:getdxf ent 70) 1)) (and (= (entity:getdxf ent 90) 5) (= (entity:getdxf ent 70) 0))) (apply (quote =) (entity:getdxf ent 42)) (progn (setq pts (curve:get-points ent)) (setq ang (abs (- (angle (nth 0 pts) (nth 1 pts)) (angle (nth 1 pts) (nth 2 pts))))) (if (> ang pi) (setq ang (- ang pi))) (and (equal ang (* pi 0.5) 1.0e-06) (equal (distance (nth 0 pts) (nth 1 pts)) (distance (nth 2 pts) (nth 3 pts)) 1.0e-06) (equal (distance (nth 0 pts) (nth 2 pts)) (distance (nth 1 pts) (nth 3 pts)) 1.0e-06) (if (nth 4 pts) (< (distance (nth 0 pts) (nth 4 pts)) 1.0e-06) t)))))
函数库使用说明
应用包
技术支持
统计信息
函数库规模: 733 个
函数库类别: 51 种
上传记录
刷新