sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Turtle Graphics for Sketchup

    Scheduled Pinned Locked Moved Extensions & Applications Discussions
    rubydata inputturtle graphics
    2 Posts 2 Posters 51 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.
    • A Offline
      August
      last edited by

      Many times over my years of intermittent Sketchup use, I have wanted to be able to input a list of directions and distances and have SU simply follow that to create a line drawing.

      Recently I realized that this isi the basic concept of one of the very first computer drawing programs, Turtle Graphics. Implementations of Turtle Graphics have been done in numerous languages, from SmallTalk to Python. There's even a downloadable Python Module.

      Turtle Graphics also seems a natural for Sketchup, but in poring over Sketchucation, the Sketchup Form, the web, etc, I can't find anything.

      The concept is simple, you provide a list of directions and distances and the system follows directions.

      N 1"
      W 1"
      S 1"
      E 1"

      or

      0, 1
      90, 1
      180, 1
      270, 1

      will draw a 1" or 1 unit square.

      Previous uses that I would have like to use it in have been measuring a room interior that is more complicated that a simple rectangle and pacing off the layout of pathways in a large garden site.

      If I were to try myself at getting a Ruby Script to input the data and draw the line, it could take me weeks to get up to speed on all the different Ruby functions I would need. I can read some Ruby, but generating it slower than one hour per line.

      Has anyone done this already? Is there someone for whom Ruby is a native language who could just whip our a demonstration version (sans bell and whistles of different data input formats, etc.) that I might augment?

      Thanks.

      P.S. Nice to be back on Sketchucation. It's been a while.

      “An idea, like a ghost, must be spoken to a little before it will explain itself.”
      [floatr:v1mcbde2]-- Charles Dickens[/floatr:v1mcbde2]

      Rich O BrienR 1 Reply Last reply Reply Quote 0
      • Rich O BrienR Offline
        Rich O Brien Moderator @August
        last edited by

        @August said in Turtle Graphics for Sketchup:

        Turtle Graphics

        You would need to piggy back on the API to have implicit commands similar to Turtle-type behaviour.

        In SketchUp you can use [#,#,#] to infer the [x,y,z] location in 3D space to place an object or point. But in all instances it requires user input to pick the tool and/or the first point.

        I know of nothing that allow you to draw in the manner you need.

        You could try @alexschreyer OpenAI extension: https://sketchucation.com/plugin/2643-as_openaiexplorer

        Or @samuel_t Parametric Modelling extension: https://sketchucation.com/plugin/2387-parametric_modeling

        Both have that type of capability of command based drawing. I like the latter for parametric block out.

        You could use the Ruby Console to draw in the same way as you could use a chainsaw to trim your fingernails.

        Try asking Claude.ai for ideas to get you a primitive example you could build on.

        Download the free D'oh Book for SketchUp 📖

        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