Milling detection while scanning

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

  • Milling detection while scanning

    Hello,

    I'm trying to get the coordinates of 2 intersection points between a round cylindrical part and a milling. (see below)
    I could have get them easily with CAD programming but the problem is that the position of the milling is random from one part to another, as well as the positioning on the fixture.

    Do I have to create a routine using polar distance from the center to detect when the OD is decreasing ?
    Or is there an easier method ?

    Thanks.


    points coordinates.PNGMilli

  • #2
    One method

    measure circle near top
    measure line across flat
    create point “pierce point” between circle and line
    create reverse line from measured line
    create point “pierce point” between circle and reverse line

    B&S CHAMELEON/PCDMIS CAD++ V2011

    There are no bugs, only "UNDOCUMENTED ENHANCEMENTS!"

    sigpic

    Comment


    • #3
      Yes, I can do this manually, but I want to automate this, the program has to find on its own where the flat is.

      Comment


      • #4
        ok if i understand what you are looking for you need the cmm to have eyes and be able to know what way the milled section is facing on the cmm, as its going to be random???
        if this is what you want take a 36 point circle around the part with a high prehit retract distance and then you are going to want to make lines from all the point to the center of the circle and the use a assignment to find the shortest line and then have the cmm align to that line and then you can pick up that milled section as stated up above.

        Comment


        • #5
          I guess that you know approximately the center of the OD (you can program the scan !), so you can calculate the shortest distance, or the point associated to it :
          ASSIGN/V1=MININDEX(SQRT(DOT(SCN1.HIT[1..SCN1.NUMHITS].XYZ-SCN1.XYZ,SCN1.HIT[1..SCN1.NUMHITS].XYZ-SCN1.XYZ)))
          I think that you know the density of points and approximately the length of the flat, so you can create a feature set with :
          ASSIGN/LENGTH=10
          ASSIGN/DENSITY=5 (here you should be able to assign it with a getsetting / gettext - I'm not at the cmm)
          ASSIGN/V2=LENGTH*DENSITY/3
          ASSIGN/V3="SCN1.HIT[+(V1-V2)+".."+(V1+V2)+"]" and use V3 in the featuer set.

          Then create a line with the feture set, and a circle with th scan using a outlier filter .

          The most problem of this method is when the star of the scan is on the flat...
          Last edited by JEFMAN; 06-17-2019, 04:30 PM.

          Comment


          • thomas pilc
            thomas pilc commented
            Editing a comment
            jefman that even nicer than the way i came up with one question so with this closed scan it should not be a defined scan right??

          • JEFMAN
            JEFMAN commented
            Editing a comment
            thomas polc : right, in this case, a defined scan shouldn't work - I tried to explain it like this because there's "while scanning" in the title .

          • thomas pilc
            thomas pilc commented
            Editing a comment
            man i have been called many things but a polc is a first lol

        • #6
          Thanks guys for you help.
          Yes thomas pilc, that's what I'm trying to do.
          Will try your method Jefman.

          Comment


          • #7
            Originally posted by thomas pilc View Post
            ok if i understand what you are looking for you need the cmm to have eyes and be able to know what way the milled section is facing on the cmm, as its going to be random???
            if this is what you want take a 36 point circle around the part with a high prehit retract distance and then you are going to want to make lines from all the point to the center of the circle and the use a assignment to find the shortest line and then have the cmm align to that line and then you can pick up that milled section as stated up above.
            Why so many points? If the flat cuts a quarter of the circle, nine points all around would be guaranteed to have at least two hits on the flat? And having a long prehit/search distance is slow, why not turn the problem around - use a short prehit/search and note which points don't hit a surface (catch the errors). Then you need just two hits with a long prehit/search, to get the line.

            Note that some controllers ignore the Search part of prehit/search, some split prehit in two, some have a hard coded search...
            AndersI
            SW support - Hexagon Metrology Nordic AB

            Comment


            • #8
              Originally posted by AndersI View Post

              Why so many points? If the flat cuts a quarter of the circle, nine points all around would be guaranteed to have at least two hits on the flat? And having a long prehit/search distance is slow, why not turn the problem around - use a short prehit/search and note which points don't hit a surface (catch the errors). Then you need just two hits with a long prehit/search, to get the line.

              Note that some controllers ignore the Search part of prehit/search, some split prehit in two, some have a hard coded search...
              You could also (probably, just throwing it out there as an idea) program a series of points (not a scan) measuring the diameter, using a small enough distance between to have at least 3 hits on the flat (can't tell you the required spacing without dimensions of this thing) then construct a BFRE line from each consecutive 3 hits (p1-p2-p3, p2-p3-p4, p3-p4-p5, etc.) then use code to grab the line with the smallest straightness value.
              sigpic
              Originally posted by AndersI
              I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

              Comment


              • #9
                dmis is one **** of a cat skinner for sure i learn so much from this place

                Comment


                • #10
                  I just noticed you used the word "scanning" in the title (but not in your actual question). If your scan manages to follow the part all the way around, you can try using Construct line from Scan Segment to get the line.
                  AndersI
                  SW support - Hexagon Metrology Nordic AB

                  Comment


                  • #11
                    Originally posted by AndersI View Post
                    I just noticed you used the word "scanning" in the title (but not in your actual question). If your scan manages to follow the part all the way around, you can try using Construct line from Scan Segment to get the line.
                    Does it work regardless of flat position ? I mean does it auto construct the line from the scan ?

                    Comment


                    • #12
                      Finally here is what I did :

                      I set a very slow scanning around the area.

                      VAR1=SQRT(SCN1.HIT[1..SCN1.NUMHITS].X^2+SCN1.HIT[1..SCN1.NUMHITS].Y^2)
                      VAR2=MININDEX(VAR1)
                      VAR3=SCN1.HIT[VAR2].X
                      VAR4=SCN1.HIT[VAR2].Y

                      Then I created a generic point and a generic line between the center and the previous point.
                      It seems to work so far.

                      Comment


                      • #13
                        Just a thought (not really more simple, but another way to write it...) :
                        ASSIGN/V1=SCN1.HIT[1..SCN1.NUMHITS].XYZ*MPOINT(1,1,0)
                        ASSIGN/V2=MININDEX(SQRT(DOT(V1,V1))
                        ASSIGN/V3=SCN1.HIT[V2].XYZ

                        Then use directly V3.X, V3.Y and V3.Z in the generic point.

                        You could also create directly the generic line :
                        ASSIGN/VECT_1=UNIT(V3-SCN1.XYZ)
                        And use V3.X,.Y and .Z as coordinates and VECT_1.I, .J and .K as vector.

                        The line of the flat side could be also assigned :
                        ASSIGN/V_FLAT=CROSS(VECT1,MPOINT(0,0,1))

                        With those assignments, you should be able programming an autoline with vectors VECT_1 and V_FLAT, and centroid V3 (without any generic feature, only assignments...)

                        Comment

                      Related Topics

                      Collapse

                      Working...
                      X