# rotate

rotate shapes.

# Parameters

shapes : ShapeList
list of shapes
base_point : array
point to rotate around: base_point = [x0,y0] in 2D, base_point = [x0,y0,z0] in 3D
angle : float
Rotation angle in degrees
direction : array, optional
Point defining direction, from origo, to rotate around in 3D

# See also

# Examples

model2d.add_polygons([[[2,0],[5,0],[5,5],[3,5]]])                       #Add polygon
a = model2d.select([0,0],[3,3],types=['face'],option='green')           #Select face
model2d.rotate(shapes=a,base_point=[2,0],angle=45)                      #Rotate polygon
model3d.add_rectangle([0,0,0],[3,3,0])                                  #Add rectangle
a = model3d.select([1,1,0],types=['face'])                              #Select face
model3d.rotate(shapes=a,base_point=[0,0,0],angle=45,direction=[1,0,0])  #Rotate face
model3d.add_prism(points=[[-1,-1,0],[-3,-3,0],[-3,0,0]],height=3)
a = model3d.select([-2,-2,1],types=['volume'])
model3d.rotate(shapes=a,base_point=[-3,-3,3],angle=90,direction=[1,1,0])