马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
Program DescriptionI'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 BreakUpon 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.
Examples
ABBE: Auto Block Break ExistingUpon 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
ABBS: Auto Block Break SelectionThis 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
|