Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Split using plane size?
Lee_Hesketh
Member, Developers Posts: 148 ✭✭✭
I am trying to make a script that creates mitred corners. I thought of creating a plane and then calling opSplit. But then I realised that the plane is infinite and will not just split the desired corner, but the whole part. Is there a way of setting an "effect radius"? Such that it will only split a part in a certain radius.
If not, what will be the best way of making mitred corners using featurescript?
If not, what will be the best way of making mitred corners using featurescript?
There are 10 types of people in the world. Those who know binary, those who don't and those who didn't expect base 3!
Tagged:
0
Comments
So you can see it has split the corner, but it has extended past and split the back face. I would like to prevent this. I know that this is because the plane is infinite, but it would be nice if the split stopped at the boundary of the plane object.
qSketchRegion (https://cad.onshape.com/FsDoc/library.html#qSketchRegion-Id-boolean) can be used to select the sketch regions created by a certain sketch.
I'm trying to do something very similar to what Lee initially asked on this thread. I have some reference geometries from which I draw line segments; then, I extrude them as surfaces in order to use it as a splitting tool.
Here's my code:
Note: I'd run a for-loop to go through all the tools (surfaces), but I simplified it for debugging purposes.
The issue I'm encountering is that when I call opSplit I get an issue where it's assuming the plane on which the "tools[0]" surface exists instead of the surface itself. Due to this the split that results is incorrect:
I've debugged the query to make sure that it is indeed the surface, and verified that it is of non-infinite area:
I've tried using the "useTrimmed" parameter for the opSplit, but then it throws a fit.
What am I doing wrong?
Sharing the document here would help diagnose, but I believe opSplitPart will always extend a planar input to do an infinite cut.
An annoying but functional workaround is to pass in a sheet body with an extra face. So, instead of extruding a line to form a planar tool, instead extrude that same line with another short line, angled off the end. When you pass in that resulting body to opSplitPart (as you already are doing) it will not be extended in any direction.
You can use an opBoolean with a surface.
IR for AS/NZS 1100
useTrimmed should work. If you make your doc public and give a link, or just contact support, we can take a look into why it is failing. Maybe because the sheets don't cut all the way through the parts? Are you intending to just split the faces or do you actually want to split the parts into separate parts. If the former you could use opSplitFace, if the latter, make sure your bodies cut all the way though the parts they are trying to split.