> I should have said iso_delta! I may have something on this tomorrow, minus
converting color to map indexes.
OK, I took the test code and organized it into this below. When deltahedra are
created using the table, the option is forced to constituent (if sub-symmetry
was chosen). There are no complex types in the table so constituent mode will
always be ok. If "none" was chosen, it just strips the colors, and deletes the
edges.
Option lower case c for coloring constituents by map value is just a comment for
now.
The only option that sub-symmetry coloring doesn't work well is option -c k,
when there are pairs of dipyramids distributed k times. The are colored as
individual constituents every time. Perhaps there is a way to do this with two
sym_repeat statements instead of one. Case h for pairs of tetrahedra distributed
k times work good, so it may be able to work like that instead.
Otherwise, this was all there was to it.
Roger
Code snippet....
// initialize, set color map
v_coloring vc(&geom);
e_coloring ec(&geom);
f_coloring fc(&geom);
color_map *rand = init_color_map("jumble");
vc.add_cmap(rand);
ec.add_cmap(rand);
fc.add_cmap(rand);
// color by sub-symmetry happened by default in sym_repeat() as map indexes
if (!opts.coloring_method) {
// no color, strip colors
fc.one_col(col_val());
geom.clear_edges();
geom.clear_v_cols();
}
else
if (opts.coloring_method == 'S' ) {
// resolve map indexes
vc.apply_cmap();
ec.apply_cmap();
fc.apply_cmap();
}
if (opts.coloring_method == 'C' || opts.coloring_method == 'c') {
// color by constituents
fc.parts();
fc.apply_cmap();
geom.add_missing_impl_edges();
ec.face_color();
vc.face_color();
if (opts.coloring_method == 'c') {
// turn into map values
}
}