# SketchUp as a hobby

**URL:** <https://forums.sketchup.com/t/sketchup-as-a-hobby/9902>\
**Category:** Off Topic\
**Created:** [April 11, 2015, 2:41am UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902 "2015-04-11T02:41:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [April 11, 2015, 2:41am UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/1 "2015-04-11T02:41:06Z")

</div>

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:

[![](https://global.discourse-cdn.com/sketchup/original/3X/6/d/6dc5a9e3cad624a3a709c48e5c898f54e5b01b66.jpeg "Lake Mandelbrot") ](https://www.youtube.com/watch?v=UUDQDjzPtv4)

Totally useless, but I had a lot of fun making it 🙂

---

<div class="post-metadata">

**Author:** ![computamax](https://avatars.discourse-cdn.com/v4/letter/c/3bc359/32.png) [@computamax](https://forums.sketchup.com/u/computamax)\
**Post date:** [April 16, 2015, 3:21am UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/2 "2015-04-16T03:21:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [April 24, 2015, 2:03am UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/3 "2015-04-24T02:03:24Z")

</div>

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:

[https://sites.google.com/site/spirixcode/code/spirix\_map\_to\_sphere.rb](https://sites.google.com/site/spirixcode/code/spirix_map_to_sphere.rb)

The model was created using SketchUp 2015 (Make), but the model I’ve uploaded to the Warehouse is in SketchUp 8 format:

https://3dwarehouse.sketchup.com/embed.html?mid=u7aa4315a-63f1-4d3b-b779-847392f4906b&width=580&height=326

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 🙂

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [May 2, 2015, 7:36pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/4 "2015-05-02T19:36:16Z")

</div>

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:

https://3dwarehouse.sketchup.com/embed.html?mid=u437b726b-d80d-4121-86d2-c6e0b3d7de8c&width=580&height=326

---

<div class="post-metadata">

**Author:** ![ChrisStewart](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/chrisstewart/32/5995_2.png) [@ChrisStewart](https://forums.sketchup.com/u/ChrisStewart)\
**Post date:** [May 2, 2015, 8:34pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/5 "2015-05-02T20:34:14Z")

</div>

I also think it is fun to play with -better than puzzle games.

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [May 5, 2015, 4:30pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/6 "2015-05-05T16:30:17Z")

</div>

I came across a monochrome depth map of a Lincoln penny:

and imported it into SketchUp:

Pretty amazing detail 🙂

---

<div class="post-metadata">

**Author:** ![catamountain](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/catamountain/32/48_2.png) [@catamountain](https://forums.sketchup.com/u/catamountain)\
**Post date:** [May 5, 2015, 11:14pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/7 "2015-05-05T23:14:59Z")

</div>

As you like depth maps, you may like to play with [Heightfield Generator](http://rhin.crai.archi.fr/rld/plugin_details.php?id=171). [XnView](http://www.xnview.com/en/) will create the required greyscale image.

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [May 8, 2015, 1:50pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/8 "2015-05-08T13:50:03Z")

</div>

> [@catamountain](#):
>
> you may like to play with Heightfield Generator

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.

---

<div class="post-metadata">

**Author:** ![Box](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/box/32/235164_2.png) [@Box](https://forums.sketchup.com/u/Box)\
**Post date:** [May 8, 2015, 2:18pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/9 "2015-05-08T14:18:23Z")

</div>

There is some very interesting stuff going on in this thread.

---

<div class="post-metadata">

**Author:** ![catamountain](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/catamountain/32/48_2.png) [@catamountain](https://forums.sketchup.com/u/catamountain)\
**Post date:** [May 9, 2015, 4:12pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/10 "2015-05-09T16:12:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![john\_drivenupthewall](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@john\_drivenupthewall](https://forums.sketchup.com/u/john_drivenupthewall)\
**Post date:** [May 9, 2015, 4:42pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/11 "2015-05-09T16:42:18Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [May 10, 2015, 4:41pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/12 "2015-05-10T16:41:12Z")

</div>

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 …

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [May 10, 2015, 5:57pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/13 "2015-05-10T17:57:07Z")

</div>

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](https://forums.sketchup.com/uploads/default/6373/50cbc35f5887a0e1.skp) (109.8 KB)

Solving geometry puzzles with SketchUp is a lot more fun than solving Sudokus 🙂

---

<div class="post-metadata">

**Author:** ![rodgercarr13601](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@rodgercarr13601](https://forums.sketchup.com/u/rodgercarr13601)\
**Post date:** [May 11, 2015, 2:25am UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/14 "2015-05-11T02:25:48Z")

</div>

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?!

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [May 11, 2015, 4:24am UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/15 "2015-05-11T04:24:18Z")

</div>

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](https://sites.google.com/site/spirixcode/code/spirix_outliner.rb)

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [May 11, 2015, 8:07pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/16 "2015-05-11T20:07:38Z")

</div>

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](https://sites.google.com/site/spirixcode/code/spirix_outliner.rb)

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [May 16, 2015, 5:25pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/17 "2015-05-16T17:25:46Z")

</div>

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:

https://3dwarehouse.sketchup.com/embed.html?mid=u3e297b83-1167-485d-b22f-27f58b84c528&width=580&height=326

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 🙂

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [June 5, 2015, 7:01pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/18 "2015-06-05T19:01:19Z")

</div>

Something fun for Linux fans …

[![](https://global.discourse-cdn.com/sketchup/original/3X/3/9/3965c0b5d6f2de7cbd57a66df8a3bb8452aaa511.jpeg "Tux") ](https://www.youtube.com/watch?v=5va1EFuz7Ks)

https://3dwarehouse.sketchup.com/embed.html?mid=u40c5d785-8087-4a6d-91c1-cb75c2913b0a&width=580&height=326

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [June 7, 2015, 3:37pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/19 "2015-06-07T15:37:24Z")

</div>

![](https://global.discourse-cdn.com/sketchup/original/2X/b/b77d7f7c22902faa2ccdfcc4169dfa2abe7355a3.png)

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [June 8, 2015, 1:50pm UTC](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902/20 "2015-06-08T13:50:22Z")

</div>

This “Gear Sphere” is 1" in diameter (printed in dyed laser-sintered nylon):

 ![](https://global.discourse-cdn.com/sketchup/original/2X/a/a219ee1c589670ed6b9a42d39200ad9b9fb8a29f.png)

[Next page](https://forums.sketchup.com/t/sketchup-as-a-hobby/9902.md?page=2)
