Код:knot_pos1=null;knot_pos2=null;knot_pos3=null;S_C=null;nk=null;dopknot=null;qq=null undo "shape_mod" on ( for i in selection where superClassof i == shape do ( S_C = copy i; S_C.name = uniquename (i.name+"_mod") convertToSplineShape S_C for sp=1 to numSplines S_C do ( for spv = 1 to numKnots S_C sp do ( setKnotType S_C sp spv #corner ) ) for sp=1 to (numSplines S_C) do ( nk = numKnots S_C sp if nk > 2 do ( if isClosed S_C sp then qq=1 else qq=2 for spv = 1 to nk-qq do ( knot_pos1=getknotpoint S_C sp spv if (spv+1) < nk then ( dopknot = spv+1 knot_pos2=getknotpoint S_C sp (spv+2) ) else ( dopknot = nk knot_pos2=getknotpoint S_C sp 1 ) knot_pos3=((knot_pos1+knot_pos2)/2) setKnotPoint S_C sp dopknot knot_pos3 updateShape S_C ) ) ) ) )