Creating 100% Solid, 3D-Printable Threads in SketchUp (My Ruby API Journey)

Hi everyone,

I wanted to share a technical project I’ve been working on to solve a specific issue I kept running into with 3D printing. As someone who heavily relies on 3D printing for functional parts and jigs, I always struggled to generate perfectly manifold, “100% Solid” machine threads directly in SketchUp without the geometry breaking.

To solve this, I dove deep into the Ruby API and developed a custom generator (I call it MoGrOv).

The Technical Challenge: As many of you know, SketchUp has limitations with tiny geometry, especially during complex Boolean operations. When I tried generating small metric threads (like M5 and below), the faces would fail to form. I managed to solve this by implementing an automatic 1000x scale-up under the hood during the generation process, doing the Boolean math at a massive scale, and then scaling it back down. This ensures the final thread is completely solid and slicer-ready without missing faces.

What the tool does now: It reliably generates standard ISO/DIN metric fasteners (from tiny M2s up to M450). But since many users work in inches, I also developed a fully dedicated Imperial version to handle UNC thread standards. Transitioning the Ruby math from metric pitch to calculate Threads Per Inch (TPI) was a fun challenge, but now both versions guarantee Solid Components ready for the printer bed.

I’m sharing this because I’d love to connect with other users who use SketchUp for functional 3D printing.

  • How do you usually handle complex threads for your prints?

  • Has anyone else tackled the “small faces” issue in Ruby differently?

I have some documentation and videos showing the workflow on my site and YouTube channel if anyone is interested in the technical details behind it.

Would love to hear your thoughts or see examples of functional threads you’ve printed!

nah, whether it’s manual or ruby-made, the *1000 then /1000 is valid.

actually, when preparing a print, I’ll just work *1000 : open a file in metre and work in it as if it was in millimetre.
it makes your file automatically *1000 but when you import it in your slicer, it’ll be automatically resized.

Yes, absolutely! Working in meters and letting the slicer automatically interpret them as millimeters is a classic and bulletproof workaround. I used to do exactly that for a long time!

The main reason I built the *1000 scale-up/down directly into the Ruby script’s background process is so that I can just stay in my standard millimeter (or inch) template. When I’m designing a complex mechanical assembly and trying to dial in the exact real-world fit – especially adjusting those critical minus values for thread clearances so they actually screw together off the printer – I prefer to see the true 1:1 dimensions and measurements in SketchUp.

The script just does the heavy lifting in the background, so I get a solid bolt instantly without changing my workflow.

Do you print a lot of functional/mechanical parts? I’m curious how you usually handle the clearance tolerances when using the meter method!

trial / error, eyeballing, and post print work. I’d rather have to sand down a face slightly than have too much tolerance

and if I need a standardised part, like a thread, I’ll usually just grab one on makerworld and adapt it (they are already scaled with some tolerance) :innocent:

in the end, tolerance depends on your machine, filament, slicer parameters too. I’ve had prints supposed to be an impeccable tight fit that were either too tight or loose.

You make a very fair point about the machine and filament variables! However, my approach to solving that is a bit different.

Instead of relying on downloaded models from Makerworld that have someone else’s random tolerances permanently baked into the mesh, I prefer to rely on proper printer calibration. If you calibrate your machine correctly—for example, by printing a test washer and fine-tuning slicer settings like Horizontal Expansion / Hole Horizontal Expansion (in Cura) or XY Hole Compensation (in PrusaSlicer/Bambu)—a well-tuned printer will output the exact 1:1 geometry of the 3D model without any issues.

That is exactly why I designed the generator to output perfectly true, mathematically correct standard threads. The plugin’s UI already lets you define the exact bolt length, thread length, and head type before generating.

But the real magic is that because it outputs a completely clean, 100% Solid Component, you can easily modify it further after it’s generated. Even though the standard parameters are set, you can use native Solid Tools to drill a hole straight through the bolt, cut off the standard head to merge the thread with a highly specific custom knob, or subtract the threads from a block to create a custom jig. It’s a completely different and much faster workflow compared to fixing downloaded, non-solid meshes!