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

    Alternate API, Pioneers Wanted

    scheduled pinned locked moved Developers' Forum
    28 Posts 6 Posters 2.0k Views 6 Watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • M Offline
      MartinRinehart
      last edited by

      I edited the original post to state that Chapter 16 was available.

      I've also finished the design of the multi-instance animator. Simple and light. Will get to it as soon as I finish YARC (yet another Ruby console).

      Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

      one-reply-to-this-post last-reply-time reply quote 0
      • D Offline
        driven
        last edited by

        Hi Martin and Chris,

        I, for one, follow both your Machiavellian activities keenly, and hope my interest, input and comments are of some assistance in your endeavors.

        I attempt to keep up, but do get lost from time to time and probably make some extremely naive and/or plain stupid comments, to which you have both, independently, responded graciously.

        I thought I should write to publicly support your work and hopefully to enthuse others to speak-up, question, inform, etc, even if they don't have clue if it will help you to achieve your goals.

        in particular, I'm calling other Mac users watching to participate now instead of waiting, only to complain at the end if your 'products' where to evolve into PC only entities.

        Anyhow, well done both and keep up the good work

        john

        learn from the mistakes of others, you may not live long enough to make them all yourself...

        one-reply-to-this-post last-reply-time reply quote 0
        • chrisglasierC Offline
          chrisglasier
          last edited by

          Thanks for your support, driven; I really look forward to Mac compatibility.

          So now I have mechanisms for setting and retrieving the properties of movers and boxes to be moved, the next task is to start building routes.

          Edit: Last section deleted as revised by following post

          With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

          one-reply-to-this-post last-reply-time reply quote 0
          • chrisglasierC Offline
            chrisglasier
            last edited by

            anim001.png

            Load = boxes to be moved,

            Name adds a new stage to the route.

            None for positioning movers or run empty legs.

            First - box to be moved

            Number - number to be moved, or

            Last - to be moved

            anim002.png

            Each name is a computer object that is able to store information about itself.

            The location of all the boxes and movers are recorded at the beginning of a session.

            The process for each stage is to:

            Name it

            Select an object in SU display; move or rotate as necessary

            Select menu item to save the key and index

            anim003.png

            Mover = Selection

            Name adds a new stage to the route.

            Destination adds the final position and rotation (transformation) of the mover for this step.

            Putting paths, turns and pauses aside for the moment, I think there is enough information in the model transformations and the key/index pairs to animate moves from one 3d point directly to another.

            I not quite sure how picking will work but perhaps raytesting would be a good basis. I need to look into that.

            With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

            one-reply-to-this-post last-reply-time reply quote 0
            • chrisglasierC Offline
              chrisglasier
              last edited by

              Yes raytest seems to be the way forward. The idea of boxes moving seemingly out of control should be appealing to Kellyites. Can anyone offer some snippets or further ideas about this?

              With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

              one-reply-to-this-post last-reply-time reply quote 0
              • chrisglasierC Offline
                chrisglasier
                last edited by

                @martinrinehart said:

                I've also finished the design of the multi-instance animator. Simple and light. Will get to it as soon as I finish YARC (yet another Ruby console).

                Any chance for SCF to have a look at the "Simple and light multi-instance animator".

                With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                one-reply-to-this-post last-reply-time reply quote 0
                • J Offline
                  jessejames
                  last edited by

                  @martinrinehart said:

                  I've created an alternate API for moving, rotating and scaling. Design goal: eliminate the transformation matrix; let the developer move, rotate and scale directly.

                  Martin,
                  i like this Alternate API approach. This is exactly what i proposed some 2 years ago but at the time i was just beginning the long and weary obstacle course of learning the Ruby language. Well now i have quite a good grasp on the language (about time right!) although strangely i have picked up other languages very quickly.

                  Anyhoo, i wanted to offer a suggestion for extending this API to correct some asinine inefficiencies in the BoundingBox class. Of course like you mentioned in the Movable and Transformable, these methods should belong to some derived class. But alas we can't hold our collective breaths forever lest we suffocate and die waiting for change.

                  I find the need to grab a group/comp by it's "bbox.center", "bbox.center_bottom", and "bbox.center_top" so important that i wrote a nice function to encapsulate all the calls required to retrieve these points. So maybe you would like to add this, maybe not. Let me know. It would be so nice to call obj.bounds.center('center'), obj.bounds.center('top'), or obj.bounds.center('bottom'), but that will have to wait.

                  @martin said:

                  I'm creating SketchUp learning materials. If you want to compete with me, please write your own code. Otherwise you can use this as if it were public domain.

                  And thanks for being an honest scripter who is willing to share knowledge with others free of attached binding licensing. We need many more folks who think as you do because such practices fosters innovation. Sure we could lock up some code and make a few quick buck, but then we would have sold our souls in the process. We have many honest scripters, but we always need more.

                  Thanks again Martin! 😍

                  Always sleep with a loaded gun under your pillow!

                  one-reply-to-this-post last-reply-time reply quote 0
                  • J Offline
                    jessejames
                    last edited by

                    @dan rathbun said:

                    There is a plugin for this (that needs some language cleanup,) written by Sahi.
                    It's called AxizComp.rb

                    Thanks for the heads up Dan! Although i won't look at since my function works just fine. I try to never look at other scripts and learn my way around a problem using only the docs and my Ruby Console (God i wish we had a multi line console!!!). Copy and paste is detrimental to your future evolution as a programmer. Only in the most extreme circumstances when i feel i have exhausted every possibility of self reliance then and only then would i take a "peek" at some OS script to get an idea of how to do it.

                    Always sleep with a loaded gun under your pillow!

                    one-reply-to-this-post last-reply-time reply quote 0
                    • chrisglasierC Offline
                      chrisglasier
                      last edited by

                      Link Preview Image
                      SketchUp Ruby Code Editor β€’ [as]

                      This code editor extension offers an easy-to-use and visually appealing way to write and modify Ruby scripts directly within SketchUp. These scripts can then be used to create geometry, add functionality or add data within the SketchUp 3D modeling environment. The SketchUp Ruby API provides an extensive set of functions to automatize SketchUp in many ways or create scripted, computational geometry.

                      favicon

                      [as] (www.alexschreyer.net)

                      With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                      one-reply-to-this-post last-reply-time reply quote 0
                      • Dan RathbunD Offline
                        Dan Rathbun
                        last edited by

                        @jessejames said:

                        I find the need to grab a group/comp by it's "bbox.center", "bbox.center_bottom", and "bbox.center_top" so important that i wrote a nice function to encapsulate all the calls required to retrieve these points. So maybe you would like to add this, maybe not. Let me know. It would be so nice to call obj.bounds.center('center'), obj.bounds.center('top'), or obj.bounds.center('bottom'), but that will have to wait.

                        There is a plugin for this (that needs some language cleanup,) written by Sahi.
                        It's called AxizComp.rb (Axis Components), see this thread (ther's some code snippets for other languages later in the thread.)
                        http://forums.sketchucation.com/viewtopic.php?f=323&t=21635&hilit=axis#p181881


                        EDIT: With the release of SketchUp 2020, grips on object bounding boxes are now native !
                        https://help.sketchup.com/en/current-release-notes

                        I'm not here much anymore.

                        one-reply-to-this-post last-reply-time reply quote 0
                        • 1
                        • 2
                        • 2 / 2
                        • first-post
                          last-post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement