Jump to content

Trimming everything outside a closed Polyline


Recommended Posts

Is there a command or lisp that will allow you to select a closed polyline and trim everything outside of it even if the items are blocks that aren’t exploded?

 

I’ve tried EXTRIM but that fails on blocks.

Link to comment
Share on other sites

  • Replies 23
  • Created
  • Last Reply

Top Posters In This Topic

  • neophoible

    11

  • RobDraw

    5

  • Bobzy20

    4

  • dbroada

    3

"cookiecutter" that is what I was going to suggest, think my old one was called "detail" or something like. I also have a delete all outside window lisp that could be modified

Link to comment
Share on other sites

I love answering my own questions. :geek:
When you get through patting yourself on the back, have a look at more of this thread.:P
Link to comment
Share on other sites

You can with the CookieCutter.lsp!
You might want to really shine here by actually helping someone other than yourself. For example, you could give a link to the routine. Never mind. I did it myself. See below. Of course, feel free to give an updated or better link, if you have one. Edited by neophoible
added Never mind...
Link to comment
Share on other sites

You cannot trim block insertions.

 

You can with the CookieCutter.lsp!
No, you can't. Well, maybe sort of; but, no, not really. This is a great routine, but it does not leave the block insertion intact, that is, there is no block insertion left when it is done, at least not in the version I found. I suppose a routine could include a way of creating a new block after the trimming, perhaps an anonymous block; but AFAIK, no one has done this yet. It seems doable, though; and perhaps there is an update to the routine. If so, someone should post it here.
Link to comment
Share on other sites

Here is a link to CookieCutter2 http://www.cadtutor.net/forum/showthread.php?44599-cookiecutter2-v1.2.lsp . Note that Lee Mac flagged this as missing its original header, which cites the author. I don't know if this is the latest version or not. Perhaps someone can add to or verify concerning this.

Edited by neophoible
Added the IDK portion
Link to comment
Share on other sites

BTW, anyone searching for CookieCutter ought to be aware that this name has also been applied to ExTrim.lsp, but the OP is right that they are not the same thing in this case (or anymore, etc., depending on how you look at it).

Link to comment
Share on other sites

Another note: CookieCutter... is a great routine. My hat's off to Joe Burke. :notworthy: In the header he cites some of its limitations. I did try the version I linked to (see above) on a dynamic block, but, in my testing, it was unable to handle that. It will be interesting to see if anyone will be able to create a routine to handle that sort of situation. As many gaps as there are in my experience, it's possible that someone has done it already.

Link to comment
Share on other sites

I have only just looked at this thread but I'll jump in with mouth open and both feet ready. You CANNOT trim one block in any way without all other instances of that block becoming identical to the trimmed block. If you explode the block first you are not trimming the block. It is possible to create a new block from the old block with a different name but you would need one block for each variation. You can create a dynamic block that does not display certain parts of its geometry.

 

In normal circumstances, all instances of one block are identical..

Link to comment
Share on other sites

You CANNOT trim one block in any way without all other instances of that block becoming identical to the trimmed block.

 

But you can clip them without affecting the block definition. Probably hard to do with code but can be done manually after using cookie cutter.

Link to comment
Share on other sites

But you can clip them without affecting the block definition. Probably hard to do with code but can be done manually after using cookie cutter.

does it remain a block or is it exploded first?

Link to comment
Share on other sites

It does remain a block.
I'm intruiged. How does it deal with other blocks of the same name? I am going to have to look when I get back to AutoCAD tomorrow.
Link to comment
Share on other sites

It's a new one for me, too. I'm not sure exactly what is going on, yet, but it appears to be similar to a wipeout in that it masks part of the block.

Link to comment
Share on other sites

Well, perhaps I'm not following the discussion well, but... The routine Bobzy20 attached appears to be identical to the one I already linked to, EXCEPT for the credit to Joe Burke. I get the same results with both, namely, they both explode the block. So, if you come in with some sort of masking after using the CookieCutter(s) above, it's already too late, the exploding has already been done. At least that has been my experience when testing the above routine(s) posted by myself and Bobzy20. As I said, these appear to be identical, save the credit.

 

RobDraw, are you referring to these same versions of CookieCutter, or do you have a different version, or what? What am I missing here?

Link to comment
Share on other sites

I'm was not up to speed on my understanding of Cookie Cutter exploding the blocks. Is it an option for the blocks to be left intact?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...