Calculating Summed-up Volumes with Ruby (Snippet)

Calculating Summed-up Volumes with Ruby (Snippet)

I received an email a few days ago by someone who needed to calculate volumes and face areas in SketchUp for the purpose of estimating. I suggested doing this in a few lines with Ruby and as it turns out, it is pretty easy as long as the objects that need to be summed up are "solid" groups in SketchUp. I thought the solution could be useful for others, too, so here it is: Here's the total Just paste the code below into the Ruby Code Editor in SketchUp. Then select the groups that you would like to sum up and press the Run button. With this version, you will get the sum of the volumes as well as the areas of the perimeter surfaces (e.g. for estimating formwork). You can use this piece of code and customize it to your liking. For example, you could export the data separately for each object to a text file (or to a multiline messagebox) for use in...
Read More
SketchUp 3D Basecamp 2014 Recap

SketchUp 3D Basecamp 2014 Recap

Now that the semester is winding down, I can finally look back and post about the great SketchUp 3D Basecamp conference that happened 4/14-4/16 this year in Vail, Colorado. As in years past, this was a meeting of SketchUp users, plugin authors, technology vendors, and, of course, all the makers of SketchUp. What was especially good this year was that the conference was held in the same place where everyone stayed, making things very convenient. Once we all arrived there - which was not all that easy due to a late-season snowstorm - we got to enjoy the beauty of Vail and the hospitality of the Vail Cascade hotel. As part of days one and two I gave a presentation on "Components are our friends: How component-based modeling can improve your life" and a workshop (together with Daniel Tal) on "Plugins and Scripting for Architects". There were actually too many great presentations for anyone to attend, so the best way to catch up is actually to watch them...
Read More
What’s New in SketchUp 2014? Better Ruby, for Example!

What’s New in SketchUp 2014? Better Ruby, for Example!

By now you most probably have heard that SketchUp 2014 has been released. There are quite a few great new-feature overviews and reviews out there and I'll suggest you look at the ones linked at the end of this post to get up to speed. For now, I just wanted to show you why the Ruby update in SketchUp 2014 is pretty amazing. Look at this image: We can now use web requests in our Ruby code! What is so interesting about the image above? Well - those are images that were loaded from Flickr directly into SketchUp using the now included "net/http" library. Since SU 2014 not only updated Ruby to 2.0 but also included all of the standard libraries, stuff like this is now possible. You can integrate Net functionality much more and create all kinds of interesting mash-ups. To replicate what I did above, copy the following code snippet and either paste it into the Ruby Console (it now accepts...
Read More
Creating Photo Textures for Rendering

Creating Photo Textures for Rendering

As you just saw in the CLT example, having a good texture makes all the difference when you create renderings in SketchUp. I also discussed this in some length in the book (especially in the rendering chapter). To expand on this topic, here are some tips for two cases: Making a Seamless Texture Obviously a seamlessly repeating (a "tiling") texture is the most efficient way to go when you use textures. This allows you to use a small image to fill a large space. And if you use a good texture, you won't even see any seams or repeating patterns. As I described in the book, there are many places where you can get good quality tiling textures. Steps What do you do when you need to make your own? First of all, start with a good image! This typically requires a few simple but important steps: Find the texture you are looking for (a brick wall, grass etc.). Be careful with the sun's position....
Read More
What to do With Plugins in SketchUp 2013?

What to do With Plugins in SketchUp 2013?

So now that you have upgraded to SketchUp 2013 you should be facing the question: What to do with SketchUp's plugins in this release. After all, when you started the new software for the first time, it likely only had the default plugins installed that Trimble released with it. But there was also a new toolbar button for the Extension Warehouse! At this time, you have a few options. Let's look at them: A) You are upgrading and you had plugins installed in the earlier version With the new Extension Warehouse and the SketchUcation Plugin Store now available, which both include one-click install and easy updating, it makes most sense to get plugins that are hosted in these places through the respective installers. So even if you had installed specific plugins in a previous version of SketchUp, I would recommend to go to these tools first to find them (instead of simply copying the Plugins folder). So here's my suggested order of...
Read More