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

    2D fillets and CNC

    Scheduled Pinned Locked Moved Developers' Forum
    46 Posts 7 Posters 15.4k Views 7 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.
    • thomthomT Offline
      thomthom
      last edited by

      Also - are we only talking about squares here?

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

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

        It's be possible to add a filletCNC to any angle of corner <180 degrees [>=180 it's pointless] - the trig just gets more complex to find the intersections.
        Here's my trig thoughts
        We know the vertex.
        We know the vectors of the two edges coming off it.
        We can find the bisecting angle of these and thereby the vector that the arc center lies on.
        We offset the vertex-point as a new point along the angle-bisector vector by the radius - that gives us the arc's center.
        We can get the angle between an edge's vector and the angle-bisector vector - the angle from the arc's center to the intersection of the arc and that edge in the same angle, so we can work out where the two edges' intersection points are.
        To erase the unwanted bits of the two edges break split them at the intersection points by drawing a temporary line between these two points, it should split off the bits to be deleted: erase the unwanted bits of edge which will have their start/ends at the vertex and intersection points, do this before adding the arc.
        We have enough info to make an arc - radius/segs, center, normal[?], swept-angle/start/end points etc.
        When the arc is added erase the temp-line to tidy up.

        TIG

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          Yea. I Sketched up how I could calculate this. Was thinking I could make it into a tool that produces a preview and let the user specify the radius in the VCB.


          CNC-milling.png

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

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

            @thomthom said:

            Yea. I Sketched up how I could calculate this. Was thinking I could make it into a tool that produces a preview and let the user specify the radius in the VCB.

            See my 2D Tools Arc etc for examples of this... you get dynamic VCB radius and segment preview etc
            Note how the angle between the arc center and vertex and the side intersection sis the same... not [yet] drawn on your example ?

            TIG

            1 Reply Last reply Reply Quote 0
            • fredo6F Offline
              fredo6
              last edited by

              @outland86 said:

              Hi thanks for all the replies
              you are on the right track
              the picture looks about right
              but you want to make it so you remove as little of the corner material as possible without
              losing the abilaty to fit the square peg in the round hole so to speak.

              t bone is similar but a t shape instead of the dogbone shape pictured.
              both have the same result.

              a router can cut square outside corners but not square inside corners so to allow all sorts of square parts to fit into other square holes and slots.

              does anyone know if a plugin could be written to carry out this operation on a 2D drawing using just a point and click routine and also being able to set the radius prior

              This could be written as an extension of Bezier Spline, whether for drawing or for converting existing curves.
              I assume the parameters are the radius and the number of segments. There is also the angle of the small opening.
              What a bout T Bones?

              Fredo

              1 Reply Last reply Reply Quote 0
              • O Offline
                outland86
                last edited by

                Hi and thanks

                once more for all the interest
                i am lost with all the math but i did draw apicture to illustrate
                it is here.

                this is what is needed
                to be able to create the fillets just by a single comand in sketchup where you point and click the corner point of the slot or square then choose the raduis for the arc. which would be the same as the raduis of the tool you would use to cut the material on the CNC router

                http://www.makecnc.com/bones.jpg

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  So you want to pick each corner individually? Not click on a face and have all corners filleted.

                  Thomas Thomassen — SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 Reply Last reply Reply Quote 0
                  • fredo6F Offline
                    fredo6
                    last edited by

                    @outland86 said:

                    Hi and thanks

                    once more for all the interest
                    i am lost with all the math but i did draw apicture to illustrate
                    it is here.

                    this is what is needed
                    to be able to create the fillets just by a single comand in sketchup where you point and click the corner point of the slot or square then choose the raduis for the arc. which would be the same as the raduis of the tool you would use to cut the material on the CNC router

                    http://www.makecnc.com/bones.jpg

                    That's easy for orthogonal segments. But how does it work when the angle is not 90°?

                    Fredo

                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      @unknownuser said:

                      That's easy for orthogonal segments. But how does it work when the angle is not 90°?

                      http://forums.sketchucation.com/download/file.php?id=39707

                      The drill bit would move on a vector in the middle between the two corners. With angles > 90° you will still get a curve, just smaller, but with angles < 90° you would get a half circle and edges that run tangentially back to the corner - simulating the drill bit moving up that direction.

                      Thomas Thomassen — SketchUp Monkey & Coding addict
                      List of my plugins and link to the CookieWare fund

                      1 Reply Last reply Reply Quote 0
                      • thomthomT Offline
                        thomthom
                        last edited by

                        Fredo - are you adding this to your Bezier Spline plugin?

                        One thing though, the behaviour would depend if the edges that make up the corner is an inner or outer loop. I'd think you'd need to have the base shape - as a face first. In order to determine this.

                        Thomas Thomassen — SketchUp Monkey & Coding addict
                        List of my plugins and link to the CookieWare fund

                        1 Reply Last reply Reply Quote 0
                        • fredo6F Offline
                          fredo6
                          last edited by

                          @thomthom said:

                          Fredo - are you adding this to your Bezier Spline plugin?

                          One thing though, the behaviour would depend if the edges that make up the corner is an inner or outer loop. I'd think you'd need to have the base shape - as a face first. In order to determine this.

                          Tom,

                          You are right. My initial idea was to integrate it as an extension of BezierSpline, which is the quick path.
                          However, the T-Bone is not symetrical and the question of inner vs outer is very relevant.

                          So maybe it's not a good idea.

                          Fredo

                          1 Reply Last reply Reply Quote 0
                          • thomthomT Offline
                            thomthom
                            last edited by

                            I was looking briefly at it yesterday. My initial idea was letting the user pick Face Loops - like my Select Edge Loop tool in Selection Toys. you can click on an edge and it's use that loop, or pick a face where it'd take all loops.

                            Only thing which had me puzzled was - how to determine the offset of a point to go into the face?

                            Also - it's now the question to if outland86 want to pick each corner one by one.

                            Dog-bones are easy to determine, but with T-bones, you have two possible outcomes. What should determine this? the user pick each point and indicate direction. Or user pick loops and indicate which direction the tool would take around the loop and keep all T-Bone fillets going in the same direction.

                            Thomas Thomassen — SketchUp Monkey & Coding addict
                            List of my plugins and link to the CookieWare fund

                            1 Reply Last reply Reply Quote 0
                            • Dave RD Offline
                              Dave R
                              last edited by

                              Considering the application in outland86's original request, these cuts would only be used on the outside of a corner. Think of the rectangular tab that needs to be inserted in the hole. That's the reason for the relief cuts in the first place. I think if you selected the inner face of the rectangle, ran the tool, entered the diameter of the cutter and hit Enter. It would be enough. Perhaps there would be two menu entries. One for Dogbone and one for T-Bone In the case of the T-bone, I think you'd either settle on a convention or extending the short side of the rectangle or you'd have to choose the correct side.

                              Etaoin Shrdlu

                              %

                              (THERE'S NO PLACE LIKE)

                              G28 X0.0 Y0.0 Z0.0

                              M30

                              %

                              1 Reply Last reply Reply Quote 0
                              • thomthomT Offline
                                thomthom
                                last edited by

                                I was thinking of that - but surely, there must be a way to calculate this without going through the overhead of testing points.

                                My idea - which I haven't tested, was using the angle of the corner (returned by .angle_between, using the normal of each edge segment) and determine if it needs to be rotated left or right depending on the direction of the edges on the face. As I understand, edges normally run counter-clockwise around a face, unless they are reversed. Which I'd then think could be used to determine if you should rotate left/right.

                                Thomas Thomassen — SketchUp Monkey & Coding addict
                                List of my plugins and link to the CookieWare fund

                                1 Reply Last reply Reply Quote 0
                                • thomthomT Offline
                                  thomthom
                                  last edited by

                                  @dave r said:

                                  I think if you selected the inner face of the rectangle, ran the tool, entered the diameter of the cutter and hit Enter. It would be enough. Perhaps there would be two menu entries. One for Dogbone and one for T-Bone In the case of the T-bone, I think you'd either settle on a convention or extending the short side of the rectangle or you'd have to choose the correct side.

                                  "Outside" would depend if your on the outer loop of a face, or on a inner loop (a hole).

                                  @dave r said:

                                  Considering the application in outland86's original request, these cuts would only be used on the outside of a corner.

                                  But what if the shape isn't a simple rectangle? That was just the example given.

                                  Thomas Thomassen — SketchUp Monkey & Coding addict
                                  List of my plugins and link to the CookieWare fund

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

                                    @thomthom said:

                                    I was looking briefly at it yesterday. My initial idea was letting the user pick Face Loops - like my Select Edge Loop tool in Selection Toys. you can click on an edge and it's use that loop, or pick a face where it'd take all loops.

                                    Only thing which had me puzzled was - how to determine the offset of a point to go into the face?

                                    Also - it's now the question to if outland86 want to pick each corner one by one.

                                    Dog-bones are easy to determine, but with T-bones, you have two possible outcomes. What should determine this? the user pick each point and indicate direction. Or user pick loops and indicate which direction the tool would take around the loop and keep all T-Bone fillets going in the same direction.

                                    RickW wrote an extra offset.rb method that's very useful.
                                    To see which side of an edge a face is yo can offset the vertex_point a tiny amount by a +small_degree vector [use face.normal for rotation] and use a face.classify_point test to see if the point is on the face, if it's not the the face is on the other side of the edge...

                                    TIG

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

                                      If you are picking each point then only corners <180 degrees need the extra arc-hole, so place it on the smaller angle formed by the edges?

                                      TIG

                                      1 Reply Last reply Reply Quote 0
                                      • thomthomT Offline
                                        thomthom
                                        last edited by

                                        .angle_between doesn't give a result in a 360 direction. Only 180. If you get a result of 15 degrees - it could be in either left or right direction. That's why it's a little bit more complicated. 😕

                                        Thomas Thomassen — SketchUp Monkey & Coding addict
                                        List of my plugins and link to the CookieWare fund

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

                                          @thomthom said:

                                          .angle_between doesn't give a result in a 360 direction. Only 180. If you get a result of 15 degrees - it could be in either left or right direction. That's why it's a little bit more complicated. 😕

                                          Get a 'cross' of the normal and edge vectors and if it's '-ve' you can make 180 adjustment?

                                          TIG

                                          1 Reply Last reply Reply Quote 0
                                          • thomthomT Offline
                                            thomthom
                                            last edited by

                                            Cross of the face's normal and the edge normal? If it's '-ve' - what does that mean?

                                            Thomas Thomassen — SketchUp Monkey & Coding addict
                                            List of my plugins and link to the CookieWare fund

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement