I like SketchUp, I really, really do. While most folks use it for their work or hobby projects, I like to use it as a hobby in and of itself. Over the past few years, I have used SketchUp for all sorts of random things, most of which involve some sort of Ruby plugin to do something fun or interesting. One of my favorites is this video I made using classic Mandelbrot equations:
Totally useless, but I had a lot of fun making it
It’s totally useless but I have the book on Ruby. Used to see the original ones of these back in 90 It was cool then.
SketchUp is a natural playground for puttering with code that does mathematical things with 3D geometry. I was trying to use a 2D gear shape to create a 3D beveled gear and ended up creating a standalone plugin that maps edges and triangulated faces to a spherical surface instead:
There may already be a plugin or extension that does this, but it’s much more fun to write my own. By creating two gear outlines and using the spherical mapping, I was able to construct this Gear Sphere:
Due to the way the gear was created, it can be 3D printed (here’s a rendering from a 3D vendor):
The part is about 2" across and the sphere it fits into is about 2.5" in diameter. If you want to play with this plugin, you can download it here:
The model was created using SketchUp 2015 (Make), but the model I’ve uploaded to the Warehouse is in SketchUp 8 format:
I’ve been working with various CAD systems for more than 35 years now and nothing is more fun and enjoyable to use than SketchUp
I’ve become somewhat obsessed with creating the “perfect” bevel gear … I feel like I’m chasing the Holy Grail or something. All the tutorials I’ve seen involve projecting the involute curve onto a cone. However, it seems to me that it should be wrapped around a conical section of a sphere instead. Or not.
My latest endeavor:
I also think it is fun to play with -better than puzzle games.
I came across a monochrome depth map of a Lincoln penny:
and imported it into SketchUp:
Pretty amazing detail
As you like depth maps, you may like to play with Heightfield Generator. XnView will create the required greyscale image.
I played with it, but not very successfully. However, in trying to debug the program, I learned how to get the current model units** (something I’ve been rather lazy about doing since I generally only work in decimal inches). I also learned about the PGM file format and how Gimp places a comment on the second line which freaks out the Heightfield Generator (not to mention its liberal use of global variables). Overall, a very positive learning experience that led me back to my original import code now reading ASCII gray-scale PGM files instead of color BMP files. And now that I’ve seen the light on model units, I have no excuse for not updating my plugins to work in any setting
** Thanks to Dan, TIG, and ThomThom for the gory details.
There is some very interesting stuff going on in this thread.
I looked up my original test for the heightfield generator. The image resolution also needed to be greatly reduced - from 346 x 470 to 74 x 100 pixels. Didier only recommended two programs to generate the PGM file. XnView was the one that worked for me.
Unfortunately, Google seems to be cleaning out old Groups, so the original thread is gone.
TT has one that users .bmp files, but on a mac I have to convert them a to a specific ms bmp format, type2 from memory…
ADD can have some interesting side effects. I set out to design a plaque for a mural painted on the wall in our backyard and got sidetracked with this Lincoln coin depthmap. My last iteration used 650 x 650 pixels and resulted in 908,552 polygons (2,272,728 entities total) and a skp filesize of 146MB. Unfortunately, the DAE file was 94MB which exceeds the maximum filesize of my print vendor’s 64MB limit. Oh well.
[mental reset] So, back to my original goal of designing a plaque … I left off when I was trying to track down a logo for the starving artist that originally created the mural 25 years ago so that I could incorporate it into the plaque’s design. A web search turned up the Lincoln depthmap since she was peripherally involved with its creation. Look, there goes a squirrel …
I’m trying to create a plaque that incorporates a swan design. I needed to somehow import the drawing I had into SketchUp. I originally imported it as an image and got frustrated trying to trace around it. Once again, discovering a need to re-invent the wheel, I used Ruby to import a BMP and trace around it for me. As a test, I created these random shapes in MS-Paint (using a 2048 x 2048 image size):
The plugin gave this result (using an Atom processor with 1GB of memory):
The 3D result ended up being better than I had hoped for:
File in SketchUp 8 format: random.skp (109.8 KB)
Solving geometry puzzles with SketchUp is a lot more fun than solving Sudokus
Ooooh! Cool! I have collected a ton of pics for figures I’d like to make into Face Me’s, but not looking forward to hand cutting them all out…any way this would work with that?!
You’re welcome to give it a try … you should use a black color and a white background in MS-Paint and save it as a 24-bit color BMP. The higher the resolution, the smoother the result. However, the image width MUST be an even multiple of four. Only the outside perimeter is created (holes or islands are not considered). The line thickness should probably be 2 or more pixels. It’s been tested with 2015 Make and seems to work without any problems (only on a Windows machine). Oh, and like most of my flaky code, it prefers an inch environment so the output of a 800 x 600 image would be 800 x 600 inches.
The plugin can be found here: https://sites.google.com/site/spirixcode/code/spirix_outliner.rb
I found a major bug in my program … I would have thought using an “elseif” instead of an “elsif” here and there would have caused a syntax error somewhere along the line. Instead it cheerfully skipped that condition and moved on to the next one.
The updated version is here: https://sites.google.com/site/spirixcode/code/spirix_outliner.rb
Since I’m not an artist, I looked at various swan drawings until I found something that was close to what I had in mind. I cut and pasted it into MS-Paint and scaled it up to about 2600 x 2200 pixels. Using the default “red” color in MS-Paint (237,28,36), I traced around the blurry image and then used that as a starting point to finally achieve the shape I wanted:
I imported the image into SketchUp using my outliner plugin:
Adding an “eye” and some lettering, I ended up with a plaque that I’m having 3D printed in bronzed steel:
The best part is that I’m finally getting around to procuring an item that my wife and I have been talking about for the last 20-odd years. Once again, SketchUp saved my marriage
Something fun for Linux fans …
This “Gear Sphere” is 1" in diameter (printed in dyed laser-sintered nylon):