sketchucation logo sketchucation
    • Login
    1. Home
    2. tt_su
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🚨 Skimp | 25% Off until March 30 Buy Now
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1,034
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: General question - definition of units (inch/metric)

      @slbaumgartner said:

      I believe you can find these settings in the OptionsProvider named "UnitsOptions" in the model's OptionsManager. The names in that OP are pretty clear, but you may have to do some experimentation to figure out what the numeric values mean for the key "LengthUnit".

      You would rarely need to use those values. Only if you needed to implement a custom unit function that SU doesn't already implement. I did write a library to expand area and volume units - as well as formatting of floats in the user locale: https://github.com/thomthom/SketchUp-Units-and-Locale-Helper

      posted in Developers' Forum
      tt_suT
      tt_su
    • RE: General question - definition of units (inch/metric)

      As Daniel mentioned, I wrote an article on this. It's actually less work to make it work for whatever unit the user is using because you use the methods that the Ruby API provides for this.

      Basically, all units in SketchUp is internally inches. Work with that - and just ensure you use the Length.to_s method to present the unit to the user. If you want to define some specific length to your calculations, use the helper methods of the Numeric class, sch as: 1000.mm to define a Length object representing 1000mm. It will be stored as inches, but when you convert it to a string it will appear in the current model's units.

      posted in Developers' Forum
      tt_suT
      tt_su
    • RE: [Plugin] Export 2d with Alpha

      It works in SU2013. Did you install the RB file from this thread, or the RBZ from the PluginStore?

      posted in Plugins
      tt_suT
      tt_su
    • RE: [Plugin] TT_Lib²

      Thanks for the feedback. I think I have a fix - but I don't have an XP machine to test on.

      I've uploaded a new version on BitBucket: https://bitbucket.org/thomthom/tt-library-2/downloads

      Can you try that and let me know if it works. Then I can upload it to the Plugin Store and Extension Warehouse.

      posted in Plugins
      tt_suT
      tt_su
    • RE: Paste between instances and onLayerAdded issue

      That operation should be transparent...

      posted in Developers' Forum
      tt_suT
      tt_su
    • RE: [Plugin] TT_Lib²

      Hmm... must be some differences in the environment variable between Win8/7/Vista and XP.

      Can you open the Ruby Console and give me the result of ENV.each { |k,v| puts "#{k} = #{v}" } ? Then I can make a patch for this.

      posted in Plugins
      tt_suT
      tt_su
    • RE: [Plugin] Solid Inspector

      @g64 said:

      However to install the actual rb plugin,

      Install it as an RBZ package from the Plugin Store: http://sketchucation.com/resources/pluginstore?pln=tt_solid_inspector

      (I haven't had time to update all my threads to point to the Plugin Store yet.)

      posted in Plugins
      tt_suT
      tt_su
    • RE: Base Camp 2014.

      @utiler said:

      Chris/Thom, we'll leave it up to you guys.

      I'll coordinate Chris' work from Norway. 👍

      posted in Corner Bar
      tt_suT
      tt_su
    • RE: Base Camp 2014.

      Hat tip

      posted in Corner Bar
      tt_suT
      tt_su
    • RE: Base Camp 2014.

      Where are we going to keep warm now?

      posted in Corner Bar
      tt_suT
      tt_su
    • RE: [Plugin] 3D Text Editor

      Hm... I've not had time to look at this yet, but TIG's comment about the font list not being populated could be a clue. Maybe IE11 had removed the MS hack I used to get the font list...

      The %20 instead of a space is just IE transforming the path string into a URL string. Nothing wrong there.

      posted in Plugins
      tt_suT
      tt_su
    • RE: Adding methods.

      @mptak said:

      In general Ruby (or Python as well) it seems that you use subclasses but this seems problematic.

      Yes, though then it's normally in a server environment where you have more control over the environment where your code is run. In SketchUp the user controls the environment and the developer is the guest - flipping the roles.

      posted in Developers' Forum
      tt_suT
      tt_su
    • RE: Adding methods.

      @mptak said:

      I presume that by adding methods to the Sketchup::ComponentInstance class I am breaking
      all the rules

      Any plugin that modified the core Ruby and SketchUp classes and modules will not be accepted to the Extension Warehouse. This is because of the risk of clashing with other plugins if they implemented the same modifications. Or even our method if we decided we wanted methods with the same name. (And it's hard to debug when there's like 100 plugins installed on a user's machine.)

      Since the SketchUp Ruby API is a shared environment ensure you encapsulate all your code into your own namespace (module). That way you ensure you don't conflict with other extensions.

      If you plan to submit to Extension Warehouse I'd recommend that you read up on the guidelines before you start your project so you can save yourself some refactoring. The guidelines are there to ensure no conflict and encourage good practices so they are good to read in any case.
      http://extensions.sketchup.com/developer

      General guidelines I wrote up a while back:
      http://www.thomthom.net/thoughts/2012/01/golden-rules-of-sketchup-plugin-development/

      posted in Developers' Forum
      tt_suT
      tt_su
    • RE: [Plugin] 3D Text Editor

      What version of TT_Lib2 do you have installed?

      posted in Plugins
      tt_suT
      tt_su
    • RE: [Tutorial] SketchUp Ruby C Extension

      We are setting up a C++ Hello World example for Visual Studio and Xcode. That will give you better environments to work and debug in.

      posted in Developers' Forum
      tt_suT
      tt_su
    • RE: [C++SDK] ISkpRenderer

      Yes, currently the SLAPI cannot access the live model. That's why the old C++ can still be used in the current version of SketchUp.

      Once SLAPI do support this the old C++SDK will be completely removed from the product.

      posted in Developers' Forum
      tt_suT
      tt_su
    • RE: Getting an active page

      @jiminy-billy-bob said:

      model.active_layer
      model.materials.current
      model.pages.selected_page

      Don't forget model.styles.selected_style 😒

      posted in Developers' Forum
      tt_suT
      tt_su
    • RE: [Plugin] SketchUcation Tools

      How are you getting the temp path? When I tested with unicode characters in the username and used ENV['TEMP'] it returned a DOS 8.3 ASCII format path which Ruby 1.8 was able to read.

      posted in Plugins
      tt_suT
      tt_su
    • RE: Getting an active page

      Don't you just love the consistency of the API? 👊

      posted in Developers' Forum
      tt_suT
      tt_su
    • RE: [Plugin] LoopLab v1.0.0

      @renderiza said:

      @3dsmax9 said:

      loop selection is great, is it possible to do a ring selection ?

      ThomThom's Quadface tools has a ring selection feature and more.
      :

      Have a look at how I defined a"quad" in QuadFace Tools. Both Fredo and TIG use that in some of their plugins which give a nice interobility.
      https://bitbucket.org/thomthom/quadface-tools/wiki/Overview#!quadface-definition

      Just a brief history of why I picket the set of properties I did for the diagonal edges:

      1. Hidden property doesn't smooth the shading of the quad. Each triangle would be shaded flatly.
      2. Soft+Smooth give nice shading, but if you want to make the whole mesh also appear soft+smooth then the quads will break.
      3. Soft+Smooth + CastShadow=false gave the best result for me. Once could create a mesh with quads where the border edges of the quads could also be soft+smooth.

      I didn't use an attribute because they are slow - performance was important here when traversing thousands of entities. And I liked that you could create the quad manually via the UI if you wanted to. The one thing that is still an issue is that if you use the Soften Edges tool in SU it might unsoft some diagonals.

      @renderiza said:

      @thomthom said:

      Have you used GitHub and git before?

      Github | Bitbucket
      I now love Repositories like Github & Bitbucket they are really useful and make my life easier so thank you for mentioning them. 👍

      Excellent! If you aren't using it already I'd recommend SourceTree as a really nice and good GUI that can handle both Git and HG as well as managing your repositories hosted at GitHub and BitBucket.

      I'm in the progress of writing a new set of core classes that will return quad faces from a set of SketchUp entities. I'll make this as generic and small as possible (and fast) so ti can be easily implemented in extensions that want to support quads. I'd love to see more quad-based tools.
      QuadFace Tools grew to a decent size, but there is's just the basics. There is much more that would be great to have.

      posted in Plugins
      tt_suT
      tt_su
    • 1 / 1