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.
Is it possible to write a standalone function that does not create new features but only returns a value to be used for other inputs in the UI? I'm creating a number of containers that will be 3D printed and want the thin walls to be an ideal thickness for printing. I know the formula used by my slicer to calculate recommended wall thicknesses and want to write a function that will take the layer height, extrusion width, and desired number of perimeters and return the required wall thickness for use in sketches and Shells.
Plugging the following formula into dimension fields in my sketches and other operations (with the placeholders filled with proper values) works just fine, but I'm copying this same formula all over the place and would rather have one function to maintain rather than dozens of separate dimensions fields scattered throughout my model.
number_of_perimeters * extrusion_width - layer_height * (1 - PI/4) * (number_of_perimeters - 1)