Icon representing a recipe

Recipe: Datacute Least Ideal

created by spdenne

Profile


Name
Datacute Least Ideal
ID
46694
Shared with
Public
Parent
Datacute Banded Idealize
Children
None
Created on
September 16, 2013 at 06:59 AM UTC
Updated on
September 16, 2013 at 06:59 AM UTC
Description

Reports the amount of movement due to using Idealize on each pair of segments.

Best for


Code


print("Finding biggest movement from Idealize") sc = structure.GetCount() save.Quicksave(3) selection.DeselectAll() selection.Select(1) worstSegment=0 worstSegmentLength=0 bestSegment=0 bestScore=current.GetScore() for i=1,sc-1 do if i+1 == sc then iBand = band.Add(i,i+1,1,0.0000001,0,0) else iBand = band.Add(i,i+1,sc,0.0000001,0,0) end selection.Select(i+1) structure.IdealizeSelected() selection.Deselect(i) local bandLength = band.GetLength(iBand) bandLength = bandLength - bandLength % 0.00001 print(i,bandLength) if bandLength > worstSegmentLength then worstSegmentLength = bandLength worstSegment = i end currentScore = current.GetScore() if currentScore > bestScore then bestScore = currentScore bestSegment = i end save.Quickload(3) end selection.DeselectAll() print("Biggest movement from Idealize is between",worstSegment,worstSegment+1) if bestSegment > 0 then print("Biggest gain to",bestScore," from Idealize is between",bestSegment,bestSegment+1) end

Comments


spdenne Lv 1

The purpose of this recipe is to identify segments that might be worth a closer look. The idea is that if the idealize tool results in a large movement, then the segments arrangement must have been far from ideal, and you may be able to find a way to rearrange those segments in a more ideal way, without giving up all your points.