I want to create extensions in an effective and correct manner!

Hello! You may remember me from my trim extension threads (which I will discuss in a second) from a few months ago. I’ve taken a break from SketchUp Ruby to catch up on a few other projects and study ruby in a more relaxed atmosphere. Taking the advice of an expert in these forums, I have decided to postpone my trim extension project and work on something simpler to gain more experience. Here’s a list of projects I’ve wanted to tackle in the future. Which of these would you recommend to start with? If none of these are a good start, is there another extension concept you feel I should begin with? Here’s the list…

  • Window Maker - Creates Windows (Basic, Single Hung) with an input of grill patterns and window sizes.
  • Interior Door Maker - Creates Interior Doors based on size input and style input. Imports selected doorknob from a library in extension folder.
  • Siding Creator - Creates siding profiles on faces (similar to the solid tools intersect) in both a lap and board and baton style. Input is gathered for siding reveal and board width.
  • Cabinet Maker (Hardest in My Opinion) - Creates cabinets based upon cabinet type (Lower cabinet, upper cabinet, refrigerator, sink, vanity, etc…), door/drawer configuration and style, hardware selection, and dimensions.
  • Orient face tool - Makes all front faces showing in model (in monochrome) for export with Unreal DataSmith
  • Stair Builder (Not really necessary but as I have streamlined this quickly but could be a start) - Builds stairs based on user input for stair rise, run, number of stairs, and tread style.
  • Garage Door Builder - Makes garage doors based on style and dimensions
    *ProTrim (Been working on) - Extrudes trim profile from library in folder along multiple paths in a SketchUp model.
    *AutoCAD (.dwg) to SketchUp

I work on homes (interior and exterior) so anything in that realm would help. If these seem too complex or difficult for someone just getting started (as they probably are), please recommend a good starting extension. I understand most of these utilize custom classes and that may be a whole different realm of difficulty. If there maybe is an opportunity where there is a team effort to create an extension I’d be happy to join and learn in a group setting too (kind of a long shot but I figured I’d put it out there). Thanks for all your support!

Hi Cayden. I think the easiest way to create Dynamic Component objects is to call them with the interface you will create. Create your Dynamic components, add options to the interface that will allow the user to call the cabinet they want, and leave the small touches to the user. You are right, it is very hard otherwise. Enjoy your work :slight_smile:

There are existing extensions for most if not all of these possibilities. Some free, some paid for.

Are you doing this to speed up your own work? To learn Ruby extension building for your own interest, or to create and sell extensions?

Some of them (for example, Stairs), could be created as Dynamic Components - I’ve made such a DC myself. But I sense that you want to write Ruby Extensions.

You’ll need to create a user interface to collect parameters for whatever you choose to create.

An InputBox is the simplest way by far. More complex is an HTML form, which requires knowledge not only of Ruby but also of HTML, CSS, and JavaScript.

So I suggest you try first to think of something simple like a bookshelf and write an InputBox to ask the user for parameters like:

Overall height
Overall width
Overal depth
Number of shelves
Shelf thickness
Front inset (setback of shelf from sides and top)
Add back? (Yes/No)
Back inset
Plinth height.

Code it to detect user model units - Ft/Inch/Fraction, other US Customary units, or Metric m, cm or mm.

Write code to create components for top, sides, plinth, bottom, back and shelves.

Elaborate later to (for example) add doors, choice of door handle or knob; or include drawers.

And try to replace the InputBox by an HTML form. There’s a GitHub resource which provides wrappers to simplify using such forms. Sorry, I can’t remember it exactly.

That will keep you going for a while!

In the meantime to speed up your work try some of the free existing extensions, many of which are unencrypted so you can read the code and learn from it as well as use the extension and think how you could improve it.

@DanRathbun has a list of Ruby learning resources you could use. Search the forum for that, or maybe he can respond and post a link in this topic.

1 Like

The Ruby Resources lists should be pinned at the top of this subcategory …