sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    How to make a Solid Component from a Solid Group?

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    20 Posts 5 Posters 1.3k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      tomot
      last edited by

      TIG! I made an .rb file out of your code. Yes your script creates what I'm looking for, BUT, why do you erase the component group it just created? I want to leave all the rafters in place so I can edit one of the rafter tails which will influence the other 5. πŸŽ‰


      rafter.jpg


      RafterJoist.skp

      [my plugins](http://thingsvirtual.blogspot.ca/)
      tomot

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        OK.
        I doesn't erase the rafters - as Entity Info shows there are 6 - all overlaid...
        The issue is that the groups don't seem to be 'equivalent'.
        Their 'insertion points' are different, so when they get made into a component the new instances become 'coincident'.
        How are you making these groups initially ?
        Is there a way of giving them a consistent 'origin' ?
        The code I posted only works if all of the groups are 'equivalent'.
        Of course in your case you can move the instances back into their correct locations, and then notching one will notch all...

        TIG

        1 Reply Last reply Reply Quote 0
        • TIGT Offline
          TIG Moderator
          last edited by

          Why not use the equivalent RafterTool ? http://rhin.crai.archi.fr/rld/plugin_details.php?id=319 it automatically makes components except for the last infill 'group'. It's easy enough to tweak the settings to make mono-pitched rafters... πŸ˜• [you made it!]
          IF you really have to do this, in this way... then I COULD code something to give every selected rafter-group a consistent 'origin' and then make them into single component instances...

          Let me know... πŸ˜•

          TIG

          1 Reply Last reply Reply Quote 0
          • T Offline
            tomot
            last edited by

            That brings us full circle, back to my opening thread. The Rafters are created by an (.rbs) ruby, while the joists in yellow are created by JoistTool.rb

            There is something else I have noted about this .rbs file, it appears to me that the author mirrored the rafters about a center hence those at the middle are not equally spaced, as shown in the pic and the .skp file.

            [my plugins](http://thingsvirtual.blogspot.ca/)
            tomot

            1 Reply Last reply Reply Quote 0
            • T Offline
              tomot
              last edited by

              I gather that ss=model.selection is not robust enough to able to register the co-ordinate location of each existing rafter, so that this information can be used again to reinstall the new component group to their original location?

              [my plugins](http://thingsvirtual.blogspot.ca/)
              tomot

              1 Reply Last reply Reply Quote 0
              • T Offline
                tomot
                last edited by

                @tig said:

                Why not use the equivalent RafterTool ? http://rhin.crai.archi.fr/rld/plugin_details.php?id=319
                πŸ˜•
                I know that guy! its the other me. LOL! But actually the rafter tool from 10001bit are more practical for most complex roof framing, particularly when it comes to hip and valley framing, unfortunately this human need to preserve ones code gets in the way of going forward ......sigh!

                [my plugins](http://thingsvirtual.blogspot.ca/)
                tomot

                1 Reply Last reply Reply Quote 0
                • TIGT Offline
                  TIG Moderator
                  last edited by

                  @tomot said:

                  I gather that ss=model.selection is not robust enough to able to register the co-ordinate location of each existing rafter, so that this information can be used again to reinstall the new component group to their original location?
                  It can... so I will code some convoluted transformation stuff for you tomorrow - it's late here right now... 😐

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • TIGT Offline
                    TIG Moderator
                    last edited by

                    (c) TIG 2012
                    Permission to use, copy, modify, and distribute this software for
                    any purpose and without fee is hereby granted, provided that the above
                    copyright notice appear in all copies.
                    THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
                    IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
                    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                    TIG-groups2components.rb
                    Usage: Preselect the 'equivalent' groups to convert.
                    Type [copy/paste] this into the Ruby Console
                    TIG.groups2components
                    This takes the selection of groups and turns them all into
                    instances of one component that is made from the first group in the
                    selection. The insertion points of the selected groups is rationalized
                    so that groups that are effectively the same form [e.g. rafters made
                    using 1001-tools] but with varying insertion points are accommodated.
                    Only use it on groups that are either copies of the same group, or
                    groups that are 'equivalent' in 'form' to each other, because it will
                    affect all groups selected. Each group's layer and material is
                    duplicated in the new instance that replaces it.
                    It is one step undoable in case of disasters !
                    Donations: Paypal.com = info @ revitrev . org
                    Version: 1.0 20120208 First proper release.


                    Place into the Plugins folder and restart Sketchup. Follow the Usage Notes...

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      tomot
                      last edited by

                      Well done TIG! the components are indeed editable, except for one small problem, when using a hip roof the rafters are all the same length, the attached file explains further.


                      Rafter.skp

                      [my plugins](http://thingsvirtual.blogspot.ca/)
                      tomot

                      1 Reply Last reply Reply Quote 0
                      • TIGT Offline
                        TIG Moderator
                        last edited by

                        You can't make a single simple component to serve as a series of different length hipped-rafter groups.
                        The best you can hope for is to use symmetry and have pairs of mirrored components at opposite ends of the roof...
                        You couldn't expect to make a component manually that would serve for all the hipped rafters, so how could a simple tool that converts groups to components do any better ?

                        Also if you make a copy of a group and don't edit it then Sketchup can [incorrectly] have two instances of that group's definition. That seems what's happening there...
                        Here's a version of the tool that makes every group unique before processing it...
                        try it again and see what happens...


                        TIG-groups2components.rb

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • T Offline
                          tomot
                          last edited by

                          I understand the problem! which now takes on a whole new perspective. The solution for editing the rafter tails, of the entire perimeter of a roof the rafters, would appear to lie in producing a secondary set of coincident rafters that only serve as editable tails and that would not interfered with the original rafters at all.

                          [my plugins](http://thingsvirtual.blogspot.ca/)
                          tomot

                          1 Reply Last reply Reply Quote 0
                          • TIGT Offline
                            TIG Moderator
                            last edited by

                            How about somehow combining all of the rafter groups that share a common 'wall-plate' into a single group and exploding them inside this 'rafters-group'.
                            You then [hopefully] have a 'solid' rafters-group.
                            Then we make another solid group [copy] representing the 'wall-plate' and use the 'Solid' boolean tools to subtract the wall-plate from the rafters' ends, making the required notches in one go, and then we rework the rafters-group contents, so all-connected-geometry was once again made into individual grouped rafters [if that's whats needed] and then explode the temporary rafters-group at the end [if that's whats needed] πŸ˜•
                            What's the workflow here ?

                            TIG

                            1 Reply Last reply Reply Quote 0
                            • T Offline
                              tomot
                              last edited by

                              Actually your roof.rb is a good starting point for an editable rafter tails addition, where the editable rafter tail components only extend from the exterior building envelope to the width of the roof overhang. Is spring in the air yet?

                              [my plugins](http://thingsvirtual.blogspot.ca/)
                              tomot

                              1 Reply Last reply Reply Quote 0
                              • 1 / 1
                              • First post
                                Last post
                              Buy SketchPlus
                              Buy SUbD
                              Buy WrapR
                              Buy eBook
                              Buy Modelur
                              Buy Vertex Tools
                              Buy SketchCuisine
                              Buy FormFonts

                              Advertisement