I may have mistakenly cross posted this in the newbie forum, thinking it was a newbie developers section, where this post would of belonged.. Sorry about that.
My goal is to create a rectangular face, pushpull a user-input amount, and then be able to find the vertices (and create variables for them) of the new side created by the push pull. Similarly I want to be able to find the corner of a face, after rotation has occurred, so I can continue automated drawing using that point.
This is my first real script I don't know exactly what to search for in the API or in this forum. Is this another way that transformation works?
Even though this is my first post, you all have helped me out a lot on this script already. It's a script that builds a home based off of roof dimensions. I have finished the part of the script that can make gabled roofs but now I'm trying to automate the drawing of the house beneath. Thanks for everything.
Here's a copy of my script, if it helps.
model = Sketchup.active_model
##input box for roof properties
prompts = ['X or Ridgeline Length;', 'Y or Slope Length;',
'Tilt']
defaults = [15.feet.inch, 11.feet.inch, 20]
inputs = UI.inputbox( prompts, defaults, 'Astrum Gabled Roof Builder' )
## creating variables for the inputbox results
ridge_length = inputs[0].to_i
slope_length = inputs[1].to_i
tilt_degrees = inputs[2].to_i
tilt_degrees = tilt_degrees - (tilt_degrees * 2)
ridge_mid = ridge_length / 2
## organizing the roofs face coordinates
line1 = [0,0,0]
line2 = [ridge_length,0,0]
line3 = [ridge_length,slope_length,0]
line4 = [0,slope_length,0]
rotate_midpoint = [ridge_mid,0,0]
# Make our roof into a group, push/pull & rotate
roof_rotate = Geom;;Transformation.rotation rotate_midpoint, X_AXIS, tilt_degrees.degrees
roof_spin = Geom;;Transformation.rotation rotate_midpoint, Z_AXIS, 180.degrees
roof_group = model.entities
face = roof_group.add_face line1, line2, line3, line4
face.reverse!
face.pushpull -6
group = roof_group.add_group face.all_connected
select = model.selection.add (group)
group.transform!(roof_rotate)
group2 = group.copy
group2.transform!(roof_spin)