Recent Posts

Pages: 1 ... 7 8 [9] 10
81
Off Topic / Conway's Game of Life in SketchUp
« Last post by Medeek on December 30, 2018, 06:42:23 pm »
Conway's Game of Life or Saturday Night Fever, I'm not sure which:



If the grid is much bigger than 20x20 it really slows down, at least on my computer.

Something like this probably needs to run at a lower level than the Ruby API.

My code is below:



    ### Conway Gameboard ####

    model = Sketchup.active_model
    entities = model.active_entities
    @view = model.active_view
    @faces = []

    @cycles = 0
    ysize = 18
    xsize = 18
    blk = 12

    model.start_operation('Generate Game Board', true, false, true)

    for j in 0..(ysize-1)

       for i in 0..(xsize-1)
          i2 = i + 1
          j2 = j + 1
          pt1 = [(i*blk),(j*blk),0]
          pt2 = [(i2*blk),(j*blk),0]
          pt3 = [(i2*blk),(j2*blk),0]
          pt4 = [(i*blk),(j2*blk),0]
          face1 = entities.add_face(pt1, pt2, pt3, pt4)
         
          face1.reverse! if (rand(4)<2)

          @faces << face1
       end
    end

    model.commit_operation


    def calc_conway

       @update_array = []

       for facei in @faces
       
          adj_live_count = 0
         
          if facei.normal.samedirection? Z_AXIS
             facei_status = true
          else
             facei_status = false
          end
       
          adj_faces_list = @faces.find_all { |e| !facei.bounds.intersect(e.bounds).empty? }
          adj_faces_list.delete(facei)
         
          for face_adj in adj_faces_list
             if face_adj.normal.samedirection? Z_AXIS
                adj_live_count += 1
             end   
          end
       
          if facei_status
             # Cell is Live
             if adj_live_count < 2
                @update_array << true
             elsif adj_live_count < 4
                @update_array << false
             else
                @update_array << true
             end
          else
             # Cell is Dead
             if adj_live_count == 3
                @update_array << true
             else
                @update_array << false
             end
          end
       end

       counter = 0
       for facei in @faces
          if @update_array[counter]
             facei.reverse!
          end
          counter += 1
       end

       @view.refresh
       @cycles += 1

       if @cycles > 200
          UI.stop_timer(@conwaytimer)
       end
    end


    model.start_operation('Run Game of Life', true, false, true)

    @conwaytimer = UI.start_timer(0.02, true) { calc_conway }

    model.commit_operation
82
Medeek Truss Plugin / Re: Development and Updates for the Medeek Truss Plugin
« Last post by Medeek on December 29, 2018, 08:08:57 pm »
Version 2.2.7c - 12.30.2018
- Enabled roof labels and framing callouts for all rafter roof assemblies: Gable, Hip, Dutch Gable, TJI, TJI w/ Glulam, Shed etc...









I've also been thinking about how to best handle holes or cutouts in the roof sheathing and cladding that are not only parametric but can be properly reported by the estimator (ie. net area vs. gross area).  I think I have a system worked out, I just need to implement the prototype and test it out.

The cut out or hole tool will have a few options.  One of the options will allow the user to specify whether to cut the cladding, sheathing or framing or all of them.  If the framing is cut then another option for framing in the opening.

I may also provide another option to provide a skylight to cover an opening or other construction elements (eg. vents, whirlybirds etc...)
83
Medeek Truss Plugin / Re: Development and Updates for the Medeek Truss Plugin
« Last post by Medeek on December 29, 2018, 10:47:41 am »
Version 2.2.7b - 12.29.2018
- Enabled roof labels and framing callouts for monopitch truss assemblies.
- Added stats (roof sheathing) for common and monopitch truss roofs which can be analyzed within the Medeek Estimator (Wall Extension) module.

In order to use this new feature you must also have the Wall plugin installed and upgraded to Version 0.9.9v, See Wall plugin thread for further details.
84
Medeek Wall Plugin / Re: Development and Updates for the Medeek Wall Plugin
« Last post by Medeek on December 29, 2018, 10:39:43 am »
Version 0.9.9v - 12.29.2018
- Added roof sheathing to the Medeek Estimator (common and monopitch truss assemblies).

In order for this cross plugin communication/analysis to work correctly you must also upgrade the Truss plugin to the latest version (2.2.7b - 12.29.2018).  The latest truss plugin version has statistics enabled for common and monopitch truss roofs.

Note that the Medeek Estimator is largely experimental (but functional) at this point.  I am essentially setting up the templates and overall organization. Once I am satisfied with the general layout and system I will begin to fully flesh it out with all of the various construction elements (eg. studs, plates, windows, doors, etc...)

I may also separate the Medeek Estimator module into its own stand along plugin since technically it can work with either the Wall or Truss plugin or both.  I will also be augmenting the Foundation plugin with statistics so that its output can also be analyzed in the estimator.

If I do pull it out then it will not really be a stand along plugin as much as an add on that works specifically with the mdkBIM suite since it is not setup to analyze generic models like Quantifier or Estimator (John Brock). 
85
Medeek Wall Plugin / Re: Development and Updates for the Medeek Wall Plugin
« Last post by Medeek on December 28, 2018, 07:38:33 pm »
I just received my copy of John's new book yesterday. 

https://www.amazon.com/gp/product/1119484006/ref=dbs_a_def_rwt_hsch_vapi_taft_p1_i0

I haven't had a chance yet to thoroughly review it from cover to cover but at a cursory glance it appears that it is a fairly complete text.  I was actually quite surprised to the level of detail that John models his homes.  I didn't expect to see all of the electrical outlets and switches however the major duct work for the HVAC does seem like an excellent idea so as to avoid clashes with other building elements.

I was pleasantly surprised to see that the Truss plugin was included in the text.  Of course the wall plugin was released probably after the book went to press so it did not get any coverage but hopefully it might find its way into the 2nd edition.

I've got to say though, those Lumion renderings are something else.  At first glance I thought I was looking at the actual completed residence.

I think I would have liked to see a more in depth treatment in Part IV (Construction Documents) with regards to Layout and more examples of actual construction documents but overall I think this book will be a good reference and earns a spot on my bookshelf.
86
Medeek Foundation Plugin / Re: Development and Updates for the Medeek Foundation Plugin
« Last post by Medeek on December 28, 2018, 09:07:22 am »
Version 1.1.8b - 12.28.2018
- Fixed bug in the registration/licensing module.
87
Medeek Truss Plugin / Re: Development and Updates for the Medeek Truss Plugin
« Last post by Medeek on December 27, 2018, 11:12:52 am »
Version 2.2.7 - 12.27.2018
- Roof and Floor labels option added to the General tab of the Global Settings.
- Roof and Floor label prefixes can be customized in the General tab of the Global Settings.
- Roof labels enabled for common trusses.
- When framing callouts are enabled the area of each roof plane will be shown below the roof label (currently only common truss assemblies have this feature available).
- Added a customizable color for roof and floor labels within the Material tab of the Global Settings.
- Added additional layers for dimensions, annotations, 2d geometry, building code and engineering.

88
Medeek Truss Plugin / Re: Development and Updates for the Medeek Truss Plugin
« Last post by Medeek on December 22, 2018, 06:36:37 pm »
I've been thinking about labels for truss and rafter roofs and I would like to add in some sort of labeling system like the Wall plugin.

With a typical gable roof I will have a label on each side of the roof aligned with the roof plane but offset vertically so it does not Z fight with the sheathing or cladding (shingles).  The label will be similar to the Wall plugin where the user can customize the prefix (eg Roof1, Truss1, Rafter1 etc...)

Each side will be designated a letter, so Roof1-A and Roof1-B.  Hip roofs will have four roof planes so A, B, C and D.

If the framing callout is enabled then beneath the label will show the area for that roof plane (sheathing):

89
Medeek Wall Plugin / Re: Development and Updates for the Medeek Wall Plugin
« Last post by Medeek on December 21, 2018, 08:34:37 pm »
Version 0.9.9u - 12.22.2018
- Enabled temporary (construction) dimensions for beams in the Draw Beam tool.
- Enabled temporary (construction) dimensions for stairs in the Draw Stair tool.
- Added 2D construction lines for exterior wainscoting.
- When the cladding or wainscoting air gap is greater than zero the 2D construction lines are drawn in order to represent the interior surface.

90
Medeek Foundation Plugin / Re: Development and Updates for the Medeek Foundation Plugin
« Last post by Medeek on December 20, 2018, 09:39:33 pm »
Version 1.1.8 - 12.21.2018
- Enabled temporary (construction) dimensions for all foundation types.
- Added a section in the General tab of the global settings for configuring construction dimensions.
- Licensee name now appears in the License tab of the Global Settings when plugin is registered.
Pages: 1 ... 7 8 [9] 10