1. Tuk Bredsdorff
  2. Geodome frames for SU

Commits

Tuk Bredsdorff  committed a49c9de

Now sorting by length str as there were some counts that occured multiple times.

  • Participants
  • Parent commits 1d4fdea
  • Branches default

Comments (0)

Files changed (1)

File geodome_frame.rb

View file
 STRUT_NAMES = ["A", "B", "C", "D"]
 
 $strut_lengths = nil
-$strut_counts = nil
+$strut_lengths_sorted = nil
 
 
 def edges_in_selection
 
 # Look up colors and names given a strut length
 def strut_properties length
-	count = $strut_lengths[length.to_s]
-	index = $strut_counts.index count
+	index = $strut_lengths_sorted.index length.to_s
 	color = PRIMARY_COLORS[index]
 	name = STRUT_NAMES[index]
 	
 				size = inputbox prompts, STRUT_SIZE, "Strut Dimensions"
 				if size
 					$strut_lengths = find_strut_lengths
-					$strut_counts = $strut_lengths.values.sort
+					$strut_lengths_sorted = $strut_lengths.keys.sort
 					
 					create_frame edges, center, size
 					print_strut_lengths