ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • Dimension issue

    3
    0 Votes
    3 Posts
    133 Views
    Wo3DanW
    @tig said: Unfortunately dimensions have scant access in the Ruby API... Thanks TIG, I was afraid this would be the answer.
  • Should have seen this coming - Where to write temp files?

    24
    0 Votes
    24 Posts
    622 Views
    Dan RathbunD
    Just noticed ANOTHER standard Ruby extension that bears on this subject. With a path to the local standard Ruby lib dir pushed into the $LOAD_PATH array, you add the following to your module: require('tmpdir.rb') This standard extension adds the class methods: Dir::tmpdir and Dir::mktmpdir If you read the file, you'll recognize the Dir::tmpdir method as the 'progenitor' of the edition in the Google 'webtextures_loader.rb' file. (Google "lifted" it, and stripped out the Win32 specific part.) So (above) when we talked about whether to rely on the WebTextures plugin, my advice is, to instead rely on the Standard Ruby library.
  • Enable error reporting for WebDialogs under OSX?

    15
    0 Votes
    15 Posts
    3k Views
    thomthomT
    Thanks. I'll try that soon when I get the chance.
  • Help with shadow_info and SunRise

    3
    0 Votes
    3 Posts
    126 Views
    JuantxoJ
    I thought I was doing something wrong. Then, I don't worry about this discrepancy. Thanks Tig
  • How to Connect Ruby to MySQL

    12
    0 Votes
    12 Posts
    2k Views
    Dan RathbunD
    Thanks Tavi.. dang it.. dat's a bummer... oh well then it's SQLite3
  • [Win] net/http

    4
    0 Votes
    4 Posts
    180 Views
    danielbowringD
    @dan rathbun said: ... your talking about one of the standard Ruby libraries. I answered a similar question here: http://forums.sketchucation.com/viewtopic.php?f=180&t=39648#p350463 Many thanks, worked great.
  • Advice : Developing Ruby extension for Sketchup (Windows)

    4
    0 Votes
    4 Posts
    231 Views
    Dan RathbunD
    You have read the FAQ page I made? [Info] C/C++ Ruby extensions & SketchUp plugins
  • Understanding Variables

    3
    0 Votes
    3 Posts
    158 Views
    A
    Okay, now I know!! And yeah at first my question made sense to me, but now it doesn't! Thanks
  • TextTag

    15
    0 Votes
    15 Posts
    3k Views
    TIGT
    If you are using Layout you are better off doing your text in Layout. This is a pretty old tool! Try my 2dTools 2dText - it's much more flexible than this old thing... BUT the size is fixed height - you can make it sat 100mm and then make three copies scaled at x2 and x3 use layers called TEXT-100, TEXT-200 and TEXT-300 etc. Put copies on different layers and have only one layer on in a scene-view. Then you can switch the layers as needed so text size seems to varying. 2dText is a 'component' so making layered copies means you can edit one and they'll all change across the layers and the scaling will be kept too...
  • Another grouping a group issue?

    10
    0 Votes
    10 Posts
    192 Views
    Dan RathbunD
    @tomot said: Interesting! I have 2 scripts, on replicates joists the other studs both use count. One script constantly gives me an '<' error in the console the other does not. ....very aggravating! Yep.. and same with: entities.add_instance(count, t) The word 'entities' is a method name. It often works OK, but is poor form. Using something like: grp_ents.add_instance(joist, tx_vec) is much better, and more understandable.
  • DC instance make unique

    22
    0 Votes
    22 Posts
    649 Views
    Dan RathbunD
    @jolran said: However there is no "glue_to" method for groups in the API. Right.. and you should not use a Group, for the job of a ComponentInstance. Groups are best used for temporary editing both manual and in scripting. By collecting objects together into a Group, you can: move them from one edit context to another, protect them from being modified by crossing edges, apply a tranform to a set of objects all at once (where they move, scale or rotate all together.) I would say, that when you get a "set" of objects the way you want, and then wish to use that set multiple places in the model, it's best to then convert them into a ComponentInstance. Especially if your going use scripting, to manipulate them, or glue them to faces.
  • Geom.intersect_line_plane = point3d?

    5
    0 Votes
    5 Posts
    207 Views
    Dan RathbunD
    @voljanko said: I can not set my browser (chrome) to show the comments. You are seeing the localized language version of the API page. Somehow you must try to set Chrome to English, so you can see the main English pages that have the comments. This is a known issue with the API Doc pages, and complaints have been logged with Google.
  • API redefinition required!

    9
    0 Votes
    9 Posts
    446 Views
    T
    @tig said: Please don't use global $ variables unless you really have to Rats! I can't count how many times I have been reminded of that issue. My typical response: I use global's so I can verify the 3d point location in the Ruby console, I need this to verify any mistakes I may be making (which happens frequently !) when I'm developing a script which corresponds to 3d points on my gridded 1/4" notepad. It would be really nice if @ variables where able to display the same information in the Ruby console.
  • Deleting group.copy?

    8
    0 Votes
    8 Posts
    213 Views
    L
    Yeah, that worked, and not having to explode my group fixed a lot of problems. Thank you!
  • Angle between two edges in a face?

    11
    0 Votes
    11 Posts
    690 Views
    TIGT
    My code was a quick example to show that you could get the correct angles. Of course edges=face.edges can easily be replaced with edges=face.outer_loop.edges or we iterate through the loops to get their edges in turn... BUT if its for only one vertex it's then easy enough to find the two edges belonging to that vertex [and that face] and run similar code on them to get the angle between them, using the face normal and vectors cross comparison to trap for concave corner angles >180 degrees... remembering to trap for ==180.degrees, as well as < and >...
  • [Code] How do you compute weighted vertex normals?

    26
    0 Votes
    26 Posts
    6k Views
    thomthomT
    Now I seemed to have corrected it. I had to ensure the vectors I used came in the same direction as the edge loop.
  • Writing to specific lines in a File

    4
    0 Votes
    4 Posts
    98 Views
    Chris FullmerC
    Awesome Dan, thanks! I'll go look into those.
  • 2 issues; inheritance &amp; require ?

    10
    0 Votes
    10 Posts
    187 Views
    T
    @dan rathbun said: @tomot said: Unfortunately some addons today wont run anywhere else than from c:\Program Files That's not your fault.. it's the fault of the plugin author. If they are not scrambled, you can tweak them... if they are, you can try to ask the author to fix the plugin. A friend of mine recently said " if I want an appliance I'll buy a MAC if I want a computer I'll buy a PC. I think Microsoft is heading down the same road as Apple. A pay for everything, the user wants, freeway! So I saved $350.00 by NOT having Apple install a new HDD, on my wife's iMac, I did it my way! [image: YNLo_imac.jpg]
  • Sketchup kind of 'stuck' after scripts

    13
    0 Votes
    13 Posts
    264 Views
    TIGT
    Sketchup.send_action("selectSelectionTool:") should work cross-platform - it's only the numerical codes that are PC specific like Sketchup.send_action(10501) which is PC only whereas the equivalent Sketchup.send_action("viewTop:") works on PC & MAC...
  • Free Chinese localization

    12
    0 Votes
    12 Posts
    718 Views
    Dan RathbunD
    Language translators, and proofreaders needed. http://forums.sketchucation.com/viewtopic.php?f=323&t=36465&p=350198#p350198

Advertisement