I’m attempting one of my first Ruby Scripts. Total noob. I have some experience with programming though, so hopefully I’ll be able to follow. I’m trying to write a script that will generate a “vase” that I can use for 3D printing. Basicially, I want to manually draw a face in SketchUp, then I want the Ruby script to Push/Pull the face 1", then rotate the resulting face 15° (while autofolding). It would then loop through that multiple times to create the vase, very similar to the below image.
I really don’t know where to begin. I can’t figure out how to get a script to recognize a selected face, so for now I’m just drawing a square inside Ruby, and Push/pulling it. But from there, I don’t know how to “select” the new push/pulled face in order to rotate it, then Push/pull it again.
This is really lame, but this is pretty much just a copy/paste from the Ruby API
depth = 100 width = 100 model = Sketchup.active_model entities = model.active_entities pts =  pts = [0, 0, 0] pts = [width, 0, 0] pts = [width, depth, 0] pts = [0, depth, 0] # Add the face to the entities in the model face = entities.add_face(pts) face.reverse! status = face.pushpull(100, true)
So once I’ve generated the push/pull, how do I manipulate the new face? Let’s start there I guess… Any help would be greatly appreciated.