sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Ruby script help

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 3 Posters 547 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.
    • G Offline
      globaltrainer
      last edited by

      I have been designing some structures that I have decided to create a ruby script to produce. While I have no problems using Sketchup, Im still learing Ruby and am not sure what would be the best strategy.

      I look forward to any input, help and guidance anyone may offer to write this script to be used by myself and my collegues.

      Please see

      Error 404 (Not Found)!!1

      favicon

      (sketchup.google.com)

      I need to use width, hieght, eave and crown radii as well as length to create this form.

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

        Hello and welcome the the forums.

        Have you had any luck with automating the construction of your structures?

        When drawing in SketchUp with Ruby, you are adding Entity object to an Entities collection. You may be interested in the add_face, add_edge and either add_arc or add_curve methods.

        Start with a basic script with the minimal functionality you need.

        
        entities = Sketchup.active_mode.active_entities
        pts = [] # an Array of points
        pts[0] = [0, 0, 0]
        pts[1] = [0, 1, 0]
        pts[2] = [1, 1, 0]
        pts[3] = [1, 0, 0]
        entities.add_face( pts )
        
        

        Hi

        1 Reply Last reply Reply Quote 0
        • G Offline
          globaltrainer
          last edited by

          Im traveling in Africa and havent resumed the effort yet but I appreciate your input. I have been thinking what would be the best way to approach it that would work simply and on sketchups strenghts. It should also be uncomplicated as sme languages can get.

          1 Reply Last reply Reply Quote 0
          • MALAISEM Offline
            MALAISE
            last edited by

            Hello Jim

            I rode globaltrainer's post and agree him about SU Ruby's scripts

            Sorry for such a question : how do you use the script inside SU ?
            ( probably with Ruby window..but it allows just a command's line)

            Could you explain it in few words, for us Ruby's newbies ?
            Thanks a lot

            MALAISE 😄

            La Connaissance n'a de valeur que partagée

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

              MALAISE,

              I made a tutorial just for you. (Not really, it's for anyone.)

              Link Preview Image
              Tutorial: Getting Started With SketchUp Plugins

              I have made a short, inter-active tutorial demonstrating some basic techniques for writing SketchUp plugins in Ruby. It covers the workflow ...

              favicon

              (sketchuptips.blogspot.com)

              Hi

              1 Reply Last reply Reply Quote 0
              • MALAISEM Offline
                MALAISE
                last edited by

                Thanks a lot Jim

                I really appreciate 😄
                It's exactly what a number of us was waiting for. The tutorial leads you
                step by step in making-of. Now, I can go a step forward, having some ideas
                I wanted to test for a long while.

                Would you agree, I translate your tutorial in French ?

                MALAISE 👍

                La Connaissance n'a de valeur que partagée

                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