Hello, I was wondering is there is a way of deleting all objects outside a boundary curve, meaning that all objects inside the curve will remain and be splitted from the parts that were outside.
Thank you
Shynn
Hello, I was wondering is there is a way of deleting all objects outside a boundary curve, meaning that all objects inside the curve will remain and be splitted from the parts that were outside.
Thank you
Shynn
Yes, there is, below is a script that will “boundary trim” inside or outside a set of closed curves (trimming curves can be multiple and even nested, but not overlapping).
HTH, --Mitch
MultiNestedBoundaryTrimCurves.py (4.1 KB)
Great! Thank you.
One more thing, how can I change the default search paths for pythong scripts?
I got into the python editor, options, add path, added the path I wanted, and moved it up in the search order, but the default search path still opens. Anyways, what is the purpose of having multiple search paths if you cant swap between them? Or can you?
Shynn
I think the folder that comes up first when looking for scripts is the last used one, or the default if one has not previously opened a script in the current session (that may not be 100% correct though). I don’t think this is user changeable.
The search paths in the editor have nothing to do with this. The paths entered in the editor tell Rhino where to look for python scripts if you want to run them by filename but without specifying a full path.
Thus using an alias like ! _-RunPythonScript "MyScriptName.py"
will run the script MyScriptName if it is found in one of the directories that have been specified in the editor. It looks in each directory in the list in order and stops looking at the first file it finds with the corresponding name.
–Mitch
Hi guys!
Sorry for replying to an old thread but unfortunately the script “MultiNestedBoundaryTrimCurves.py” that I have loved and used for many years doesn’t seem to work in Rhino 7 anymore (it worked perfectly fine in Rhino 5).
Is there any way someone with some Python knowledge could take a look at what has happened or changed? I have uploaded a screengrab from the message I’m getting as I’m trying to run it.
I have been using it almost daily before the Rhino upgrade and I would really appreciate it if someone could update the script somehow! <3
Thank you in advance!
The i in If should be lowercase… if not If
How did it get that way? The original script is not like that or it would not have worked in V5 either.
Oh wow! I have no idea how it got changed to uppercase but now it works perfectly!
Thank you so much for your help! Should I delete my message so that it doesn’t confuse other people?
Glad it’s working now. No, no need to delete the post.