Showing posts with label sketchup. Show all posts
Showing posts with label sketchup. Show all posts

SketchUp Tutorial

Martin Rinehart has added a few chapters (11 - 14) about SketchUp/Ruby programming to his Edges to Rubies tutorial.

Kitchen Images

Old and new images of a kitchen exercise made for learning. Large and small variations of similar views. Images created using SketchUp, Podium, Kerkythea, and Picasa.

SketchUp Installation Location Registry Entry

Didier Bur on the SketchUcation forums asked where SketchUp stores its installation location in the Windows registry. The answer, direct from SketchUp's installer expert Steve P. is..

For SketchUp 6:

HKEY_LOCAL_MACHINE\SOFTWARE \Microsoft\Windows\
CurrentVersion\\Uninstall\{98736A65-3C79-49EC-B7E9-A3C77774B0E6}\InstallLocation


For SketchUp 7+:
HKEY_LOCAL_MACHINE\SOFTWARE\Google\Google SketchUp 7\InstallLocation


SketchUcation Community Forums • View topic - Sketchup registry key ?

Sketchup to CamBam Plugin

Sketchup to CamBam Plugin: "I wrote a simple plugin for Sketchup which will add a menu option for exporting a CamBam file. It's a pretty straight forward process, and you can probably figure out how to use it without even reading this page, but I will go ahead and give some instructions anyway."

Creating & Placing Trees using RpTreeMaker

This video by RenderPlus shows how to create, place, and render low-poly, 2d trees in a SketchUp model using the free RenderPlus TreeMaker plug-in.

RpTreeMaker is a free integrated plug-in for Google SketchUp that creates realistic trees for SketchUp.

Please check out all the other great free (and fee) SketchUp plug-ins available from the RenderPlus homepage.

Links: [ link to video | RpTreeMaker | RenderPlus Home ]



OpenStudio

OpenStudio is a free plugin for the Google SketchUp 3D drawing program. OpenStudio makes it easy to create and edit the building geometry in your EnergyPlus input files. It also allows you to launch EnergyPlus simulations and view the results without leaving SketchUp.


http://sourceforge.net/projects/openstudio/

Video: Google I/O 2008 - Advanced Ruby Scripting for Sketchup

This video covers some basics of the SketchUp RUby API, talks about WebDialogs, and gives some cool demos of some of the API's capabilities.

SketchUp WebDialog & Javascript Library

I was wondering how to create a library of common functions that SketchUp-Ruby coders could use in their WebDialogs.

The example I have attempted to create is a width method for WebDialog - it returns the current width of the WebDialog window.

This is what I came up with. I am hoping someone with a higher understanding of Ruby/SketchUp/JavaScript can help me clean it up, and point me in the right direction.

w.rb



class UI::WebDialog
@_width = 1
def width
puts "executing getWidth()"
execute_script("getWidth();")
@_width
end
end

# Extend the Dialog s
def ex(s)
def s.setWidth(v)
@_width = v
end
s.add_action_callback("width") {|d, a| puts "width callback called."; s.setWidth a }
end


# Create a new dialog
w = UI::WebDialog.new

# Extend the dialog (w) to include a .width method.
ex(w)


html = %[
<html>
<head>
<script>
function getWidth() {
window.location = "skp:width@" + document.body.offsetWidth;
}
</script>
</head>
<body>
<button onClick="window.location='skp:test'">Click</button>
</body>
</html>
]


##########################################
# Everything above here would be in
# separate files and required as needed.
# So your main script would be small, and
# all the definitions forthe extended
# functionality would be hidden.
#

# Set the html file for the dialog
# f = File.dirname(__FILE__) + "/w.html"
#w.set_file( f )
w.set_html( html )

# add a simple test callback
w.add_action_callback("test") { |d, a|
print "The width of this dialog is: "
p w.width
}

# show the dialog
w.show

Popular Posts (Last 30 Days)