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

    Calculate a curve that fits between two edge?

    Scheduled Pinned Locked Moved Developers' Forum
    14 Posts 5 Posters 467 Views 5 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

      hmm... here the radius is the variable, and the offset from the corner is fixed. But I have a fixed radius with variable offset from the corner.

      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

        hmm.... wait... if I get the Line for both edges, offset them by the radius, their intersection should be the centre point, right?

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

        1 Reply Last reply Reply Quote 0
        • Chris FullmerC Offline
          Chris Fullmer
          last edited by

          A linear combination of the vectors of each line will return the vector on which your centerpoint will exist. Then you just have to figure out how far down that vector it will sit.....ok, that's all got I got. I'm useless.

          Chris

          Lately you've been tan, suspicious for the winter.
          All my Plugins I've written

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

            Thom, your last statement is correct. Lines parallel to the edges and offset by the radius of the curve will intersect at the arc center. What you do with that in a Ruby is way over my head, though.

            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

              @dave r said:

              What you do with that in a Ruby is way over my head, though.

              It'll soon be revealed... πŸ˜‰

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

              1 Reply Last reply Reply Quote 0
              • Chris FullmerC Offline
                Chris Fullmer
                last edited by

                BTW, if you should start a thread about it, I have some organization and expansion ideas...

                Chris

                Lately you've been tan, suspicious for the winter.
                All my Plugins I've written

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

                  Yea, I'll make a thread later this week when I've added a couple of more things to the concept script and make some illustrations. Just make a note of your ideas etc and do a follow-up post when I post it.

                  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

                    "this week", as in the next week... 😳 still a couple of hours until monday...

                    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 to disappoint... but K_Tools.rb has long had an L function to joint two selected edges and add a specified radius (like 'fillet')... Isn't that exactly what you are trying to do ?

                      Just look at the code for clues...
                      .

                      TIG

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

                        Giving a radius to two edges is only one minor function. I ended up getting the linear_combination of the two edge's vectors, then use trigonometry to calculate the centre point on that vector.

                        It'd be interesting to have a look at K_Tools.rb to see how it's done there. My trigonometry is very rusty so I'm not sure if I'm doing it the best way.

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

                        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