- /*
- Check if breaking constraints are met.
- */
- bool break_satisfy = true;
- int sz = positions->cols_.size ();
- for (int i = sz; i--;)
+ *ideal = (spring) ? spring->distance_ : 5.0;
+ *inv_hooke = (spring) ? spring->inverse_strength_ : 1.0;
+}
+
+static Column_description
+get_column_description (vector<Grob*> const &cols, vsize col_index, bool line_starter)
+{
+ Grob *col = cols[col_index];
+ if (line_starter)
+ col = maybe_find_prebroken_piece (col, RIGHT);
+
+ Column_description description;
+ Grob *next_col = next_spaceable_column (cols, col_index);
+ if (next_col)
+ get_column_spring (col, next_col, &description.ideal_, &description.inverse_hooke_);
+ Grob *end_col = dynamic_cast<Item*> (cols[col_index+1])->find_prebroken_piece (LEFT);
+ if (end_col)
+ get_column_spring (col, end_col, &description.end_ideal_, &description.end_inverse_hooke_);
+
+ for (SCM s = Spaceable_grob::get_minimum_distances (col);
+ scm_is_pair (s); s = scm_cdr (s))