sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Request plugin :Trilateration ruby

    Scheduled Pinned Locked Moved Plugins
    14 Posts 5 Posters 2.9k 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.
    • BepB Offline
      Bep
      last edited by

      Dear Ruby programmers,
      Sketchup is still missing a very simple basic tool that would be very useful to many users.
      There is no way to precisely draw a triangle with known side-lengths.(= Trilateration).
      A Triangle ruby could do that.
      It could function as follows.

      You first activate the triangle ruby.
      You would be prompted to draw the first line of the triangle the normal way.
      Then the sticky sort of help-line at your cursor with its origin from the first line should appear to let you choose the plane the triangle should be drawn on.
      At the same time you should be prompted to fill in the value control box with the two remaining side-lengths of the triangle (counter clockwise?) probably separated with ; .
      After the Enter command these lines would be drawn.

      Could some of you please make this ruby?

      Greeting,

      Bep van Malde

      "History is written by the winners"

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

        You can sort of do this with the polygon tool, just set the number of sides to 3...

        If you need irregular triangles, you could then just alter it with the move tool, and with some simple maths you could have pretty much any triangle that takes your fancy.

        http://remusrendering.wordpress.com/

        1 Reply Last reply Reply Quote 0
        • BepB Offline
          Bep
          last edited by

          @remus said:

          You can sort of do this with the polygon tool, just set the number of sides to 3...

          If you need irregular triangles, you could then just alter it with the move tool, and with some simple maths you could have pretty much any triangle that takes your fancy.

          Yes Remus i know it is possible this way and probebly some other ways ,but they are all to cumbersome doing this many-many times ,or to complicated.
          I realy would like to skip the math and let the ruby do all of that time after time.

          "History is written by the winners"

          1 Reply Last reply Reply Quote 0
          • W Offline
            watkins
            last edited by

            Dear Bep,

            You can make an equilateral triangle of known side length using the following method:

            Use the polygon tool with the number of sides set to 3
            Draw a triangle
            Double click to select all the entities and make a group
            Double click to edit the group, and when in edit mode use the tape measure tool to measure one side
            Type in the desired length
            Type yes when asked about resizing group
            Explode group

            Regards,
            Bob

            1 Reply Last reply Reply Quote 0
            • BepB Offline
              Bep
              last edited by

              @watkins said:

              Dear Bep,

              You can make an equilateral triangle of known side length using the following method:

              Use the polygon tool with the number of sides set to 3
              Draw a triangle
              Double click to select all the entities and make a group
              Double click to edit the group, and when in edit mode use the tape measure tool to measure
              one side
              Type in the desired length
              Type yes when asked about resizing group
              Explode group

              Regards,
              Bob

              Thank you Bob for responding,

              But the ruby i request could help to contruct all types of triangles ,scalene if no sides are equal;isosceles if two sides are equal;equilateral if three sides are equal.

              greetings ,

              Bep van Malde

              "History is written by the winners"

              1 Reply Last reply Reply Quote 0
              • Didier BurD Offline
                Didier Bur
                last edited by

                Hi,

                @unknownuser said:

                Could some of you please make this ruby?

                On my to-do-list

                DB

                1 Reply Last reply Reply Quote 0
                • BepB Offline
                  Bep
                  last edited by

                  On my to-do-list[/quote]

                  Thank you Didier, that you are taking up an interest in developing this Ruby.
                  I am very happy 😍
                  I can now rest asure knowing that it will be made.

                  Greetings,

                  Bep van Malde

                  "History is written by the winners"

                  1 Reply Last reply Reply Quote 0
                  • Didier BurD Offline
                    Didier Bur
                    last edited by

                    @Bep,
                    Just a question: Given Side1 from Point A to Point B, and 2 lengthes a and b, the general trilateration case (from Al-Kashi theorem) gives 4 solutions.

                    How do you would see the script determine which triangle is the "good" one (from the user point of view I mean) ?
                    trilateration.jpg

                    DB

                    1 Reply Last reply Reply Quote 0
                    • GaieusG Offline
                      Gaieus
                      last edited by

                      What if you allow all four - separately grouped - and let the user delete the unwanted ones.

                      But also, what would decide which plane they are drawn? In 3D space there are endless possibilities. Or would you then restrict it to the red/green axis? Or maybe not if the initial line is drawn on any face?

                      Gai...

                      1 Reply Last reply Reply Quote 0
                      • GaieusG Offline
                        Gaieus
                        last edited by

                        Ah, I see, the plane has been solved. Yes, logical. Also the solution for the choice of the triangles sounds quite reasonable!

                        Gai...

                        1 Reply Last reply Reply Quote 0
                        • Didier BurD Offline
                          Didier Bur
                          last edited by

                          What is currently on the drawing board is:

                          trilateration2.jpg

                          User clicks 2 points to define the first side of the triangle (the red line between the 2 "X"), and click 1 point to define the plane (the third "X"). The plane is computed with a crossproduct between vectors, this is not a problem.
                          Between the 4 possibilities still remaining, I would suggest that the first length entered would start from the start point of side 1, the second would start from end point of side 1. This leads to 2 solutions. So I also suggest that the point defining the plane will also define the pointing direction of the second side (given by the first length) to get only one solution.
                          What do you think ?

                          DB

                          1 Reply Last reply Reply Quote 0
                          • BepB Offline
                            Bep
                            last edited by

                            Didier,

                            You are much faster than I am.
                            I think that we come up with the same sort of solution.

                            Bep


                            possibility 1.skp

                            "History is written by the winners"

                            1 Reply Last reply Reply Quote 0
                            • Didier BurD Offline
                              Didier Bur
                              last edited by

                              Bep,
                              I'll PM you soon a beta for test. It's almost ready, just several weird angle problems to solve πŸŽ‰
                              Regards,

                              DB

                              1 Reply Last reply Reply Quote 0
                              • GaieusG Offline
                                Gaieus
                                last edited by

                                I can hardly wait! πŸ‘

                                Gai...

                                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