sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ”Œ Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download

    AI generated subdivison plugin

    Scheduled Pinned Locked Moved Extensions & Applications Discussions
    3 Posts 3 Posters 43 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.
    • S Offline
      sashapepperspray
      last edited by sashapepperspray

      In the past view weeks, I worked with ai to make a subdivision and mesh reduction plugin. I started off with this old plugin (https://github.com/NB70/sketchup-loop-subdivision), and got the ai to improve it, and then I got it to make a dynamic subdivision plugin, and a mesh reduction plugin. I don't really know ruby coding, so I can't say it will work, but it works for me. I will attach it here, hopefully someone finds it useful. I also am attaching a manual, generated by ai (obviously) from the code.
      mesh tool manual.pdf
      Mesh Tools.rbz

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

        Impressive result.

        Tons of Ruby Console errors

        #<TypeError: reference to deleted Face>
        C:/Users/rclub/AppData/Roaming/SketchUp/SketchUp 2026/SketchUp/Plugins/mesh_tools/Dynamic_Subdivide.rb:190:in `edges'
        C:/Users/rclub/AppData/Roaming/SketchUp/SketchUp 2026/SketchUp/Plugins/mesh_tools/Dynamic_Subdivide.rb:190:in `block in dyn_loop_getvertices'
        C:/Users/rclub/AppData/Roaming/SketchUp/SketchUp 2026/SketchUp/Plugins/mesh_tools/Dynamic_Subdivide.rb:188:in `each'
        C:/Users/rclub/AppData/Roaming/SketchUp/SketchUp 2026/SketchUp/Plugins/mesh_tools/Dynamic_Subdivide.rb:188:in `dyn_loop_getvertices'
        C:/Users/rclub/AppData/Roaming/SketchUp/SketchUp 2026/SketchUp/Plugins/mesh_tools/Dynamic_Subdivide.rb:345:in `block in dyn_loop_subdivide'
        C:/Users/rclub/AppData/Roaming/SketchUp/SketchUp 2026/SketchUp/Plugins/mesh_tools/Dynamic_Subdivide.rb:343:in `times'
        C:/Users/rclub/AppData/Roaming/SketchUp/SketchUp 2026/SketchUp/Plugins/mesh_tools/Dynamic_Subdivide.rb:343:in `dyn_loop_subdivide'
        C:/Users/rclub/AppData/Roaming/SketchUp/SketchUp 2026/SketchUp/Plugins/mesh_tools/Dynamic_Subdivide.rb:555:in `loop_dynamic_build_result'
        C:/Users/rclub/AppData/Roaming/SketchUp/SketchUp 2026/SketchUp/Plugins/mesh_tools/Dynamic_Subdivide.rb:581:in `block in loop_dynamic_schedule_rebuild'
        

        Download the free D'oh Book for SketchUp πŸ“–

        1 Reply Last reply Reply Quote 0
        • TIGT Online
          TIG Moderator
          last edited by TIG

          Works well.

          But I have a few observations from a non-AI view-point...

          The Dynamic_Subdivide.rb file uses several $xxx... global variables - these are frowned upon because they can pollute all other Ruby files [and are not acceptable in extensions submitted for review in the EWH. It's a simple fix - replace them all with @xxx... variables that then work across methods in the same modules, not 'globally'.

          That Dynamic_Subdivide.rb file also has potential trip-hazards as Rich pointed out -
          e.g. in line#190 it's possible for it to reference an edge of a face that is no longer valid, as specified in an earlier line, so it falls over.
          Again a simple fix is the add a skip trap near the start of the block - e.g.
          faces.each do |face| next unless face.valid? ... end
          which skips the invalid face and so the error is sidestepped.
          You can do a find in the code to add in similar traps like this for any non-valid face, edge, vertex etc.
          Note that the various blocks have an inconsistent format swapping between
          xxx.each { |e| xxx... }
          to
          xxx.each do |e| xxx... end
          But editing them is possible with a little care.

          TIG

          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