A couple known bugs:
- "Add Group" doesn't work the first time you click it.
- Unfolding the window doesn't work correct. Instead of unfolding it expands a little in the width.
A couple known bugs:
@jolran said:
try changing matl = Sketchup::Color.new(0,250,154) to (0,250,154, 100)and
faces.each{|face|
> face.back_material = face.material = matl
> face.material.alpha = 0.5
> }
edit: Updated code for backface as you wanted. And the 4rth argument is actually not needed in th Color object..
Setting alpha for face material inside the loop is not efficient. It'd be better set outside the loop.
@tig said:
UI.show_inspector("Materials")If you substitute any 'name' it will open that browser's dialog... but it leaves the current tool unchanged.
He want's to do the exact opposite.
As far as I can tell there is no way to do that. I'd recommend you file a feature request.
@artmusicstudio said:
if so, is there another "simple" syntax for rounding to 2 after comma - position ( or any other, of course) ?
If you want a rounded float in return:
<span class="syntaxdefault">moduleĀ Example<br />Ā Ā defĀ self</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">round</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">number</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">Ā precision</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">Ā Ā Ā Ā iĀ </span><span class="syntaxkeyword">=</span><span class="syntaxdefault">Ā 10.0Ā </span><span class="syntaxkeyword">**</span><span class="syntaxdefault">Ā precision<br />Ā Ā Ā Ā </span><span class="syntaxkeyword">(</span><span class="syntaxdefault">numberĀ </span><span class="syntaxkeyword">*</span><span class="syntaxdefault">Ā i</span><span class="syntaxkeyword">).</span><span class="syntaxdefault">roundĀ </span><span class="syntaxkeyword">/</span><span class="syntaxdefault">Ā i<br />Ā Ā end<br />end</span>
` Example.round(12.3456, 2)
If you are formatting a number into a string to the UI you can use sprintf:
` sprintf('%.2f', 12.3456)
By the way - on the usage of typename: http://www.thomthom.net/thoughts/2011/12/never-ever-use-typename/
@txusic said:
is there a version in .rb instead of .rbz..
i can“t find it to work on SU7 on an old PPC Mac
Check out this article: http://www.thomthom.net/thoughts/2012/01/installing-plugins-for-google-sketchup/#the-old-fashioned-manual-way
I don't know about the speed differences - but I'd not try to optimize that before it's a problem. Less code = less chance of bugs.
@jolran said:
Normally the user would like to work in current set Units.
To convert numbers to that, you could use this for starters ?
Someone else may come up with better idea, just a rough idea..edit: ah! I missed Thomthoms SketchUp-Units-and-Locale-Helper
#default
> @su_units = ;inch
>
> def set_model_units
> current_unit = Sketchup.active_model.options["UnitsOptions"]["LengthUnit"]
> return case current_unit
> when 0 then @su_units = ;inch
> when 1 then @su_units = ;feet
> when 2 then @su_units = ;mm
> when 3 then @su_units = ;cm
> when 4 then @su_units = ;m
> end
> end
>
> # init 1 time in your module
> set_model_units
>
> puts 5.to_l
>
> puts (5).send( @su_units )
That would be the same as:
puts 5.to_l puts 5.to_s.to_l
There really is few cases when you need to get the model unit and do special work like that. The Ruby API provides most of that - the exception is area and volume, which is why I made that library.
If you find yourself poking into the model unit then pause and consider if you are doing too much work. Most of the time when I see this done the API provides a much shorter and easier way.
This is something that might need another blog post. It keeps coming up.
It's certainly something I want to see improved in the API docs to make it more visible - as these very useful methods are easy to miss.
@artmusicstudio said:
thanx for the tips, i read the articles. i will make changes to my system, so that every saved value will be in inches (like basic skp) and i will recalculate to meters for "metric"-world.
You don't really need to recalculate anything. Just keep your units as Length objects and let Length.to_s take care of presenting the unit to the user - as the user prefers it.
If you need to specify some fixed values in your calculations, like you want to create a 1x1 meter square, then use the helper methods of the Numeric class:
width = 1000.mm height = 1000.mm
That will give you Length objects that stored that unit in inches. All done for you by the API.
@tig said:
Always add the inner face, and then add the outer face.
Then the inner face should erase as you hope.
Tried that, didn't work for me.
I also tried to intersect; group & explode; nuffin' worked. The dark force is string with this geometry.
@icehuli said:
But this does not work.
How does it not work? Errors? Unexpected result?
Got a snippet of what you got so far?
What about the normal Text tool? click on empty space and it creates text that is fixed in the view. Though you have to put it on a separate layer that toggles for each scene. (There is a plugin to create a layer that is visible only to the current view.)
@g_wilson said:
SUCCESS !!! Thank you Thomas. Have nominated you for the "TIG" award for fast service.

Whohoo! Sorry for the inconvenience - had I had a copy of XP it would have been fixed earlier.
@g_wilson said:
Error: #<TypeError: C:/Program Files/Google/Google SketchUp 8/Plugins/TT_Lib2/core.rb:249:in
exist?': can't convert nil into String> C:/Program Files/Google/Google SketchUp 8/Plugins/tt_cleanup.rb:90 C:/Program Files/Google/Google SketchUp 8/Plugins/TT_Lib2/core.rb:249:invirtualstore_check'
hm.... this might be yet another bug. Let me just quickly update with a new patch.
(I wish I had access to an XP machine right now...) 
@micione said:
Thomas,
The new version 2.9.3 seems to have solved the problem.
Thank you.

@g_wilson said:
Hi again - this may be a wild goose chase. I just closed SU8 and after exiting - up pops bugsplat window. I have attached .dmp file - closed bugsplat without being smart enough to send to trimble but searched out .dmp file. I tried 4 times to repeat bugsplat but no joy - exited cleanly. The bugsplat occurred with a new blank my default .skp as per usual.
OOPS - won't send .dmp file - renamed .txt
Stubborn bloody thing - now attached as .zip
So this crash doesn't repeat itself?
Have you also tried the latest 2.9.3 version? Are things working better then?
After you removed the content of the VirtualStore Plugins folder - did you also remove it?
(I might have to change the detection code to not raise a message if the folder exist but is empty. At the moment it will alter the user by just being there.)
Maybe these files where created before you had full access to the plugins folder?
In any case, the files in VirtualStore should either be moved to the actual Plugins folder or removed.