How to use the zencad.libs.inertia.attach_inertia function in zencad

To help you get started, we’ve selected a few zencad examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mirmik / zencad / expers / pendulum.py View on Github external
base = zencad.assemble.unit()
arot = kinematic.rotator(name="AROT",ax=(1,0,0))
a = zencad.assemble.unit(name="A")
ma = zencad.assemble.unit(name="MA", shape=sphere(10))

a.add_shape(cylinder(r=5, h=L))

base.relocate(rotateY(deg(90)))
base.link(arot)
arot.link(a)
a.link(ma)

a.link(ma)
ma.relocate(up(L))

inertia.attach_inertia(ma, mass=1, Ix=1, Iy=1, Iz=1)

arot.set_speed(-0.2)
t = treedy.tree_dynamic_solver(base)

cancel = False
DELTA = 0

def evaluate():
	global DELTA
	starttime = time.time()
	lasttime = starttime

	time.sleep(2)

	#cp.enable()
	while True:
github mirmik / zencad / expers / treedy.py View on Github external
aaaaa = zencad.assemble.unit(name="AAAAA")
bbbbb = zencad.assemble.unit(name="BBBBB")

a.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
b.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaaaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbbbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
inertia.attach_inertia(rot.output, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(body, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(a, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(b, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaaaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbbbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))

rra = kinematic.rotator(name="RRA",ax=(0,0,1), location=translate(0,-20,0), parent=body)
rrb = kinematic.rotator(name="RRB",ax=(0,0,1), location=translate(0,20,0)*rotateZ(deg(180)), parent=body)
ra = kinematic.rotator(name="RA",ax=(1,0,0))
rb = kinematic.rotator(name="RB",ax=(1,0,0))
raa = kinematic.rotator(name="RAA",ax=(0,1,0))
rbb = kinematic.rotator(name="RBB",ax=(0,1,0))
github mirmik / zencad / expers / treedy.py View on Github external
aaaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaaaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbbbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
inertia.attach_inertia(rot.output, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(body, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(a, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(b, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaaaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbbbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))

rra = kinematic.rotator(name="RRA",ax=(0,0,1), location=translate(0,-20,0), parent=body)
rrb = kinematic.rotator(name="RRB",ax=(0,0,1), location=translate(0,20,0)*rotateZ(deg(180)), parent=body)
ra = kinematic.rotator(name="RA",ax=(1,0,0))
rb = kinematic.rotator(name="RB",ax=(1,0,0))
raa = kinematic.rotator(name="RAA",ax=(0,1,0))
rbb = kinematic.rotator(name="RBB",ax=(0,1,0))
raaa = kinematic.rotator(name="RAAA",ax=(0,1,0))
rbbb = kinematic.rotator(name="RBBB",ax=(0,1,0))
raaaa = kinematic.rotator(name="RAAAA",ax=(0,1,0))
rbbbb = kinematic.rotator(name="RBBBB",ax=(0,1,0))
raaaaa = kinematic.rotator(name="RAAAAA",ax=(0,1,0))
rbbbbb = kinematic.rotator(name="RBBBBB",ax=(0,1,0))

inertia.attach_inertia(rra.output, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(rrb.output, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
github mirmik / zencad / expers / treedy.py View on Github external
b.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaaaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbbbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
inertia.attach_inertia(rot.output, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(body, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(a, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(b, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaaaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbbbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))

rra = kinematic.rotator(name="RRA",ax=(0,0,1), location=translate(0,-20,0), parent=body)
rrb = kinematic.rotator(name="RRB",ax=(0,0,1), location=translate(0,20,0)*rotateZ(deg(180)), parent=body)
ra = kinematic.rotator(name="RA",ax=(1,0,0))
rb = kinematic.rotator(name="RB",ax=(1,0,0))
raa = kinematic.rotator(name="RAA",ax=(0,1,0))
rbb = kinematic.rotator(name="RBB",ax=(0,1,0))
raaa = kinematic.rotator(name="RAAA",ax=(0,1,0))
rbbb = kinematic.rotator(name="RBBB",ax=(0,1,0))
raaaa = kinematic.rotator(name="RAAAA",ax=(0,1,0))
rbbbb = kinematic.rotator(name="RBBBB",ax=(0,1,0))
github mirmik / zencad / expers / treedy.py View on Github external
a.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
b.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaaaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbbbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
inertia.attach_inertia(rot.output, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(body, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(a, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(b, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaaaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbbbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))

rra = kinematic.rotator(name="RRA",ax=(0,0,1), location=translate(0,-20,0), parent=body)
rrb = kinematic.rotator(name="RRB",ax=(0,0,1), location=translate(0,20,0)*rotateZ(deg(180)), parent=body)
ra = kinematic.rotator(name="RA",ax=(1,0,0))
rb = kinematic.rotator(name="RB",ax=(1,0,0))
raa = kinematic.rotator(name="RAA",ax=(0,1,0))
rbb = kinematic.rotator(name="RBB",ax=(0,1,0))
raaa = kinematic.rotator(name="RAAA",ax=(0,1,0))
rbbb = kinematic.rotator(name="RBBB",ax=(0,1,0))
raaaa = kinematic.rotator(name="RAAAA",ax=(0,1,0))
github mirmik / zencad / expers / treedy.py View on Github external
bb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaaaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbbbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
inertia.attach_inertia(rot.output, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(body, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(a, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(b, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaaaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbbbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))

rra = kinematic.rotator(name="RRA",ax=(0,0,1), location=translate(0,-20,0), parent=body)
rrb = kinematic.rotator(name="RRB",ax=(0,0,1), location=translate(0,20,0)*rotateZ(deg(180)), parent=body)
ra = kinematic.rotator(name="RA",ax=(1,0,0))
rb = kinematic.rotator(name="RB",ax=(1,0,0))
raa = kinematic.rotator(name="RAA",ax=(0,1,0))
rbb = kinematic.rotator(name="RBB",ax=(0,1,0))
raaa = kinematic.rotator(name="RAAA",ax=(0,1,0))
rbbb = kinematic.rotator(name="RBBB",ax=(0,1,0))
raaaa = kinematic.rotator(name="RAAAA",ax=(0,1,0))
rbbbb = kinematic.rotator(name="RBBBB",ax=(0,1,0))
raaaaa = kinematic.rotator(name="RAAAAA",ax=(0,1,0))
rbbbbb = kinematic.rotator(name="RBBBBB",ax=(0,1,0))
github mirmik / zencad / expers / treedy.py View on Github external
inertia.attach_inertia(bbbbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))

rra = kinematic.rotator(name="RRA",ax=(0,0,1), location=translate(0,-20,0), parent=body)
rrb = kinematic.rotator(name="RRB",ax=(0,0,1), location=translate(0,20,0)*rotateZ(deg(180)), parent=body)
ra = kinematic.rotator(name="RA",ax=(1,0,0))
rb = kinematic.rotator(name="RB",ax=(1,0,0))
raa = kinematic.rotator(name="RAA",ax=(0,1,0))
rbb = kinematic.rotator(name="RBB",ax=(0,1,0))
raaa = kinematic.rotator(name="RAAA",ax=(0,1,0))
rbbb = kinematic.rotator(name="RBBB",ax=(0,1,0))
raaaa = kinematic.rotator(name="RAAAA",ax=(0,1,0))
rbbbb = kinematic.rotator(name="RBBBB",ax=(0,1,0))
raaaaa = kinematic.rotator(name="RAAAAA",ax=(0,1,0))
rbbbbb = kinematic.rotator(name="RBBBBB",ax=(0,1,0))

inertia.attach_inertia(rra.output, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(rrb.output, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))

raa.relocate(up(L))
rbb.relocate(up(L))
raaa.relocate(up(L))
rbbb.relocate(up(L))
raaaa.relocate(up(L))
rbbbb.relocate(up(L))
raaaaa.relocate(up(L))
rbbbbb.relocate(up(L))


rra.link_directly(ra)
rrb.link_directly(rb)
ra.link_directly(a)
rb.link_directly(b)
github mirmik / zencad / expers / ldpendulum.py View on Github external
arot.set_coord(deg(90))

a.link(ma)
b.link(mb)

ma.relocate(up(L))
mb.relocate(up(L))

arot.dempher_koeff = 0
brot.dempher_koeff = 0

#treedy.attach_inertia(a, mass=1, Ix=0, Iy=0, Iz=0, pose=up(L/2))
#treedy.attach_inertia(b, mass=1, Ix=0, Iy=0, Iz=0, pose=up(L/2))
#treedy.attach_inertia(ma, mass=1, Ix=0, Iy=0, Iz=0)
inertia.attach_inertia(mb, mass=1, Ix=0, Iy=0, Iz=0)

#forces.gravity(unit=a,vec=(0,0,-9081))
#forces.gravity(unit=b,vec=(0,0,-9081))
#forces.gravity(unit=ma,vec=(0,0,-9081))
#forces.gravity(unit=mb,vec=(0,0,-9081))

#dph1 = forces.dempher(unit=arot, koeff=50000)
#dph2 = forces.dempher(unit=brot, koeff=50000)

brot.set_speed(1)
t = lagrange.lagrange_solver(arot)
t.print_reaction_lagrange_multipliers()
t.print_local_inertial_objects()

cancel = False
DELTA = 0
github mirmik / zencad / expers / treedy.py View on Github external
a.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
b.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
aaaaa.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)), color=zencad.color.blue)
bbbbb.add_shape((cylinder(h=L, r=5)+sphere(10).up(L)))
inertia.attach_inertia(rot.output, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(body, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(a, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(b, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(aaaaa, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))
inertia.attach_inertia(bbbbb, mass=0.1, Ix=0.1, Iy=0.1, Iz=0.1, radius=pyservoce.vector3(0,0,L))

rra = kinematic.rotator(name="RRA",ax=(0,0,1), location=translate(0,-20,0), parent=body)
rrb = kinematic.rotator(name="RRB",ax=(0,0,1), location=translate(0,20,0)*rotateZ(deg(180)), parent=body)
ra = kinematic.rotator(name="RA",ax=(1,0,0))
rb = kinematic.rotator(name="RB",ax=(1,0,0))
raa = kinematic.rotator(name="RAA",ax=(0,1,0))
rbb = kinematic.rotator(name="RBB",ax=(0,1,0))
raaa = kinematic.rotator(name="RAAA",ax=(0,1,0))
rbbb = kinematic.rotator(name="RBBB",ax=(0,1,0))