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.
Introducing "Keyway Generator" feature script
konstantin_shiriazdanov
Member Posts: 1,221 ✭✭✭✭✭
Would like to introduce to the community my FS for generation of prismatic key joints.
One may choose between 2 types of prismatic keys and prismatic key joint for open slot in the shaft.
It allows creation of key slots in shaft, optionaly adds the key itself, and optionaly adds corresponding key slot in the bushing.
Also could be specified: angular position of the key and slots, offset from the end of the shaft, depth for slots in the shaft and bushing, length and width of the key. Currently all key joint parameters requare numeric input, and have standart FS defaults for value with units.
https://cad.onshape.com/documents/10679a4084c4454fa9967774/w/a20ace13ef8c80fcab074d23/e/e3ca70a81d4e0ad794ad2359
One may choose between 2 types of prismatic keys and prismatic key joint for open slot in the shaft.
It allows creation of key slots in shaft, optionaly adds the key itself, and optionaly adds corresponding key slot in the bushing.
Also could be specified: angular position of the key and slots, offset from the end of the shaft, depth for slots in the shaft and bushing, length and width of the key. Currently all key joint parameters requare numeric input, and have standart FS defaults for value with units.
https://cad.onshape.com/documents/10679a4084c4454fa9967774/w/a20ace13ef8c80fcab074d23/e/e3ca70a81d4e0ad794ad2359
2
Comments
Maybe opDeleteBodies on both sketches might be an idea, so one doesn't have to hide the features?
If you want the defaults to auto-populate based on the selected geometry, you need to write an editing logic function. You can see how this is done in the standard modifyFillet feature here: https://cad.onshape.com/documents/12312312345abcabcabcdeff/v/f9422f9ffdaa4a7259396008/e/9fa139fb0be24611874fa080
rotationMatrix3d (axis is array, angle is ValueWithUnits) returns Matrix
but really axis is vector