• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

How to make a Solid Component from a Solid Group?

Scheduled Pinned Locked Moved SketchUp Discussions
sketchup
20 Posts 5 Posters 1.1k Views
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 6 Feb 2012, 17:00

    I have a Ruby (rb), what draws the Yellow ruby joists as Solid Components, which I can edit at once as demonstrated by the rebate, in the joist.
    The other Ruby (.rbs), draws the Red rafters as a Solid Group, I can't make any changes to the file since it is obfuscated.

    Question: How can I make the Red rafters into a Solid Component that allows me to change all the rafter tails? TIA!


    joist1.jpg

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

    1 Reply Last reply Reply Quote 0
    • G Offline
      Gaieus
      last edited by 6 Feb 2012, 18:07

      This plugin would allow you to convert all instances of the same group definition into instances of a component definition. (I believe).
      http://forums.sketchucation.com/viewtopic.php?t=14975

      Gai...

      1 Reply Last reply Reply Quote 0
      • T Offline
        tomot
        last edited by 7 Feb 2012, 01:54

        @gaieus said:

        This plugin would allow you to convert all instances of the same group definition into instances of a component definition. (I believe).
        http://forums.sketchucation.com/viewtopic.php?t=14975

        Thanks Gaieus, the definitive word is I believe πŸ˜„ http://forums.sketchucation.com/viewtopic.php?f=323&t=23307&start=15
        ..... what a mess!, I appreciate all the stuff ThomThom does for SU users, unfortunately trying to keep with all this updating can and does become a full time job, with each new release of SU, I really feel sorry for ThomThom and any Ruby programmers, I have found some of my own Rubies no longer perform as expected prior installing the latest and greatest versions of SU.
        Makes one wonder why all this constant upgrading is really worth it, in the long term, for the serious SU user?

        I cut and pasted my existing plugins folder to a new location, Since I always keep a copy of the original SU install Plugins folder on hand I pasted a copy to the same location, un-rared ThomThom files to the new Plugins menu. I don't see a new Toolbar in the Toolbar menu? 😞
        What else am I missing?

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

        1 Reply Last reply Reply Quote 0
        • T Offline
          thomthom
          last edited by 7 Feb 2012, 09:26

          @tomot said:

          I believe πŸ˜„ viewtopic.php?f=323&t=23307&start=15

          That is TT_Lib version 1 - only used by Selection Toys. And by itself it does nothing.

          Thomas Thomassen β€” SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • E Offline
            Edson
            last edited by 7 Feb 2012, 10:34

            @gaieus said:

            This plugin would allow you to convert all instances of the same group definition into instances of a component definition. (I believe).
            http://forums.sketchucation.com/viewtopic.php?t=14975

            csaba,

            how does one go about converting groups into components with Selection Toys? I did not find any command (icon or menu item) to do that.

            edit: I have just found how to do it: first select the groups then right-click and select Group Copies>Convert into Components.

            edson mahfuz, architect| porto alegre β€’ brasil
            http://www.mahfuz.arq.br

            1 Reply Last reply Reply Quote 0
            • G Offline
              Gaieus
              last edited by 7 Feb 2012, 10:44

              This, of course, only works until you modify any f the group instances (and that group instance will be unique this way). Here it goes (it's in the right click / context menu of a selected group)


              Groups2Components.png

              Gai...

              1 Reply Last reply Reply Quote 0
              • T Offline
                TIG Moderator
                last edited by 7 Feb 2012, 11:02

                Some simple code will take ALL selected groups, make a component of the first selected group and replaces all the selected groups with instances of that component...EDIT:

                CODE REMOVED AS NEW VERSION IN A LATER POST IS MORE EFFECTIVE...
                

                TIG

                1 Reply Last reply Reply Quote 0
                • T Offline
                  tomot
                  last edited by 7 Feb 2012, 17:51

                  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
                  • T Offline
                    TIG Moderator
                    last edited by 7 Feb 2012, 19:54

                    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
                    • T Offline
                      TIG Moderator
                      last edited by 7 Feb 2012, 20:12

                      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 7 Feb 2012, 20:16

                        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 7 Feb 2012, 20:37

                          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 7 Feb 2012, 20:47

                            @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
                            • T Offline
                              TIG Moderator
                              last edited by 7 Feb 2012, 21:23

                              @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
                              • T Offline
                                TIG Moderator
                                last edited by 8 Feb 2012, 10:56

                                (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 8 Feb 2012, 19:20

                                  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
                                  • T Offline
                                    TIG Moderator
                                    last edited by 8 Feb 2012, 22:18

                                    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 8 Feb 2012, 23:10

                                      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
                                      • T Offline
                                        TIG Moderator
                                        last edited by 8 Feb 2012, 23:39

                                        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 9 Feb 2012, 00:04

                                          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
                                          1 / 1
                                          • First post
                                            1/20
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement