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.
Trim previous sketch entities with FS?
EvanReese
Member, Mentor Posts: 2,186 ✭✭✭✭✭
I'm working on a feature that—among many other steps—copies and trims some existing sketch curves. I want the output to look and behave just like a normal sketch entity. I'd asked previously about whether we can do something like "use" to convert an existing entity into my sketch that the feature is making (was told no). I'm still trying to solve the same thing here but with a different approach. Now the method looks like:
- opPattern() to copy the input sketch curve in place
- opSplitPart() to cut it into 2 wire bodies since opSplitEdges() does split the edge, but keeps it as 1 wire body somehow.
- opDeleteBodies() what I don't want to keep
Evan Reese
Tagged:
0
Answers
Now I know nothing of featurescript shorthand such as opPattern()
But maybe this approach might help
So with regards to getting a curve to where it can enter the feature world, where the feature is dependent on direction, I wonder if this would work
My idea is to combine the code of the following features - into your feature. I'm assuming you can look at and copy the code behind various custom featurescripts.
For starters, you mentioned manually assigning a direction
So to do this, if you could incorporate the code of MultiMateConnector to act as an IMPLICIT MATE inside your feature
Next, you would need to make a CUSTOM EXTRUDE FEATURE, made up of the code of the following 3 features. Extrude Vertex, Curve Pattern, Loft - and these combined, would give the result of an extrude surface. See Part Studio — BETTER WAY
So once you have a surface object, you could use all kinds of other features on it.
Note - I’m pretty sure the curve that am starting with, is not planar
I hope this made at least a tiny bit of sense LOL
See the doc below
https://cad.onshape.com/documents/3c6e446153b8ca5cf734a854/w/e4ffc0fe2ef0d0c8152a62a1/e/5778df09fee6a8a39c0ddfd1
Thanks for this. It's not that I can't personally get the curve to extrude—I can just pick a "real" sketch edge first, then my funny one, since extrude direction is determined by the first entity picked (as one example). My issue is that I want other people to be able to without having to think of it any differently than a normal sketch.
As an aside, I did notice that even the new "extrude direction" option in extrude doesn't overcome this issue, but I feel like it could be updated to make that work. That's another topic though.