sketchucation logo sketchucation
    • Login
    1. Home
    2. bigcatln
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    B
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 8
    • Posts 20
    • Groups 1

    Posts

    Recent Best Controversial
    • sign extension doesn't work

      I used to sign my extension with sketchup online tool, I did it just a few weeks ago successfully, but today I failed all the time for the same extenstion that I signed before successfully, I made a very simple plugin with starndard structure like myplugin.rb, myplugin folder, and mypluginmain.rb in the folder, but it also fail, I think the Sketchup team may altered their tool ,but I can't find any information on web. anyone knows why?
      thanks

      posted in Developers' Forum
      B
      bigcatln
    • RE: How download and apply material from html page?

      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

      posted in Developers' Forum
      B
      bigcatln
    • 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.

      posted in Developers' Forum
      B
      bigcatln
    • RE: Need openssl.so

      Thanks , TIG and Dan, I have decided to install Ruby, though it seem a little complex to me

      posted in Developers' Forum
      B
      bigcatln
    • 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

      posted in Developers' Forum
      B
      bigcatln
    • RE: How to find loops edges from selection

      thanks TIG, I worked it out by classify_point and raytest

      posted in Developers' Forum
      B
      bigcatln
    • 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.
      test1.JPG
      I try to use raytest method, but it only work when then two loops don't connect to each other

      	grps.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?

      posted in Developers' Forum
      B
      bigcatln
    • 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.
      test.jpg
      Can anyone give some advice?

      Thanks in advance

      posted in Developers' Forum
      B
      bigcatln
    • 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 finish

      It is not a nice solution,because I found it is hard to do a box crossing selection by ruby

      posted in Developers' Forum
      B
      bigcatln
    • 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.

      posted in Developers' Forum
      B
      bigcatln
    • 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

      posted in Developers' Forum
      B
      bigcatln
    • 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

      posted in Developers' Forum
      B
      bigcatln
    • 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

      posted in Developers' Forum
      B
      bigcatln
    • RE: Yardoc for ruby api

      Sounds a good idea,support!

      posted in Developers' Forum
      B
      bigcatln
    • 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 provider

      In fact sketchup has the function by shareing model onto google server, can't ruby do the same?

      posted in Developers' Forum
      B
      bigcatln
    • 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
      
      posted in Developers' Forum
      B
      bigcatln
    • RE: How to scale a face nested in component

      http://code.google.com/intl/zh-CN/apis/sketchup/docs/ourdoc/entities.html

      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

      posted in Developers' Forum
      B
      bigcatln
    • 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

      posted in Developers' Forum
      B
      bigcatln
    • 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.

      posted in Developers' Forum
      B
      bigcatln
    • Ruby can't connect MS access

      hi, all
      I am trying to connect MS access but it always give me an error

      Error: #<NoMethodError: undefined method `record' for main:Object>
      D:/Program Files/Google/Google SketchUp 8/Plugins/testac2.rb:7

      require '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? thanks

      bo cui

      posted in Developers' Forum
      B
      bigcatln
    • 1 / 1