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

    Call C++ from ruby in Sketchup

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 3 Posters 816 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W Offline
      wawmsey7
      last edited by

      I'm trying to enable panel optimisation in my plugin and the code to do this properly is exceedingly complex so I've been trying to track down some code that already exists for this... I run a mac and most libraries to run this function work with dll which is no good, but I have managed to track down one that should work with c++ ...

      Link Preview Image
      Cut 2D X - wood, glass, metal, sheet, paper, cutting and nesting library

      Automation component (library) for rectangular (2D) nesting and cutting optimization of glass, wood, metal, paper, sheets. Can be used with Delphi, Visual Basic, C#, Java, Excel, VC++ etc.

      favicon

      (optimalprograms.com)

      So my question is... If this does work (i've sent an email to the company to enquire), can I run / access the c++ file / function from within ruby and obtain the results in ruby...?

      would really appreciate it if anyone has any ideas on this or in general the whole panel optimisation / 2d bin backing / 2d stock cutting problem thing???

      Thanks

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        You can write a Ruby C Extension - that will et you use C/C++ libraries.

        Here's a GitHub repo with example Visual Studio and Xcode examples:
        https://github.com/SketchUp/ruby-c-extension-examples

        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • A Offline
          archidave
          last edited by

          I notice this was last updated for SU 2015, last commit Nov 7 2014 - does it still work with SU 2016?

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement