### Author Topic: Truss Calculators  (Read 370365 times)

0 Members and 1 Guest are viewing this topic.

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #900 on: September 25, 2019, 03:29:52 AM »
First look at a complex roof primitive created with the complex roof module:

The roof primitive will be placed on the hidden layer and the roof outline (blue colored face) will be placed on the outline layer.  The outline layer is important since it allows the moving of the roof edges.  Both of these layers are normally turned off but can be turned on manually at any time.

View the model here:

https://3dwarehouse.sketchup.com/model/10c5d29f-eee3-4ff7-8fbc-0686d6e9bc16/Complex-Roof-Test-1

So far the algorithm for generating the roof planes (roof primitive) seems pretty stable, I will have to try harder to break it.

The next step will be the edit functions and then sheathing and cladding, those are the easy ones.  After that it is on to sub-fascia, soffit & fascia and gutters.

The most difficult algorithms will be the framing and the hip & ridge.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #901 on: September 25, 2019, 11:27:19 AM »
You can also eliminate entire roof planes simply by merging the edges of the roof:

Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #902 on: September 25, 2019, 11:56:58 PM »
Complex octagon roofs are going to get interesting when it gets to the framing:

I will be adding in a separate toolbar for complex roofs with the following tools:

- Draw Complex Roof
- Edit Complex Roof
- Move Roof Edge
- Edit Roof Plane

Some of these tools can also be accessed via the context menu by right clicking on the roof assembly.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #903 on: September 26, 2019, 11:54:05 AM »
First look at the Complex Roofs toolbar:

I have removed the complex roof (draw) icon from the main toolbar.

The "Edit Complex Roof" tool will allow the user to manage all of the basic and advanced options for the overall roof.  The "Edit Roof Plane" tool will allow the user to select a specific roof plane and edit its specific parameters:

- pitch
- top plate height (vertical offset with respect to the main roof)
- overhang
- birdcut
- rafter depth

If a roof plane meets certain criteria the option to switch the roof plane to an end gable will also be allowed.  I have yet to work out all the details or algorithm which will determine whether a roof plane meets this criteria but I do have a pretty good idea on this one, however it may need some fine tuning.

If a roof plane is converted to a gable configuration then additional parameters for gable roofs will be presented in the roof plane edit menu (ie. gable overhang, outlookers, etc...)
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #904 on: September 27, 2019, 12:12:35 AM »
Still working on the trying to break the roof plane (primitive) algorithm.  I've added in a bit more error checking code.  It will probably be a couple more days of testing to make sure it is bullet proof or mostly bullet proof.

The edit, move edge and edit outline tools and functions are now all working.  The next item of business is the roof plane edit tool.

Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #905 on: September 28, 2019, 02:34:18 PM »
Even the most convoluted shapes will generate a roof so long as they are closed polygons:

However, I currently don't have a way to create a roof with inner polygons (holes), for example a donut shaped roof.  I don't think this is critical right now but I will put this on my todo list.

Just fixed a major performance bug/flaw in the plugin not only for this module but actually for all the plugins.  I will be releasing updates for each plugin including the Truss plugin that resolve this issue.

Currently working on the roof plane edit tool.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #906 on: September 28, 2019, 08:49:26 PM »
Version 2.5.0 - 09.28.2019
- Fixed a critical performance bug that affects all the modules within the extension.
- Added the Complex Roofs toolbar.

*** CRITICAL PERFORMANCE UPDATE ***

If you are noticing a slowdown of the plugin performance after multiple edits to a roof or floor assembly, this fix will resolve that issue. This issue affects all previous versions of the plugin.

***

Also note that the complex roof toolbar is now active and will allow you to create a complex roof primitive (edit, move edge, edit outline and regen).  The "Edit Roof Plane" tool is currently not yet available.

The roof primitive and roof outline are placed on separate layers, I will get into that more with a  future tutorial video.  I primarily released this update tonight because of the performance issue I discovered this afternoon with all of the plugins, but it also allows some of you more adventurous designers the ability to test out the new complex roof tools.  Granted a lot remains to be done but at least I've got a start into it now.  I will be focused on it until it is complete.  After that I will attack the secondary roof module.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #907 on: September 28, 2019, 09:19:56 PM »
An example of a roof primitive:

(Note, that I've assigned the material of the primitive to a different material and edited it so that it is transparent.)

View model here:

https://3dwarehouse.sketchup.com/model/d9ecec46-8283-478f-91df-24fbd06530d5/Complex-Roof-Primitive-Test-2

The roof outline is a separate group within the assembly, on its own "outline" layer.  I've taken great care to make sure that the primitive is a "solid" so that the user will be able to use SketchUp's boolean (solid) tools to further manipulate these roof primitives if required.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #908 on: September 29, 2019, 10:52:50 AM »
All the magic happens here:

Nothing elaborate with my office or setup.  The most critical is a somewhat decent computer that works well and the two monitors which allows me to open multiple ruby files at once when I need to.

So busy with the code that I still have not fixed the light fixture base (in the stairwell) that got knocked out of place a few months ago, I guess it all comes down to priorities.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #909 on: September 29, 2019, 12:50:38 PM »
Every roof plane will be able to be customized (or have the customization removed and return to its default state where it uses the global settings of the roof assembly).

The first and most important parameter is the Roof Plane Type:  Hip or Gable

Not all roof planes will be able to convert to a gable configuration.  If you look at a complex roof you should only be able to turn the roof planes that form a triangle (defined by three vertices) into a gable configuration.  All other roof panes are going to be inclined or "hip".  The other constraint is that the angle between the roof plane in question and its adjacent roof planes on either side must be orthogonal (90 degrees), otherwise you could potentially try and gable a roof plane on a octagon shaped roof, which would not make any sense.  I think these two constraints will successfully limit a roof plane, as to whether it can become a gable end.

If a roof plane is customized and it is a hip its parameters are:

- pitch
- birdcut
- rafter depth
- overhang
- delta height

If a roof plane is customized and it is a gable end its parameters become:

- gable rafter option
- gable rafter depth
- gable overhang
- rake option
- rake width
- rake depth
- outlooker option
- outlooker spacing
- outlooker size
- outlooker orientation
- outlooker structural: Yes/No
- outlooker @ peak: Yes/No

P.S.  A certain situation exists where the roof plane has 4 vertices might also be able to be a gable end, I will study this further.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #910 on: September 29, 2019, 01:06:43 PM »
Customizing roof planes gets a little complicated when combined with the roof edge move tool.  The problem is that as you move roof edges you potentially change up the shape of roof, eliminating certain roof planes entirely and also changing some roof planes that potentially could be gable ends back to a hip configuration and vice versa.

With custom roof planes the move tool is going to have to get a bit more elaborate (more logic) so that a number of checks can be run to make sure that we are not trying to turn certain roof planes into gable ends that physically cannot be this configuration and also checking to see if certain roof planes were deleted.

The outline edit tool is even a larger problem in my opinion.  How do you know which edges were retained after an outline edit?  I think the default behavior should be to erase all roof plane customizations after the outline edit tool is used.  I will need to give this some further thought.

Somehow I always knew that complex roofs was going to be a bit of a Pandora's box.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #911 on: September 30, 2019, 12:49:00 PM »
Lots of little details when it comes to editing roof planes.  First of all let's introduce an updated  menu:

Notice that the roof plane status will tell you whether the selected roof plane is inheriting its parameters from the main roof or it has its own custom settings.

I've also added a "Clear Custom Settings" at the bottom of the menu so that one can return the roof plane to the default/global settings of the roof assembly.

Setting up all of this supporting infrastructure is somewhat tedious and certainly time consuming, however I do believe that a solid user interface that is both efficient and intuitive will make or break this module.

I intend for the edit plane tool to be persistent, provided that it does not affect stability.  In other words you can keep clicking on roof planes and updating them without having to restart the tool by clicking on the icon in the toolbar.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #912 on: October 01, 2019, 01:19:32 PM »
If you take a look at these two roofs you will notice that in the second case the lower ridge has degenerated into the steeper roof plane:

I didn't think it was possible but there are certain configurations where a standard straight skeleton will not generate the expected roof.  This is a good example of that.

The complex roof module will not be able to automatically handle these types of situations.

This is where the secondary roof module will need to come in.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #913 on: October 01, 2019, 02:17:19 PM »
Throwing all sorts of curve balls at this module to see if I can break it.  Ultimately one can always break anything if you try hard enough, especially with something as complex as some of these roofs get.

Overall I'm pretty happy with it, I've addressed the issue with inside corners and now all is working as expected.  Here is a recent test example of a roof with planes and pitches all over the place:

View model here:

https://3dwarehouse.sketchup.com/model/1f7e4e9c-e727-4053-956c-c71b57d4241d/Asymmetric-Complex-Roof-3

That being said there is always further testing that can be done.  I'm sure there is some state I have not thought of that someone will get the plugin into that will break it.

I think it is time to move on to the gable end option.  Once I get that working I think the utility of this new module will start to become apparent.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #914 on: October 01, 2019, 10:56:06 PM »
Gable End option (within the edit roof panel menu) is now providing stable results:

View model here:

https://3dwarehouse.sketchup.com/model/b10e6638-5dea-4da2-8a60-dea543978109/Assymetric-Complex-Hip-and-Gable-Roof

The roof primitive module for asymmetric complex roofs with gable and hip ends is now complete.  Granted there is still room for additional options like dutch gable and half hips but I will leave those for another day.

I will now turn my attention to sheathing and cladding as well as the roof plane labels (name and sqft).

One thing I forgot to add into the overall roof parameters/options is anything for battens and cross battens.  I can add it in if I receive some positive feedback on that feature, otherwise I will move on and start into the sheathing module first thing tomorrow.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #915 on: October 01, 2019, 11:25:32 PM »
Version 2.5.1 - 10.02.2019
- Enabled the "Edit Roof Plane" tool, allowing for customized roof planes within complex roof assemblies.
- Added the gable end option for complex roofs within the "Edit Roof Panel" tool/menu.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #916 on: October 03, 2019, 12:29:16 AM »
Version 2.5.1b - 10.03.2019
- Added logic so that customized roof planes can co-exist with the "Move Roof Edge" and "Edit Roof Outline" tools of the complex roof module.

Previously, moving roof edges would potentially shift the customized roof planes if certain roof edges were removed or consolidated.  I think we have now achieved a fully parametric status with the various tools all working together.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #917 on: October 03, 2019, 11:54:19 AM »
After giving it some further consideration I’ve decided to enable dutch gable and half hip options for custom roof planes rather than leave it for later. If I include these options now it will force me to keep my other more specific algorithms general enough to handle all cases. The geometry calcs required to generate the roof primitive for these two other configurations is really not that difficult and actually provides a rather intriguing challenge.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #918 on: October 03, 2019, 09:34:57 PM »
I actually started developing these plugins quite by accident (Truss plugin). I have a web based truss calculator that I initially programmed as a purely academic exercise but eventually became a web based tool when I saw that others might have use for it. This web based app provided a way for the user to generate a DWG of the truss geometry and then download it. I don’t remember who it was, but a SketchUp user emailed me one day back in early Oct. 2015 if I could also make it generate a SketchUp file instead. At that point I had no idea if I could or not, I had no knowledge that SketchUp even had a Ruby API, so I said I would look into it. A few days later in some spare time I was curious if SketchUp might have some sort of AutoLisp like feature (similar to AutoCad) so I dug around on the internet a bit and sure enough an API did exist.

In a few hours I quickly hacked together a bit of Ruby code (my first time coding Ruby, all my previous coding experience is primarily Perl, javascript and HTML) and pretty soon I had some code that one could drop into the ruby console or your plugin folder (.rb file) and it would draw the truss geometry. At the same time I also discovered the various SketchUp forums (SketchUp and Sketchucation). I posted about my update to my truss calculator since I figured other SketchUp users might find this useful if they wanted to model up accurate trusses.

A few days later Julian Smith (South African Architect/Designer) asked me if this tool would become a “real extension”. That got me thinking and I thought if I can find the time it might be fun to actually make this into something. I was finding that the API and ruby were actually quite fun to program and it didn’t take much convincing to keep working on it, in truth it was strangely addicting. One thing led to the next and pretty soon the truss plugin was capable of generating a number of truss types.

In 2016 I started work on the Foundation plugin however I held off on developing the Wall plugin since John Brock (Estimator for SketchUp) had announced his work on a framing plugin.

By early 2018 the Truss plugin had gradually evolved into quite a complex and deep plugin and I had a number of people begging me to consider doing a Wall plugin, including Larry Belk who had been pushing me in that direction since 2015. Brock’s wall plugin had still not been released so I finally decided I’d go for it. Except this time, instead of working on it part time, I decided to go for it full time, a major leap of faith. I did a KickStarter campaign to see if there was sufficient interest in a Wall plugin and started programming it full time in early April 2018. By May 25th, I released the first BETA of the wall plugin and by January of this year I felt like the plugin was good enough to move it from BETA status to full.

All of the plugins are currently under active development, much work remains to be done. They have been my full time job since I started the Wall plugin last year. My current push is to complete the complex rafter roof module. I am grateful to SketchUp for having the foresight to provide an API, and for my customers who allow me to keep creating and pushing the ball forward, without them none of this would have been possible. One day I would like to see SketchUp become the predominant architectural tool used for residential and commercial work.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #919 on: October 03, 2019, 09:35:35 PM »
First look at half hip complex roofs:

(textures added to roof primitive for effect)

Notice the additional "setback" parameter in the menu.  Also a half hip roof plane has both hip and gable parameters with the non-applicable parameters grayed out, as shown.

Similar to a gable end, the half hip can only be applied to certain roof planes, the plugin automatically restricts this placement.

The overhang of the half hip is governed by the gable overhang parameter, hence the overhang under the hip options is grayed out.

Now, on to the dutch gable...
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #920 on: October 03, 2019, 11:51:14 PM »
First look at dutch gable complex roofs:

(textures added to roof primitive for effect)

After I setup the system for the half hip this one fell out without too much trouble.

View model here:

https://3dwarehouse.sketchup.com/model/6f5908e1-189d-420e-8675-78cbe32ef522/Dutch-Gable-Complex-Roof

Now it is time to move on to the sheathing and cladding, but first I need to add in some options for battens and cross battens.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #921 on: October 04, 2019, 12:29:43 AM »
Version 2.5.2 - 10.04.2019
- Added the half hip option for complex roofs within the "Edit Roof Plane" tool/menu.
- Added the dutch gable option for complex roofs within the "Edit Roof Plane" tool/menu.
- The "Edit Roof Plane" tool has been made non-persistent to further improve stability.

Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #922 on: October 04, 2019, 10:44:12 PM »
First look at roof sheathing:

Roof cladding is a little more involved because of the cladding extension parameter.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #923 on: October 05, 2019, 01:48:22 AM »
A few more kinks to work out in the sheathing module, but overall it is working better than expected and it wasn't nearly as hard to code as I initially thought it would be.

View model here:

Still a bit more work to do with sheathing when the dutch gable option is utilized.  As you can tell from the model the sheathing is not tucking under the gable end overhang just yet.  I will be addressing this tomorrow.
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer

#### Medeek

• Journeyman
• Posts: 2,065
• Structural Engineering
##### Re: Truss Calculators
« Reply #924 on: October 05, 2019, 03:02:02 PM »
The rebuild time on this model takes about 1.5 seconds.  That is just with the roof primitive and sheathing.

The question is what will the rebuild time be like for a model/roof this complex when all of the rafters and other accoutrements are included?

View model here:

https://3dwarehouse.sketchup.com/model/cbb4f973-a333-42a0-8262-70d351fa5f7b/Complex-Roof-Test-5
Nathaniel P. Wilkerson, P.E.
Designer, Programmer and Engineer