That is what I needed, thank you ThomThom.
I am creating several thousand of these pegs in different locations on the board,I have noticed a real processing hit.
I read that it would be better to create these objects as components and then add them dynamically? I tried to do a basic example of a component instance and transformation(seems simple with a simple face, but confusing in cylinder)
What am I missing?
model = Sketchup.active_model
entities = model.entities
# Create a series of "points", each a 3-item array containing x, y, and z.
pt1 = [0, 0, 0]
pt2 = [20, 0, 0]
pt3 = [20, 20, 0]
pt4 = [0, 20, 0]
# Call methods on the Entities collection to draw stuff.
new_face = entities.add_face pt1, pt2, pt3, pt4
new_face.pushpull 0.75
# Draw a circle on the ground plane around the origin.
center_point = Geom;;Point3d.new(1,1,0)
normal_vector = Geom;;Vector3d.new(0,0,1)
radius = 0.3
entities = Sketchup.active_model.entities
edgearray = entities.add_circle center_point, normal_vector, radius
first_edge = edgearray[0]
face = first_edge.faces.select { |f| (f.outer_loop.edges & edgearray).length == edgearray.length }.first
group = Sketchup.active_model.entities.add_group
face.pushpull 3
face = group.entities.addface face
comp = group.to_component
transformation = Geom;;Transformation.new([2,1,0])
componentinstance = entities.add_instance(comp.definition, transformation)