hexagon logo

Need script to output scan point deviations

I have an airfoil cover that I analog scan in about 26 sections. I report profile of each section but was asked to output XYZ of each point. I'm able to do so using loops within PC-DMIS but it takes about 25 minutes just for this output alone. I'm now being asked to report deviation from nominal of each point in each scan. Can someone point me in the right direction?
  • You are probably being asked for the T-value. I believe JEFMAN has posted a way to calculate the T-value from XYZ/vector values if you can't use the "normal" dimensioning.
  • Something like

    ASSIGN/COUNT=0
    DO/
    ASSIGN/COUNT=COUNT+1
    ASSIGN/T_VAL=DOT((SCN1.HIT[COUNT].XYZ-SCN1.HIT[COUNT].TXYZ),SCN1.HIT[COUNT].TIJK)
    *** YOUR METHOD OF OUTPUTTING T_VAL GOES HERE***
    UNTIL/COUNT > SCN1.NUMHITS-1
    
  • For the XYZ output of each point all you need to do is create a COP feature and then a COP export operator to automatically output the XYZ values. On my programs that have tens of thousands of points it takes less than 10 seconds.

    To get XYZ and deviation of each point in a clean file format the best way would be to use a script. Looping in basic script is dramatically faster than trying to use looping inside PCDMIS.

    You could also use RTF format for your report, create a profile of line dimension (form and location) for each section, and turn on textual analysis for all of them. This will display the deviation of every single point. RTF is a bit of a messy file format but it should meet your need. It might mean a bit more work on their end to format the data.
  • You are probably being asked for the T-value. I believe JEFMAN has posted a way to calculate the T-value from XYZ/vector values if you can't use the "normal" dimensioning.


    I will look for this post.

    Something like

    ASSIGN/COUNT=0
    DO/
    ASSIGN/COUNT=COUNT+1
    ASSIGN/T_VAL=DOT((SCN1.HIT[COUNT].XYZ-SCN1.HIT[COUNT].TXYZ),SCN1.HIT[COUNT].TIJK)
    *** YOUR METHOD OF OUTPUTTING T_VAL GOES HERE***
    UNTIL/COUNT > SCN1.NUMHITS-1
    


    This does exactly what I want but takes forever with over 6000 points per part. I just need to figure out how to do this in a script.

    For the XYZ output of each point all you need to do is create a COP feature and then a COP export operator to automatically output the XYZ values. On my programs that have tens of thousands of points it takes less than 10 seconds.

    To get XYZ and deviation of each point in a clean file format the best way would be to use a script. Looping in basic script is dramatically faster than trying to use looping inside PCDMIS.

    You could also use RTF format for your report, create a profile of line dimension (form and location) for each section, and turn on textual analysis for all of them. This will display the deviation of every single point. RTF is a bit of a messy file format but it should meet your need. It might mean a bit more work on their end to format the data.


    I already use the COP feature for my needs and it works well. Unfortunately the customer wants XYZ deviation for each point in csv format.
  • Something like

    ASSIGN/COUNT=0
    DO/
    ASSIGN/COUNT=COUNT+1
    ASSIGN/T_VAL=DOT((SCN1.HIT[COUNT].XYZ-SCN1.HIT[COUNT].TXYZ),SCN1.HIT[COUNT].TIJK)
    *** YOUR METHOD OF OUTPUTTING T_VAL GOES HERE***
    UNTIL/COUNT > SCN1.NUMHITS-1
    

    So this is working great. Anyone care to help with using this in a script to speed up the process?