sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Model.raytest broken in SU8!

    Scheduled Pinned Locked Moved Developers' Forum
    58 Posts 9 Posters 5.1k Views 9 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.
    • A Offline
      Anton_S
      last edited by

      TIG, before I go on complain, do you agree with the current raytest task below?
      If not ,then simply state how it works, if you know

      Current Raytest Tasks

      • Search throught all the entities
      • Change its point and vector relative to group's/component's transformation each time it enters the group/component (each group has its own coordinate system)
      • Check's whether it intersects the face, or the edge
      • convert intersection position to current transformation of the origin
      • return the closest point and the object, with its container path
      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        Anton, the C++ SDK is for reading and writing SKP files. Not for communicating with an open SketchUp instance like the Ruby API.

        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
          Anton_S
          last edited by

          @thomthom said:

          Anton, the C++ SDK is for reading and writing SKP files. Not for communicating with an open SketchUp instance like the Ruby API.

          O ๐Ÿ˜ฎ ๐Ÿ˜• ๐Ÿ˜ฒ , okay then ๐Ÿ˜’ , I guess. ๐Ÿคข

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

            You can always create Ruby C Extensions - but you'd have to use the Ruby API interface to communicate with SketchUp.

            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
              Anton_S
              last edited by

              @thomthom said:

              You can always create Ruby C Extensions - but you'd have to use the Ruby API interface to communicate with SketchUp.

              something new, any examples???

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

                @anton_s said:

                @thomthom said:

                You can always create Ruby C Extensions - but you'd have to use the Ruby API interface to communicate with SketchUp.

                something new, any examples???

                Monitor***** these TWO topics:
                [Info] C/C++ Ruby extensions & SketchUp plugins

                [Tutorial] SketchUp Ruby C Extension

                • When in a topic thread (that you wish to Bookmark or Subscribe to ... scroll to the bottom of the topic page, and use the "Subscribe topic" or "Bookmark topic" links on the bottom toolbar.
                  You can manage your topic Subscriptions to certain topics via the Forum: "User Control Panel" > "Overview" > "Manage subscriptions" (and Bookmarks via: "User Control Panel" > "Overview" > "Manage bookmarks".)

                I'm not here much anymore.

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

                  ... many thanks, just what I wanted

                  Bookmarking these links is also what I prefer to do, otherwise I don't know.

                  For replies, suggestions and pointing out very, very important stuff, I would sugggest a,

                  Thanks, just Thanks!!! ๐Ÿ˜„ ๐Ÿ˜„ ๐Ÿ˜„

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

                    But I still don't think you'll get much joy in Ruby C Extensions to create your own raytracer. Simply because you can't get around the fact you need to obtain geometry data from SketchUp that would have to go via the Ruby API - and that process alone would probably be too slow for making any custom raytracer faster than SU's native.

                    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
                      Anton_S
                      last edited by

                      @thomthom said:

                      But I still don't think you'll get much joy in Ruby C Extensions to create your own raytracer. Simply because you can't get around the fact you need to obtain geometry data from SketchUp that would have to go via the Ruby API - and that process alone would probably be too slow for making any custom raytracer faster than SU's native.

                      Thanks, I also got that... I'll just use the native raytest, SU gives a lot of power to its processing.

                      Learning C++ by interacting with interesting Sketchup is a much better, than learning it with simple "hello world" tutorials. ๐Ÿ˜‰

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

                        @anton_s said:

                        Learning C++ by interacting with interesting Sketchup is a much better, than learning it with simple "hello world" tutorials. ๐Ÿ˜‰

                        Aye! I'm just nowt getting to grips with C. Looked at it before, but never got into it. Working with concrete tasks for my Ruby C Extensions gave me the push I needed to battle these scary pointers and memory management. ๐Ÿ˜„ Latest Ruby method I ported to C, gave me a 300 times performance increase. ๐Ÿ˜„ ๐Ÿ˜„

                        Though, not all things are suited. If you need to keep on referring back to SketchUp and the Ruby API interface you quickly loose performance. In my case I was doing lots of calculations on 3D points - which I then first cached into C structs before starting the number-crunching.

                        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
                          Anton_S
                          last edited by

                          @thomthom said:

                          Aye! I'm just nowt getting to grips with C. Looked at it before, but never got into it.

                          Well, of course Thom, same thing here. A bit ago started learning it here, but ran out of batteries at chapter 4.

                          It's not because I'm lazy, its all that there is a language that is much easier, simpler, similar power, really reliable, plus FUN!!! ๐Ÿ˜„ It's Ruby, a Gem ...The programers' task is to develop a better way of interacting with things. Since, Ruby was developed, an easier way of programing, we decided to move to easier step. Moving back to C++, is like experiencing Microsoft Word 2010, and then getting back to 2002 version.

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

                            @anton_s said:

                            A bit ago started learning it here ( learncpp.com ), ....

                            Here nice tutorial there !! I had to bookmark that site.

                            I read a few chapters.. and then jumped around looking up things I always wanted to know. I may actually try C++ sooner rather than later. ๐Ÿ˜

                            I'm not here much anymore.

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

                              hmm - would be nice with a C++ Hello world of a Ruby Extension.

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

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

                              Advertisement