• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

Call C++ from ruby in Sketchup

Scheduled Pinned Locked Moved Developers' Forum
3 Posts 3 Posters 816 Views
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 7 Nov 2015, 23:39

    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
    • T Offline
      thomthom
      last edited by 15 Dec 2015, 16:27

      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 26 Jan 2016, 13:31

        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