Shortest distance between a line and a curve?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Shortest distance between a line and a curve?

    I have a measured line and a curve that is created from a number of measured points. Now I want to calculate the shortest distance between those two features, is that possible?

    I have tried some different approaches, but I only seem to get the distance between the line (or a prolongation of the line) and the starting point of the curve (the first measured point that constitutes the curve).

    Is there no way to make PC-DMIS calculate the shortest distance between the line and one of the calculated points in the curve?

  • #2
    You could assign generic points to the max and min values of the curve in the axis you are looking to measure.
    Then dimension selecting the generic point first and the line second (datum) in the required axis.
    The only potential problem being that depending on the spacing of your points, the max and min values might not be 100% accurate as the lowest / highest portion of the curve could be between your hits
    sigpic

    Comment


    • #3
      "Distance between line and cir minus radii" should do it for you.

      Comment


      • #4
        Align to the line and call it zero, then report the MIN axis value that is perp to the line you aligned to.
        sigpic
        Originally posted by AndersI
        I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

        Comment


        • #5
          Originally posted by Tested View Post
          "Distance between line and cir minus radii" should do it for you.
          What Tested said. I'll select the circle first, line second.
          sigpicIt's corona time!
          737 Xcel Cad++ v2009MR1....SE HABLA ESPAÑOL

          Comment


          • #6
            But, from his post, he doesn't HAVE a circle, he has a curve, 2 completly different things.
            sigpic
            Originally posted by AndersI
            I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

            Comment


            • #7
              Originally posted by Matthew D. Hoedeman View Post
              Align to the line and call it zero, then report the MIN axis value that is perp to the line you aligned to.
              Ok, so step one would be to set the line to be an axis (Y for instance), is that correct?

              How do I do the rest? I'm new to PC-DMIS and have only had basic training, so a more detailed description would be very appreciated.

              And yes, it is a curve, not a circle, so unfortunately the suggestions with circles doesn't work.

              Comment


              • #8
                OK, best bet:

                1) Measure a plane on the top of the surface
                2) Measure the line
                3) Alignment (not a complete alignment, but enough to get what you need)
                a) Level to plane (lets level to Z+)
                b) Rotate to line (lets rotate X+ around the Z+ axis)
                c) set XY origin to the line (good enough for the answer you need)
                d) set Z origin to the plane
                4) You are now looking for the smallest Y value from the points. You can so this with ASSIGN and report the value.
                sigpic
                Originally posted by AndersI
                I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

                Comment


                • #9
                  Originally posted by Matthew D. Hoedeman View Post
                  But, from his post, he doesn't HAVE a circle, he has a curve, 2 completly different things.
                  You're right Matt. I was wondering if creating a high point will do the job.

                  From help menu:
                  The High Point auto option allows you to search a user defined region to locate the highest point in the current work plane.
                  The result of the search is a single point defined by its X, Y, Z coordinates and approach vector.

                  Once this constructed he can recall distance to the line.

                  Good day!
                  sigpicIt's corona time!
                  737 Xcel Cad++ v2009MR1....SE HABLA ESPAÑOL

                  Comment


                  • #10
                    Originally posted by Matthew D. Hoedeman View Post
                    OK, best bet:

                    1) Measure a plane on the top of the surface
                    2) Measure the line
                    3) Alignment (not a complete alignment, but enough to get what you need)
                    a) Level to plane (lets level to Z+)
                    b) Rotate to line (lets rotate X+ around the Z+ axis)
                    c) set XY origin to the line (good enough for the answer you need)
                    d) set Z origin to the plane
                    4) You are now looking for the smallest Y value from the points. You can so this with ASSIGN and report the value.
                    Ok, thank you, now it is a bit clearer, but I still don't know how to use ASSIGN to find the smallest Y, I've tried to search the help but didn't find anything.

                    Will this method be able to find the distance to any point in the curve, even the calculated, or only the points that the curved is based on (the measured points)?

                    The high point sounds interesting, however all the points are in the same plane. Is there a way to construct a plane that is rotated 90 degrees to the original plane, around the X-axis?

                    Comment


                    • #11
                      Well, high-point is kind of a hit-or-miss function, mostly it is a 'miss'.

                      ASSIGN is a function that is easy to use as well as hard to sue (sounds like fun, huh!)

                      OK, your code will need to be: (place your cursor at the end of all the features you want to include) AND HIT ENTER. This will give you a blank line, then type in:

                      ASSIGN/V1 = ARRAY(featid.y, featid.y, featid.y)

                      and continue until you have entered in all the features you want to include (featid.Y where featid is the feature ID and the .y is needed to tell it what portion of the feature you want, in this case, the Y axis)

                      Once you ahve all the features in the array, hit ENTER again to get a NEW blank line and type in:

                      ASSIGN/V2 = MIN(V1)

                      Now, variable V2 will be equal to the smallest Y value of all the included features. Now, hit enter again to get a new blank line and type in:

                      GENERIC

                      Pcdmis will make a generic feature for you to play with. It will have NOMS and MEAS values as well as IJK values. Now, in the MEAS portion, in the second 0 (zero), change that to V2. You will now have a point with the smallest Y value that you can dimension just like any other point.
                      sigpic
                      Originally posted by AndersI
                      I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

                      Comment


                      • #12
                        Originally posted by Matthew D. Hoedeman View Post
                        Well, high-point is kind of a hit-or-miss function, mostly it is a 'miss'.

                        ASSIGN is a function that is easy to use as well as hard to sue (sounds like fun, huh!)

                        OK, your code will need to be: (place your cursor at the end of all the features you want to include) AND HIT ENTER. This will give you a blank line, then type in:

                        ASSIGN/V1 = ARRAY(featid.y, featid.y, featid.y)

                        and continue until you have entered in all the features you want to include (featid.Y where featid is the feature ID and the .y is needed to tell it what portion of the feature you want, in this case, the Y axis)

                        Once you ahve all the features in the array, hit ENTER again to get a NEW blank line and type in:

                        ASSIGN/V2 = MIN(V1)

                        Now, variable V2 will be equal to the smallest Y value of all the included features. Now, hit enter again to get a new blank line and type in:

                        GENERIC

                        Pcdmis will make a generic feature for you to play with. It will have NOMS and MEAS values as well as IJK values. Now, in the MEAS portion, in the second 0 (zero), change that to V2. You will now have a point with the smallest Y value that you can dimension just like any other point.

                        But this will only give the smallest distance to a Point perp. to the line. If he does not have a point at the smallest distance, he will miss it.

                        This is one of those things that just might be easier to check using "old fashioned" methods.

                        Comment


                        • #13
                          Originally posted by Goodluck View Post
                          But this will only give the smallest distance to a Point perp. to the line. If he does not have a point at the smallest distance, he will miss it.

                          This is one of those things that just might be easier to check using "old fashioned" methods.
                          Your right and a loop would be necessary to probe looking for the "closest" point.
                          Links to my utilities for PCDMIS

                          Comment


                          • #14
                            Originally posted by Goodluck View Post
                            But this will only give the smallest distance to a Point perp. to the line. If he does not have a point at the smallest distance, he will miss it.

                            This is one of those things that just might be easier to check using "old fashioned" methods.
                            Ok, so I will only get the measured point with the smallest distance?

                            I am using an optical machine, so perhaps I'll have to stick to making an estimation by simply using the grid function in the toolbox?

                            Comment


                            • #15
                              Originally posted by Micke View Post
                              Ok, so I will only get the measured point with the smallest distance?

                              I am using an optical machine, so perhaps I'll have to stick to making an estimation by simply using the grid function in the toolbox?
                              It will give you the smallest POINT FEATURE, measured or constructed, makes no difference (like an intersection point).
                              sigpic
                              Originally posted by AndersI
                              I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              X