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.
Issu with opSplitPart
MikeSarrey
Posts: 2 ✭
Hello all !
I'm a new Onshape user and I'm trying to make my first script.
This script goal is to make a helical cam like this :

I made this part using Solidworks pretty easily using 3d parametric curve but it seems that there are no similar feature on Onshape. That's why I'm trying to write it by myself. Actually, I almost succeeded by genereting with the script the 2 curves, creating a surface between them and a ring. My problem is with the opSlipPart. I don't understand how it work. I want to split the ring with my wave surface and to keep the part from
https://cad.onshape.com/documents/6d44ab7129cbaa1042d4ab5a/w/a7f47da4d52d7aa4e1c1f1e5/e/14c0ced3d21998160c14140b
I'm a new Onshape user and I'm trying to make my first script.
This script goal is to make a helical cam like this :

I made this part using Solidworks pretty easily using 3d parametric curve but it seems that there are no similar feature on Onshape. That's why I'm trying to write it by myself. Actually, I almost succeeded by genereting with the script the 2 curves, creating a surface between them and a ring. My problem is with the opSlipPart. I don't understand how it work. I want to split the ring with my wave surface and to keep the part from
https://cad.onshape.com/documents/6d44ab7129cbaa1042d4ab5a/w/a7f47da4d52d7aa4e1c1f1e5/e/14c0ced3d21998160c14140b
0
Comments
-
FYI, there is a parametric curve custom feature here: https://cad.onshape.com/documents/578ff8b3e4b0e65410fcfda3/v/ee58cb1db7f6bcf3edeb1122/e/cc0c3d5644a78b1b64d6c3b4Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc0
-
I think the problem in your code is with the targets query for opSplitPart: qCreatedBy(id + "Ring", EntityType.BODY) doesn't resolve to anything because a boolean doesn't create bodies, it modifies existing ones. qCreatedBy(id + "cylinder1", EntityType.BODY) should work better. In any case, you can use debug to see what a query evaluates to.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc0
-
Thank you very much for your answer ! It works well !0
-
there are a number of ways in OS to create such profile - Sketch wrapper FS for example allows a nice control abilities, as it uses 2d sketch curve that is mapped to the cylinder or cone face
https://cad.onshape.com/documents/fe622d67f34560a1c1e2a0ca/w/7a13fae6edb7aed2a88c4cf1/e/13d6aedaac72d5c14499c2a7
1


