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

    Round front edge of

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 4 Posters 418 Views 4 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.
    • D Offline
      davesexcel
      last edited by

      ` prompts = ["length", "width","height"]
      defaults = [36.0,10.0,1.0]
      input = UI.inputbox prompts, defaults, "Tread."

      if input == false
      UI.messagebox("All Must Be Entered")
      else
      a,b,c=input
      UI.messagebox("Tread input accepted!, #{input}!")
      end

      ent = Sketchup.active_model.entities
      face = ent.add_face [0,0,0], [a,0,0], [a,b,0], [0,b,0]
      #face.reverse!
      face.pushpull c`

      I am using the above code, how can I round the front edge of my drawing. for example Height is 1, then I would like the front to be rounded with 1" diameter.

      thanks.

      1 Reply Last reply Reply Quote 0
      • K Offline
        ktkoh
        last edited by

        You will probly get better answers and but I would draw the end face wich would include the radius and push the length. I did this for my loose tenons. I used simple trig to calculate as many radius points needed. The built in radius would be more flexible but I never got the hang of it.

        Keith

        Ps. Send pm if interested in my code.

        1 Reply Last reply Reply Quote 0
        • sdmitchS Offline
          sdmitch
          last edited by

          @davesexcel said:

          ` prompts = ["length", "width","height"]
          defaults = [36.0,10.0,1.0]
          input = UI.inputbox prompts, defaults, "Tread."

          if input == false
          UI.messagebox("All Must Be Entered")
          else
          a,b,c=input
          UI.messagebox("Tread input accepted!, #{input}!")
          end

          ent = Sketchup.active_model.entities
          face = ent.add_face [0,0,0], [a,0,0], [a,b,0], [0,b,0]
          #face.reverse!
          face.pushpull c`

          I am using the above code, how can I round the front edge of my drawing. for example Height is 1, then I would like the front to be rounded with 1" diameter.

          thanks.

          One possibility

          prompts = ["length", "width","height"]
          defaults = [36.0,10.0,1.0]
          input = UI.inputbox prompts, defaults, "Tread."
          
          
          if input == false
          UI.messagebox("All Must Be Entered")
          else
          a,b,c=input
          UI.messagebox("Tread input accepted!, #{input}!")
          end
          
          ent = Sketchup.active_model.entities
          ent.add_line [0,b,0],[0,0,0]
          ent.add_arc [0,0,c/2.0],[0,0,-1],[-1,0,0],c/2.0,0,180.degrees,6
          ent.add_line [0,0,c],[0,b,c]
          edg=ent.add_line [0,b,c],[0,b,0]
          edg.find_faces; face=edg.faces[0]
          #face = ent.add_face [0,0,0], [a,0,0], [a,b,0], [0,b,0]
          #face.reverse!
          face.pushpull -a
          

          Nothing is worthless, it can always be used as a bad example.

          http://sdmitch.blogspot.com/

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

            You could use Fredo6 Round Over.

            I do this for curved stairs with radius corners.
            I use a polygon mesh and fill in all the surfaces.


            Tread after filling in


            Tread before filling in

            1 Reply Last reply Reply Quote 0
            • D Offline
              davesexcel
              last edited by

              Thanks a lot for the replies. The code actually draws it the way I would draw it manually.
              Thanks!

              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