SketchUcation Premium Membership

 

 

[Plugin] Make Fur (Updated - v.1.5a Thu Oct 28, 2010)

Re: [Plugin] Make Fur (Updated - v.1.3c)

Postby DareDevil » Wed May 19, 2010 11:29 pm

TIG wrote:Try substituting the comma (,) as the list separator with a semi-colon (;)... so in UK/US 1,2.3,4.5 >> 1;2,3;4,5 in FR.

I tried, but dont work :(
Or change you regional settings !

Nooooooooo, pleeeeaaaaase ;)

thomthom wrote:I use Norwegian locale, we also use comma as decimal separator. But using period in this plugin works for me.

Can you use the period in the SU standard value input ? I cant ! I must use the comma and the semi-colon as separator (i.e. 10,5;22,4 for a rectangle).
I noted something in what you said though: (0.0cm,0.0cm,5.0cm)
Did you enter cm into the direction and force vectors?
They should not have length indications. Vectors are just direction indicators.

No, cm is in the default setting.
If it's 0cm it's ok, but if it's 0 cm (with space) it dont work.

OK, I know why I have the unit after value, because it's a SU setting in the Model info : "Display units format". Uncheck it, disable the cm.
... And if I set the Precision (in Model info -> Units) to 0 instead 0,0 all it's ok in the Fur setting windows, I have 0,0,5 (but setting 0cm for Precision or mm for Units in it's not ok for my way of work ;))
User avatar
DareDevil
 
Posts: 360
Joined: Sun Mar 15, 2009 10:19 pm
Location: Marseille, France
Name: Didier D

Re: [Plugin] Make Fur (Updated - v.1.3c)

Postby tak2hata » Thu May 20, 2010 1:33 am

Frederik wrote:Would it be possible to add an option, where you can select that components don't intersect with each other...??

That's very difficult for me.I will challenge future.Please wait without expecting it. :roll:
daredevil wrote:I'm french and use SU on a french vista system. In french we use the comma (,) for decimal separation
If it's 0cm it's ok, but if it's 0 cm (with space) it dont work.

Indeed,I learnt it for the first time. I will think about some measures for that problem.
Thomas wrote:could you keep the filename free from the version number? That way it's easier to update by just dragging the file into the plugins folder overriding the old.

Thanks.That's right! I will keep the filename. ;)
-----------
by TAK2HATA
tak2hata
 
Posts: 205
Joined: Fri Feb 13, 2009 1:41 pm
Location: Japan
Name: tak2hata
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Make Fur (Updated - v.1.3c)

Postby Frederik » Thu May 20, 2010 7:03 am

tak2hata wrote:That's very difficult for me.I will challenge future.Please wait without expecting it. :roll:

I'll keep my fingers crossed... :)
This plug-in is so much fun to work with...
You have my deepest respect...
User avatar
Frederik
Top SketchUcator
 
Posts: 2177
Joined: Mon Nov 12, 2007 8:13 pm
Location: Denmark
Name: Kim Frederik
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3c)

Postby thomthom » Thu May 20, 2010 8:34 am

daredevil wrote:Can you use the period in the SU standard value input ? I cant ! I must use the comma and the semi-colon as separator (i.e. 10,5;22,4 for a rectangle).

Not in the SU VCB area, no. But this plugin doesn't use this, does it? :?:
What I was referring to was the webdialog (metric) for this plugin. The screenshot I showed last time.

daredevil wrote:No, cm is in the default setting.
If it's 0cm it's ok, but if it's 0 cm (with space) it dont work.

OK, I know why I have the unit after value, because it's a SU setting in the Model info : "Display units format". Uncheck it, disable the cm.
... And if I set the Precision (in Model info -> Units) to 0 instead 0,0 all it's ok in the Fur setting windows, I have 0,0,5 (but setting 0cm for Precision or mm for Units in it's not ok for my way of work ;))

Are you seeing "cm" in the webdialog for this plugin?
I'm confused...

Or are you talking about SU in general?
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3d)

Postby tak2hata » Thu May 20, 2010 10:39 am

Hi,All.
I update fur plugin.
Now it's version 1_3d.
this fileName will keep to "fur_en.rb" for future.
When you use this version ,you must remove older version fur plugin file from sketchup plugins folder.

Thanks.
-----------
by TAK2HATA
tak2hata
 
Posts: 205
Joined: Fri Feb 13, 2009 1:41 pm
Location: Japan
Name: tak2hata
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Make Fur (Updated - v.1.3d May 20, 2010 6:39 pm

Postby thomthom » Thu May 20, 2010 10:52 am

Good stuff! :thumb:

Very nice plugin this. Shaping up good.

Another remark: menu names, can you also avoid version number in the menu names? Keep them static? Because when the menu name changes between updates the shortcuts assigned to them doesn't work any more.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3d May 20, 2010 6:39 pm

Postby thomthom » Thu May 20, 2010 11:30 am

hmmm...
I now see the problem daredevil talked about.

tak2hata:
When the user's locale is decimal you can't use the comma to get the various components of the vectors.
2010-05-20 12h02_47.png


"0,400mm,0mm,0mm" is interpreted as x=0, y=400, z=0

The problem is this:
Code: Select all
  def fur_dialog_ini
    @fur_units_metric = false
    @fur_units_metric = true if ( 0.to_l.to_s )["m"]
    @delim = ","
    @delim = ";" if Sketchup.get_locale.upcase == "FR"
  end


This code only checks for FR Sketchup locale. But there are many more that uses , comma as decimal delimiter. Norwegian for instance.
But, Sketchup.get_locale does not return the locale of the system. It returns the language code of Sketchup.
For instance, I use Norwegian locales, but use English SU. Sketchup.get_locale returns en-US

I've been recently struggling with this myself.
And the hack I ended up using to find the user's comma decimal separator was this: @decimal_separator ||= 1.2.to_l.to_s.match(/\d(\D)\d/)[1]
See viewtopic.php?f=180&t=28346 for more info.

Now, this only gives you what the comma separator is. I've not found a way to find the list separator. Just I think you can catch most cases by assuming locales with comma as decimal separator uses ; as list separator.


So to revise your code:
Code: Select all
  def fur_dialog_ini
    @fur_units_metric = false
    @fur_units_metric = true if ( 0.to_l.to_s )["m"]
    decimal_sep = 1.2.to_l.to_s.match(/\d(\D)\d/)[1]
    @delim = ";" if decimal_sep == ','
  end




Then there is the other part of that method:
@fur_units_metric = false
@fur_units_metric = true if ( 0.to_l.to_s )["m"]

Use model.options to get the user units.
http://code.google.com/apis/sketchup/do ... ml#options

It returns an OptionManager that gives you access to some OptionsProvider classes.
http://code.google.com/apis/sketchup/do ... nager.html
http://code.google.com/apis/sketchup/do ... vider.html

To inspect the available options, use this snippet:
Sketchup.active_model.options.keys.each {|key| p key; Sketchup.active_model.options[key].each {|k,v| puts "> #{k} - #{v}"} }

Using that you can see that model.options["UnitsOptions"] gives you all the info you need about the model units.
model.options["UnitsOptions"]["LengthUnit"] gives you the unit type.

The unit types are:
// LENGTH_FORMAT: 0 = Decimal, 1 = Arcitectural, 2 = Engineering
// LENGTH_UNITS: 0 = Inches, 1 = Feet, 2 = Millimeters 3 = centimeters, 4 = Meters
// LENGTH_PRECISION: number of decimal places to show

(Found this in the Google SketchUp 7\Resources\en-US\i18n.dat file)
Please, register (free) to access all the attachments on the forums.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3c)

Postby Gaieus » Thu May 20, 2010 1:05 pm

Frederik wrote:...Only in UK in Europe (and I believe on Cypres too) they drive in the left side... ;)

And Ireland, too.
Gai...
User avatar
Gaieus
Administrator
 
Posts: 27640
Joined: Sat Oct 20, 2007 8:24 am
Location: Pécs, Hungary
Name: Csaba Pozsárkó
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: historical reconstruction
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3d May 20, 2010 6:39 pm

Postby watkins » Thu May 20, 2010 1:18 pm

Countries that drive on the left

http://en.wikipedia.org/wiki/File:Count ... _right.svg

Quite a few.
watkins
 
Posts: 1367
Joined: Wed Nov 14, 2007 5:47 pm

Re: [Plugin] Make Fur (Updated - v.1.3d May 20, 2010 6:39 pm

Postby solo » Thu May 20, 2010 1:29 pm

Countries that drive on the left


Looks like a British commonwealth map. :?
My site

Quod gratis asseritur, gratis negatur.
User avatar
solo
Global Moderator
 
Posts: 10795
Joined: Mon Nov 12, 2007 1:46 pm
Location: Dallas, Texas
Name: Pete Stoppel
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] Make Fur (Updated - v.1.3d May 20, 2010 6:39 pm

Postby Gaieus » Thu May 20, 2010 1:59 pm

Yeah. Though already a minority of the countries, still "the sun never sets over the countries that drive on the left".
:D
Gai...
User avatar
Gaieus
Administrator
 
Posts: 27640
Joined: Sat Oct 20, 2007 8:24 am
Location: Pécs, Hungary
Name: Csaba Pozsárkó
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: historical reconstruction
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3d May 20, 2010 6:39 pm

Postby Pilou » Thu May 20, 2010 2:15 pm

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
Please, register (free) to access all the attachments on the forums.
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou
Top SketchUcator
 
Posts: 10073
Joined: Wed Jan 23, 2008 10:33 pm
Operating system: Windows
SketchUp version: 6
License type: Free/Make
SketchUp use: hobby
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby tak2hata » Thu May 20, 2010 3:00 pm

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
tak2hata
 
Posts: 205
Joined: Fri Feb 13, 2009 1:41 pm
Location: Japan
Name: tak2hata
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby thomthom » Thu May 20, 2010 3:11 pm

tak2hata wrote: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
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby thomthom » Thu May 20, 2010 3:11 pm

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
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby thomthom » Thu May 20, 2010 3:13 pm

:( 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
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby TIG » Thu May 20, 2010 3:34 pm

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:in `initialize'
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
User avatar
TIG
Global Moderator
 
Posts: 14002
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby tak2hata » Thu May 20, 2010 4:28 pm

thomthom wrote::( 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..
Code: Select all
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 wrote: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:in `initialize'
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
tak2hata
 
Posts: 205
Joined: Fri Feb 13, 2009 1:41 pm
Location: Japan
Name: tak2hata
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby thomthom » Thu May 20, 2010 4:59 pm

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
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby thomthom » Thu May 20, 2010 5:02 pm

This whole thing makes no sense...
Code: Select all
    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
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby thomthom » Thu May 20, 2010 5:08 pm

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

Code: Select all
   
    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
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby tak2hata » Thu May 20, 2010 5:47 pm

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
tak2hata
 
Posts: 205
Joined: Fri Feb 13, 2009 1:41 pm
Location: Japan
Name: tak2hata
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby thomthom » Thu May 20, 2010 5:58 pm

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
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby thomthom » Thu May 20, 2010 6:14 pm

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. :oops: )

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:


Code: Select all
  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
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby jchau2007 » Thu May 20, 2010 9:40 pm

wow... keep it coming. Thanks.
jchau2007
 
Posts: 50
Joined: Mon Aug 31, 2009 7:46 pm
Name: James

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby AcesHigh » Thu May 20, 2010 9:44 pm

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
AcesHigh
 
Posts: 428
Joined: Wed Mar 05, 2008 1:58 pm

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby Rich O Brien » Thu May 20, 2010 10:12 pm

Is v1.3e working for others?

Nothing happens when i select it?
:::Blog:::

I'm a Trimbler now!
User avatar
Rich O Brien
Administrator
 
Posts: 8318
Joined: Fri Oct 31, 2008 9:05 am
Location: Limerick, Ireland
Name: Rich O'Brien
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Advanced

Re: [Plugin] Make Fur (Updated - v.1.3e May 20, 2010 10:52 p

Postby EscapeArtist » Thu May 20, 2010 10:16 pm

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.
User avatar
EscapeArtist
Top SketchUcator
 
Posts: 1305
Joined: Sun Aug 03, 2008 7:36 pm
Location: Northeast US
Name: Jeff
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: hobby
Level of SketchUp: Intermediate

Re: [Plugin] Make Fur (Updated - v.1.3g May 21, 2010 4:06 pm

Postby tak2hata » Fri May 21, 2010 8:11 am

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
tak2hata
 
Posts: 205
Joined: Fri Feb 13, 2009 1:41 pm
Location: Japan
Name: tak2hata
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Make Fur (Updated - v.1.3g May 21, 2010 4:06 pm

Postby thomthom » Fri May 21, 2010 8:24 am

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
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Vertex Tools for SketchUp. Take control over each vertex with this vertex editor for SketchUp.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012

PreviousNext

Return to Plugins

Who is online

Users browsing this forum: Bing [Bot], Lander, ppoublan, snakeysnape and 12 guests