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.
opSplit with evFaceTangentPlane... or anything, really
adamohern
Member, OS Professional Posts: 216 PRO
I'm having trouble getting opSplit to work. My ultimate goal is to create something similar to the "cut with surface" tool in SolidWorks, where I can lop off a chunk of material in one operation using a face, plane, or sketch as input.
My assumption was that if I query a face, I could just feed that face into the opSplit operation. No such luck, as it doesn't seem to work even in easy cases. I thought maybe it needed to be a sheet body first, so I tried doing an opOffsetFaces first and then feeding the result into the opSplit. No dice. So I gave up and decided to use a plane instead, just to keep messing with it. I used evFaceTangentPlane to create a plane from an input face, and then tried to use it in the opSplit... but apparently opSplit only allows queries, not explicit planes. Sigh.
Sorry for the long story, just wanted to provide some context in case someone might be so kind as to explain where my thinking's gone wrong here. I'm trying to learn to fish.
My assumption was that if I query a face, I could just feed that face into the opSplit operation. No such luck, as it doesn't seem to work even in easy cases. I thought maybe it needed to be a sheet body first, so I tried doing an opOffsetFaces first and then feeding the result into the opSplit. No dice. So I gave up and decided to use a plane instead, just to keep messing with it. I used evFaceTangentPlane to create a plane from an input face, and then tried to use it in the opSplit... but apparently opSplit only allows queries, not explicit planes. Sigh.
Sorry for the long story, just wanted to provide some context in case someone might be so kind as to explain where my thinking's gone wrong here. I'm trying to learn to fish.
1
Comments
One piece of fishing advice... Why not start by copying Onshape's split feature? It's got a pre-made GUI and a functional implementation to boot (Here, the call to qOwnerBody in there is what tipped me off about what you might be missing). For a case like this I imagine it's easier to iterate on working code than to start blind and trying to get something to work.
I was trying to avoid that, since I don't ultimately want to keep the plane. It seemed cleaner to use a regular 'plane' than creating an opPlane, since I wouldn't have to delete it afterwards. Oh, well.
Ah, of course. So does Onshape not have a sheet offset tool? If not, I'm assuming it's impossible to create one? That's a pretty huge limitation. Is there any way to duplicate a face such that it becomes a sheet?
Because if you remove the face-splitting capabilities of the split feature, all you end up with is:
Helpful as that is, it's really not all that informative. Basically the feature just lets the user fill in the arguments for the built-in opSplitPart command--I could have figured that out on my own. What I'm trying to do is improve on opSplitPart, so my approach is going to have to be different.