找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 4414|回复: 9

[他山之石] Automatic Block Break

[复制链接]

已领礼包: 1999个

财富等级: 堆金积玉

发表于 2013-5-9 13:46:23 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

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

×
Program Description

I've seen quite a few programs of this nature, enabling the user to automatically break an object onto which a block is inserted, and so I decided to write my own.

The program will allow a user to insert (or copy) a block at a specified point with all objects surrounding the block trimmed to the rectangular block outline as demonstrated in the animation below. In addition, with the Automatic Block Rotation option set to On, if a curve object is detected at the block insertion point, the block will be automatically rotated to align with the curve.

The method utilised by the program to trim the objects surrounding the block is to obtain the dimensions of the bounding box of the selected block at zero rotation, and, following transformation of such bounding box to account for block rotation, scale and orientation, the program tests for intersections between an LWPolyline (constructed from the bounding box coordinates), and a selection set of the surrounding objects.

This method, although accurate in most cases, makes the assumption that the points of intersection between the block and surrounding objects are the extremeties of the block.

The program offers three commands:

ABB: Auto Block Break

Upon calling the program with ABB, the program first prompts the user to select a block to insert. At this prompt the user may select a block from the drawing, or type Browse to browse for a drawing file to insert. The user may also alter the program rotation setting by typing Rotation when prompted.

Following a valid response, the program prompts the user to specify an insertion point for the block.

If a curve object (Arc, Elliptical Arc, Ellipse, Circle, Line, XLine, Spline, LWPolyline or Polyline) is detected at the block insertion point and the program rotation setting is enabled, the inserted block will be automatically rotated to align with the curve at an angle providing maximum readability of any attributes which may be present.

Finally, all surrounding compatible objects found to intersect with the inserted block are then trimmed to the rectangular block outline.


请点击此处下载

查看状态:需购买或无权限

您的用户组是:游客

文件名称:AutoBlockBreakV1-5.lsp 
下载次数:243  文件大小:27.3 KB 
下载权限: 不限 以上  [免费赚D豆]



Examples

abb.gif


abb2.gif


ABBE: Auto Block Break Existing

Upon calling the program with ABBE, the user is prompted to select an existing block in the drawing. At this prompt, the user may also alter the program rotation setting by typing Rotation at the prompt.

Following a valid selection, If a curve object is detected at the insertion point of the selected block and the program rotation setting is enabled, the block will be automatically rotated to align with the curve, again at an angle retaining maximum readability.

All surrounding compatible objects found to intersect with the selected block are then trimmed to the rectangular block outline.


Example

abbe.gif



ABBS: Auto Block Break Selection

This third command enables the user to select multiple existing blocks and automatically trim all surrounding geometry to the rectangular outline of each block.

Optionally, the program will automatically rotate each block in the selection to align with curve objects detected to pass through the block insertion point.



Example

abbs.gif




评分

参与人数 2D豆 +15 贡献 +1 收起 理由
ScmTools + 5 technical points Award!
XDSoft + 10 + 1 很给力!经验;技术要点;资料分享奖!

查看全部评分

论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!

已领礼包: 19个

财富等级: 恭喜发财

发表于 2013-5-9 13:53:45 | 显示全部楼层
好强大,是直接打断的线还是用的wipeout ?
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

已领礼包: 3394个

财富等级: 富可敌国

发表于 2013-5-9 17:26:15 | 显示全部楼层
好东西,谢谢楼主分享
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

已领礼包: 6468个

财富等级: 富甲天下

发表于 2013-5-13 16:24:19 | 显示全部楼层
太牛了,支持。
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2013-5-21 19:56:01 | 显示全部楼层
太牛了,支持:(
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2013-8-1 20:58:58 | 显示全部楼层
太强大了!!
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复

使用道具 举报

发表于 2013-11-8 11:43:39 | 显示全部楼层
好神奇!               
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2016-7-13 12:57:59 | 显示全部楼层
6666666666666666666666666666666666666666666
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

已领礼包: 2个

财富等级: 恭喜发财

发表于 2016-9-17 17:52:12 | 显示全部楼层

太强大了!!
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复

使用道具 举报

已领礼包: 69个

财富等级: 招财进宝

发表于 2018-8-1 00:30:43 | 显示全部楼层
这个真的很牛逼啊,感谢楼主!
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-4-26 23:49 , Processed in 0.197805 second(s), 58 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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