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.
Are sketch operations like "offset" or "split" available in featurescript?
ron_moreland
Member Posts: 90 ✭✭
Best Answers
-
NeilCooke Moderator, Onshape Employees Posts: 5,671No they are not. You must explicitly create each sketch element.Senior Director, Technical Services, EMEAI5
-
ron_moreland Member Posts: 90 ✭✭I believe the featurescript "source" is available. Can I use that as a guide? Where can I find it?0
-
NeilCooke Moderator, Onshape Employees Posts: 5,671This is the source code, but split and offset are not created using FeatureScript.
https://cad.onshape.com/documents/12312312345abcabcabcdeff
Senior Director, Technical Services, EMEAI5
Answers
https://cad.onshape.com/documents/12312312345abcabcabcdeff
Using surface/solid bodies as construction tools sounds messy, but as long as you opDelete the bodies when you're done, no harm no foul.
There are a lot of very good tools. I have to look at what's there and wish for what isn't.
Thanks.
I used Flange.fs as a starting place and my script works decently well, thanks for the work you put in. I have a question about your script. When you look for faces to move you did this:
Can you explain this? Why not use just the faces adjacent to the start cap? or all the faces except the start cap?
Because just querying for adjacent faces might give me the inner boundary instead of the outer boundary. The purpose of the FS was to create a flange that was an offset of the outer edge of the selected face, leaving the inner edge the same. If I wanted to offset all the faces, then this step wouldn't be necessary. For example, if I selected the end of a hollow tube, I wanted to make sure I was using the surface corresponding to the outer diameter, not the inner diameter.
In a future iteration of the FS, I'm thinking of letting the user individually select the inner and outer offset. In doing that, I would still need to separate out the inner and outer boundary, so this bounding box check will stay regardless.