Sketchucation Tools 5.0.7 | Licensing improvements and bug fixes Learn More

Alkategóriák

  • No decscription available

    20 Témakörök
    462 Hozzászólások
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • KeyBoard observer?

    11
    0 Szavazatok
    11 Hozzászólások
    708 Megtekintések
    Chris FullmerC
    I'm guessing you already have a tool observer set up or something? You've already figured out how to keep track of the previously used tools, right? If so, Lets say you have a global variable that holds an array of all the last used tools - $previous_tools Also, maybe you need a menu item for "Set Shortcut Key". This is for the user to tell your script what key they have assigned your script to (it might save the value to an external text file or a registry entry would be better). So perhaps they assign it to "t", your inputbox could create a global variable $previous_tools_shortcut = "t" Now make a tool with the onKeyUp method in it. It compares the onkey up to $previous_tools_shortcut. And it also implements its own timer feature. So you can watch the time between keystrokes. So if they press the dhortcut key 1 time, it just selects $previous_tools.last. If they press it twice within a specified time limit (.5 seonds or less) then it will select $previous_tools[length-1], press it three times within 1 second, it selects the $previous_tools[length-2] tool. That is how I think I would go about it. But that assumes you have an array of the previously used tools, and it also requires the user to input the shortcut key that they assigned to your tool. Chris
  • What does Entities.transform_by_vectors actually do?

    4
    0 Szavazatok
    4 Hozzászólások
    363 Megtekintések
    PixeroP
    Thanks for the info. Might come handy for an update of my align script.
  • Shift WebDialog Focus to SU?

    11
    0 Szavazatok
    11 Hozzászólások
    1k Megtekintések
    thomthomT
    @adamb said: But thats correct behavior if I unwind an operation to just before the Tool was used..No? Nah. Not IMO. I find it very annoying. I want to keep the focus on the viewport.
  • [HowTo?] Edit Components (or change "active level")

    6
    0 Szavazatok
    6 Hozzászólások
    2k Megtekintések
    TIGT
    model.close_active ### will jump you up one 'level' out of the current edit session. You can only go in the direction of the base model... You can repeat x(model.active_path.length) to close the edit back to the base model 'level'. Alternatively... model.active_path[model.active_path.length-2] ### to get up 1 level, or use -3 for 2 levels etc... All of these physically close any current edit sessions... If you just want to do something with the entities found at a particular 'level' then just use... parent=model.active_path[model.active_path.length-2] i.e. the container of the current edit session's instance/group parent_entities=parent.definition.entities if parent.typename=="ComponentInstance" parent_entities=parent.entities if parent.typename=="Group" etc... there's no need to close edits etc, just specify the actual entities-set to work on...
  • Edge.split Point3d not working as expected?

    4
    0 Szavazatok
    4 Hozzászólások
    415 Megtekintések
    thomthomT
    It does sound like it should fail if it's not on the edge. I would have expected a nil return like many of the other functions when they fail.
  • Please can someone check this plugin.NEW VERSION

    12
    0 Szavazatok
    12 Hozzászólások
    947 Megtekintések
    TIGT
    Sujikai refers to something that's diagonal, oblique or bracing - e.g. in patterns - like on sword hilts - or perhaps in stud-wall bracing, as it appears here... Exactly what is this script trying to do ? If we knew that, then we could edit out the rogue 'Japanese characters' and see how it might work as hoped...
  • Calculate a curve that fits between two edge?

    14
    0 Szavazatok
    14 Hozzászólások
    967 Megtekintések
    thomthomT
    Giving a radius to two edges is only one minor function. I ended up getting the linear_combination of the two edge's vectors, then use trigonometry to calculate the centre point on that vector. It'd be interesting to have a look at K_Tools.rb to see how it's done there. My trigonometry is very rusty so I'm not sure if I'm doing it the best way.
  • Beginning Ruby Tutorial

    16
    0 Szavazatok
    16 Hozzászólások
    1k Megtekintések
    Al HartA
    Chris, Thanks for making a ruby tutorial. Its always inspiring to look at someone else's code. Here is a version which use a hash instead of arrays to count all entities types; def count_entities model = Sketchup.active_model entities = model.entities count = {} # start a new hash entities.each do |e| stype = e.typename # start new count, or add 1 to existing count count[stype] = count[stype] ? count[stype] + 1 ; 1 end#loop sorted_keys = count.keys.sort sorted_keys.each do |key| printf("Total %-12s; %5d\n", key, count[key]) end#loop return nil end#def The weird line: count[stype] = count[stype] ? count[stype] + 1 : 1 would be easier to read as if (count[stype]) count[stype] = count[stype] + 1 else count[stype] = 1 end#if Keep up the good work
  • Test if a point is between 2 points?

    7
    0 Szavazatok
    7 Hozzászólások
    464 Megtekintések
    Chris FullmerC
    Very good to know. I've never tested anything like that, but I had a suspicion that it is true. Thanks for thiking of a method that uses SU native natives. Mine involved an algebraic formula being applied to each x,y,z coordinate, and if it got fed zero's would return NaN or Infinity, so I also had to teste everynumber before it passed through. In the end, it was quite long and I'm sure it was slow. I've got it set up where I could do a time test on it, Id be interested in seeing how much faster it is. Thanks Fredo! Chris
  • Lisp getpoint (not finished!)

    9
    0 Szavazatok
    9 Hozzászólások
    874 Megtekintések
    M
    I thought about that work-around method... I will use it until something better... Thank you Chris!
  • Method library?

    3
    0 Szavazatok
    3 Hozzászólások
    282 Megtekintések
    Chris FullmerC
    I was leanin towards something like that too at first, but then when I remembered the [code] tag, I started liking that idea. Maybe a sticky that has a link to all [code] threads so its easzy to sort through them. I'm thinking a single thread might tend to have a method, then some posts and discussions, then another method, and some discussion, and on an one. And it might make it tricky to dig through 20 pages, with only 1 method per page or something. That is my onoly concern with doing a single sticky thread. I have a bezier method I'd like to post. It requires as input: point1, handle1, point2, handle2, segment_count. Thats it, and it returns an arc object, or with a tweak it just returns an array of Point3d objects. So thats one method I'd like to post. Another is one that will take any series of connected edge segments and return them in an ordered array of points from the beginning to end. Chris
  • Using the Registry - Any Gotchas?

    5
    0 Szavazatok
    5 Hozzászólások
    445 Megtekintések
    J
    Thanks Adam, I was actually using the following: str.gsub!(/\\/, '\\\\') But I think simply changing it to '/' is a better solution, and will modify inputbox.rb I suppose it's possible for someone to want to use \ for some other string, though. I'm also escaping double-quotes: str.gsub!(/"/, '\"') Thanks.
  • Swap between 2 lines

    12
    0 Szavazatok
    12 Hozzászólások
    1k Megtekintések
    A
    No, but SWEEP 2 RAILS plugin will be very usefull for me!
  • Please install progressbar.rb

    11
    0 Szavazatok
    11 Hozzászólások
    7k Megtekintések
    Chris FullmerC
    Hehe, yeah my scripts aren't nice enough to check if you have progressbar first. They just crash. Chris
  • Loft questions

    26
    0 Szavazatok
    26 Hozzászólások
    5k Megtekintések
    pilouP
    @unknownuser said: in what program are you making those loft images? Moment of Inspiration (Moi) (just image colorisation is made in 2D prog for fun & variety I don't believe that SU can actually makes the same than Zbrush! There are 8 000 000 polys in normal way at level 7 of subdivision ! And it just one object! So when you will make many objects in the same time SU will freeze before
  • Checkerboard painting ? (or selection)

    18
    0 Szavazatok
    18 Hozzászólások
    3k Megtekintések
    A
    @unknownuser said: Not yet released but you can try this one lol, come on, it was already said that Random Painter isnt able to create a checkbox pattern, since, of course, its randon
  • Inside-out transformation?

    6
    0 Szavazatok
    6 Hozzászólások
    400 Megtekintések
    A
    I'm pretty sure the only way to effect an instance without effecting the definition is just the Transform. But that will just effect the instance as a whole. You can't reverse the faces (I don't think) without interacting with the actual geometry, thus changing the definition.
  • Make Curve...

    6
    0 Szavazatok
    6 Hozzászólások
    363 Megtekintések
    Chris FullmerC
    Ahh weld, of course, good thinking Remus. I was thinking of a script that would automatically find all arc and turn them into true SketchUp arcs. Overkill. Weld, of course, Chris
  • Strange error when setting component axes

    8
    0 Szavazatok
    8 Hozzászólások
    480 Megtekintések
    Chris FullmerC
    Yeah, I tried it and I also get the errors. I should have tried sooner. There are other tools that send errors to the ruby console too. Oops! So I would say it is woorking as expected. Chris
  • .get_front_UVQ return unexpected results

    5
    0 Szavazatok
    5 Hozzászólások
    464 Megtekintések
    thomthomT
    @adamb said: But perhaps a better way of doing this is to use a PolyMesh and just explicitly set UVs. Never used Polygon Meshes before. So to map existing faces I'd convert them to PolyMeshes?

Advertisement