⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

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
  • Ruby Challenge

    7
    0 Szavazatok
    7 Hozzászólások
    940 Megtekintések
    J
    @unknownuser said: @Jim I must say that I am bluffed with the speed of Ruby, thinking that all the lines are interpreted and that I use many Array operations which have a lot of code behind them.[/qoute] My thought is that it is fast because there are no objects being created. The arrays being manipulated contain only pointers to integers which there is only a single instance of in Ruby. @unknownuser said: PS: another challenge would be to create a Sudoku solution workbench in Ruby! Yes, that's a good one; and i had a similar one in mind called the "100 squares" puzzle.
  • [Code] custom file_loaded() and file_loaded?() v2.0.0

    11
    0 Szavazatok
    11 Hozzászólások
    7k Megtekintések
    Dan RathbunD
    OK.. so, for those you who have read the thread.. looked at the template, and scratch your head and wonder why all the complexity to control a private array ?? Answer.. it's just an example, of a private library mixin module. In practice, you can rename the mixin module to whatever you like... and insert whatever proprietary functionality you wish to include in only YOUR plugins (ie, methods in the mixin sections, other class variables and constants, etc.) whilst not allowing some other "hack" to use those features in their plugins.
  • Import DWG files

    5
    0 Szavazatok
    5 Hozzászólások
    495 Megtekintések
    thomthomT
    @arcad-uk said: So why not grab a copy of the earlier version while you can... http://support.google.com/sketchup/bin/answer.py?hl=en&answer=60107 import through the earlier version then bring it into v8? 1+ - I got SU7 and the importer plugin on disk archived.
  • Creating new variables in for-loop?

    5
    0 Szavazatok
    5 Hozzászólások
    322 Megtekintések
    R
    Ok thank you Dan. I will try that.
  • [Code] Print the transformation matrix

    14
    0 Szavazatok
    14 Hozzászólások
    3k Megtekintések
    D
    thank you very much Thomas and Tig that prompt reply! I will try to implement your suggestions right now
  • Draw a new component with axes at original pick point?

    14
    0 Szavazatok
    14 Hozzászólások
    2k Megtekintések
    TIGT
    By 'hand built' I mean 'made manually', i.e. without using any code... that's all... If you make a group that straddles the origin, then its origin [axes] are located at its bounds.min... As I tried to explain... you can then move that group from its insertion_point back to the model ORIGIN, and then apply the same translation transformation BUT as an 'inverse', to the group's entities... so that it appears in the same place in the model, BUT its actual axes have been relocated to the ORIGIN...
  • Right mouse click on toolbar button

    2
    0 Szavazatok
    2 Hozzászólások
    169 Megtekintések
    Rich O BrienR
    Not that i know of....
  • Kill external process

    7
    0 Szavazatok
    7 Hozzászólások
    550 Megtekintések
    M
    Thanks Dan, Your suggestion to write callback that is called from killing object, was very useful idea - and makes nice readable code. Much better idea then various signals I planned to use before. Thanks again, Marija
  • Identify/locate the Subclass

    4
    0 Szavazatok
    4 Hozzászólások
    237 Megtekintések
    A
    @dan rathbun said: obj.respond_to?(:activate) Thanks Dan, description - sure will help. Edited: Previously, I used obj.methods.include?(someMethod). - That will give an error if the object wouldn't be a class, nor module. But using respond_to? will work on any selected object without errors. Jst true or false I was wrong in blue words. Actually, .methods can be implemented in any object. 134.methods, nil.methods, "dsfg".methods, false.methods, Class.methods will always work.
  • DATA in Ruby 1.8 working?

    4
    0 Szavazatok
    4 Hozzászólások
    236 Megtekintések
    Dan RathbunD
    So assuming you want some data encapsulated within the script file itself, that will use it. A Here Doc, or Array or Hash, would seem to be a much easier solution.
  • Making a face

    3
    0 Szavazatok
    3 Hozzászólások
    285 Megtekintések
    A
    Thanks a bunch TIG, I forgot you could get the arcs edges! Still organizing all this information
  • Component definition script problem?

    7
    0 Szavazatok
    7 Hozzászólások
    600 Megtekintések
    T
    @tig said: You are only ever giving us half the story... Sorry about that! I clearly had some difficulty thinking outside the box. The empty definition did not work in this case, so I added a dummy line definition entity and erased it. #----Do dummy line entities = def_stair.entities # def line = entities.add_line (@p8, @p7) entities.erase_entities line all is well now, thanks! [image: stair1.png]
  • Wish List - Ruby interpreter and libraries

    8
    0 Szavazatok
    8 Hozzászólások
    2k Megtekintések
    Dan RathbunD
    @thomthom said: Don't know about 1.8.7 - but they tried 1.9 I think. So did I !! The main issue is that that they (the Ruby Core guys,) renamed functions on the c-side, without leaving aliases that would properly call the newer named functions. This is the character encoding realm.
  • OnActiveModelObserver

    14
    0 Szavazatok
    14 Hozzászólások
    871 Megtekintések
    Dan RathbunD
    @jim said: Either way, can't you just get the active model from the selected entity.. Or from the Selection itself? Keeping in mind that on Mac there can be multiple model objects open.. each with it's OWN selection object, which it's it's OWN selected entity.
  • [Code] Win32 - Get SketchUp Window Handle (WIP)

    40
    0 Szavazatok
    40 Hozzászólások
    13k Megtekintések
    A
    @dan rathbun said: You neglect to show the require() staement that loads Dan Berger's win32-api extensions. (This example does not use the Win32API.so file, that comes "out-of-the-box" with Ruby.) Thanks for pointing that out. Yep, the code above requires win32-api
  • Webdialog - trouble passing array from JS to Ruby

    12
    0 Szavazatok
    12 Hozzászólások
    2k Megtekintések
    Dan RathbunD
    @rvs1977 said: I wonder why the eval-rescue solution has to be avoided? Is it slow? ALL String operations in Ruby 1.8.x are slow. eval() is the Ruby code parser.. so it is a very large method (actually a C-side function.) But I cannot see it being slower than the 2 iterator methods you are using, in addition to the type converter. But it works... and you understand how it works. If speed is not an issue, then go with it ... Also if you KNEW each numeric was separated by a "," then you also do: @YV_array = yv_array.split(',').map{|i| i.to_i}
  • How to get edge/line color?

    6
    0 Szavazatok
    6 Hozzászólások
    613 Megtekintések
    B
    Perfect, those rendering options will come in handy! This works great, thanks Jim
  • [Code] YARC – yet another ruby console

    22
    0 Szavazatok
    22 Hozzászólások
    5k Megtekintések
    A
    @anton_s said: I recommend putting the whole __FILE__ That's very reasonable. I'll fix it. I just wanted to let you all know that I'm working on improvements (esp. the snippets should have been saved over sessions) but I'm a bit busy at the moment. I'll publish a next version when I'm ready.
  • Using Unit Test with SketchUp for Debugging & Testing

    3
    0 Szavazatok
    3 Hozzászólások
    497 Megtekintések
    S
    Joe, Thanks for posting this. I was going to eventually, but got tangled up in other things and didn't get around to it/ I hope it is useful to others. Steve
  • RETRIEVE SCALE

    3
    0 Szavazatok
    3 Hozzászólások
    595 Megtekintések
    A
    Thanks ! it's works and I use def scaleX() Math.sqrt(self.to_a[0]**2+self.to_a[1]**2+self.to_a[2]**2) end def scaleY() Math.sqrt(self.to_a[4]**2+self.to_a[5]**2+self.to_a[6]**2) end def scaleZ() Math.sqrt(self.to_a[8]**2+self.to_a[9]**2+self.to_a[10]**2) end

Advertisement