sketchucation logo sketchucation
    • Login
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Help with recursive component?

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    15 Posts 4 Posters 2.5k Views 4 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.
    • Al HartA Offline
      Al Hart
      last edited by

      @tig said:

      The Outliner is a far more efficient way of finding nested components/groups, right clicking over the selected item in the Outliner offers all of the usual context-menu items.
      Using View > Component Edit > Hide rest of model etc lets you see what's what too...
      A little better component naming would be helpful too 😒

      Thanks TIG - A client grabbed this from the 3D warehouse and marked the whole thing as a light - which was making way too many individual light sources. (Not just the rice paper, but also all of the hardware in the light)

      I told him he should re-insert the rice paper as a single surface, (it is 26 separate surfaces in the 3D Warehouse model), and then make it into a single light for faster processing. But without the outliner, (which I did not think to use), or the expand function, it was hard to see just what was going on.

      Al Hart

      http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
      IRender nXt from Render Plus

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

        It could certainly be made from far less geometry and sub-parts - it's a light-fitting, who's ever going to be so close to see it's inner workings - a prime example of over-detailing an object 😒

        TIG

        1 Reply Last reply Reply Quote 0
        • Al HartA Offline
          Al Hart
          last edited by

          @unknownuser said:

          When you import a model, all it's sub-components are marked as "internal" and hidden by default in SU.

          I see there is an internal? to check for an internal component in Ruby.

          Is there any way to mark a component being used as a sub-component as internal when I am creating a component with ruby?

          Al Hart

          http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
          IRender nXt from Render Plus

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            @al hart said:

            Is there any way to mark a component being used as a sub-component as internal when I am creating a component with ruby?

            Unfortunatly no. I've requested this, as it'd be very useful for organizing a model.

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

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

              ... ☀
              BUT provided the sub-components are only used inside a main-component [i.e. they have no instances in their own right] you could try this way...
              Save the main-component externally [use the 'TEMP' folder etc], rename the original and any sub-components as 'scrap'.
              https://developers.google.com/sketchup/docs/ourdoc/componentdefinition#save_as
              Keep track of any instances of the main-component's definition.
              Reload the TEMP skp back into the model - it should take it's 'original name' [rename it otherwise].
              https://developers.google.com/sketchup/docs/ourdoc/definitionlist#load
              Erase the TEMP SKP to tidy up [ File.delete(tempskp)].
              Set every original main-component instance.definition=newdefn to use this newly imported replacement.
              The newly imported component now has its own 'internal' sub-components.
              At the close of play do a ' .clear!' on each of the unused ['scrap'] main-component and sub-componnet definition.entities in turn - when the model.start...commit_operation block closes they then are auto-deleted as empty definitions.
              Now any 'internal' wholly sub-components are no longer listed in the unExpanded Component Browser > Model panel.
              They will appear in the Outliner as before...

              TIG

              1 Reply Last reply Reply Quote 0
              • GaieusG Offline
                Gaieus
                last edited by

                The other day I put together a little tutorial about internal and external components: http://www.sketchucation.com/resources/tutorials/36-intermediate/115-internal-external-components

                Gai...

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  @gaieus said:

                  The other day I put together a little tutorial about internal and external components: http://www.sketchucation.com/resources/tutorials/36-intermediate/115-internal-external-components

                  👍 👍

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

                  1 Reply Last reply Reply Quote 0
                  • GaieusG Offline
                    Gaieus
                    last edited by

                    This "recursively defined model or component" is not in that tut but from the "preamble" What is a component, it is obvious that you cannot place a file into itself.

                    Gai...

                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      Only thing about the article - at the end, about scaling - it seem to suggest that you scale a model to a match the incorrect scale of an imported component? Or did I misinterpret that?

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

                      1 Reply Last reply Reply Quote 0
                      • GaieusG Offline
                        Gaieus
                        last edited by

                        I did not mean to say that there. I'll revisit and see if there is anything to misunderstand, thanks.

                        Gai...

                        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