Urasik Extensions | Lots of new extensions to check out Learn More

Subcategories

  • No decscription available

    20 Topics
    462 Posts
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Shift WebDialog Focus to SU?

    11
    0 Votes
    11 Posts
    977 Views
    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 Votes
    6 Posts
    2k Views
    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 Votes
    4 Posts
    395 Views
    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 Votes
    12 Posts
    875 Views
    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 Votes
    14 Posts
    907 Views
    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 Votes
    16 Posts
    1k Views
    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 Votes
    7 Posts
    426 Views
    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 Votes
    9 Posts
    831 Views
    M
    I thought about that work-around method... I will use it until something better... Thank you Chris!
  • Method library?

    3
    0 Votes
    3 Posts
    271 Views
    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 Votes
    5 Posts
    420 Views
    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 Votes
    12 Posts
    1k Views
    A
    No, but SWEEP 2 RAILS plugin will be very usefull for me!
  • Please install progressbar.rb

    11
    0 Votes
    11 Posts
    7k Views
    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 Votes
    26 Posts
    5k Views
    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 Votes
    18 Posts
    3k Views
    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 Votes
    6 Posts
    366 Views
    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 Votes
    6 Posts
    328 Views
    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 Votes
    8 Posts
    425 Views
    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 Votes
    5 Posts
    430 Views
    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?
  • Rotation interface with Ruby extension -- possible?

    6
    0 Votes
    6 Posts
    480 Views
    A
    @chris fullmer said: I would imagine that it is possible. Are you interested in learning Ruby? This is a great place to learn it. Chris I did a little Ruby tutorial a few years ago, but it kept crashing on me at a certain point. So I guess I know the reeeaal basics. (ooooooor.. could quickly remember them if I seem em again!) If you could give me some ideas (like methods, functions, etc.) of how I can make this thing work with a Ruby plugin, that'd be great.
  • Control Projected Textures via the API?

    2
    0 Votes
    2 Posts
    271 Views
    T
    Google seems to be deaf to our requests. There is no built-in method for recognising if a face has a projected texture or not. It can be done through writing a texture to a Texturewriter of especially created temporary face with no distortion and then writing a texture of a face being examined. If the number of textures in TW increases it means the face has a photomatched texture. I have seen a texturewritter2 in the SU SDK, but it is not reflected in Ruby. I haven't tried to control a position of a projected texture, but I am afraid it can be pretty hard. Mostly because we have no sample code that would show how to do basic modification. Tomasz

Advertisement