• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] Make Fur v.2.1.0(20140323)

Scheduled Pinned Locked Moved Plugins
650 Posts 255 Posters 1.1m Views 254 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.
  • P Offline
    pilou
    last edited by 20 May 2010, 13:15

    @unknownuser said:

    This code only checks for FR Sketchup locale.

    And when French user uses directly FR Locale "." (modified) whith English SU version seems there is no problem? πŸ˜‰
    wind.jpg

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

    1 Reply Last reply Reply Quote 0
    • T Offline
      tak2hata
      last edited by 20 May 2010, 14:00

      Hi, All.
      I update this to v1.3e.
      Thomas,Thank you very very much!
      At last, I also understood.
      I use your code "decimal_sep = 1.2.to_l.to_s.match(/\d(\D)\d/)[1]".
      and model.options["UnitsOptions"]["LengthUnit"] >= 2 then unit is metric.
      It not depend to Sketchup locale.

      I think that this is perhaps no problem.
      please reply when there is a problem.

      Thanks


      by TAK2HATA

      1 Reply Last reply Reply Quote 0
      • T Offline
        thomthom
        last edited by 20 May 2010, 14:11

        @tak2hata said:

        I use your code "decimal_sep = 1.2.to_l.to_s.match(/\d(\D)\d/)[1]".
        and model.options["UnitsOptions"]["LengthUnit"] >= 2 then unit is metric.
        It not depend to Sketchup locale.

        I think that this is perhaps no problem.
        please reply when there is a problem.

        I think that should work.

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

        1 Reply Last reply Reply Quote 0
        • T Offline
          thomthom
          last edited by 20 May 2010, 14:11

          Oh - you posted update already! I see. I'll try it out then.

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

          1 Reply Last reply Reply Quote 0
          • T Offline
            thomthom
            last edited by 20 May 2010, 14:13

            😞 1.3e not working for me.

            Error: #<NoMethodError: undefined method[]' for nil:NilClass>
            C:/Program Files (x86)/Google/Google SketchUp 7/Plugins/fur_en.rb:734:in fur_dialog_ini' C:/Program Files (x86)/Google/Google SketchUp 7/Plugins/fur_en.rb:741:in fur_webdialog'
            C:/Program Files (x86)/Google/Google SketchUp 7/Plugins/fur_en.rb:1414
            C:/Program Files (x86)/Google/Google SketchUp 7/Plugins/fur_en.rb:1413:in call'

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

            1 Reply Last reply Reply Quote 0
            • T Offline
              TIG Moderator
              last edited by 20 May 2010, 14:34

              With 1.3e I get Error: #<TypeError: no implicit conversion to float from nil> C:/Program Files/Google/Google SketchUp 7/Plugins/fur_en.rb:1326:ininitialize'
              C:/Program Files/Google/Google SketchUp 7/Plugins/fur_en.rb:1326:in new' C:/Program Files/Google/Google SketchUp 7/Plugins/fur_en.rb:1326:in s_to_vec'
              C:/Program Files/Google/Google SketchUp 7/Plugins/fur_en.rb:713:in show_webdialog' C:/Program Files/Google/Google SketchUp 7/Plugins/fur_en.rb:658:in call'`
              with the 'web-dialog' accept button.
              You must be passing an empty argument to a defn ?

              TIG

              1 Reply Last reply Reply Quote 0
              • T Offline
                tak2hata
                last edited by 20 May 2010, 15:28

                @thomthom said:

                😞 1.3e not working for me.

                Error: #<NoMethodError: undefined method[]' for nil:NilClass>
                C:/Program Files (x86)/Google/Google SketchUp 7/Plugins/fur_en.rb:734:in fur_dialog_ini' C:/Program Files (x86)/Google/Google SketchUp 7/Plugins/fur_en.rb:741:in fur_webdialog'
                C:/Program Files (x86)/Google/Google SketchUp 7/Plugins/fur_en.rb:1414
                C:/Program Files (x86)/Google/Google SketchUp 7/Plugins/fur_en.rb:1413:in call'

                I think this is LengthFormat or LengthPrecision problem.
                So I will change code..

                
                def fur_dialog_ini
                	unitoptions = Hash.new
                	Sketchup.active_model.options["UnitsOptions"].each{|key ,val| unitoptions[key] = val }
                	Sketchup.active_model.options["UnitsOptions"]["LengthFormat"] = 0 if unitoptions["LengthFormat"] != 0
                	Sketchup.active_model.options["UnitsOptions"]["LengthPrecision"] = 1 if unitoptions["LengthPrecision"] == 0
                	@fur_units_metric = false
                	lunit = unitoptions["LengthUnit"]
                	@fur_units_metric = true if lunit >= 2
                	lprec = Sketchup.active_model.options["UnitsOptions"]["LengthPrecision"]
                	@decimal_sep = 1.2.to_l.to_s.match(/\d(\D)\d/)[1]
                	@delim = ","
                	@delim = ";" if @decimal_sep == ','
                	unitoptions.each{|key ,val| Sketchup.active_model.options["UnitsOptions"][key] = val }
                end
                
                

                @tig said:

                With 1.3e I get Error: #<TypeError: no implicit conversion to float from nil> C:/Program Files/Google/Google SketchUp 7/Plugins/fur_en.rb:1326:ininitialize'
                C:/Program Files/Google/Google SketchUp 7/Plugins/fur_en.rb:1326:in new' C:/Program Files/Google/Google SketchUp 7/Plugins/fur_en.rb:1326:in s_to_vec'
                C:/Program Files/Google/Google SketchUp 7/Plugins/fur_en.rb:713:in show_webdialog' C:/Program Files/Google/Google SketchUp 7/Plugins/fur_en.rb:658:in call'`
                with the 'web-dialog' accept button.
                You must be passing an empty argument to a defn ?

                Sorry,I will change the code.


                by TAK2HATA

                1 Reply Last reply Reply Quote 0
                • T Offline
                  thomthom
                  last edited by 20 May 2010, 15:59

                  Why are you doing this?

                  Sketchup.active_model.options["UnitsOptions"].each{|key ,val| unitoptions[key] = val } Sketchup.active_model.options["UnitsOptions"]["LengthFormat"] = 0 if unitoptions["LengthFormat"] != 0 Sketchup.active_model.options["UnitsOptions"]["LengthPrecision"] = 1 if unitoptions["LengthPrecision"] == 0

                  You're changing the model settings.

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

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    thomthom
                    last edited by 20 May 2010, 16:02

                    This whole thing makes no sense...

                    
                        def fur_dialog_ini
                           unitoptions = Hash.new
                           Sketchup.active_model.options["UnitsOptions"].each{|key ,val| unitoptions[key] = val }
                           Sketchup.active_model.options["UnitsOptions"]["LengthFormat"] = 0 if unitoptions["LengthFormat"] != 0
                           Sketchup.active_model.options["UnitsOptions"]["LengthPrecision"] = 1 if unitoptions["LengthPrecision"] == 0
                           @fur_units_metric = false
                           lunit = unitoptions["LengthUnit"]
                           @fur_units_metric = true if lunit >= 2
                           lprec = Sketchup.active_model.options["UnitsOptions"]["LengthPrecision"]
                           @decimal_sep = 1.2.to_l.to_s.match(/\d(\D)\d/)[1]
                           @delim = ","
                           @delim = ";" if @decimal_sep == ','
                           unitoptions.each{|key ,val| Sketchup.active_model.options["UnitsOptions"][key] = val }
                        end
                    
                    
                    

                    You create an hash to store model UnitOptions, then change them and then restore the original values...?

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

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      thomthom
                      last edited by 20 May 2010, 16:08

                      From what I could understand, that method could be condensed to:

                          
                          def fur_dialog_ini
                             units = Sketchup.active_model.options["UnitsOptions"]["LengthUnit"]
                             @fur_units_metric = (units >= 2) # true if units are 2 or greater
                             @decimal_sep = 1.2.to_l.to_s.match(/\d(\D)\d/)[1]
                             @delim = (@decimal_sep == ',') ? ";" ; ","
                          end
                      
                      

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

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        tak2hata
                        last edited by 20 May 2010, 16:47

                        Hmmm,
                        When LengthFormat is Architectural or LengthPrecision = 0,
                        "1.2.to_l.to_s.match(/\d(\D)\d/)[1]" return error.

                        Is that problem excluding this?


                        by TAK2HATA

                        1 Reply Last reply Reply Quote 0
                        • T Offline
                          thomthom
                          last edited by 20 May 2010, 16:58

                          Ah, yes. I see the problem. ..hm... this needs some more thinking... 😞

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

                          1 Reply Last reply Reply Quote 0
                          • T Offline
                            thomthom
                            last edited by 20 May 2010, 17:14

                            Ok - turns out that you can't trust the SU methods to extract the decimal separator as model settings affects the length to string formatting. (Should have thought of that. 😳 )

                            Looking at there seems to mostly be just comma or period as decimal separator. At least if you make that assumption it will cover most.

                            So here is an alternative:

                            
                              def get_decimal_separator
                                # If this raises an error the decimal separator is not '.'
                                '1.2'.to_l
                                return '.'
                              rescue
                                return ','
                              end
                            
                              def fur_dialog_ini
                                @decimal_sep ||= get_decimal_separator
                                @delim ||= (@decimal_sep == ',') ? ";" ; ","
                              end
                            
                            

                            This snippet makes some assumptions:
                            Only comma or period as decimal separator.
                            If the separator is a period then comma is used as list separator.
                            If the separator is a comma then ; is used as list separator.

                            The method is working out the decimal separator is by trial and error.

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

                            1 Reply Last reply Reply Quote 0
                            • J Offline
                              jchau2007
                              last edited by 20 May 2010, 20:40

                              wow... keep it coming. Thanks.

                              1 Reply Last reply Reply Quote 0
                              • A Offline
                                AcesHigh
                                last edited by 20 May 2010, 20:44

                                I thought of a very cool thing to do with this plugin... those xmas stuff that you put on Xmas trees, you know?? Well, actually this plugin also makes it easy to do the Xmas tree itself.

                                I am talking about this thing that goes around the tree

                                http://downloads.open4group.com/wallpapers/ilustracao-de-arvore-de-natal-74af7.jpg

                                1 Reply Last reply Reply Quote 0
                                • R Offline
                                  Rich O Brien Moderator
                                  last edited by 20 May 2010, 21:12

                                  Is v1.3e working for others?

                                  Nothing happens when i select it?

                                  Download the free D'oh Book for SketchUp πŸ“–

                                  1 Reply Last reply Reply Quote 0
                                  • E Offline
                                    EscapeArtist
                                    last edited by 20 May 2010, 21:16

                                    I did have some issues as well, didn't check the console though. I had a model I'd saved using the previous "make fur" revision and was attempting to use the plugin, nothing happened - dialogue wouldn't open. I opened a "new" scene (File > New) and then the plugin worked.

                                    1 Reply Last reply Reply Quote 0
                                    • T Offline
                                      tak2hata
                                      last edited by 21 May 2010, 07:11

                                      I update to version 1.3g.
                                      Vector parameter split to 3 parameter each.
                                      and I change preset file.
                                      I think this vesion has problem yet.

                                      For the time being, It going on my sketchup.
                                      But very difficult for me to convert units.
                                      and so tired.

                                      Thanks.


                                      by TAK2HATA

                                      1 Reply Last reply Reply Quote 0
                                      • T Offline
                                        thomthom
                                        last edited by 21 May 2010, 07:24

                                        I appears to work. I'll see if I can get some time to have a better look at your script and see if I can help with the units.

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

                                        1 Reply Last reply Reply Quote 0
                                        • T Offline
                                          TIG Moderator
                                          last edited by 21 May 2010, 08:56

                                          it seems to work OK now BUT the dialog is getting too tall.
                                          Can't you redo the web-dialog code so that some of the boxes are side-by-side - the XYZ ones could be in a line, so making it 3 input boxes wide, but with each a little narrower would be more manageable ?

                                          TIG

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 8
                                          • 9
                                          • 10
                                          • 11
                                          • 12
                                          • 32
                                          • 33
                                          • 10 / 33
                                          10 / 33
                                          • First post
                                            186/650
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement