明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 740|回复: 2

[提问] 绘制填充边界 如何增加范围预览和中途返回上一点?

[复制链接]
发表于 2020-11-16 02:26:51 | 显示全部楼层 |阅读模式
因为习惯所以做了一个直接绘制边界然后生成填充区域的简单程序
惯例通病:不能中途退出,不能修正选错的点,也不能显示填充范围。
特别希望能像AREA这样能够显示范围,还能返回上一点。不知道有什么函数能做到!

;;绘制边界填充
(defun Mc:hatch (HNAME BL JD / p0 p1 p2 p3 ent Pls)
                (try-osmode0);取消捕捉
  (setq CLY        (getvar "clayer"))
        (setvar "clayer" "0")
        (if (setq p1 (getpoint (strcat "\n 指定封闭填充区域>>>填充图案为>>" HNAME)))               
            (command "-bhatch" "properties" HNAME  BL JD p1)
                (progn
                (c:zz);恢复捕捉
    (setq p2 (getpoint (strcat "\n指定填充区域第一点>>>填充图案为>>>"  HNAME )))       
         (setq p0 P2)
         (setq ent (entlast))               
                 (while (setq p3 (getpoint p0 "\n指定第二点"))
                  (command "PLINE" p2 p3 "")
                        ( SETQ P2 P3)
                 )       
    (command "PLINE" p2 p0 "")
                (COMMAND "pedit" "m" (last_ent  ent) ""  "j" 0.5 "")       
                (SETQ Pls (entlast))
                (command "-bhatch" "p" HNAME  BL JD "s" Pls "" "")
                (command "CHPROP" (entlast) ""  "C" 3 "")
    (entdel Pls)                       
        ))
        (setvar "clayer" cly)
        (try-osmode1);恢复捕捉
)









本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2020-11-19 21:29:32 | 显示全部楼层
本帖最后由 wen1235 于 2020-11-19 21:41 编辑

 
 你这个问题可以去看一下Et工具里的“Copym.lsp” 再看了一下,你用line可以了。满三个点,你就头尾相连。填充,隐藏。选点。就这样重复~


;;
;;  Copym.lsp - Multiple copy command with measure, divide and array capabilities.
;;                    
;;
;;  Copyright ?1999 by Autodesk, Inc.
;;
;;  Your use of this software is governed by the terms and conditions
;;  of the License Agreement you accepted prior to installation of this
;;  software.  Please note that pursuant to the License Agreement for this
;;  software, "[c]opying of this computer program or its documentation
;;  except as permitted by this License is copyright infringement under
;;  the laws of your country.  If you copy this computer program without
;;  permission of Autodesk, you are violating the law."
;;
;;  AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
;;  AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
;;  MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK, INC.
;;  DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
;;  UNINTERRUPTED OR ERROR FREE.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2025-5-17 18:32 , Processed in 0.167300 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表