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.
featurescript - adding features to spur gear script [SOLVED]
matthijs_keuper
Member Posts: 2 ✭
Just discovered featurescript. awesome!
I'd like to add some features to the spur gear scrupt, such as a helical gear
My thought was just to add a boolean button to the feature UI section and go from there:
I'd like to add some features to the spur gear scrupt, such as a helical gear
My thought was just to add a boolean button to the feature UI section and go from there:
annotation { "Name" : "Helical gear" }
definition.helicalGear is boolean;
if (definition.helicalGear)
{
annotation { "Name" : "Pitch (mm)" }
isLength(definition.pitchHelical, LENGTH_BOUNDS);//
annotation { "Name" : "Change direction" }
definition.HelicalMirror is boolean;
annotation { "Name" : "V-type" }
definition.Helicaldouble is boolean;
}
I put this at the end of the other existing features (after "offset").
However, I get
I put this at the end of the other existing features (after "offset").
However, I get
Precondition failed (definition.helicalGear is boolean) I just started with this, so I'm probably missing something benign. Any ideas? |
0
Comments
I have dropped my library , copied from elsewhere, in favour of this - reprinting the gears as we speak so that they are all from the same generator.
Only briefly looked at featurescript so much leaning to do before I am capable of doing it myself. ... when I have a spare moment or two!!