Jump to content

How to access surface comparison deviation data in GOM 2021 through scripting


---
 Share

Recommended Posts

Earlier in GOM 2018, I use to extract the surface comparison to plot histogram plot using below script

import gom

import numpy as np
import matplotlib.pyplot as plt

gom.app.project.inspection['Surface comparison on Max machining Req.'].data.result_dimension.deviation

i, j, k = dz.shape

dz2 = np.reshape(dz, (j))

a = plt.hist(dz2, bins=100, density=True, alpha=0.6, histtype='bar', ec='black')
 

Whereas in GOM 2021, 

Couldn't extract the inspection data using above script.

Kindly suggest how to proceed.

 

Link to comment
Share on other sites

  • 3 weeks later...

Can you please add further information, if there is an error message (which one?) or if there is no data at all or what exactly means "Couldn't extract [...] data [...]"?

At my side it works, when I load the ".data" into a real Numpy array. (I had no surface comparison available at the quick spot, so please check if "result_dimension.deviation" is still the right accessor for your data by pressing F2 in the script editor again and choose the data from the element you want to use. In my case (a surface comparison check) it was ".scalar_value".)

dz = np.array (gom.app.project.inspection['Check.dZ'].data.scalar_value)

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...