import math
# R is outer radius of ring
# T is NOT the ring's thickness radially
# but vertically, if the ring is resting on a surface
# ie, the hollow cylinder that is the ring has a HEIGHT of T
R = 9.5
T = 3.0
# Make a function that radially patterns points
def list_points(r, a, N):
'''Radially pattern points
r: the radius of the circle on which points are placed
a: an offset angle from the x axis, CCW, in degrees
N: number of points to place radially along.
Spaces evenly along full 360 circle
'''
arad = math.radians(a)
theta = math.pi*2 / N
pnts = []
for i in range(0, N):
coord = (r*math.cos(theta*i + arad), r*math.sin(theta*i + arad))
pnts.append(coord)
return pnts
# Create a plain ring, centered in the plane and around the origin
ring = (cq.Workplane("XZ").workplane(offset=(-T/2.0))
.circle(R).extrude(T)
.faces("