Browsed by
Tag: formula

Parabolic Curve

Parabolic Curve

Compatible with WizoScript versions: 1.42

Creates a parabolic curve from 0cm, 0cm to 15cm, 60cm.

# Draws a parabolic curve in a sketch from 0cm,0cm to 15cm,60cm
 
Units.Current = UnitTypes.Centimeters
 
# y = ax^2 where x = 15 and y = 60
def para(x):
  y = 0.2666666666 * x**2
  return y
 
MyPart = Part("My Part")
Parabola = MyPart.AddSketch("Parabola", MyPart.GetPlane("XY-Plane"))
 
# generate list of points
points = []
for x in range(0, 16):
  points.extend([x, para(x)])
 
Parabola.AddBsplineThroughPoints(3, points, False)