乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 19|回复: 3

[编程交流] 帮助:LISP以分离/修剪/sp

[复制链接]

48

主题

304

帖子

256

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
240
发表于 2022-7-5 18:45:42 | 显示全部楼层 |阅读模式
目前,我的工作涉及根据图中所示改变切割线内外项目的颜色。
 
目前我使用trim命令&这需要很长时间&我有很多这样的实例。
 
有没有Lisp程序的语言可以更快?
 
谢谢
 
切割。图纸
194542tdoo8d8fwocpxzdx.jpg
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 19:18:51 | 显示全部楼层
库克卡特。lsp?
 
第二步修剪图案填充cookiecutter在dwg中删除。
 
想到的唯一一件事是偏移pline边界,获取顶点并使用“F”围栏选项,然后四处走动。这相当于一次只做一段。需要测试时间。
回复

使用道具 举报

48

主题

304

帖子

256

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
240
发表于 2022-7-5 19:41:05 | 显示全部楼层
 
尝试cookiecutter 1.2。
1) 如果我不破坏图案填充,修剪的结果会更好。
2) 但只能使用1个尖端,在我的例子中有2个。
3) 由于第二,我将削减3次,将需要创建重复的文件,因为任何内部或外部我想保留将被删除。
4) 如果我为删除选项选择“否”,它仍将删除,但修剪的结果不符合剪切线。不确定“不”实际上是什么意思。
 
我不得不说,虽然我必须创建图纸的副本并将其组合在一起,但我认为这个LISP可能是我最接近和最好的选择。
 
谢谢BIGAL
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 19:58:39 | 显示全部楼层
方法是取外点线偏移1个单位,然后得到所有顶点,这在“修剪栅栏”中使用,我认为这会起作用,然后对内点线重复两次拾取,但仍然很快。只是需要一些时间。其他人以前也可能有。
一个正在进行的工作,它不工作,但我知道方法是这样做,因为我已经做了这一点,这是一位代码,我没有更多。
  1. ; pline co-ords example
  2. ; By Alan H
  3. (defun getcoords (ent)
  4. (vlax-safearray->list
  5.    (vlax-variant-value
  6.      (vlax-get-property
  7.    (vlax-ename->vla-object ent)
  8.    "Coordinates"
  9.      )
  10.    )
  11. )
  12. )
  13. (defun co-ords2xy ()
  14. ; convert now to a list of xy as co-ords are x y x y x y if 3d x y z x y z
  15. (setq len (length co-ords))
  16. (setq numb (/ len 2)) ; even and odd check required
  17. (setq I 0)
  18. (repeat numb
  19. (setq xy (list (nth i co-ords)(nth (+ I 1) co-ords) ))
  20. ; odd (setq xy (list (nth i co-ords)(nth (+ I 1) co-ords)(nth (+ I 2) co-ords) ))
  21. (setq co-ordsxy (cons xy co-ordsxy))
  22. (setq I (+ I 2))
  23. )
  24. )
  25. ; program starts here
  26. (defun c:trmmer ( / co-ordsxy)
  27. (setq co-ords (getcoords (car (entsel "\nplease pick pline")))) ; chnage to offset one unit
  28. (co-ords2xy) ; list of 2d points making pline
  29. ; need to get this to work
  30. (command "trim" obj "" F co-ordsxy)
  31. )
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-12 13:53 , Processed in 0.576622 second(s), 74 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表