global proc smoothEdgeRing(int $ksb) { polySelectEdges edgeRing; string $startRingEdge[] = `ls -sl -fl`; getFaces; global string $slFaces[]; global string $diffF = ""; $slFaces = `ls -sl -fl`; string $forFace; for ($forFace in $slFaces) { select $forFace; ConvertSelectionToVertices; string $test[]= `ls -sl -fl`; int $SizeV = `size $test`; if ($SizeV != 4) $diffF = ($diffF+$forFace+" "); } string $diffFaceArray[] = stringToStringArray($diffF, " "); string $diffRingEdgeRez[] = stringArrayRemove($diffFaceArray,$slFaces); select $diffRingEdgeRez; if ($ksb == 1){ polySmooth -mth 1 -dv 1 -c 1 -kb 0 -ksb 0 -khe 0 -kt 1 -kmb 1 -suv 1 -sl 1 -dpe 1 -ps 1 -ro 1 -ch 1 ;} if ($ksb == 0){ polySmooth -mth 0 -dv 1 -c 1 -kb 0 -ksb $ksb -khe 0 -kt 1 -kmb 1 -suv 0 -sl 1 -dpe 1 -ps 0.1 -ro 1 -ch 1 ;} string $lastHelpRingEdgeFace[] = `ls -sl -fl`; GrowPolygonSelectionRegion; select -d $lastHelpRingEdgeFace; ConvertSelectionToEdges; string $lastHelpRingEdge[] = `ls -sl -fl`; select $lastHelpRingEdgeFace; ConvertSelectionToEdges; string $allRingEdge[] = `ls -sl -fl`; select $startRingEdge; SelectEdgeLoop; GrowPolygonSelectionRegion; string $lastRingEdge[] = `ls -sl -fl`; string $lastRingEdge[] = stringArrayCatenate( $lastRingEdge, $lastHelpRingEdge); string $diffRingEdge[] = stringArrayRemove($lastRingEdge,$allRingEdge); select $diffRingEdge; DeleteEdge -ch 1; $startRingEdge = {""}; $slFaces = {""}; $lastRingEdge = {""}; $diffRingEdgeRez = {""}; $diffF = ""; $lastHelpRingEdge = {""}; }