🏒 PlaceMaker | 25% off for February including new Google Earth data imports! Learn more
  • Can it be to achieve?

    8
    0 Votes
    8 Posts
    276 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
    462 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
    923 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
    259 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
    486 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
    472 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
    618 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
    263 Views
    PixeroP
    Thanks, will try this.
  • Flip Camera Ruby?

    7
    0 Votes
    7 Posts
    655 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
    248 Views
    TIGT
    @markbergaas said: I found it! I needed to set behavior.is2d to true, also. Now it works like a charm. Well spotted !
  • Tool in another tool

    5
    0 Votes
    5 Posts
    397 Views
    G
    @unknownuser said: I want to have 3D coordinates of a point which is given by middle of two points clicked before. Ruby can easily do that. But I also want to use this coordinate as second point of a line, or center of the circle, opposite angle of a rectangle, etc... So inside an active tool ! How is going on your project to run a tool inside an existing active tool? I'm very curious to know if is somthing possible or not. If so, it could solve lots of annoyng problems (middle between two points, many types of tangents, and so on). Let me know something. Thanx!
  • Possible plugin?

    3
    0 Votes
    3 Posts
    211 Views
    EscapeArtistE
    I hadn't thought that far ahead. I was just hoping a plugin existed like joint push pull that could be set with a distance/division modifier. I suppose if it were a plugin request it would be pretty much like joint push pull, extrude along the normal or axis of choice with the ability to select distance and number of segments either by "X" distance divided "Y" segments, or, extrude "Y" segments "Z" number of times. What the heck, throw a selection of taper by % or numerical distance amount per segment too, and that would make a fine combination of joint push pull and a little bit of Greeble too.
  • Transformation.to_a array definition

    9
    0 Votes
    9 Posts
    641 Views
    Chris FullmerC
    Don't worry, nether did I. I found it on Wikipedia, but the math involved is a bit over my head for the time being. But in time I hope to get it figured out. Glad you got it working though, Chris
  • Two problems with an 'Export to Vue' ruby script

    7
    0 Votes
    7 Posts
    271 Views
    A
    I've solved both problems now - please see my other thread for the finished plugin
  • More Cooperative Modeling Ideas

    10
    0 Votes
    10 Posts
    494 Views
    L
    I'm guessing (from having a play in blender) the system is optimized so that after "subscribing" to the model only changes would be received and sent by the system. There are pros and cons with a system such as this. I guess one pro is increased speed, and one con is the chance for bugs to arise such as getting out of sync.
  • Hey Whaat: Profile Builder...?

    7
    0 Votes
    7 Posts
    415 Views
    W
    yeah...unfortunately, Profile Builder is based on the native Follow Me tool and cannot help you here. However, if you do a lot of this sort of modelling, it will pay for itself pretty quick.
  • BZ_Toolbar

    3
    0 Votes
    3 Posts
    12k Views
    M
    @unknownuser said: If It's from Fredo6 You must have this and this Cool, thanks.
  • Setting custom cursor for a Tool

    3
    0 Votes
    3 Posts
    504 Views
    thomthomT
    Hm... it turns out that onSetCursor doesn't actually return the view as an argument. Works now. Thanks man!

Advertisement