Medeek Truss

I’ve added in thumbnails to the sheathing tab of the global settings so the user can preview the wall and roof cladding materials:

Version 2.1.5b - 02/18/2018

  • Added a crow’s beak option for gambrel attic trusses.
  • Added thumbnails for wall and roof materials in the sheathing tab of the global settings.

This barn is very similar to the one we had at our first farm in Terrace B.C. Canada:

Foundation was created with the foundation plugin.

View model here:


The thing I find very interesting with the gambrel roof is the two pitches, whereas with your typical gable roof you only have one pitch and each side of the roof is simply the hypotenuse of half the span and the height of the peak.

With a gambrel roof you have the two legs of the roof and the two pitches and an infinite number of possible combinations and hence a large variety in the shape of the gambrel roof.

Ultimately this led me to create the HTML/SVG preview panel so that the user can play with the various parameters until the desired gambrel shape is achieved. I believe this is where the real power in this plugin in manifest, in situations where an architectural element can be realized by incrementally adjusting parameters within the user interface.

A common truss is much more simpler than the gambrel but a similar preview screen would be helpful in my opinion.

1 Like

As I was creating the various test models for the gambrel attic truss yesterday I realized that the color I had initially set for the gypsum material was slightly off white, which for my particular case was just fine. However, after giving it second thought I realized that the gypsum color (material) should also be configurable so I added in one additional setting into the sheathing tab.

Then my 13 year old son (Jared) suggested that I implement some sort of color picker since most people don’t equate a hexadecimal RGB value with any particular color (ie. #FF2C9F). I found a simple javascript based color picker and modified it to fit my needs, hopefully this is somewhat helpful.

Under the materials tab I will probably implement similar options where one can modify the color of the lumber and the pressure treated lumber. For now I will probably keep the plywood and the OSB material/texture as default. If someone really wants to modify those it is simply a matter of replacing the .jpg image with their own custom image within the plugin folder.

Since javascript tends to be a bit browser dependent I am curious how well this works on MacOS with the background browser running as Safari, please let me know if there are any issues.

The color boxes at the bottom of the color picker provide some shades of grey as well as the default Medeek colors for: lumber, pressure treated lumber, gypsum.

This minor update is rolled into sub-revision 2.1.5c.

I took a step back today and pulled my head out of the sand, so to speak.

The truss plugin does some pretty cool stuff and its fairly detailed where I’ve fleshed out certain truss and roof types. However, it is missing one major feature or has a major flaw depending on how you want to word it.

Currently the plugin is “fire and forget”, with no ability to edit an existing roof or floor assembly. This needs to change.

I have a mental picture of how I want to handle this but there may be some flaws with my thinking.

I briefly discussed this with a few others at this thread:

My idea is to right click on a roof or floor assembly, then click “Edit Assembly” at which point the plugin will bring up a very concise list of parameters for the assembly. Changing any one of the various parameters or settings will essentially redraw the entire (roof, truss, floor, dormer) assembly. The list will remain open after each edit and only be closed if the user decides to close it.

My original idea was to have the edit process walk the user back through each UI menu but this is too time consuming and probably unnecessary.

Any manual edits made to the assembly will of course be lost but this is the price of having a fully editable assembly.

I think I can implement this fairly easily, the various modules are all utilized the same as when I originally created the assembly, the only difference being the user interface.


That is awesome! That is a thought that I had as well, but since you are able to generate a new roof so quickly it didn’t bother me too much. But that would make this app even better!!!

Any idea on when you might get to adding the dormers into the program?

1 Like

After the plugin was configured to hold the parameters of the previously drawn roof it then became less of a nuisance to have to walk back through the menus and recreate a roof, I agree with that statement.

However, you still have to reselect the three points that define the roof and then the time it takes to click back through through all of the menus is precious time lost, time is money.

With an edit panel implemented you simply change one parameter (or more) and click update.

1 Like

Dormers have been partially implemented but not fully. The current dormer routine will draw the walls of the dormer but nothing else. So much to do…

The update and close button will be at the bottom or the top of the UI and even though you scroll down through all of the parameters the position of these buttons will not change, this will make it quick to change a parameter and then hit update, without having to scroll back to find the update button, when your done you can either x out of the window or hit the close button.

1 Like

Why don’t you store the 3 points along with all the parameters.

Additionally - keep the outermost container. Delete the old roof details and then create the new roof details within the outermost container. Then the new roof is created exactly where the old one was - even if the user moved the entire roof.

Then of course the user also has the option of deleting the old roof and creating another.


When I initially create the outermost container (group) I create it at the origin and then translate and rotate it into position based on the (3 points selected).

I could either clear out the contents of the group and create the new roof inside the existing group.


I could get the transform of the existing group, delete it, create the new group and then transform the new group into the correct position and rotation.

The original 3 points don’t have any value in my opinion since the user may have moved the assembly (group) after it was created. I often do this myself if I initially create the roof first and then add in the walls and foundation later.

The same scenario works for my cabinets. The user can move and or rotate them where ever they want. Editing is still simple and does NOT require the user to choose points.

All the information that you require are part of the transform.

We can take this off line if you wish

1 Like

I haven’t looked at the transform in enough detail yet but I need to figure out how to pull out the rotation and origin, all of which I can probably get from some built in methods. I need to peruse the API documentation a little more.

You shouldn’t need to worry about that. In my extension for my porches I base my drawing off of [0,0,0] in the component. Then I transform the component to place at the position the user requested. I can redraw the geometry using the same code later. If the user moves the location of the component I can redraw the geometry and the location of the component doesn’t change, but stays where the user placed it.

1 Like

So basically you are using method #1 above which clear out the contents of the component or group and then redraws the geometry inside the existing component/group. This does seem like a more logical method than the alternative I’ve given above.

Realistically this update will take at least two full days of work to implement, hopefully not too much rewriting of the main code base but you never know until you really dive into it.

Basically I’m saying you should be able to use the same code you used to do the initial drawing. Where the actual component is located should not really affect your drawing code.


first grab the transformation of the main container
tr = roof.transformation.clone

Create your roof as you normally would and then move the new roof to where the old one was
Then you can erase the old roof

1 Like

I simply do.

def draw_roof (comp, properties)
  #create new entities to draw roof using provided properties.

unless @old_roof then @old_roof = comp_from_points(points) end
draw_roof (@old_roof, new_properties)

This is faster than deleting a component and creating a new one. Plus you don’t need to worry about the transformation at all.

1 Like

It always depends what you are actually trying to accomplish.

In my case the time it takes to perfrom erase_entities takes 0 milliseconds - so why fix something if it ain’t broke.

Trying to get some work done on this today. First though I need to create a library for the truss assembly that specifies every single parameter or user option, so that all of this information is stored for each assembly created. Essentially it is a database, its really quite amazing that you can do all of this within SketchUp, I only wish I knew that the API existed years ago, I can only imagine what I would have created by now.