Loop issue

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

  • Loop issue

    I'm measuring a sphere with linear scans in a loop V1.
    In the loop, I construct a 3D circle using outlier filtering.
    I can construct a feature set from scans (SCN1[1..36]), but I'm unable to construct a sphere from circles hits.
    I tried to insert a feature set in the loop with CE1.HIT[1..CE1.NUMHITS], and then construct another feature set after the loop with SCN2[1..36], which takes only the first hit of the circle, I tried CE1[1].HIT[1..CE1[1].NUMHITS], nothing works fine...

    Any idea ?

  • #2
    Are you looping your linear scan? Meaning, you are doing one scan, then looping that 36 times?

    Comment


    • JEFMAN
      JEFMAN commented
      Editing a comment
      Yes, there's one scan in the loop, and the loop "turns"

  • #3
    I think it's because you can't have an array index within an array index - HIT[1..CE[1].NUMHITS]

    Have you tried putting the circle hits into a COP rather than a feature set? You could then just construct your sphere from the COP
    Neil Challinor
    PC-DMIS Product Owner

    T: +44 870 446 2667 (Hexagon UK office)
    E: [email protected]

    Comment


    • #4
      Originally posted by neil.challinor View Post
      I think it's because you can't have an array index within an array index - HIT[1..CE[1].NUMHITS]

      Have you tried putting the circle hits into a COP rather than a feature set? You could then just construct your sphere from the COP
      I can't select CIRC1[1] in the COP...
      If I select CIRC1, I can't add [1] after it in the edit window.

      Is there a way (2020 R1 SP13) to see looped features in the list of features ?

      It's friday, have a nice weekend, all !!!!!

      Comment


      • #5
        Originally posted by JEFMAN View Post

        I can't select CIRC1[1] in the COP...
        If I select CIRC1, I can't add [1] after it in the edit window.

        Is there a way (2020 R1 SP13) to see looped features in the list of features ?

        It's friday, have a nice weekend, all !!!!!
        Maybe there is a connection with what I noticed with loops and scans. Maybe try a variation of this:

        https://www.pcdmisforum.com/forum/pc...ns-and-looping

        Comment


        • #6
          Originally posted by bfire85 View Post

          Maybe there is a connection with what I noticed with loops and scans. Maybe try a variation of this:

          https://www.pcdmisforum.com/forum/pc...ns-and-looping
          I will give it a try, thx !

          Comment


          • #7
            Originally posted by bfire85 View Post

            Maybe there is a connection with what I noticed with loops and scans. Maybe try a variation of this:

            https://www.pcdmisforum.com/forum/pc...ns-and-looping
            Just because I pointed it out, doesn't mean I cr_acked the code, This is all bfire85
            (In Memory of my Loving wife, "Ronda" who I lost March 7, 2016. I love you baby.)
            They say "Nobody's Perfect." I must be Nobody.

            Comment


            • #8
              Originally posted by KIRBSTER269 View Post

              Just because I pointed it out, doesn't mean I cr_acked the code, This is all bfire85
              True...however it did help me with what I wanted to do. Maybe Jef is seeing a variation of what I saw.

              Comment


              • #9
                Hello Jef, isn't it easier to enable single point in your scans (obviously group them to avoid overflowing in the edit window) and filter them as points? Later construct whatever you want to consruct.

                1.jpg
                Attached Files

                Comment


                • JEFMAN
                  JEFMAN commented
                  Editing a comment
                  There are more than 10000 hits...
                  Thx for the input...

                • constadin
                  constadin commented
                  Editing a comment
                  ****, I quoted instead of commenting. Still too early in Europe :P

              • #10
                Originally posted by constadin View Post
                Hello Jef, isn't it easier to enable single point in your scans (obviously group them to avoid overflowing in the edit window) and filter them as points? Later construct whatever you want to consruct.

                1.jpg
                I see no issue there :P Just grp them together and maybe change the display diameter of points to 0.2mm or something. Normally in terms of pc resources, the demands should be roughly the same (maybe hide them on second though).

                Any time btw, you have helped me more than once in the past

                Comment


                • #11
                  Thx, constadin, I will give it a try...

                  Comment


                  • #12
                    Have you tried using them seagull brackets ( { } ) instead of the hard brackets ( [ ] )?

                    ...or tried with a variable instead of number?

                    ASSIGN/X = COUNT
                    CE1[X].HIT[1..CE1[X].NUMHITS]
                    Last edited by vpt.se; 06-21-2022, 06:53 AM.
                    PC-DMIS CAD++ 2o22.1 SP2

                    Comment


                    • Henniger123
                      Henniger123 commented
                      Editing a comment
                      hi,
                      1.) in pcDMIS you can only access an array element with square brackets. if you use a different one it's just red.
                      2.) accessing an array within an array does not seem to work in pcDMIS, no matter how many variables or numbers in between.
                      -> unfortunately that dont work. (tested)

                    • vpt.se
                      vpt.se commented
                      Editing a comment
                      Ok, thanks Henniger123

                  • #13
                    good Day,

                    if you want you can try something like this:
                    you can write the xyz data to a file and then import the data to a PoindCloud

                    problem with that:
                    * for 10k points it takes forever, because he write each point individually into the file
                    * while writing to the file, the meas values are rounded to the display precision

                    (circle1 represents the scan)
                    Code:
                    DISPLAYPRECISION/6
                    
                    FPTR =FILE/OPEN,C:\TEST.XYZ,WRITE
                    
                    V1 =LOOP/START,ID=YES,NUMBER=4,START=1,SKIP=,
                    OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=90
                    
                      CIRCLE1 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,OUT,LEAST_SQR
                      THEO/<0,0,0>,<0,-1,0>,100,0
                      ACTL/<0,0,0>,<0,-1,0>,100,0
                      TARG/<0,0,0>,<0,-1,0>
                      START ANG=0,END ANG=85
                      ANGLE VEC=<1,0,0>
                      DIRECTION=CCW
                      SHOW FEATURE PARAMETERS=NO
                      SHOW CONTACT PARAMETERS=NO
                    
                      ASSIGN/VLOOP=1
                    
                      DO/
                    
                        FILE/WRITELINE,FPTR,  STR(CIRCLE1[V1].HIT[VLOOP].X)+" "+
                                                                  STR(CIRCLE1[V1].HIT[VLOOP].Y)+" "+
                                                                  STR(CIRCLE1[V1].HIT[VLOOP].Z)+" "+
                                                                  STR(CIRCLE1[V1].HIT[VLOOP].I)+" "+
                                                                  STR(CIRCLE1[V1].HIT[VLOOP].J)+" "+
                                                                  STR(CIRCLE1[V1].HIT[VLOOP].K)
                    
                        ASSIGN/VLOOP=VLOOP+1
                    
                      UNTIL/CIRCLE1.NUMHITS<VLOOP
                    
                    LOOP/END
                    
                    FILE/CLOSE,FPTR,KEEP
                    
                    COP1 =COP/DATA,TOTAL SIZE=16,REDUCED SIZE=16,
                    REF=CIRCLE1,,
                    
                    COPIMPORT1 =COP/OPER,IMPORT,FORMAT=XYZ,FILENAME=C:\TEST.XYZ,APPEND=NO,
                    SIZE=16,REF=COP1,,
                    
                    SPHERE1 =FEAT/SPHERE,CARTESIAN,IN,LEAST_SQR,NO
                    THEO/<0,0.000001,0>,<0,0,1>,99.999999
                    ACTL/<0,0.000001,0>,<0,0,1>,99.999999
                    CONSTR/SPHERE,BFRE,COP1.HIT[1..COP1.NUMHITS],,

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    X