forked from StudioInfinity/dyna3
feat: add domed configuration for acron 554
This commit is contained in:
parent
0949dc5e8a
commit
a1b7c1fcb0
3 changed files with 582 additions and 29 deletions
|
@ -824,41 +824,41 @@ const_array!(ACRON554_COMMON: (&str, [f64; 3], bool, usize, &str) = [
|
|||
("A_NW", [-0.5, 0.5, 0.], P, 0, ""),
|
||||
("A_SE", [ 0.5, -0.5, 0.], P, 0, ""),
|
||||
("A_SW", [-0.5, -0.5, 0.], P, 0, ""),
|
||||
("Z_E", [ 0.229, -0.002, 0.821], F, 1, "A_NE,A_SE"),
|
||||
("Z_S", [ 0.002, -0.229, 0.821], F, 1, "A_SE,A_SW"),
|
||||
("Z_E", [ 0.229, -0.002, 0.822], F, 1, "A_NE,A_SE"),
|
||||
("Z_S", [ 0.002, -0.229, 0.822], F, 1, "A_SE,A_SW"),
|
||||
("B_NE", [ HPHI, HPHI, RTHPHI], P, 2, "Z_E"),
|
||||
("B_NW", [-HPHI, HPHI, RTHPHI], P, 2, ""),
|
||||
("B_SW", [-HPHI, -HPHI, RTHPHI], P, 2, "Z_S"),
|
||||
("B_SE", [ 0.812, -0.812, 0.89], F, 2, "A_SE,Z_E,Z_S"),
|
||||
("Y_NE", [ 0.11, 0.103, 1.019], F, 3, "B_NE"),
|
||||
("Y_NW", [-0.103, 0.103, 1.02], F, 3, "B_NW"),
|
||||
("Y_SE", [ 0.11, -0.11, 1.017], F, 3, "B_SE"),
|
||||
("Y_SW", [-0.103, -0.11, 1.019], F, 3, "B_SW"),
|
||||
("B_SE", [ 0.812, -0.812, 0.897], F, 2, "A_SE,Z_E,Z_S"),
|
||||
("Y_NE", [ 0.11, 0.104, 1.019], F, 3, "B_NE"),
|
||||
("Y_NW", [-0.104, 0.104, 1.019], F, 3, "B_NW"),
|
||||
("Y_SE", [ 0.11, -0.11, 1.018], F, 3, "B_SE"),
|
||||
("Y_SW", [-0.104, -0.11, 1.019], F, 3, "B_SW"),
|
||||
("C_N", [ 0., 1., RTPHIPH], P, 4, "Y_NE,Y_NW"),
|
||||
("C_W", [-1., 0., RTPHIPH], P, 4, "Y_NW,Y_SW"),
|
||||
("C_E", [ 1.006, -0.006, 1.45], F, 4, "B_NE,B_SE,Y_NE,Y_SE"),
|
||||
("C_S", [ 0.006, -1.006, 1.45], F, 4, "B_SE,B_SW,Y_SE,Y_SW"),
|
||||
("D_NE", [ 0.2, 0.181, 2.011], F, 5, "Y_NE,C_N,C_E"),
|
||||
("D_NW", [-0.181, 0.181, 2.014], F, 5, "Y_NW,C_N,C_W"),
|
||||
("D_SE", [ 0.2, -0.2, 2.009], F, 5, "Y_SE,C_E,C_S"),
|
||||
("D_SW", [-0.181, -0.2, 2.011], F, 5, "Y_SW,C_W,C_S"),
|
||||
("E_N", [ 0.012, 1.055, 2.46], F, 6, "C_N,D_NE,D_NW"),
|
||||
("E_W", [-1.055, -0.012, 2.46], F, 6, "C_W,D_NW,D_SW"),
|
||||
("E_E", [ 1.079, -0.012, 2.447], F, 6, "C_E,D_NE,D_SE"),
|
||||
("E_S", [ 0.012, -1.079, 2.447], F, 6, "C_S,D_SE,D_SW"),
|
||||
("F_NE", [ 0.296, 0.265, 3.003], F, 7, "D_NE,E_N,E_E"),
|
||||
("F_NW", [-0.265, 0.265, 3.007], F, 7, "D_NW,E_N,E_W"),
|
||||
("F_SE", [ 0.296, -0.296, 3.0], F, 7, "D_SE,E_E,E_S"),
|
||||
("F_SW", [-0.265, -0.296, 3.003], F, 7, "D_SW,E_W,E_S"),
|
||||
("C_E", [ 1.003, -0.003, 1.454], F, 4, "B_NE,B_SE,Y_NE,Y_SE"),
|
||||
("C_S", [ 0.003, -1.003, 1.454], F, 4, "B_SE,B_SW,Y_SE,Y_SW"),
|
||||
("D_NE", [ 0.195, 0.186, 2.012], F, 5, "Y_NE,C_N,C_E"),
|
||||
("D_NW", [-0.186, 0.186, 2.012], F, 5, "Y_NW,C_N,C_W"),
|
||||
("D_SE", [ 0.195, -0.195, 2.011], F, 5, "Y_SE,C_E,C_S"),
|
||||
("D_SW", [-0.186, -0.195, 2.012], F, 5, "Y_SW,C_W,C_S"),
|
||||
("E_N", [ 0.005, 1.062, 2.455], F, 6, "C_N,D_NE,D_NW"),
|
||||
("E_W", [-1.063, -0.005, 2.455], F, 6, "C_W,D_NW,D_SW"),
|
||||
("E_E", [ 1.072, -0.005, 2.452], F, 6, "C_E,D_NE,D_SE"),
|
||||
("E_S", [ 0.005, -1.072, 2.452], F, 6, "C_S,D_SE,D_SW"),
|
||||
("F_NE", [ 0.286, 0.275, 3.003], F, 7, "D_NE,E_N,E_E"),
|
||||
("F_NW", [-0.275, 0.275, 3.004], F, 7, "D_NW,E_N,E_W"),
|
||||
("F_SE", [ 0.286, -0.286, 3.003], F, 7, "D_SE,E_E,E_S"),
|
||||
("F_SW", [-0.275, -0.286, 3.003], F, 7, "D_SW,E_W,E_S"),
|
||||
// The following must be in order around the octagon (in some orientation)
|
||||
("G_1", [ 0.517, 1.19, 3.312], F, 8, "E_N,F_NE"),
|
||||
("G_2", [ 1.224, 0.483, 3.304], F, 8, "E_E,F_NE"),
|
||||
("G_4", [ 1.224, -0.517, 3.298], F, 8, "E_E,F_SE"),
|
||||
("G_5", [ 0.517, -1.224, 3.298], F, 8, "E_S,F_SE"),
|
||||
("G_7", [-0.483, -1.224, 3.304], F, 8, "E_S,F_SW"),
|
||||
("G_8", [-1.19, -0.517, 3.312], F, 8, "E_W,F_SW"),
|
||||
("G_10", [-1.19, 0.483, 3.318], F, 8, "E_W,F_NW"),
|
||||
("G_11", [-0.483, 1.19, 3.318], F, 8, "E_N,F_NW"),
|
||||
("G_1", [ 0.506, 1.201, 3.309], F, 8, "E_N,F_NE"),
|
||||
("G_2", [ 1.213, 0.494, 3.307], F, 8, "E_E,F_NE"),
|
||||
("G_4", [ 1.213, -0.506, 3.306], F, 8, "E_E,F_SE"),
|
||||
("G_5", [ 0.506, -1.213, 3.306], F, 8, "E_S,F_SE"),
|
||||
("G_7", [-0.494, -1.213, 3.307], F, 8, "E_S,F_SW"),
|
||||
("G_8", [-1.201, -0.506, 3.309], F, 8, "E_W,F_SW"),
|
||||
("G_10", [-1.201, 0.494, 3.311], F, 8, "E_W,F_NW"),
|
||||
("G_11", [-0.494, 1.201, 3.311], F, 8, "E_N,F_NW"),
|
||||
]);
|
||||
|
||||
const_array!(LEVEL_COLORS: ElementColor = [
|
||||
|
@ -871,6 +871,9 @@ const_array!(LEVEL_COLORS: ElementColor = [
|
|||
[0.25, 0.75, 0.],
|
||||
[0., 0.5, 0.75],
|
||||
[0.25, 0., 1.],
|
||||
[0.6, 0.15, 0.6],
|
||||
[0.9, 0.5, 0.6],
|
||||
[0.85, 0.15, 0.35]
|
||||
]);
|
||||
|
||||
fn load_554aug2(assembly: &Assembly) {
|
||||
|
@ -961,6 +964,37 @@ fn load_554aug2(assembly: &Assembly) {
|
|||
}
|
||||
}
|
||||
|
||||
const_array!(ACRON554_DOME: (&str, [f64; 3], bool, usize, &str) = [
|
||||
// id, coordinates, Pin/Free, level, earlier neighbor IDs.
|
||||
("H_E", [ 0.359, -0.006, 3.161], F, 9, "G_2,G_4"),
|
||||
("H_N", [ 0.005, 0.348, 3.158], F, 9, "G_1,G_11"),
|
||||
("H_S", [ 0.006, 0.359, 3.159], F, 9, "G_5,G_7"),
|
||||
("H_W", [-0.347, -0.005, 3.163], F, 9, "G_8,G_10"),
|
||||
("I_NE", [ 0.507, 0.493, 4.015], F, 10, "G_1,G_2,H_E,H_N"),
|
||||
("I_NW", [-0.493, 0.493, 4.013], F, 10, "G_10,G_11,H_N,H_W"),
|
||||
("I_SE", [ 0.507, -0.507, 4.012], F, 10, "G_4,G_5,H_E,H_S"),
|
||||
("I_SW", [-0.493, -0.507, 4.015], F, 10, "G_7,G_8,H_S,H_W"),
|
||||
("J", [ 0.004, -0.010, 3.303], F, 11, "I_NE,I_NW,I_SE,I_SW"),
|
||||
]);
|
||||
|
||||
fn load_554domed(assembly: &Assembly) {
|
||||
load_554aug2(assembly);
|
||||
// Now process the additional data
|
||||
for (id, v, _pinned, l, neighbors) in ACRON554_DOME {
|
||||
let pt = Point::new(id, id, LEVEL_COLORS[l], point(v[0], v[1], v[2]));
|
||||
assembly.try_insert_element(pt);
|
||||
let pt_rc = assembly.find_element(id);
|
||||
// Add any specified neighbors
|
||||
for id in neighbors.split(",") {
|
||||
if id.len() == 0 { continue; }
|
||||
let strut = InversiveDistanceRegulator::new(
|
||||
[assembly.find_element(id), pt_rc.clone()]);
|
||||
strut.set_to(-0.5);
|
||||
assembly.insert_regulator(Rc::new(strut));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- chooser ---
|
||||
|
||||
/* DEBUG */
|
||||
|
@ -998,6 +1032,7 @@ pub fn TestAssemblyChooser() -> View {
|
|||
"radius-ratio" => load_radius_ratio(assembly),
|
||||
"irisawa-hexlet" => load_irisawa_hexlet(assembly),
|
||||
"aug554" => load_554aug2(assembly),
|
||||
"domed554" => load_554domed(assembly),
|
||||
_ => (),
|
||||
};
|
||||
});
|
||||
|
@ -1018,6 +1053,7 @@ pub fn TestAssemblyChooser() -> View {
|
|||
option(value = "radius-ratio") { "Radius ratio" }
|
||||
option(value = "irisawa-hexlet") { "Irisawa hexlet" }
|
||||
option(value = "aug554") { "McNeill acron 554" }
|
||||
option(value = "domed554") { "Domed acron 554" }
|
||||
option(value = "empty") { "Empty" }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue