Jump to content

Cleaning up noise from fixturing


---
 Share

Recommended Posts

---

Hello all, would like to ask for assist on cleaning up fixture artifacts. I have tried various settings in the "extract volume areas automatically" to clean this up, which does remove some of the larger stuff, but leaves smaller stuff, as shown. Also have tried utilizing "reliable surfaces only" during polygonization, with some success, but still doesn't cover all artifacts. Have taken a few shots at "Refine Mesh" and "Smooth Mesh" as well. I have to manually remove quite a bit of these artifacts after polygonizing, all simply bits of foam fixturing, seems like it should be easily done but I have yet to find the right tool, obviously. Any assist appreciated!Noisyscan.JPG.8aedc85ec155a2ea587e672b4f421c9e.JPG

Link to comment
Share on other sites

---

Hi brian , you can select patches of data by number of triangles.  Set the value to something where you are sure the main patch or patches is selected , invert this selection and delete the rest.   You can select the larger patches manually but the way with triangles allows for a robust scriptable solution .  

Link to comment
Share on other sites

---

Are you manually doing polygonization one part at a time or scripting this?  You can identify floaters by max number of points using some like below with a script...toss this in the script editor with your mesh active and it should work...it is found here:

Edit > Selection in 3D > Other Selections > Select Patches by num of pnts

 

import gom

# This is an attempt to delete any small artifacts floating around
# Depending on your workflow or version of GOM the ['Part'] may be something like ['Part 1'] I used a script to find this name and make a variable in 2023, in 2021 it is hardcoded as below...

#try:
#	gom.script.selection3d.select_patches_by_size (
#		elements=gom.ElementSelection ({'category': ['key', 'elements', 'part', gom.app.project.parts['Part'], 'explorer_category', 'actual_part']}), 
#		max_points=5000)
#	
#	gom.script.cad.delete_selected_3d_area (reset_deviation_values=True)
#	print('An object with less than 5000 points was detected and deleted')
#except:
#	print('The deletion of the small part didnt work')



# code works for 2023 and 2021

# this small code gets the name of the linked Part, which seems to always be 'Part 1' in 2023
for i in gom.app.project.parts:
	print(i)
	linked_name = i.get('name')
	print(linked_name) # print for debugging
	break
	
try:
	gom.script.selection3d.select_patches_by_size (
		elements=gom.ElementSelection ({'category': ['key', 'elements', 'part', gom.app.project.parts[linked_name], 'explorer_category', 'actual_part']}), 
		max_points=5000)
	
	gom.script.cad.delete_selected_3d_area (reset_deviation_values=True)
	print('An object with less than 5000 points was detected and deleted')
except:
	print('The deletion of the small part didnt work')

 

Link to comment
Share on other sites

---

Please sign in to view this quote.

Hey James, I am unsure how to go about this, my "select patch" tool doesn't provide an option to filter by triangle size. Could you please expound on this a bit?

Link to comment
Share on other sites

---

Please sign in to view this quote.

Hey Tim, you are going way above my skill level here, in my fist year with GOM/ CT, and this is an added function of an already "too many hats" existing position, so there is little to no hope of getting into the scripting arm of the functionality at this point. Do appreciate the input though. 

Link to comment
Share on other sites

---

Hi brian , dont need to code it but coding it would help save time in the end if you need to keep on doing it .  It is in the menu as a discrete function rather than a filter.  If you use the help bar at the top right and type selection by points or similar it will pop up a page with the menu pathway and a description.

Link to comment
Share on other sites

---

Please sign in to view this quote.

Thanks James, looking into this, always appreciative of the help here 

Link to comment
Share on other sites

---

Please sign in to view this username.

If you are going to do this manual just do what I suggested, but do it manually...I gave you the method to do it manually:

Edit > Selection in 3D > Other Selections > Select Patches by num of pnts

enter in something like 5000. This is basically saying to the software select individual meshes on the screen that collectively only amount to a total of 5000 points or under. So if you know for certain that your mesh has over 50,000+ pnts then it will keep that selection and only highlight mesh floaters that are under 5000 pnts.

Then simply Ctrl + del to remove them.

 

My script I presented you does just that. If you are going to do this often you are best served to start learning python. I was you about 2 yrs ago. I spent 2 weeks studying python coding fundamentals...then dove in...then bought a book, then every week tried to learn a new python fundamental. Stick to learning the python fundamentals early. Learn to use the record button inside the python scripting environment inside GOM.

 

 

 

 

Edited
Link to comment
Share on other sites

---

Agree Tim.  It does seem daunting but it is well worth the time.  You absolutely do not need to be an expert to get value out of it.  Simple help scripts like this save an awful lot of time, and with ability to record things it is less complex than it looks by just reading the resultant code.

The tricky bit is making it robust, but that doesnt stop you getting started 🙂

By the way

Please sign in to view this username.

 in the code you posted if you know that there is only 1 part container in the project ( very likely ) then you could skip getting the containers name and use gom.app.projects.parts[0] as this returns the first and only item in the part container list.

Link to comment
Share on other sites

---

Please sign in to view this username.

 

Thanks, I considered using that, and maybe I could, but later in our scripts we manually cut out each mesh with their own coordinates and copy to the clipboard and do a couple other things so I get copies of the container like 'Part 1 Copy 1',  'Part 1 Copy 2', etc. I probably could have indexed to 1, 2, 3, etc. but just felt like showing the name in the script for clarity. Who knows what they are going to do next, this linked volume thing really threw a wrench in my scripts. Took me a while to figure out all the errors I was having, one error I think is on their end, as .red and .fil are new extensions they placed after the reduction and filtering. .fil occurs in the unlinked volume a step before it appears in the linked volume. I disagree with that difference in order of operations, and hence it took a few hours to figure out why my scripts kept erroring out.

Link to comment
Share on other sites

---

Please sign in to view this username.

  I'd like to connect with you via email...can you send me a contact email at timlikesgom at protonmail   I was never able to connect with you on linkedin for some reason.

 

I can send you an official email afterward and perhaps we can connect and discuss a few things which we have discussed over the last year.

Link to comment
Share on other sites

---

Please sign in to view this quote.

This works perfectly! Thanks for the guidance on this.

Python has been on my peripheral list since before we obtained our first CT unit about a year ago, will give your above script a shot. 

Link to comment
Share on other sites

---

Actually, in the polygonization quality parameters for Volume Polygonization, this exact setting can be configured. There you can specify the minimum number of points per surface patch (connected surface element) shall remain. All geometry patches with less points than the configured threshold will not be put into the final actual mesh.

Link to comment
Share on other sites

---

Choose "Edit" on the Polygonization quality setting and set "Max. number of points" to some value > 0 to remove smaller particles.
image.thumb.png.e935f3f9e9c4e8eb0ebfde1282a54ae7.png

Link to comment
Share on other sites

 Share

×
×
  • Create New...