How i can do this in Ruby?



Hello I have a example on Youtube. I tried to perform it but cant. How i can do it?

model = Sketchup.active_model
entities = model.entities
(1…52).each { |i|
group = model.active_entities.add_group
yk = i5
yk2 = yk-5
orjin =, 1,
orjin1 =, 1,
cember = group.entities.add_circle(orjin, Z_AXIS, (75-i+10).cm, 6)
cember1 = group.entities.add_circle(orjin1, Z_AXIS, (75-i+10).cm, 6)
face = group.entities.add_face(cember)
path = group.entities.add_edges(orjin,orjin1)
face.back_material = [(157),(163),(13)]
rot_angle = (i
rot_transformation = Geom::Transformation.rotation(ORIGIN,Z_AXIS,rot_angle)


Youtube Link:


Please edit your post so that it is within a ‘code’ block - 'backticks [`].
As it is currently formatted [as a quote?] some characters are missing in the published version, and others are affected in other ways.
Like yk = i5 generates an error.
I expect you mean yk = i*5 ?
The rogue * makes the characters in between it into ‘italics
There’s a similar issue with the later i4 which as you i*4 it’s read as the closing code for the ‘italics’…
I’ve had to ‘escape’ them here using \*

Once we have the intended code we can test it an advise you properly…