Remove Spikes in Mesh. Select by longest edge?

I haven't found anything on Scriptspot that you can select by edge length. I am trying to delete large spikes in a mesh that were generated from an autoretopo. I think the easiest way is to select long edges based on a threshold. Anyway to do this? I found one by Bobo but the link is dead.....

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

Select some faces and run the

Select some faces and run the script. It will remove all non quads from the selection, so only quad faces will remains selected.

(
	if selection.count == 1 and classof (curO = selection[1]) == Editable_Poly then
	(
		local selFacesBA = polyop.getFaceSelection curO
		local poGetFaceDeg = polyop.getFaceDeg
		polyop.setFaceSelection curO (for f in selFacesBA where (poGetFaceDeg curO f) == 4 collect f)
		redrawViews()
	)
	else
		messagebox "Select only one Editable Poly object" title:"Invalid Selection"
)

This will remove all quads from the selection, so only the non quads will remains selected:

(
	if selection.count == 1 and classof (curO = selection[1]) == Editable_Poly then
	(
		local selFacesBA = polyop.getFaceSelection curO
		local poGetFaceDeg = polyop.getFaceDeg
		polyop.setFaceSelection curO (for f in selFacesBA where (poGetFaceDeg curO f) != 4 collect f)
		redrawViews()
	)
	else
		messagebox "Select only one Editable Poly object" title:"Invalid Selection"
)
jininjin's picture

Thanks again Miauu. This

Thanks again Miauu. This helps alot.

miauu's picture

There is a script that allows

There is a script that allows you to select edges by length - miauu's Select Edges By Length.

jininjin's picture

Thanks Miauu. This is exactly

Thanks Miauu. This is exactly what I was looking for. Now I just need subtract quads from the selection and I should be good to go.

miauu's picture

You wants a script that will

You wants a script that will get selected faces and will remove the quad polygons from the selection, so at the end only tris and n-gons will remains selcted?
I can write this script, but will do it tonight.
Someone else can do it earlier. :)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.