πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
  • Refresh and stop inside a long routine

    7
    0 Votes
    7 Posts
    341 Views
    TIGT
    Jim's idea of sub-setting works to an extent. See my Roof.rb - it asks for details, makes the roof's form, then displays it with default materials and then asks for materials in a dialog and redisplays it with the materials. It is the user input that causes the pause and the screen to refresh. Using model.start_operation ... model.commit_operation with your clac's might help but it could mean multiple undo's ?
  • Scene maker

    4
    0 Votes
    4 Posts
    600 Views
    chrisglasierC
    @chrisglasier said: I feel quite despondent that I continue to fail to explain namesets adequately but I will soldier on with a good old British stiff upper lip! Chris A couple of members told me privately that taking a look at "Operative content" helped. Thanks ... Chris
  • Are there any .3ds exporters free or paid?

    11
    0 Votes
    11 Posts
    501 Views
    P
    I have found a very good exporter to .lwo: http://www.flay.com/GetDetail.cfm?ID=2362 In fact, I have finally exported to Blender my more complex model. Of course, no textures, it's a work you must do manually later. But it's the best free solution I have ever seen
  • Why can not draw the geometric by the ruby script?

    3
    0 Votes
    3 Posts
    223 Views
    Chris FullmerC
    I'm not sure, it worked for me in both 6 and 7. Are you getting any errors in the ruby console? Chris
  • Editing SU menu

    3
    0 Votes
    3 Posts
    224 Views
    honoluludesktopH
    Thanks, Chris. Now I don't feel too bad about not being able to find it in the API.
  • . color method

    5
    0 Votes
    5 Posts
    275 Views
    TIGT
    For a color it's always = 255 [100% opaque]... there is a color.alpha= method but it's never ever worked, you must set alpha [transparency] for a material itself not material.color e.g. material.alpha=0.4 for 40% opacity will work but the material.color.alpha still reports 255 [100%], if you try to change it, it just does nothing ! So to recap - the fourth item in a SUp material.color array is its alpha [r,g,b,a] but it's not used ! The alpha of the material itself works as a 0 to 1.0, equivalent to % setting of opacity... http://code.google.com/apis/sketchup/docs/ourdoc/color.html
  • [Bug] Groups in ComponentInstances made unique

    3
    0 Votes
    3 Posts
    229 Views
    R
    thnx for the workaround, haven't tried it yet tho.... but gj
  • I have a trouble in the code,and need help.thanks!

    3
    0 Votes
    3 Posts
    181 Views
    W
    Thank you very much!It is greate help to me!
  • Can it be to achieve?

    8
    0 Votes
    8 Posts
    333 Views
    R
    @tig said: You can also do it without Ruby... Try this way... In the model select the component instances you want to be replaced - either by manually picking them (in which case they can even be a mixture of several types) OR by using the Component Browser (model-tab) and then right-clicking over the definition's icon that you want to have selected and pick 'Select Instances' - that way all of its active instances are selected. Now use the Component Browser - either in the model-tab to use components that are already within the model, or from any other 'external' location for components that are currently not yet loaded into the project - again you right-click over the definition's icon that you want 'to add' and pick 'Replace Selected'. Now the components you selected have been replaced by the component you wanted... It's possible to script it BUT it might be as easy to do it this way... There are already several component swapping scripts too... It can be done using the Component Browser, but when you have lots of components, it can be easier to select a desired component on-screen rather than hunting through the browser. Though I wrote ApplyTo before the Component Browser offered that functionality, it retains its relevance for this reason.
  • Automating export of scenes

    6
    0 Votes
    6 Posts
    515 Views
    chrisglasierC
    @rickw said: SceneExporter and SceneExporterPro will do this as well. Very thoughtful and generous, thanks. You may be interested in seeing how this relates to my templates query Chris
  • Is it possible to offset a 3d spline?

    19
    0 Votes
    19 Posts
    3k Views
    R
    You could try offset.rb While I wrote it to provide standard "flat" offset capability, I noticed it does perform 3d offsets. It may not be exactly what you want, but it could form the basis for a 3d offset.
  • Thanks to all Ruby developers, and more...

    14
    0 Votes
    14 Posts
    1k Views
    M
    Good to see that it have been helpfull ! The automatic translation is a really good idea (in fact, I've never really try this kind of tools before... ). In fact, after some test, the google translation is better, and there are not that much big mistakes or nonsense (just when I'm going off topic...). http://translate.google.com/translate?js=n&prev=_t&hl=fr&ie=UTF-8&u=www.wip-archi.com&sl=auto&tl=en&history_state0= For instance, I've quickly check the Vray lessons, and it works quite well... give it a try...
  • Is it possible to do this...

    3
    0 Votes
    3 Posts
    277 Views
    S
    thanx...stupid me
  • Making a SketchUp tool - incorporating the mouse & keyboard

    55
    0 Votes
    55 Posts
    2k Views
    Chris FullmerC
    Here is your code how I tweaked it. I think all I did was move the if @thing == 0 to the bottom and then changed all the sets back to arrays and then made the @vert array uniq!. SO look this over and compare it to yours. See if that helps. require "sketchup.rb" class Pinchmover def activate @model = Sketchup.active_model @ent = @model.entities @view = @model.active_view @slct = @model.selection @slct.clear @vect = [] @verts = [] @dvert = [] @thing = 0 end def onLButtonUp(flags, x, y, view) if @thing == 1 vec=[] ip2 = view.inputpoint x,y pt3 = ip2.position pt4 = Geom;;Point3d.new pt3 @cpoint2 = @ent.add_cpoint pt4 prompts = ["Radius="] defaults = [ 0.0.to_l] list = [""] results = UI.inputbox prompts, defaults, list, "Please input desired radius." @rad= results[0].to_l @ent.each do |e| if e.typename == "Edge" @verts << e.start @verts << e.end end end @verts.uniq! @verts.each do |v| dist = v.position.distance @cpoint.position if dist < @rad @dvert << v end end @dvert.each do |d| # Doesn't seem to work. vec = @cpoint.position.vector_to @cpoint2.position @vect << vec end Sketchup.active_model.entities.transform_by_vectors @dvert, @vect @thing = 2 end if @thing == 0 ip1 = view.inputpoint x,y pt1 = ip1.position pt2 = Geom;;Point3d.new pt1 @cpoint = @ent.add_cpoint pt2 @thing = 1 end end end Sketchup.active_model.select_tool Pinchmover.new Chris
  • [Research] Area Report

    9
    0 Votes
    9 Posts
    559 Views
    thomthomT
    I've got a prototype. But I'm not sure if I'll go forward with this project after seeing this: http://www.sketchucation.com/forums/scf/viewtopic.php?f=80&t=19084 Looks very promising.
  • Pro or free version

    9
    0 Votes
    9 Posts
    539 Views
    Al HartA
    Thanks TT. After seeing if it worked, I was going to have someone try to type it in in SU6 to see what happened. Al
  • Modeling the surface of flowing water

    9
    0 Votes
    9 Posts
    729 Views
    W
    @jim said: @will pittenger said: Randomize TIN looks like it will do the job. It does, however, need more error notifications like "no appropriate selection." Yeah, I'm bad about stuff like that. It does help when someone comments, so thanks for that - I'll look at updating the plugin. I figured it out when I examined the code. Until then, I thought I had to select the contents of the group rather than the group itself. Also, read the following: All nodes appear to be either up 1" (what I entered), down 1", or left alone. There don't appear be to be nodes with any other changes. As a result, the surface doesn't look as smooth as it could. I haven't figured out how to do the transition at the bottom. Not only is the stream something other than a simple rect, but at the bottom, I need it to get slightly steeper for a moment. I plan to simulate a screen there that will divert the ball from the stream to a tube leading to the hole. (The stream will look like a ordinary water hazard, but won't be one.) The ball has to go one way and the "water" another. But the ball won't roll uphill. So I want the bottom to be steep enough that the water goes below the screen and yet the ball can still roll downhill. This might telegraph through to the surface.
  • How to set page index?

    7
    0 Votes
    7 Posts
    305 Views
    PixeroP
    Thanks, will try this.
  • Flip Camera Ruby?

    7
    0 Votes
    7 Posts
    721 Views
    Dave RD
    Could you just reshape the drawing window to make it a vertical rectangle?
  • ComponentDefinition.behavior.snapto does not work for me

    4
    0 Votes
    4 Posts
    264 Views
    TIGT
    @markbergaas said: I found it! I needed to set behavior.is2d to true, also. Now it works like a charm. Well spotted !

Advertisement