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!
    🔌 Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download

    Greeble Beta (Updated Feb-06-2009)

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

      I'm not on my Vistaq machine right now, but that is the same error I was getting on it running SU7. But SU6 and 7 both work on my XP machine here at work right now. So it looks like a Vista issue. I'll see if I can find anything in the code that looks a little shaky ( 🤣 well, it ALL looks a little shaky honestly). I haven't really heard of plugins that work on XP but not Vista.

      Chris

      Lately you've been tan, suspicious for the winter.
      All my Plugins I've written

      1 條回覆 最後回覆 回覆 引用 0
      • Chris FullmerC 離線
        Chris Fullmer
        最後由 編輯

        Hi Pilou, could you specifiy if that is on XP, Vista, or Mac? Thanks!

        Chris

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 條回覆 最後回覆 回覆 引用 0
        • R 離線
          RickW
          最後由 編輯

          @chris fullmer said:

          I like how your code consolidates it all down to just 2 lines though. I already can see all the extra fluff I have in there, so I'll clean it up.

          If the forum didn't wrap the line, you would see a single line of code. 😄 It's called a "ternary expression" since it has three parts (binary is 2 parts, ternary is 3 parts), and it is essentially just a very compact if:then:else statement.

          The parts are:
          (argument) ? (result_if_true) : (result_if_false)

          It's best for short tests, but will work for longer ones, and you can nest them:

          def guessme(x=10)
            my_number = rand(x.to_i)+1
            while (guess = ((UI.inputbox(["Guess a number between 1 and #{x} inclusive;"]))[0]).to_i)
              (guess == my_number) ? (UI.messagebox("You're right!");return nil) ; (return nil if UI.messagebox("Too #{(guess>my_number) ? ("high") ; ("low")}. Try again?", MB_YESNO)==7)
            end
          end
          
          

          RickW
          www.smustard.com

          1 條回覆 最後回覆 回覆 引用 0
          • Chris FullmerC 離線
            Chris Fullmer
            最後由 編輯

            Yikes, I do not fluently read ternary expressions then. I can see sort of what its doing, but there's a lot in there I don't get. Maybe in time 😄 Also Rick, I am getting this error:

            Error; #<ArgumentError; Cannot create unit vector from zero length vector>
            C;/Program Files/Google/Google SketchUp 7/Plugins/offset.rb;49;in `parallel?'
            C;/Program Files/Google/Google SketchUp 7/Plugins/offset.rb;49;in `offset'
            C;/Program Files/Google/Google SketchUp 7/Plugins/offset.rb;39;in `upto'
            C;/Program Files/Google/Google SketchUp 7/Plugins/offset.rb;39;in `offset'
            C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;159;in `greeble'
            C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;137;in `each'
            C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;137;in `greeble'
            C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;200
            C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;200;in `call'
            

            I'm sure its because I'm passing bad geometry to your offset script. What do I need to check so as to not pass bad geometry to offset.rb? Thanks!

            Chris

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

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

              Seems works fine 6 & 7 😉
              Even for the "Tin" ☀
              Bravo! 😎
              XP on PC 😉


              tin.jpg

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

              1 條回覆 最後回覆 回覆 引用 0
              • J 離線
                Jim
                最後由 編輯

                @rickw said:

                I use this:

                (Sketchup.version[0,1].to_i<7) ? (view.model.start_operation "name here") ; (view.model.start_operation "name here", true)
                > 
                

                What happens when SketchUp reaches version 10? 😆

                Hi

                1 條回覆 最後回覆 回覆 引用 0
                • T 離線
                  todd burch
                  最後由 編輯

                  @jim said:

                  @rickw said:

                  I use this:

                  (Sketchup.version[0,1].to_i<7) ? (view.model.start_operation "name here") ; (view.model.start_operation "name here", true)
                  > > 
                  

                  What happens when SketchUp reaches version 10? 😆

                  Rick will have to learn a new parsing technique! 🤣

                  1 條回覆 最後回覆 回覆 引用 0
                  • R 離線
                    RickW
                    最後由 編輯

                    Haha! Good point. But Google's backwards-compatibility policy is for 3 versions. By that time, there will be no more need for the "true" flag so it will cease to exist after version 9, and then I'm safe until SketchUp 70.0. At that point, my crystal ball gets a bit fuzzy.

                    But just in case I'm wrong, this is better:

                    Sketchup.version.split(".")[0].to_i<7
                    

                    RickW
                    www.smustard.com

                    1 條回覆 最後回覆 回覆 引用 0
                    • R 離線
                      RickW
                      最後由 編輯

                      @chris fullmer said:

                      Rick, I am getting this error:

                      Error; #<ArgumentError; Cannot create unit vector from zero length vector>
                      > C;/Program Files/Google/Google SketchUp 7/Plugins/offset.rb;49;in `parallel?'
                      > C;/Program Files/Google/Google SketchUp 7/Plugins/offset.rb;49;in `offset'
                      > C;/Program Files/Google/Google SketchUp 7/Plugins/offset.rb;39;in `upto'
                      > C;/Program Files/Google/Google SketchUp 7/Plugins/offset.rb;39;in `offset'
                      > C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;159;in `greeble'
                      > C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;137;in `each'
                      > C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;137;in `greeble'
                      > C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;200
                      > C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;200;in `call'
                      

                      I'm sure its because I'm passing bad geometry to your offset script. What do I need to check so as to not pass bad geometry to offset.rb? Thanks!

                      Chris

                      Can you email me a sample .skp file that's causing the error?

                      RickW
                      www.smustard.com

                      1 條回覆 最後回覆 回覆 引用 0
                      • T 離線
                        tomot
                        最後由 編輯

                        @rickw said:

                        @chris fullmer said:

                        Rick, I am getting this error:

                        Error; #<ArgumentError; Cannot create unit vector from zero length vector>
                        > > C;/Program Files/Google/Google SketchUp 7/Plugins/offset.rb;49;in `parallel?'
                        > > C;/Program Files/Google/Google SketchUp 7/Plugins/offset.rb;49;in `offset'
                        > > C;/Program Files/Google/Google SketchUp 7/Plugins/offset.rb;39;in `upto'
                        > > C;/Program Files/Google/Google SketchUp 7/Plugins/offset.rb;39;in `offset'
                        > > C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;159;in `greeble'
                        > > C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;137;in `each'
                        > > C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;137;in `greeble'
                        > > C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;200
                        > > C;/Program Files/Google/Google SketchUp 7/Plugins/clf_greeble.rb;200;in `call'
                        

                        I'm sure its because I'm passing bad geometry to your offset script. What do I need to check so as to not pass bad geometry to offset.rb? Thanks!

                        I had the exact same error on one of my files. when I quit SU7. I was asked if I want to fix the error in that file. Which I did. Since then I don't get that error anymore.
                        FYI: new SU7 install under Vista64, the only installed plugins are what the greeble script requires.

                        my plugins
                        tomot

                        1 條回覆 最後回覆 回覆 引用 0
                        • R 離線
                          RickW
                          最後由 編輯

                          @tomot said:

                          FYI: new SU7 install under Vista64, the only installed plugins are what the greeble script requires.

                          Do you mean that offset.rb is installed with SU7?

                          RickW
                          www.smustard.com

                          1 條回覆 最後回覆 回覆 引用 0
                          • T 離線
                            tomot
                            最後由 編輯

                            @rickw said:

                            Do you mean that offset.rb is installed with SU7?

                            Yes, offset.rb is installed with SU7

                            However my previous post and attached picture still confirms the same greeble problem when used with SU6 operating under Vista64. Mind you there are a significant number of Plugins that maybe contributing to the problem, BTW compospraytool.rb is not installed in that plugins dir.

                            my plugins
                            tomot

                            1 條回覆 最後回覆 回覆 引用 0
                            • Chris FullmerC 離線
                              Chris Fullmer
                              最後由 編輯

                              Bummer, there must be another script that is interefering too then. I'm wondering, do you have makefaces installed on the version 6? If not, could you install it and try it? It also uses progressbar.rb. So it should be broken too.

                              I might just have to releae a version that does not use progressbar I guess.

                              Chris

                              Lately you've been tan, suspicious for the winter.
                              All my Plugins I've written

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

                                Your version is always written 0.25
                                you don't increase number between version?

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

                                1 條回覆 最後回覆 回覆 引用 0
                                • Chris FullmerC 離線
                                  Chris Fullmer
                                  最後由 編輯

                                  😄 I've been updating it, but I tihnk I forgot to on this last update because it was a small update. I tihnk it went up to .0255 I do have .027 ready. It fixes a bug that makes the script stop after you greeble the same geometry a few times. But I fixed that and found there is still another problem that does the same thing. So I'm hoping RickW can shed some light as to how to fix the problem. Then other scripts are messing with progressbar too and causing me grief. So maybe today or tonight I'll do a big update that fixes lots of these little things.

                                  Thanks for the reminder on the version number. i'll make sure I keep it up to date from now on 😄

                                  Chris

                                  Lately you've been tan, suspicious for the winter.
                                  All my Plugins I've written

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • T 離線
                                    todd burch
                                    最後由 編輯

                                    I am confident progressbar.rb is not broken. It gets used 1000's of times a day.

                                    I remember putting in a diagnostic one time to trap a bad call to a method with a nil value. I overrode the nil class to see who was calling it. Found the error in no time flat.

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • Chris FullmerC 離線
                                      Chris Fullmer
                                      最後由 編輯

                                      I agree 100% Todd. Progressbar is not broken. Its been around forever. Tomot PM'ed me and found that he does in fact have the component spray tool installed. That is the ruby causing the problem on my end. I even posted to the Spray tool thread stating that I think its causing issues with progressbar. But no response from Didier yet. I'll test it out on these school computers that have no plugins installed. I'll put in my script, progressbar, and compo_spray.rb and see if I get the same error. But in my mind, its already solid. Component spray is interfering somehow.

                                      If it is true, how does he go about solving it? Does he maybe have some code that is not wrapped in a module or something? Would that fix it? His script is scrambled so I can't look at it its guts.

                                      Chris

                                      Lately you've been tan, suspicious for the winter.
                                      All my Plugins I've written

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • R 離線
                                        RickW
                                        最後由 編輯

                                        @chris fullmer said:

                                        Does he maybe have some code that is not wrapped in a module or something? Would that fix it?

                                        Yes and yes. 😄

                                        RickW
                                        www.smustard.com

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • T 離線
                                          todd burch
                                          最後由 編輯

                                          I think Didier put the progressbar script code in his script, and modified it with a timer, so that if the script was running longer than a certain time, it would interrupt the process and put a dialog in front of the user to continue or note. Great idea. Less than stellar execution. I could extend progressbar with a callback to make this type of functionality general purpose, and then he could just call the one that works! (Ouch).

                                          The benefit of using progressbar.rb, is that when I get around to upgrading progressbar with platform specific code, user's will have a real nice, platform correct progress bar that's not buried on the status bar. I'll make it so that the user could hit CANCEL at any time to interrupt the script.

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • Chris FullmerC 離線
                                            Chris Fullmer
                                            最後由 編輯

                                            Todd that all sounds superb! And that makes sense what happened with the sray tools and progressbar.

                                            Chris

                                            Lately you've been tan, suspicious for the winter.
                                            All my Plugins I've written

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

                                            Advertisement