乐筑天下

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

[编程交流] dxf group pts, hard coded vari

[复制链接]

37

主题

125

帖子

87

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
190
发表于 2022-7-6 17:17:15 | 显示全部楼层 |阅读模式
Hey folks
 
have three questions today hopefully you's can provide some insight into at least one of them
 
1. Once a list of points has been derived from a lwpolyline i'd like to use these points to select objects within the parameters of the entity whilch the points where derived from. I can't figure out how to enter all the points into a command. Can this be done or could someone provide an alternative method for this task>
 
2. At my work the rest of the staff use Anvil; an old tablet driven program for any 2D work. I don't have the eyesigth for effective use of the tablet or the will power to learn such a backward CAD package. Before creatingthe iges file the parts are set to levels (layers on Autocad) ranged  from 11-49. Rather than having to hard code a variable for each program that requires at least one variable for each layer , for example a selection set for each. I was hoping there is a way to create the variables by use of a loop with a cntr?
 
3. Smartcam is not a big fan of sharp edge on profiles therefore there has to be a fillet on each corner or change in angle. is there a way to gather these points?
 
Any help will be greatly appreciated.
 
Thanks,
Ollie.
回复

使用道具 举报

2

主题

439

帖子

536

银币

限制会员

铜币
-14
发表于 2022-7-6 17:34:11 | 显示全部楼层
1. You need function like this:
 
  1. (defun GetLwPolyVertexes(Ename) (mapcar 'cdr(vl-remove-if '(lambda(x)(/= 10(car x)))(entget Ename))) ); end of GetLwPolyVertexes
 
Try in command line:
 
  1. Command: (GetLwPolyVertexes(car(entsel)))Select object: ((-227861.0 168724.0) (-217784.0 173601.0) (-215580.0 167702.0) (-209597.0 168567.0) (-212746.0 174466.0) (-220855.0 178792.0) (-227074.0 174702.0))
 
2. Variable for each layer? For example variable for layer 11:
 
  1. (setq L11 (sssetfirst nil (ssget "_X" '((8 . "11")))))
回复

使用道具 举报

37

主题

125

帖子

87

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
190
发表于 2022-7-6 17:56:55 | 显示全部楼层
Thanks for the input. I tried the first two and couldn't seem to get anything to happen iwith them. i've been using a pice of code to this effect to get the points
  1. (setq Ent_group (entget(car(entsel))))(foreach a Ent_group  (if (= 10 (car a))    (setq verlist(append verlist(list(cdr a)))))
The main problem i am having is a can't create a fence selection from the points for example i thought this might have worked, it didn't
 
  1. ("command"move""f"verlist"")
As for the  last part i was hoping you could elaborae on how it worked a bit, most of my lisp knowledge is based on excessive lengths of time using trial and error and i don't have a clue how i would implement such code. the the selection set i would be using for each layer would roughly be.
 
 
 
  1.    (Setq break_check_10          (ssget "x"             '(           (-4 . "")         )       )   )
回复

使用道具 举报

2

主题

439

帖子

536

银币

限制会员

铜币
-14
发表于 2022-7-6 18:08:24 | 显示全部楼层
Look this http://www.cadtutor.net/forum/showthread.php?t=11682 and http://www.cadtutor.net/forum/showthread.php?t=14070 for examples.
回复

使用道具 举报

37

主题

125

帖子

87

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
190
发表于 2022-7-6 18:26:38 | 显示全部楼层
Those examples are great, thanks
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-4 16:19 , Processed in 0.344951 second(s), 62 queries .

© 2020-2025 乐筑天下

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