[Plugin] Lamella Roofs
-
As Dave said +
If you run the script in an existing model the first thing it does is DELETE EVERYTHING!! and I do mean delete, not hide, not move, DELETENot good, not good at all
-
@escapeartist said:
Reminds me of some of the beautiful wooden aircraft hangar roofs I've seen...
And reminds me of "perpendicular style" English Gothic vaults.
-
@paul russam said:
As Dave said +
If you run the script in an existing model the first thing it does is DELETE EVERYTHING!! and I do mean delete, not hide, not move, DELETE
Not good, not good at all
That's because the OP [TimWarner] doesn't seem to realize that you can make your own Template that doesn't include Sang etc; so in line #50 he has
ents.clear! # Get rid of Sang
Which of course empties the model if you've already dome some modeling !
A disaster !!
BUT it's easily disabled to avoid it erasing your existing model - edit the file and change line #50 to read.
**#**ents.clear! # Get rid of Sang
so that it's now ignoredTo avoid the clunky 'First run from the Console to install a menu item' [every time!]... the closing '
end
' can simply be moved above the 'if...
' that makes the menu entry so the menu is made as the script is auto-loadedAlso it's best to make the dialogs' defaults dimensions as 'lengths' thus:
values = [1200**.l**,6000**.l**,20.0,6,2]
forcing it into 'inches', i.e. 100'x50' - which now displays in the current units.
If you're metricyou could use:[30.m,15.m,...
etc anyway
Then you can leave those two 'lengths' alone as
height = results[0] span = results[1]
i.e. NO.to_f
is needed as it already knows it's a 'length' !
In the second dialog you can make the sizes directly in 'mm' with[38.mm,150.mm,2,10.mm]
etc and then skip changing the results with.to_f
and also later on no.mm
is needed etc - that way anyone can use it inputing in mm or cm or inches etc, depending on their current unit settings...Also you should stop if the user 'cancels' a dialog thus:
results = **inputbox**(prompts, values, "Roof Settings") **return nil unless results**
Also some other 'tips' - wrap the whole 'creation' part after the dialog in a
model.start_operation('lamella')
...create...model.commit_operation
at the end, to make an easy one-step undo !Also you can easily protect you code inside a module thus:
**module TimWarner** def **self.**lamella_roof()
...
rest of code
... adjust the closing menu item to use the now modularized method:
plugins.add_item("Lamella roof") { **self.**lamella_roof() }
...
[ruby:14pvbkvc]end#module[/ruby:14pvbkvc] goes after everything else...If you implement these general changes this has the basis of a useful toolset...
-
I recommend you read the guidelines to SketchUp Ruby Plugin developement I wrote down so that your plugin play nice with the shared plugin environment it runs in. Avoiding potential conflicts.
http://www.thomthom.net/thoughts/2012/01/golden-rules-of-sketchup-plugin-development/
-
Will the routine allow the creation of in-line lamellas, without the slight offsets?
Thank you much for sharing, Tim.
(bmike, you didn't forget the bookmark feature here?)
-
@brookefox said:
(bmike, you didn't forget the bookmark feature here?)
bookmark, what is that?
i usually post, then it is in my threads.
will have to try to bookmark...
-
reply to keep this in my list of threads.
i'll peek back once the ruby gets improved.nice looking plugin.
-
Dear Tim,
You and your colleagues are to be congratulated on your achievement. How long did it take start to finish, and did you have building experience before starting the project?
Kind regards,
Bob -
@brookefox said:
Will the routine allow the creation of in-line lamellas, without the slight offsets?
Thank you much for sharing, Tim.
(bmike, you didn't forget the bookmark feature here?)
Simple answer, no. The plugin assumes the use of dimensional lumber and common bolt connectors, as in the original Zollinger concept, and in recent examples like the Rural Studio dog shelter http://apps.cadc.auburn.edu/rural-studio/Default.aspx?path=Gallery%2fProjects%2f2006%2fhalecoanimalshelter%2f. But it's a natural option, and easier to model. Thx for the (implicit) suggestion.
PS I'm attaching a brief monograph on the underlying geometry.
-
@watkins said:
Dear Tim,
You and your colleagues are to be congratulated on your achievement. How long did it take start to finish, and did you have building experience before starting the project?
Kind regards,
BobThx Bob,
This is actually a one-man show. I built a lamella roof (the one shown at the top of the thread) some years back, based on a crude, and actually wrong Excel model, but only worked out the exact geometry last year. Writing a plugin involved learning Ruby (OK, it shows!), and grappling with the SU documentation, which I have to say I find opaque in many ways. The plugin probably took about three months to work out.
I'm not a builder at all, but I've done some simple construction work, if dry-stack walls count.
-
Great plugin Tim!!
-
I've corrected the plugin to reflect the very helpful community comments, and fix some minor errors in the way curved surfaces were being generated. Both the revised plugin and documentation are embedded in the original post to make them easier to find.
I'm still puzzling over a couple of issues. First is the odd failure of the intersect_with method in at least one circumstance. (Posted elsewhere http://forums.sketchucation.com/viewtopic.php?f=180&t=46714). This wipes out a couple of faces in a lamella, but is rare, and easy to fix manually. Second, the geometry is off by a small (< 1mm) amount in terms of the components not lining up exactly. It doesn't feel like a rounding error, so my calculations may be incorrect. Practically this is not significant.Thx all, and TIG and Thomthom especially, for your advice.
-
Really appreicate the plugin... and even more so Tig and Thom for always checking all these plugins out for us and warning us before installing them.
-
I've updated the plugin to allow the creation of a diagrid lamella roof, where the lamellas are co-planar, following brookefox's suggestion, and to add some error-checking and spinners on input. Updates are located with the original post.
Under some circumstances the upper surface of the lamella is not created properly, for reasons I still don't understand. The cutting instructions are correct, regardless.
-
Thanks Tim, hope I get to do a project with this kind of roof one day!
-
I dropped the lamella_roof.rb to the plugins folder and nothing happens, restarted SU and is not on the list?
Any one has the same issue.
I also like the big hangars made of concrete by the designer an italian eng-arch Pier Luigi Nervi.
Thanks.
-
What did you expect to happen? Did "Lamella roof" show up in the Plugins menu?
Go back to the Plugins folder and make sure lamella_roof.rb is there with the correct extension and that you didn't put it in some other Plugins folder.
-
pasted in the C:\Program Files\Google\Google SketchUp 8\Plugins.
-
Let's see if I can drag some useful information out of you so we can help you.
And after you close and reopen SketchUp does the plugin show in the Plugins menu? Do you really have XP as your profile indicates?
-
Not shown after reopen.
yes XP
Advertisement