🏒 PlaceMaker | 25% off for February including new Google Earth data imports! Learn more
  • Sketchup.format_area bug?

    7
    0 Votes
    7 Posts
    283 Views
    thomthomT
    Ok - my bad. I was being silly and didn't consider I was dealing with squares when I typed 100.mm. Sketchup.format_area(100.mm**2) 10000 Millimeters Β²
  • Command icon

    8
    0 Votes
    8 Posts
    439 Views
    thomthomT
    @kat said: Yes exactly, that was my question, i didn't understand why i needed to add two different sizes of icons to the Command. I think i did everything as explaned in the API docs, but i still won't display the icon. Are there any settings that i should check? Or something like .visible = true? From your code it appear you only added small icon. Hav eyou set your toolbar view to Small Icons? The default are Large.
  • Very Odd Bug

    3
    0 Votes
    3 Posts
    229 Views
    M
    @tig said: Glad we helped Are your martinis as dry as your humor?
  • Same Colors not equal?

    11
    0 Votes
    11 Posts
    318 Views
    thomthomT
    Yea, always avoid comparing strings. Such a shame that they've not added a proper comparison method for all objects.
  • Turning 3d points on a plane to 2d co-ords?

    8
    0 Votes
    8 Posts
    2k Views
    Dan RathbunD
    Hopefully in some future version we'll have a Geom::Axes class that let's us instantiate as many UCS' as we need and GC them when they're no longer needed. (There would be a world WCS preset by SU of course.)
  • Simple, Clean Algorithm Wanted

    10
    0 Votes
    10 Posts
    523 Views
    M
    @dan rathbun said: @martinrinehart said: I am working on a multi-move animation controller. By multi-move I mean one which allows multiple things to move at different times, times probably overlapping so multiple things can move at once. Have you investigated the standard Ruby library class Mutex ? http://phrogz.net/ProgrammingRuby/tut_threads.html ... and scroll down about 3/4 of the page. As always, Dan, I learn from your posts. I tried to work my way through this chapter, but had very little luck replicating the book's results. Gave up before Mutex.
  • Question about the vector direction

    4
    0 Votes
    4 Posts
    441 Views
    M
    This bit of code is unusual: vector = ... vector2 = vector.normalize! By convention, Ruby methods that end with a "!" work directly on the calling object's data. So vector.normalize! normalizes vector. You now have the normalized data in vector and a second reference to it in vector2. Not sure that was what you intended. I added a comment to the Vector3d class doc to clarify this. (If you learned from the doc you were misled.)
  • [Idea] Ruby Banks

    3
    0 Votes
    3 Posts
    465 Views
    K
    no no I'm thinking more along the lines of the Ruby's being arranged into Folders that are renamed to Plugins as the bank is selected. while not selected, they'd be 'Bank 1' etc.
  • Multi-threading inside SketchUp

    17
    0 Votes
    17 Posts
    6k Views
    A
    I'm working with very large textures and I think su offten crashes because of that reason. It just can't work with very large files. You can operate inside sketchup but forget the export. Well that's just my guess. At home I have x64 bit os and there are no such problems - not so offten.
  • Ruby Docs

    16
    0 Votes
    16 Posts
    2k Views
    Dan RathbunD
    post moved @wsellers89 said: Is there a good reference or tutorials for learning more about Ruby on SketchUp? Free downloadable PDF version of "Automatic SketchUp" at Google Docs (Look for the download link in the upper-left of toolbar.) EDIT: As of JULY 2010 Google reports "Sorry, the page (or document) you have requested is not available." Try the author's website: Automatic Sketchup You ALSO need to learn some standard Ruby, the old 'Pick-Axe' book "The Pragmatic Programmer's Guide: Programming Ruby" http://phrogz.net/ProgrammingRuby/frameset.html (There is a tar download link at the bottom of the left pane.) @wsellers89 said: I am experienced in Fortran and to a less extent C, but I can follow most of the the code. The weirdest thing about Ruby (and it's kept secret from newbies, I guess to surprise them in the advanced course?,) is that Ruby has no actual variables like BASIC, Pascal, or FORTRAN. Read this post for more info: [url=http://forums.sketchucation.com/viewtopic.php?f=180&t=26437#p230201:2y8qpfiu]By value or by reference?[/url:2y8qpfiu] I personally would ALWAYS tell experienced programmers about this FIRST thing, as it can and has led to much wasted time and frustration. @wsellers89 said: I am not sure what ".to_f" does in the loop to parse out the x,y points and would like to know more. Converts the object (on the left of the dot,) to a Float class. This is one of the standard Ruby instance methods. [url=http://phrogz.net/ProgrammingRuby/builtins.html#builtinclassesandmethods:2y8qpfiu]Built-In Class and Methods[/url:2y8qpfiu] This old 'Pick-Axe' version was written for Ruby 1.6.x, but still helps alot. Sketchup is using the 1.8.x branch, but the book is still say 95% valid. Ver 1.8.x renamed a few Exceptions, added some more methods, etc. (There are updated hardcopy books available for sale for the 1.8.x and 1.9.x branch. Check booksellers or Ebay.) Other Topics here at SketchUcation on Ruby Programming: [url=http://forums.sketchucation.com/viewtopic.php?f=180&t=10142:2y8qpfiu]SketchUp-Ruby Resources[/url:2y8qpfiu] [url=http://forums.sketchucation.com/viewtopic.php?f=180&t=20427:2y8qpfiu]Developer Forum Sticky Links[/url:2y8qpfiu] [url=http://forums.sketchucation.com/viewtopic.php?f=180&t=27606:2y8qpfiu]Ruby Docs[/url:2y8qpfiu] this topic (pssst! You can bookmark topics and access your bookmarks through your User Control Panel. The link is a the top left of each forum just below the list of Moderators. The bookmark button is hidden all the way at the bottom of each topic webpage in the footerbar.)
  • Reading a file in Ruby

    17
    0 Votes
    17 Posts
    2k Views
    Dan RathbunD
    @wsellers89 said: Is there a good reference or tutorials for learning more about Ruby on SketchUp? post moved to this topic: "Ruby Docs"
  • Calling Ruby Function from SketchyPhysics

    4
    0 Votes
    4 Posts
    359 Views
    J
    @jblively said: Hey Guys, I can't seem to find it anywhere... What's the syntax to call a Ruby function from within SP, like from the onTouch area? Thanks Joe For others who might be looking: It's very easy syntax, in the blue sketchyphysics boxes in the UI, just put my_rubyfunction(); Although, if you use a UI.messagebox in the called routine, it seems to crash sketchup everytime...but everything else seems to work. Joe
  • Quadrilateral face warp

    3
    0 Votes
    3 Posts
    2k Views
    pilouP
    Another one can be Soap Skin and Bubble and you will can regulate the pressure +- PS Alas seems now not more accessible for the moment! Time expired for free version! [image: HyperParaboloid.jpg]
  • ComponentDefinition.insertion_point ?

    3
    0 Votes
    3 Posts
    190 Views
    C
    it's basically the where the origin is at in the context of the definition. normally it will always be [0,0,0], but will change to the edit_transform.origin if one of it's instances is in edit mode. EDIT: it is the last point the user grabbed, not the origin. (see below)
  • Leader text vs. screen text

    5
    0 Votes
    5 Posts
    295 Views
    D
    Hmmm. Ok, at least I know that I'm not the only one. Luckily, almost all of my models have geometry in them. Thanks, Chris.
  • Properties to save between scenes

    12
    0 Votes
    12 Posts
    509 Views
    Chris FullmerC
    Pages.show_frame_at I think that answer's my own question. I would guess that is how the actualy flightpath created by SU is re-created. It would be easy then to export images from scenes - recreating the actual SU flightpath, and then compile those into a movie (presuming you get mencoder to cooperate). Chris
  • Attribute dictionary pairs into variables & values?

    8
    0 Votes
    8 Posts
    455 Views
    M
    @chris fullmer said: I've used both [hashes and dictionaries] before, just never really enough to feel like I know what I'm doing. Crash course in hashes (a very useful tool to have at hand): A hash is a dictionary and vice-versa. They are sets of key/value pairs. An array is one form of hash: arr[0] = 'fred'. The key is zero and the value is 'fred'. Arrays are commonly restricted to integer keys. The term "dictionary" is commonly used when the keys are single words. dict['name']='fred'. Ruby makes hashes dead simple (though only a devout Rubyist could love the syntax): [image: 3x9H_Ruby-example.jpg] In JavaScript, both objects and arrays are hashes: [image: Mn9Q_javascript-examples.jpg] The last example shows that the key need not be a string. (True in Ruby if you start with a hash: h=Hash.new() or h={}.) The key can be virtually anything. I'm using SketchUp ComponentInstance objects as keys in the stuff I'm doing today (trying to get a lot of things moving all at once). In Ruby, an array must be indexed by number. A hash may be indexed by anything. In JavaScript, an array is really a hash, which wins the flexibility prize but you wouldn't enter them in a race.
  • Threads Needed, Waits Wanted

    7
    0 Votes
    7 Posts
    378 Views
    M
    I had this brilliant idea (that was a total flop). Since the delay works between frames in an animation, why not just grab that one? Was working well until I moved the puts Time.now() - start out of the animation code and into the mainline: for i in 1..10 do waiter(500); puts Time.now() - start end That said something like 0.03, 0.06, ... So I moved a call to a continue() method into the animation in response to stop(). BugSplat. I think I know how to at least solve the starter problem. The animated "move" commmand stacks move specs that are then run in an animation. Kludgy? Yup. PITA? Yup. But it should actually work.
  • View? Thanks, TT!

    2
    0 Votes
    2 Posts
    174 Views
    thomthomT
    Hopefully the docs will soon be amended to reflect my comments.
  • Generate smooth 2d circle for screen

    14
    0 Votes
    14 Posts
    2k Views
    pilouP
    One of the best appearence of drawing curves on the screen is Moment of Inspiration The guy (Michael Gibson) has developped his own graphic engine [image: attachment.php?attachmentid=22617&d=1192006151] [image: attachment.php?attachmentid=22618&d=1192006151] [image: attachment.php?attachmentid=22619&d=1192006151] So you can have that directly on the work's screen By PaQ (Click for zoom)

Advertisement