Start by creating a new feature and adding a sketch in the "// Define the function's action" section. The toolbar on top adds default code to get you started.
Use the dropdown menu to create different shapes in your sketch. Create two concentric circles of different sizes to make the base of you cup.
Use the opExtrude function from the toolbar to extrude your sketch. Use the qSketchRegion function to specify that you want to extrude sketch1. Hint: Change filterinnerloops to true to extrude the outer walls of the cup only.
After saving your code, (press "Commit" in the feature studio) view your feature using the custom feature dropdown in a part studio.
These are three examples of ways to make a cup using FeatureScript. Try to figure out how to extrude a cup on your own, but if you are having trouble with syntax you can look at the opExtrude example. Once you have finished you can try for an extra challenge by making a cup with the opSweep and opRevolve function.
Hint: The path to sweep along must be orthogonal (on front plane) to the shape you want to be swept (on top plane)
Hint: You can revolve around a line defined by two points, the origin and direction, both in (x, y, z ) format