Trójkąt
Triangle
Prosty szkic trójkąta o kątach 90, 15 i 75 stopni
„Kopiuj” (Copy) kod Python

# Create triangle with angles 90, 15, 75
import math
# set up parametersTheta = 15.0Adjacent = 100.0
# calculate sideOpposite = Adjacent * math.tan(math.radians(Theta))
# generate three vertices of triangleP1_X = 0P1_Y = 0
P2_X = AdjacentP2_Y = 0
P3_X = AdjacentP3_Y = Opposite
# create part and sketchP = Part('Foo')S = P.AddSketch('Shape', P.GetPlane('XY-Plane'))
# draw itS.AddLine(P1_X, P1_Y, P2_X, P2_Y, False)S.AddLine(P2_X, P2_Y, P3_X, P3_Y, False)S.AddLine(P3_X, P3_Y, P1_X, P1_Y, False)Oryginał: Triangle