I guess you have to download the file to local disk,then apply it in your model, of course, you can use ruby to do it automaticly
Posts
-
RE: How download and apply material from html page?
-
Overlapping detection
I want to know if there is any easy way to decide whether a group(or componentinstance) overloap with other group?
I find a way using trim function of Group to decide if two group is overlapping, but if there are a lots of group, I have to iterate every group, it is not so efficient.
so I am looking for more elegant solution. -
RE: Need openssl.so
Thanks , TIG and Dan, I have decided to install Ruby, though it seem a little complex to me
-
Need openssl.so
Can anyone drop me openssl.so which is a necessary part of https.rb, used in win32 platform?
I searched the install dir of ruby1.86,but didn't find this file, and I googled it without finding it
thanks -
RE: How to find loops edges from selection
thanks TIG, I worked it out by classify_point and raytest
-
RE: How to find loops edges from selection
Thank you very much,TIG
It works just like what I want,I don't find any problem up to now in my application
The "temp grouping " method is very useful trick which avoiding unwanted face being created.I pull each face a height, and group it, then I run into another problem, I try to delete the overlap face of each group,but failed.
I try to use raytest method, but it only work when then two loops don't connect to each othergrps.each{|grp| killfaces=[] grp.entities.each{|fa| if fa.is_a? Sketchup;;Face basept=fa.bounds.center.transform! grp.transformation ray = [basept, fa.normal] item = model.raytest ray if item!=nil dist=basept.distance item[0] if dist < mingap killfaces.push fa item[1][1].parent.entities. erase_entities item[1][1] if item[1][1].is_a? Sketchup;;Face end end end } grp.entities.erase_entities killfaces }
any good idea?
-
How to find loops edges from selection
Hi, everyone
I got a problem in trying to get loops edges from a set of selection which may have more than one loops
, and the loops may share common edge.My target is adding a face for each loops,it is a challenge for me,I worked for some time without no progress.
Can anyone give some advice?Thanks in advance
-
RE: Question about order in selection
I am also in the same trouble
My solution is: select firt, then press the tool button to active my tool then use the pickhelper do another select operation,press return key to finishIt is not a nice solution,because I found it is hard to do a box crossing selection by ruby
-
RE: How to do a crossing box select by ruby?
@tig said:
Thereafter your troubles will only increase... then you need to find everything inside that 'box' [or perhaps intersecting the box] depending on whether or not the picking is left-right or right-left - just like the Select tool... Why not get the user to 'preselect' the required objects and then run your code on that selection ?
In fact I did preselect object!
I am making a trim tool which use a number of groups trimmed by another number of groups
So I need select a number of groups first then select my tool ,and then select another number of groups, put return key to do the trim at last.
that need select groups while my tool is still active. and I want the select operation just like what the select tool do. -
How to do a crossing box select by ruby?
I want to make a script that do crossing box select just like what select tool in Sketchup do ,but I can't find a good method to do it.
I did it by PickHelper firstly,but it only can pick from a point,while now I need pick from a retangle ,how can I do that?
any idea?thanx in advance
-
RE: Get form data from webdialogs?
The problem is JSON doen't support Multibyte characters in fact. when you restore Json str from javascript in ruby,it can't be handled correctly
-
RE: Get form data from webdialogs?
so far there is no elegant solution for it!
Javascript may be useful but have problem when handling mutibyte characters -
RE: How to upload skp to server by ruby plugin?
@jim said:
There are no ready-made solutions specifically for uploading .skp files to a server.
But it depends on a lot of things. By "server" do you mean a computer on your local network or one on the Internet?
thank you for help
but,I think there is no much difference whether it is local network server or internet server, the serve I mean is a iis service providerIn fact sketchup has the function by shareing model onto google server, can't ruby do the same?
-
How to upload skp to server by ruby plugin?
I wan't to upload a component to my own server and share with others ,just like the share model in Sketchup, but I dont' find any ruby script can do this? Can anyone help?
best regard
Bocui
-
RE: How to scale a face nested in component
Important note: If you apply a transformation to entities that are not in the current edit context (i.e. faces that are inside a group), SketchUp will apply the transformation incorrectly, since the geometry has one origin and the current edit context has another. You can correct for this by watching the Model.edit_transform and Model.active_path. See ModelObserver.onActivePathChanged for more information.
I put it in the origin and tried, there still is a problem ,the side face of the tube come out of the group(component) with the top and bottom face being still in the group
-
How to scale a face nested in component
I make a component of pipe, and I want to turn it into a reducer now,I tried with entities.transform_entities tr,ent,but it doesn't work properly, and I find document that said the function doesn't work properly when face is in group,but how can I make a reducer then?
can anyone help?thanks
-
RE: Ruby can't connect MS access
thank you,
yes you are right, I used ASP grammar here:(
but I find I also used wrong database driver provider, anyway ,I have worked it out. -
Ruby can't connect MS access
hi, all
I am trying to connect MS access but it always give me an errorError: #<NoMethodError: undefined method `record' for main:Object>
D:/Program Files/Google/Google SketchUp 8/Plugins/testac2.rb:7require 'win32ole' conn = WIN32OLE.new('adodb.connection') record = WIN32OLE.new('adodb.recordset') conn.open " DBQ=data.mdb; DRIVER={Microsoft Access Driver (*.mdb)};" sql = "SELECT username FROM user" record.open( sql, conn ) puts record("username")
It seem "recordset" is't supported by sketchup?, but when I use conn.Open(...) method , it also give me error.
Error: #<WIN32OLERuntimeError: D:/Program Files/Google/Google SketchUp 8/Plugins/access.rb:22:in `method_missing': Open
OLE error code:80040E14 in Microsoft JET Database Engine
FROM εε₯θ―ζ³ιθ――γ
HRESULT error code:0x80020009
>
It make me mad, can anyone help? thanksbo cui