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

      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
                      • TIGT Offline
                        TIG Moderator
                        last edited by

                        Sorry- I was too quickly typing that up - I had to go somewhere urgently... 😳
                        If you take the vectors of the two edges 'outwards' from the vertex.position you can then get the angle_between them.
                        The angle will always be returned as <=180 degrees - even if it's really >.
                        If you use edge_vector.cross(face.normal) you get +/-ve values in the result.
                        You can then 'cross' these together.
                        Getting the cross value returns different results depending on whether the angle is <180 or not - I think it will be 0,0,0 if it's <=180degrees ?
                        By noting the appropriate value of the z (?) you can add 180 to the angle if it's found to be needed when z != 0 [-ve?]...
                        You'll need to check the way these values change - unfortunately I haven't go access to my 'code-snippets' right now...
                        Sorry for the bad explanation - but it is possible to test for angles >180 this way - I have done it... 😕

                        TIG

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

                          Hello again and thanks for all the input
                          to better illustrate what the needs are for this plugin i have drawn a picture of the typical use of these fillets in a bit of sheet material say 3/8 inch MDF
                          while T bones would be good they are not critical .
                          however the dogbone type fillets are as you can see. t bones are just another way to get the same result.
                          when i drew this i noticed that the weld and trim comands were different for the inside square and the outside trims just thought i would note that..as the mathe must be different for both?
                          the options shown in the picture would be typical of the actual uses. i have uses a larger arc for this drawing but in real life the arc would be usually say 1/4 inch if cutting 3/8 thickness sheet material say plywood or MDF. i hope this better shows what i am trying to achieve..some of the projetcs i have in mind have hundreds of parts so doing it all by hand with circles etc would be a nightmare hence the need for a plugin to help automate this process. if you imagine when drawing if a guy or gal enter a radius then could point to the coner intersection of a square or inside corner then click and it would be selected then click again and presto a fillet appears one would be in CNC heaven 😄

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

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

                            That works for edges on any plane in 3D space?

                            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

                              outland86: do you need control over each corner? or would it be ok to just click a face and have the script process all the corners?

                              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:

                                That works for edges on any plane in 3D space?

                                I used face.normal since these edges will have faces, BUT you could also use a plane defined by the picked vertex.position and the two edges' other_vertex.positions [plane=Geom.fit_plane_to_points(p1,p2,p3)] and then get the plane's normal=[plane[0],plane[1],plane[2]] ???
                                Unfortunately this is all from memory... 😒

                                TIG

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

                                  think I got it working... hmm.... but I don't have much more time today to test this.

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

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

                                    Hi all

                                    to answer your question you do not need control over the parameters other than setting the tool radius before you start

                                    so it would be the same every time

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

                                      hey it would be perfect to have both options to process all and also indervidual corners
                                      can this be done?

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

                                        @outland86 said:

                                        hey it would be perfect to have both options to process all and also indervidual corners
                                        can this be done?

                                        I included a DogBone extension in BezierSpline.
                                        This allows to create directly dogbone when drawing a polyline, or to convert an existing contour. You can further change the radius.

                                        So it is not a point and click, and more oriented to handle contours.

                                        It is advised to install first the new upgrade BezierSpline 1.3, because it now converts a sequence of edges without having to weld them as a curve beforehands.

                                        Here is a short video
                                        [flash=425,344:2aed5ook]http://www.youtube.com/v/GN6xmiYRi7E&hl=fr_FR&fs=1[/flash:2aed5ook]

                                        For BezierSpline 1.3, see http://forums.sketchucation.com/viewtopic.php?f=323&t=13563&p=100509#p100509

                                        Fredo

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

                                          thanks for your help so much
                                          i did notice that when you apply the dog bone or t bone to a set of poly lines it made them
                                          at every single intersection of polylines which is not what is needed only on the inside corners is it needed as that is where the cutting tool raduis is a problem for getting fits
                                          the cutting tool can make sharp outside corners no problem .
                                          if you take a look at the picture i uploaded you can see which places need dog or t bones in them and which do not
                                          is there way to make the script only apply the t or dog bones to inside corners of a drawing as shown in my picture
                                          i hope this makes sense?

                                          and thanks again for all your help

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

                                            @outland86 said:

                                            is there way to make the script only apply the t or dog bones to inside corners of a drawing as shown in my picture?

                                            Sorry, this is not really possible with the current design of BezierSpline.
                                            You can still select the two edges bordering a vertex and apply the script however.

                                            Fredo

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

                                            Advertisement