sketchucation logo sketchucation
    • Login
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Example of Compiled Extension with SWIG and CMake

    Scheduled Pinned Locked Moved Developers' Forum
    11 Posts 6 Posters 3.6k Views 6 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.
    • thomthomT Offline
      thomthom
      last edited by

      This sounds interesting.

      @unknownuser said:

      A great idea floated around at Basecamp was to wrap the C++ SDK for file access with Ruby, that way developers could write Ruby scripts to access skp files from within SketchUp or at the command line.

      That is very interesting!

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

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        CMAKE Wikipedia

        SWIG

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • M Offline
          macumber
          last edited by

          I started a project to wrap the SDK for Ruby at:

          Link Preview Image
          Google Code Archive - Long-term storage for Google Code Project Hosting.

          favicon

          (code.google.com)

          I am just getting started now and focusing only on Windows but hopefully this could be extended pretty quickly. Let me know if you are interested in helping/using.

          Dan

          1 Reply Last reply Reply Quote 0
          • Chris FullmerC Offline
            Chris Fullmer
            last edited by

            Hey Dan, it was great to meet you at Basecamp. I do think this is an interesting project. I'm of no use in helping out with project, but I am interested in using it πŸ˜„

            Chris

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

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

              I'm also interested in this project - though atm mostly of curiosity without any exact specific usage, yes.

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

              1 Reply Last reply Reply Quote 0
              • J Offline
                Jim
                last edited by

                @thomthom said:

                I'm also interested in this project - though atm mostly of curiosity without any exact specific usage, yes.

                I think you could, for example, write a .skp converter using ruby that worked on a .skp file instead of needing to run in SketchUp.

                Batch conversions, thumbnail extraction, add/remove/modify geometry, explode, etc.

                Hi

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

                  I imagine AdamB said at some point he'd managed to access setter methods for layers and materials via the SDK. Even get layer materials. Now that would be useful!

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

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    macumber
                    last edited by

                    After working with the SDK for a little while I don't think it can be wrapped as quickly as I first thought. I have to get back to work on my real tasks so the SDK wrap project will have to wait for a while. But I did make another example using SWIG with directors to show how to pass Ruby objects into C++ code. We are looking into this to implement Ruby observers for events that happen in our own C++ code.

                    Hope this helps,
                    Dan


                    Rename to .zip and extract

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      Jim
                      last edited by

                      (you can upload .zip files here)

                      Hi

                      1 Reply Last reply Reply Quote 0
                      • K Offline
                        KamoStomp
                        last edited by

                        Hi, has anyone tried this on Mac OSX (10.6)?

                        For SWIG I did the standard: ./configure, make, make install.
                        but when i try to CMake your examples above i get this:

                        swig error : Unrecognized option -initname
                        swig error : Unrecognized option Example

                        for -initname "Example" in CMakeList.txt

                        also if i remove that it doesn't get better.

                        I tried SWIG versions 2.0.0 and 1.3.40 with no luck,
                        and I have ruby 1.8.7 (so should be no problems here...).

                        Please help,
                        Thank you.

                        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