田草博客

互联网田草博客


网友交流QQ群:11740834 需注明申请加入原因

微信 公众号:ByCAD

邮箱:tiancao1001x126.com
ByCAD,微信公众号
首页 | 普通 | 电脑 | AutoCAD | VB/VB.NET | FLash | 结构 | 建筑 | 电影 | BIM | 规范 | 软件 | ID
-随机-|-分布-
-博客论坛-|-﨣﨤﨧﨨-
-网站导航-|-规范下载-
-BelovedFLash欣赏-

用户登陆
用户:
密码:
 

站点日历
73 2024 - 3 48
     12
3456789
10111213141516
17181920212223
24252627282930
31


站点统计

最新评论



Automatic Block Break 单行文字转多行文字带背景遮罩
未知 圆形区域覆盖   [ 日期:2018-12-05 ]   [ 来自:本站原创 ]  HTML
http://www.lee-mac.com/cwipe.html

http://www.lee-mac.com/lisp/html/CircularWipeoutV1-2.html


;;-------------------=={ Circular Wipeout }==-----------------;;
;;                                                            ;;
;;  Enables the user to create a circular wipeout with a      ;;
;;  given center and radius. Works in all UCS & Views.        ;;
;;------------------------------------------------------------;;
;;  Author: Lee Mac, Copyright © 2013 - www.lee-mac.com       ;;
;;------------------------------------------------------------;;
 
(defun c:cwipe ( / cen rad )
    (cond
        (   (not
                (or (member "acwipeout.arx" (arx)) (arxload "acwipeout.arx" nil)
                    (member "acismui.arx"   (arx)) (arxload "acismui.arx"   nil) ;; 2013
                )
            )
            (princ "\nUnable to load wipeout arx files.")
        )
        (   (and
                (setq cen (getpoint "\nSpecify Center: "))
                (setq rad (getdist  "\nSpecify Radius: " cen))
            )
            (LM:CircularWipeout cen rad)
        )
    )
    (princ)
)
 
;;-------------------=={ Circle to Wipeout }==----------------;;
;;                                                            ;;
;;  Enables the user to convert a selection of circles to     ;;
;;  wipeout objects matching the original circle properties.  ;;
;;  Works with circles constructed in any UCS.                ;;
;;------------------------------------------------------------;;
;;  Author: Lee Mac, Copyright © 2013 - www.lee-mac.com       ;;
;;------------------------------------------------------------;;
 
(defun c:c2wipe ( / ent enx inc sel wip )
    (cond
        (   (not
                (or (member "acwipeout.arx" (arx)) (arxload "acwipeout.arx" nil)
                    (member "acismui.arx"   (arx)) (arxload "acismui.arx"   nil) ;; 2013
                )
            )
            (princ "\nUnable to load wipeout arx files.")
        )
        (   (setq sel (ssget "_:L" '((0 . "CIRCLE"))))
            (repeat (setq inc (sslength sel))
                (setq ent (ssname sel (setq inc (1- inc)))
                      enx (entget ent)
                      wip (LM:CircularWipeout (trans (cdr (assoc 10 enx)) ent 1) (cdr (assoc 40 enx)))
                )
                (if wip
                    (progn
                        (entmod (cons (cons -1 wip) (LM:defaultprops (entget wip))))
                        (entdel ent)
                    )
                )
            )
        )
    )
    (princ)
)
 
;; Default Properties  -  Lee Mac
;; Returns a list of DXF properties for the supplied DXF data,
;; substituting default values for absent DXF groups
 
(defun LM:defaultprops ( elist )
    (mapcar
        (function
            (lambda ( pair )
                (cond ((assoc (car pair) elist)) ( pair ))
            )
        )
       '(
            (008 . "0")
            (006 . "BYLAYER")
            (039 . 0.0)
            (062 . 256)
            (048 . 1.0)
            (370 . -1)
        )
    )
)
 
;; Circular Wipeout  -  Lee Mac
;; Creates a circular wipeout with the given center (UCS) & radius
 
(defun LM:CircularWipeout ( cen rad / ang inc lst )
    (setq acc 50
          inc (/ pi acc 0.5)
          ang 0.0
    )
    (repeat acc
        (setq lst (cons (list 14 (* 0.5 (cos ang)) (* 0.5 (sin ang))) lst)
              ang (+ ang inc)
        )
    )
    (entmakex
        (append
            (list
               '(000 . "WIPEOUT")
               '(100 . "AcDbEntity")
               '(100 . "AcDbWipeout")
                (cons 10 (trans (mapcar '- cen (list rad rad)) 1 0))
                (cons 11 (trans (list (+ rad rad) 0.0) 1 0 t))
                (cons 12 (trans (list 0.0 (+ rad rad)) 1 0 t))
               '(280 . 1)
               '(071 . 2)
            )
            (cons (last lst) lst)
        )
    )
)
(princ)




暂时没有评论
发表评论 - 不要忘了输入验证码哦!
作者: 用户:  密码:   注册? 验证:  防止恶意留言请输入问题答案:1*8=?  
评论:

禁止表情
禁止UBB
禁止图片
识别链接
识别关键字

字体样式 文字大小 文字颜色
插入粗体文本 插入斜体文本 插入下划线
左对齐 居中对齐 右对齐
插入超级链接 插入邮件地址 插入图像
插入 Flash 插入代码 插入引用
插入列表 插入音频文件 插入视频文件
插入缩进符合
点击下载按钮 下标 上标
水平线 简介分割标记
表  情
 
Tiancao Blog All Rights Reserved 田草博客 版权所有
Copyright ©