Hello
I have been registered here for a while, and this is my first post.
A short background: - I'm in my 6th and final year studying Architecture at Newcastle University, and am doing an 'Emergent Digital Design Methods' module which results in the hand-in of a scripted working prototype of an architectural model, either in ArchiCAD, 3D Studio Max, or whatever else. Two-thirds of us have chosen Ruby & SketchUp, since SketchUp is so very widespread.
I know what I want my script to achieve, and have examples of scripts that achieve it in small parts. Cannibalised and combined, I should be on my way. But translating parts of scripts to work within my own has exposed my massive lack of knowledge of programming (we haven't been specifically taught it) and time is beginning to run short.
I'm fumbling around with trail and error (mostly error) in Notepad++ & Sketchup, with reference to the Sketchup Ruby API and using the Ruby Console.
I'd hope to be able to compensate excessively useful information or tutorials that prove to work..!
So...
I have a block of code which intends to create variations of gothic arch. All it does so far is to:
Prompt a UI popup asking the user to enter 3 parametric variables ["Base Height", "Base Width", "Arch Height"] and select 2 drop-down menu variations ["Type", "Glazing"].
Prompts 7 other new drop-down menus. ["Rows", "Variation"].
Based on the parametric variables, the rest of the code designates points to draw, and draws the wire-frame of 20 types of archway.
...And that is all. The parametric parameters and equations for the points function as expected.
My problems start as follows:
I don't want the 7 pop-up menus to prompt, and I don't want all the arch type wire-frames to load at once. 2 menus max should prompt depending on the user-selection of 'types'. How do I link the values of "types" [0, 1, 2, 3] to blocks of code to load? Do I need to implement a data system?:
Or can either of these problems be addressed by 'If True Then Else' commands?
My second problem is that I'd like to incorporate 'TubeAlongPath' by TIG (c) 7/2005 to automatically select the wire-frame, so that once the frame is loaded, TIG's prompt for the TubeAlongPath starts. The result should be something like:
My final problem will be to include functionality which allows the groups to be instantiated as a component which snaps to planes and cuts into surfaces. (I think this would involve the overhaul of the point-arrays to include 'origin' instead of (0, 0, 0), and then tell the origin to be user-defined..)
(from reference script)
I'd be really grateful for any help, and would be pleased to make up for useful contributions (since I have a Thesis to worry about as well!). My many days of experimentation have yielded very few eureka-moments, unfortunately
There needs to be a blind-panic smiley.
Deadline is 20 days away.
Thanks,
Andrew