sketchucation logo sketchucation
    • 登入
    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!
    🔌 Easy Offset | Offset selected faces in SketchUp in positive and negative offsets. Download

    [plugin]Random replacement of components

    已排程 已置頂 已鎖定 已移動 Plugins
    47 貼文 13 Posters 45.3k 瀏覽 13 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • A 離線
      AcesHigh
      最後由 編輯

      It would be really nice if we could set % of random replacement.

      example:

      have a building with 300 closed window components. These will be the target

      then we also have 4 other window components that will be used as sources: totally opened window, 3/4 opened window, half opened window and 1/4 opened window

      this plugin, as it is, will replace ALL closed windows with a random number of each of the other 4 windows.

      but it would be ideal if we could decide to make random ONLY which components will be replaced, not the number.

      So...

      Original Component Remaining: 30% (I set to 30% so 30% of the 300 closed windows will remain as the "closed window" component

      Source 1 - 10% (of 300)
      Source 2 - 20%
      Source 3 - 30%
      Source 4 - 10%

      After the operation, in random locations of the building, we would have
      90 closed windows (original component)
      30 4/4 open windows
      60 3/4 open windows
      90 half open windows
      30 1/4 open windows

      1 條回覆 最後回覆 回覆 引用 0
      • pilouP 離線
        pilou
        最後由 編輯

        @unknownuser said:

        It would be really nice if we could set % of random replacement.

        Just build the source with your result % wished! 😉
        It's not a big deal to make some copy move for build your sets of %! 😉

        4 seconds * 16 cases = 1 minute 😄

        Frenchy Pilou
        Is beautiful that please without concept!
        My Little site :)

        1 條回覆 最後回覆 回覆 引用 0
        • sdmitchS 離線
          sdmitch
          最後由 編輯

          @pilou said:

          @unknownuser said:

          It would be really nice if we could set % of random replacement.

          Just build the source with your result % wished! 😉
          It's not a big deal to make some copy move for build your sets of %! 😉

          4 seconds * 16 cases = 1 minute 😄

          Sorry but I don't think this method will work because the Sources are picked randomly and, other trying to avoid picking the same source back to back, there is no tracking of the number of each of the sources that have been picked.

          However, I have created a version that does if anyone else is interested.

          Nothing is worthless, it can always be used as a bad example.

          http://sdmitch.blogspot.com/

          1 條回覆 最後回覆 回覆 引用 0
          • pilouP 離線
            pilou
            最後由 編輯

            If you have 50 Blue objects, 50 Pink Objects (B, P, B, P.....)
            Pick randomly in this bicolored list as Source will be very near than 50 % / 50 % of each color! 😉

            Frenchy Pilou
            Is beautiful that please without concept!
            My Little site :)

            1 條回覆 最後回覆 回覆 引用 0
            • E 離線
              Einstein
              最後由 編輯

              Hi!

              It works really nice. But if I replace many components and want to undo, I have to undo all changes one by one component. Could it be all the changes are done within one step only? Could somebody modify the script or give me a hint how to modify it? (I have no clue about coding - the only thing I can do is to replace some part of code in Notebook 😛)

              And... if it also worked with groups... that would be gorgeous.

              Anyways, great thanks for the Creators!

              1 條回覆 最後回覆 回覆 引用 0
              • sdmitchS 離線
                sdmitch
                最後由 編輯

                @einstein said:

                Hi!

                It works really nice. But if I replace many components and want to undo, I have to undo all changes one by one component. Could it be all the changes are done within one step only? Could somebody modify the script or give me a hint how to modify it? (I have no clue about coding - the only thing I can do is to replace some part of code in Notebook 😛)

                And... if it also worked with groups... that would be gorgeous.

                Anyways, great thanks for the Creators!

                The latest version of that plugin is Component Replacement on my blog. It has a one step Undo. Sorry but it does not work with groups only components. Groups have some component characteristics but can not assign a definition to a group like you can to a component.

                Nothing is worthless, it can always be used as a bad example.

                http://sdmitch.blogspot.com/

                1 條回覆 最後回覆 回覆 引用 0
                • S 離線
                  Sl-m
                  最後由 編輯

                  I actually tried it in Sketchup 2019.2
                  Nothing was happening at the beginning 😲 until I edit the SOURCE & TARGET "instance names" (not definition). It worked like a charm and It will make me save LOTS of time. You guys are champs! 👊

                  Tip: you can select all your source components in one go and enter their instance name in one time.
                  Hope that helps anyone who got stuck:)

                  1 條回覆 最後回覆 回覆 引用 0
                  • 1
                  • 2
                  • 3
                  • 3 / 3
                  • 第一個貼文
                    最後的貼文
                  Buy SketchPlus
                  Buy SUbD
                  Buy WrapR
                  Buy eBook
                  Buy Modelur
                  Buy Vertex Tools
                  Buy SketchCuisine
                  Buy FormFonts

                  Advertisement