"""Simple example to calculate cubes"""fromcompas.datastructuresimportMeshfromcompas.geometryimportBoxfromcompas.geometryimportFramefromcompas.geometryimportTranslationfromcompas_assembly.datastructuresimportBlockfromcompas_cra.datastructuresimportCRA_Assemblyfromcompas_cra.viewersimportcra_viewfromcompas_cra.equilibriumimportrbe_solvedeg=48.00# rotation in degreerotate_axis=[0,1,0]# around y-axissupport=Box(Frame.worldXY(),1,1,1)# supporting blockfree1=Box(Frame.worldXY().transformed(Translation.from_vector([0,0,1])),1,1,1)# block to analyseassembly=CRA_Assembly()assembly.add_block(Block.from_shape(support))assembly.add_block(Block.from_shape(free1))assembly.set_boundary_conditions([0])interface1=Mesh()# interface cornerscorners=[[0.5,0.5,0.5],[-0.5,0.5,0.5],[-0.5,-0.5,0.5],[0.5,-0.5,0.5]]fori,cinenumerate(corners):interface1.add_vertex(key=i,x=c[0],y=c[1],z=c[2])interface1.add_face([0,1,2,3])assembly.add_interfaces_from_meshes([interface1],0,1)assembly.rotate_assembly([0,0,0],rotate_axis,deg)# around y-axisrbe_solve(assembly,mu=0.1,verbose=True,timer=True)cra_view(assembly,resultant=False,nodal=True,grid=True,displacements=True,dispscale=10)