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.
Supported undo functionality
wickedDesigns
Member Posts: 6 ✭
Is there a supported way to perform and then undo an operation in Featurescript?
My current usage case is that I have an error condition that would be easiest to test by performing an opSplitPart and then evaluating some information about the resulting bodies. I know that I could opBoolean them back together, but it feels like it would be more efficient to just pop the split off the stack, so to speak (especially if there was a more complex series of operations needed for testing). I see that there is an abortFeature function, but I am assuming its use isn't supported since it is marked internal.
Perhaps there's a way to declare a sort of private subfeature which performs the error testing and then purposefully fails, throwing its result and thus causing its operations to be undone via the internal feature logic. Would that be a reasonable approach? Is there another approach I'm missing?
My current usage case is that I have an error condition that would be easiest to test by performing an opSplitPart and then evaluating some information about the resulting bodies. I know that I could opBoolean them back together, but it feels like it would be more efficient to just pop the split off the stack, so to speak (especially if there was a more complex series of operations needed for testing). I see that there is an abortFeature function, but I am assuming its use isn't supported since it is marked internal.
Perhaps there's a way to declare a sort of private subfeature which performs the error testing and then purposefully fails, throwing its result and thus causing its operations to be undone via the internal feature logic. Would that be a reasonable approach? Is there another approach I'm missing?
0
Comments
computePatternTangents function in curvePattern.fs of std