Jump to content

CT scan randomly sees 1 Material or 2 Materials


---
 Share

Recommended Posts

   #MCAD_ELEMENT=gom.script.sys.polygonize_volume (
       #elements=[gom.app.project.actual_elements[Volume_Name]], 
       #material_gray_values=['Background', ['Material 1', 'used']], 
       #polygonization_mode='all_surfaces')

    MCAD_ELEMENT=gom.script.sys.polygonize_volume (
        elements=[gom.app.project.actual_elements[Volume_Name]], 
        material_gray_values=['Background', ['Material 1', 'unused'], ['Material 2', 'used']], 
        polygonization_mode='all_surfaces')

 

Is anyone familiar with the python script above?  We use it after we capture a volume on the CT. The CT used to see two materials now it is randomly seeing 1 and 2 materials. 

If the above script runs expecting to see 2 materials and it only captures 1 material we get bad meshes. I need a solution or the ability to run an if statement to switch b/w the commented code with 1 material and the uncommented code with 2 materials.....I don't know how to get a variable from GOM that tells me beforehand how many materials it has seen.

Thanks for any help

Link to comment
Share on other sites

Hi,

in GOM Volume Inspect 2022 there exists a scripting command

"sys.determine_volume_material_gray_values"

that yields the values of automatically detected materials.
This could help to identify whether 1 or 2 materials where detected and an if-statement could be used to select one of the polygonization commands from your example code.

Best,

Lorenz

Edited
Link to comment
Share on other sites

Please sign in to view this username.

That is music to my ears my friend, thank you very much for that info. I'll be able to eliminate perhaps all our bad scans once we go to 2022 using an if stmt.

Thanks!

Link to comment
Share on other sites

Please sign in to view this username.

Other than just putting this text on a line in Python what would I need to write or put in parenthesis to retrieve the variable from that sub-program or module?

 

Thanks.

Link to comment
Share on other sites

  • 4 weeks later...

Please sign in to view this username.

Do you have an example of how to use the grey value command:

"sys.determine_volume_material_gray_values"

Is it x = sys.determine_volume_material_gray_values or something like that, does it report back a python list or something? I'd like to have a better understanding as I may try to convince the others to update one CT computer to 2022 this week. This functionality could really help us out greatly.

Thanks.

Link to comment
Share on other sites

Please sign in to view this username.

I think I have it figured out the python code would look like this:

gray_values = gom.script.sys.determine_volume_material_gray_values()

materials_seen =  len(gray_values)

Link to comment
Share on other sites

  • 1 month later...

Please sign in to view this username.

I was able to get this to work in 2021....maybe it was b/c I installed 2022 then uninstalled it, but kept the folders from 2022.

Anyway, the script works great to detect the materials and really helped us out a lot. I can direct the script where to go based on if it saw the plastic fixture or not.

We have one part that is not playing nicely though. We run 70 unique parts thru the CT and this one part it sees a gray value of ~18000 and then another material at ~17000 and it is just one metal part. This one I can't find a solution to. If you ever want to discuss let me know. Otherwise, thank you so much for giving my that idea on the request for gray_values code.

Thanks.

Link to comment
Share on other sites

  • 4 weeks later...

Hi Tim, I somehow did not get notifications for your mentions of me in this thread. Sorry for that.

Glad you figured everything out so far!

Regarding the latest problem: Sometimes, when objects move during the scan, the volume will contain "doubled" edges that look to the material detection / polygonization like another material - based on the gray value data.
Could you please send an example for the latest problem as a support request to support@gom.com? This way we can discuss and analyze this problem in detail, exchange data, etc.

Link to comment
Share on other sites

  • 2 weeks later...

Please sign in to view this username.

Good to hear from you. We are running really well now, except our 2nd CT is down now, I'm told you all in Germany may be remotely working on it this week.

The part that saw 3 materials was very rare and we haven't seen 3 materials for the last 2 months. BUT, I could trip the CT into seeing 3 materials by just adjusting the scan settings back to what they used to be.

It is NOT a fixturing issue, it is a scan setting that causes it to see 3 materials. We had to back down the images from 2500 to 1500 I believe. I'll talk to my team and perhaps run a sample run with the old settings and send you the volume along with the new settings that don't cause the 3 material issue.

We run so many parts thru our CT's I've told numerous people at Zeiss it would be mutual beneficial if someone came down and saw what we do b/c we find all the errors and we could help out while learning from you all at the same time. We run 150 parts total  thru both CT's per day when they are both up and running.

Edited
Link to comment
Share on other sites

I've had some Zeiss associates tell me inconsistent materials seen was b/c we were using cropping, then I had others say it was b/c we were not using volume reduction. During this time we used both cropping and volume reduction 50% of the time and we still got bad messes on parts that used both methods. That is why I started this thread, bc I knew they didn't understand the situation. I simply needed to know what the machine saw as far as materials seen. The rest doesn't matter. The reason they didn't understand this is b/c they simply don't run the amount of parts thru the machine as we do. We got a 2nd CT and we wondered if it would do the same and produce bad meshes the same as the previous CT and it did so we knew this was a problem deeper than they understood.

I will say I don't think some of the associates I've talked to listen to me when I explain our issues. That is why they should come down and see us and see how sophisticated our operation is, we use all python scripts to run everything, everything is automated. We are a well oiled machine.

Simply requesting the materials seen from the CT is the solution. Your reply to my request saved us a tremendous amount of time and trouble.

Edited
Link to comment
Share on other sites

 Share

×
×
  • Create New...