Posts
-
RE: Image Editor Needed...
-
RE: Image Editor Needed...
Try FastStone. It can offer a lot. http://www.faststone.org/FSViewerDetail.htm
-
RE: Follow Me Tool leaves a hole inside a bend
What is the diameter of that? I think the holes are because sketchup can not make those faces. Scale the object before follow-me. This should resolve the problem. It's a known fact that SketchUp can not make faces if smallest edge of the face is less than 1mm.
-
RE: WebDialog help - hide scrollbars
@jim said:
Is there a single, simple answer to this?
Well, I use
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">and<body scroll="no">. This seems to be working in all the cases. Other suggestions are not working if I use !DOCTYPE.I think this is the universal answer.
-
Problem with Group name in SU 7.1
I don't know if this was in previous versions of SU, but now I discovered it.
If I make a group and rename it by right-click in Outliner -> Rename, or I add a name in Entity Info, the group entity doesn't get the new name. If you check group's name in ruby console, you will see that the group still have "Group#1" name, unless the new name is added by ruby code. Is this normal? -
RE: ........
Indeed, WOW !! please put a larger image, maybe add on archive because this is really interesting and it's a pity that we can not see it clear.
-
Most efficient way [Ruby sollutions]
I start this discussion because I noticed that different ways of doing same thing give major differences in time of execution.
If this thread will be sustained, I hope that ideas which will be posted here will help us all to make more efficient codes.
Here is my first observation:
I ran this code on a model with 12800 component instances and the result was this:with this version: time for completion: 0.047
model = Sketchup.active_model ents = model.entities count = 0 t1 = Time.new ents.each do |ent| if ent.class == Sketchup;;ComponentInstance count += 1 end end t2 = Time.new dt = t2 - t1 puts 'entities parsed; ' + count.to_s puts 'time for completion; ' + dt.to_sUsing this condition: time for completion: 0.078
if ent.typename == 'ComponentInstance' count += 1 end -
RE: How can I determine entity level?
Thanks thomthom, sorry... I was tired whed I read your post and I didn't understood exactly what you mean. But, Jim opened my eyes.

Finally this is how I did it:model = Sketchup.active_model all_defs = model.definitions in_model = 0 out_model = 0 t1 = Time.new all_defs.each do |defn| count = defn.count_instances if count == 0 out_model += 1 else in_model += 1 end end t2 = Time.new dt = t2 - t1 puts 'time for completion; ' + dt.to_s puts 'all definitions; ' + all_defs.length.to_s puts 'in model; ' + in_model.to_s puts 'out_model; ' + out_model.to_sI was surprised that with 1600 component definitions , time for completion was 0.0
-
RE: How can I determine entity level?
@thomthom said:
Iterate all
model.definitions- for eachdefinitioniterate through its.instancesarray.AND?? This is what TIG's idea does...
I want to make difference between definitions that are used in model and definitions that are not used in model. (let's say you make a component, then delete it. It remains in Component Browser, but you don't have it in model anymore).
TIG's script reports me ALL definitions. -
RE: How can I determine entity level?
Many thanks TIG! Just one thing I can't figure out how to do it: I want to apply this jut to that definitions which are used in model, but I don't want to purge unused definitions. Unfortunately, active_model gives just active entities. Everything is inside a group or component is not accesible.
-
RE: Software to restore delted files?
@thomthom said:
I need software that can restored deleted files. Any recommendations?
The program is called RESTORATION and it can be successfully used to recover files deleted with Shift key pressed. It doesn't work for files purged from recycle bin.
This is what I use if I delete something by accident.
-
RE: How can I determine entity level?
@jim said:
Model.active_path should do it. (If the Component is selected as shown.)
level = Sketchup.active_model.active_path.nitemsIf not, I think you need to check the parent and compare that to see if it is the model. Repeat until you get to the model level.
Something like this (not tried)
level = 0 > while entity.parent != active_model > entity = entity.parent > level += 1 > endAs I can see, both methods work just if my component is selected. In fact, what I want is simple: to make a list with all components/groups that have not inside them (and also are not included in other components or groups). I'd like to avoid .each method because I'm afraid that could take long time to iterate trough all entities in a complex model.
-
How can I determine entity level?
Hy, I was playing a little with Entity.parent and model methods and I can't figure out how can I determine the "depth" of an entity. If I have a component (or group) that is encapsulated deep in other component, how can I find how deep (in numbers from 0 to n, where 0 means the component is topmost)
see img,if my explanation wasn't clear enough.

-
RE: What is this?? [A RIDDLE]
@unknownuser said:
because Marian found it - dead line

... and here we dont have deadlines. haha.Sorry Marian! I didn't seen you
I was a little confused how chrisglasier knows about Cluj and Suceava. Hello from Baia Mare! (and Cluj, sometimes) -
RE: What is this?? [A RIDDLE]
@chrisglasier said:
How are you going to get the Gibson to Suceava & Cluj-Napoca - by air freight?
Sorry, but why there?
(don't ask why I'm asking) -
RE: Sketchup / ruby WebDiablog / php
@pauline01 said:
Y i can create just a form in html and to give in script ruby the values of my form and i do my queries in ruby.
But it's possble to return form values with only html and javascript (unless php) in a ruby script?
If yes, i will see on the net how to do this.
Yes it is! You make all mysql operations with ruby! I tried to make a project using Ruby Mysql, but I abandoned for more simpler approach, because data wasn't much and there was not a point to use databases. BUT, i was able to make my database working under sketchup and I was able also to transfer data between webdialog and mysql database using just callbacks and ruby code. Please read what i sent you here http://forums.sketchucation.com/viewtopic.php?f=180&t=22743#p192068, you have syntax too, and examples. Believe me, you don't need php. That was my fear, because i don't know php, but in the end I've been able to make it work with ruby. In the end what is the point of using lots of programming languages, if one can do all you need?

-
RE: Sketchup / ruby WebDiablog / php
Are you sure that you need php? You can make transactions with mysql just using ruby. Everything you need to manage a database.
http://www.kitebird.com/articles/ruby-mysql.html or http://www.tmtm.org/en/ruby/mysql/ -
RE: ? [Question] - A Ruby Calculator ?
@tig said:
You would need to set the output to a global variable like $calculator_output. Then put that into the VCB AND have any tool also accept $calculator_output as it's input IF $calculator_output has changed since it launched ???

hmm... i see... But, for native tools, where does SketchUp stores VCB input? Doesn't have a global variable of its own?
-
RE: ? [Question] - A Ruby Calculator ?
I made a try... a unsuccessful try to make a calculator that sends value in VCB.
When pressing '=', the value is sent in VCB, but there can not be used
It's just there, doing nothing.Now, it sends the value in mm.

-
RE: ? [Question] - A Ruby Calculator ?
@jim said:
(it's not that easy.)
you are right. It's easy to make a webdialog to input calculations, but in ruby you must use regexp to dispatch resulting string and make calculations (this can be tricky and I'm not sure that covers all situations). Other option (more simple for who knows js) would be to make calculations with js and send just the result to ruby.