hexagon logo

Have the roundness of an auto-circle in a variable

Hi there,

I am trying to have the roundness of an auto-element in a variable. I cannot use a dimension as I have 30,000 circles and try to export all of these roudnesses via a script to a txt file.

Does anyone knows how to call the roundness of an auto-circle into a variable?

Thanks in advance.
Parents
  • Hello,

    it's not that easy. You can insert the roundness evaluation with a script, but I'm not sure if it then calculates this command correctly (within the runtime of the script).


    Excuse the question: but is it possible for you to evaluate the roundness with a pcDMIS loop and write the result straight into a CSV file? (i mean without the script altogether)​
    you just have to slightly adapt the above example from me


    anyway:
    this is how you can extract the measuring points from a "CONTACT_CIRCLE_FEATURE":
    (this does not work with "MEASURED_CIRCLE")

    MEAS_X, 0 -> center of the circle
    MEAS_X, 1 -> center of point 1
    MEAS_X, 2 -> center of point 2 (and so on)
    
    mX1 = PCDCommand.GetText(MEAS_X, 1)
    mY1 = PCDCommand.GetText(MEAS_Y, 1)
    mZ1 = PCDCommand.GetText(MEAS_Z, 1)​
    
    mX2 = PCDCommand.GetText(MEAS_X, 2)
    mY2 = PCDCommand.GetText(MEAS_Y, 2)
    mZ2 = PCDCommand.GetText(MEAS_Z, 2)​​
    


    With this points you can then calculate the roundness, the formula for this has already been posted by @ ​.
    (I do not know which exact calculation method pcDMIS uses, therefore the results could differ to pcDMIS)
Reply
  • Hello,

    it's not that easy. You can insert the roundness evaluation with a script, but I'm not sure if it then calculates this command correctly (within the runtime of the script).


    Excuse the question: but is it possible for you to evaluate the roundness with a pcDMIS loop and write the result straight into a CSV file? (i mean without the script altogether)​
    you just have to slightly adapt the above example from me


    anyway:
    this is how you can extract the measuring points from a "CONTACT_CIRCLE_FEATURE":
    (this does not work with "MEASURED_CIRCLE")

    MEAS_X, 0 -> center of the circle
    MEAS_X, 1 -> center of point 1
    MEAS_X, 2 -> center of point 2 (and so on)
    
    mX1 = PCDCommand.GetText(MEAS_X, 1)
    mY1 = PCDCommand.GetText(MEAS_Y, 1)
    mZ1 = PCDCommand.GetText(MEAS_Z, 1)​
    
    mX2 = PCDCommand.GetText(MEAS_X, 2)
    mY2 = PCDCommand.GetText(MEAS_Y, 2)
    mZ2 = PCDCommand.GetText(MEAS_Z, 2)​​
    


    With this points you can then calculate the roundness, the formula for this has already been posted by @ ​.
    (I do not know which exact calculation method pcDMIS uses, therefore the results could differ to pcDMIS)
Children
No Data