$\Large隐藏无关对象$

主视图

左视图

俯视图

原视图

初始化

l1 = Flatten(Sequence[Sequence[Polygon[(u, v), (u + 1, v), 4], u, 0, 4], v, 0, 4])
A1: 1
A2: 2
A3 = 3
A4 = 4
A5 = 5
A6 = 6
A7 = 7
A8 = 8
A9 = 9
A10 = 10
A11 = 11
A12 = 12
A13 = 13
A14 = 14
A15 = 15
A16 = 16
A17 = 17
A18 = 18
A19 = 19
A20 = 20
A21 = 21
A22 = 22
A23 = 23
A24 = 24
A25 = 25
B1 = Element(l1, A1)
n1: -1
n2: -1
n3: -1
n4: -1
n5: -1
n6: -1
n7: -1
n8: -1
n9: -1
n10: -1
n11: -1
n12: -1
n13: -1
n14: -1
n15: -1
n16: -1
n17: -1
n18: -1
n19: -1
n20: -1
n21: -1
n22: -1
n23: -1
n24: -1
n25: -1
B2 = Element(l1, A2)
B3 = Element(l1, A3)
B4 = Element(l1, A4)
B5 = Element(l1, A5)
B6 = Element(l1, A6)
B7 = Element(l1, A7)
B8 = Element(l1, A8)
B9 = Element(l1, A9)
B10 = Element(l1, A10)
B11 = Element(l1, A11)
B12 = Element(l1, A12)
B13 = Element(l1, A13)
B14 = Element(l1, A14)
B15 = Element(l1, A15)
B16 = Element(l1, A16)
B17 = Element(l1, A17)
B18 = Element(l1, A18)
B19 = Element(l1, A19)
B20 = Element(l1, A20)
B21 = Element(l1, A21)
B22 = Element(l1, A22)
B23 = Element(l1, A23)
B24 = Element(l1, A24)
B25 = Element(l1, A25)
c1 = Sequence(Cube[Translate[B1, Vector[(0, 0, v)]], true], v, 0, n1)
c2 = Sequence(Cube[Translate[B2, Vector[(0, 0, v)]], true], v, 0, n2)
c3 = Sequence(Cube[Translate[B3, Vector[(0, 0, v)]], true], v, 0, n3)
c4 = Sequence(Cube[Translate[B4, Vector[(0, 0, v)]], true], v, 0, n4)
c5 = Sequence(Cube[Translate[B5, Vector[(0, 0, v)]], true], v, 0, n5)
c6 = Sequence(Cube[Translate[B6, Vector[(0, 0, v)]], true], v, 0, n6)
c7 = Sequence(Cube[Translate[B7, Vector[(0, 0, v)]], true], v, 0, n7)
c8 = Sequence(Cube[Translate[B8, Vector[(0, 0, v)]], true], v, 0, n8)
c9 = Sequence(Cube[Translate[B9, Vector[(0, 0, v)]], true], v, 0, n9)
c10 = Sequence(Cube[Translate[B10, Vector[(0, 0, v)]], true], v, 0, n10)
c11 = Sequence(Cube[Translate[B11, Vector[(0, 0, v)]], true], v, 0, n11)
c12 = Sequence(Cube[Translate[B12, Vector[(0, 0, v)]], true], v, 0, n12)
c13 = Sequence(Cube[Translate[B13, Vector[(0, 0, v)]], true], v, 0, n13)
c14 = Sequence(Cube[Translate[B14, Vector[(0, 0, v)]], true], v, 0, n14)
c15 = Sequence(Cube[Translate[B15, Vector[(0, 0, v)]], true], v, 0, n15)
c16 = Sequence(Cube[Translate[B16, Vector[(0, 0, v)]], true], v, 0, n16)
c17 = Sequence(Cube[Translate[B17, Vector[(0, 0, v)]], true], v, 0, n17)
c18 = Sequence(Cube[Translate[B18, Vector[(0, 0, v)]], true], v, 0, n18)
c19 = Sequence(Cube[Translate[B19, Vector[(0, 0, v)]], true], v, 0, n19)
c20 = Sequence(Cube[Translate[B20, Vector[(0, 0, v)]], true], v, 0, n20)
c21 = Sequence(Cube[Translate[B21, Vector[(0, 0, v)]], true], v, 0, n21)
c22 = Sequence(Cube[Translate[B22, Vector[(0, 0, v)]], true], v, 0, n22)
c23 = Sequence(Cube[Translate[B23, Vector[(0, 0, v)]], true], v, 0, n23)
c24 = Sequence(Cube[Translate[B24, Vector[(0, 0, v)]], true], v, 0, n24)
c25 = Sequence(Cube[Translate[B25, Vector[(0, 0, v)]], true], v, 0, n25)
text1 = Text(n1 + 1, Centroid[B1] + (-0.12, -0.21))
text2 = Text(n2 + 1, Centroid[B2] + (-0.12, -0.21))
text3 = Text(n3 + 1, Centroid[B3] + (-0.12, -0.21))
text4 = Text(n4 + 1, Centroid[B4] + (-0.12, -0.21))
text5 = Text(n5 + 1, Centroid[B5] + (-0.12, -0.21))
text6 = Text(n6 + 1, Centroid[B6] + (-0.12, -0.21))
text7 = Text(n7 + 1, Centroid[B7] + (-0.12, -0.21))
text8 = Text(n8 + 1, Centroid[B8] + (-0.12, -0.21))
text9 = Text(n9 + 1, Centroid[B9] + (-0.12, -0.21))
text10 = Text(n10 + 1, Centroid[B10] + (-0.12, -0.21))
text11 = Text(n11 + 1, Centroid[B11] + (-0.12, -0.21))
text12 = Text(n12 + 1, Centroid[B12] + (-0.12, -0.21))
text13 = Text(n13 + 1, Centroid[B13] + (-0.12, -0.21))
text14 = Text(n14 + 1, Centroid[B14] + (-0.12, -0.21))
text15 = Text(n15 + 1, Centroid[B15] + (-0.12, -0.21))
text16 = Text(n16 + 1, Centroid[B16] + (-0.12, -0.21))
text17 = Text(n17 + 1, Centroid[B17] + (-0.12, -0.21))
text18 = Text(n18 + 1, Centroid[B18] + (-0.12, -0.21))
text19 = Text(n19 + 1, Centroid[B19] + (-0.12, -0.21))
text20 = Text(n20 + 1, Centroid[B20] + (-0.12, -0.21))
text21 = Text(n21 + 1, Centroid[B21] + (-0.12, -0.21))
text22 = Text(n22 + 1, Centroid[B22] + (-0.12, -0.21))
text23 = Text(n23 + 1, Centroid[B23] + (-0.12, -0.21))
text24 = Text(n24 + 1, Centroid[B24] + (-0.12, -0.21))
text25 = Text(n25 + 1, Centroid[B25] + (-0.12, -0.21))
a: false
b = true
text26 = LaTeX("请点击小格子,\textcolor{red}{" + (If[b, "增加", "减少"]) + "}小立方体")
l2 = 涂色(c1)
l3 = 涂色(c2)
l4 = 涂色(c3)
l5 = 涂色(c4)
l6 = 涂色(c5)
l7 = 涂色(c6)
l8 = 涂色(c7)
l9 = 涂色(c8)
l10 = 涂色(c9)
l11 = 涂色(c10)
l12 = 涂色(c11)
l13 = 涂色(c12)
l14 = 涂色(c13)
l15 = 涂色(c14)
l16 = 涂色(c15)
l17 = 涂色(c16)
l18 = 涂色(c17)
l19 = 涂色(c18)
l20 = 涂色(c19)
l21 = 涂色(c20)
l22 = 涂色(c21)
l23 = 涂色(c22)
l24 = 涂色(c23)
l25 = 涂色(c24)
l26 = 涂色(c25)
l27 = Join({l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, l25, l26})
c1长 = 7
c1元素1 = Element(c1, 1)
c1元素2 = Element(c1, 2)
c1元素3 = Element(c1, 3)
c1元素4 = Element(c1, 4)
c1元素5 = Element(c1, 5)
c1元素6 = Element(c1, 6)
c1元素7 = Element(c1, 7)
c2长 = 7
c2元素1 = Element(c2, 1)
c2元素2 = Element(c2, 2)
c2元素3 = Element(c2, 3)
c2元素4 = Element(c2, 4)
c2元素5 = Element(c2, 5)
c2元素6 = Element(c2, 6)
c2元素7 = Element(c2, 7)
c3长 = 7
c3元素1 = Element(c3, 1)
c3元素2 = Element(c3, 2)
c3元素3 = Element(c3, 3)
c3元素4 = Element(c3, 4)
c3元素5 = Element(c3, 5)
c3元素6 = Element(c3, 6)
c3元素7 = Element(c3, 7)
c4长 = 7
c4元素1 = Element(c4, 1)
c4元素2 = Element(c4, 2)
c4元素3 = Element(c4, 3)
c4元素4 = Element(c4, 4)
c4元素5 = Element(c4, 5)
c4元素6 = Element(c4, 6)
c4元素7 = Element(c4, 7)
c5长 = 7
c5元素1 = Element(c5, 1)
c5元素2 = Element(c5, 2)
c5元素3 = Element(c5, 3)
c5元素4 = Element(c5, 4)
c5元素5 = Element(c5, 5)
c5元素6 = Element(c5, 6)
c5元素7 = Element(c5, 7)
c6长 = 7
c6元素1 = Element(c6, 1)
c6元素2 = Element(c6, 2)
c6元素3 = Element(c6, 3)
c6元素4 = Element(c6, 4)
c6元素5 = Element(c6, 5)
c6元素6 = Element(c6, 6)
c6元素7 = Element(c6, 7)
c7长 = 7
c7元素1 = Element(c7, 1)
c7元素2 = Element(c7, 2)
c7元素3 = Element(c7, 3)
c7元素4 = Element(c7, 4)
c7元素5 = Element(c7, 5)
c7元素6 = Element(c7, 6)
c7元素7 = Element(c7, 7)
c8长 = 7
c8元素1 = Element(c8, 1)
c8元素2 = Element(c8, 2)
c8元素3 = Element(c8, 3)
c8元素4 = Element(c8, 4)
c8元素5 = Element(c8, 5)
c8元素6 = Element(c8, 6)
c8元素7 = Element(c8, 7)
c9长 = 7
c9元素1 = Element(c9, 1)
c9元素2 = Element(c9, 2)
c9元素3 = Element(c9, 3)
c9元素4 = Element(c9, 4)
c9元素5 = Element(c9, 5)
c9元素6 = Element(c9, 6)
c9元素7 = Element(c9, 7)
c10长 = 7
c10元素1 = Element(c10, 1)
c10元素2 = Element(c10, 2)
c10元素3 = Element(c10, 3)
c10元素4 = Element(c10, 4)
c10元素5 = Element(c10, 5)
c10元素6 = Element(c10, 6)
c10元素7 = Element(c10, 7)
c11长 = 7
c11元素1 = Element(c11, 1)
c11元素2 = Element(c11, 2)
c11元素3 = Element(c11, 3)
c11元素4 = Element(c11, 4)
c11元素5 = Element(c11, 5)
c11元素6 = Element(c11, 6)
c11元素7 = Element(c11, 7)
c12长 = 7
c12元素1 = Element(c12, 1)
c12元素2 = Element(c12, 2)
c12元素3 = Element(c12, 3)
c12元素4 = Element(c12, 4)
c12元素5 = Element(c12, 5)
c12元素6 = Element(c12, 6)
c12元素7 = Element(c12, 7)
c13长 = 7
c13元素1 = Element(c13, 1)
c13元素2 = Element(c13, 2)
c13元素3 = Element(c13, 3)
c13元素4 = Element(c13, 4)
c13元素5 = Element(c13, 5)
c13元素6 = Element(c13, 6)
c13元素7 = Element(c13, 7)
c14长 = 7
c14元素1 = Element(c14, 1)
c14元素2 = Element(c14, 2)
c14元素3 = Element(c14, 3)
c14元素4 = Element(c14, 4)
c14元素5 = Element(c14, 5)
c14元素6 = Element(c14, 6)
c14元素7 = Element(c14, 7)
c15长 = 7
c15元素1 = Element(c15, 1)
c15元素2 = Element(c15, 2)
c15元素3 = Element(c15, 3)
c15元素4 = Element(c15, 4)
c15元素5 = Element(c15, 5)
c15元素6 = Element(c15, 6)
c15元素7 = Element(c15, 7)
c16长 = 7
c16元素1 = Element(c16, 1)
c16元素2 = Element(c16, 2)
c16元素3 = Element(c16, 3)
c16元素4 = Element(c16, 4)
c16元素5 = Element(c16, 5)
c16元素6 = Element(c16, 6)
c16元素7 = Element(c16, 7)
c17长 = 7
c17元素1 = Element(c17, 1)
c17元素2 = Element(c17, 2)
c17元素3 = Element(c17, 3)
c17元素4 = Element(c17, 4)
c17元素5 = Element(c17, 5)
c17元素6 = Element(c17, 6)
c17元素7 = Element(c17, 7)
c18长 = 7
c18元素1 = Element(c18, 1)
c18元素2 = Element(c18, 2)
c18元素3 = Element(c18, 3)
c18元素4 = Element(c18, 4)
c18元素5 = Element(c18, 5)
c18元素6 = Element(c18, 6)
c18元素7 = Element(c18, 7)
c19长 = 7
c19元素1 = Element(c19, 1)
c19元素2 = Element(c19, 2)
c19元素3 = Element(c19, 3)
c19元素4 = Element(c19, 4)
c19元素5 = Element(c19, 5)
c19元素6 = Element(c19, 6)
c19元素7 = Element(c19, 7)
c20长 = 7
c20元素1 = Element(c20, 1)
c20元素2 = Element(c20, 2)
c20元素3 = Element(c20, 3)
c20元素4 = Element(c20, 4)
c20元素5 = Element(c20, 5)
c20元素6 = Element(c20, 6)
c20元素7 = Element(c20, 7)
c21长 = 7
c21元素1 = Element(c21, 1)
c21元素2 = Element(c21, 2)
c21元素3 = Element(c21, 3)
c21元素4 = Element(c21, 4)
c21元素5 = Element(c21, 5)
c21元素6 = Element(c21, 6)
c21元素7 = Element(c21, 7)
c22长 = 7
c22元素1 = Element(c22, 1)
c22元素2 = Element(c22, 2)
c22元素3 = Element(c22, 3)
c22元素4 = Element(c22, 4)
c22元素5 = Element(c22, 5)
c22元素6 = Element(c22, 6)
c22元素7 = Element(c22, 7)
c23长 = 7
c23元素1 = Element(c23, 1)
c23元素2 = Element(c23, 2)
c23元素3 = Element(c23, 3)
c23元素4 = Element(c23, 4)
c23元素5 = Element(c23, 5)
c23元素6 = Element(c23, 6)
c23元素7 = Element(c23, 7)
c24长 = 7
c24元素1 = Element(c24, 1)
c24元素2 = Element(c24, 2)
c24元素3 = Element(c24, 3)
c24元素4 = Element(c24, 4)
c24元素5 = Element(c24, 5)
c24元素6 = Element(c24, 6)
c24元素7 = Element(c24, 7)
c25长 = 7
c25元素1 = Element(c25, 1)
c25元素2 = Element(c25, 2)
c25元素3 = Element(c25, 3)
c25元素4 = Element(c25, 4)
c25元素5 = Element(c25, 5)
c25元素6 = Element(c25, 6)
c25元素7 = Element(c25, 7)
n0: -1

Tool: 涂色
请点击列表，会生成一个新列表；再在指令栏输入：执行()【括号里面写新列表的名称】
Input: l1
Output: l5

l1长 = Length(l1)
l2 = Sequence(Name[l1] + "元素" + (k) + "=Element(" + (Name[l1]) + "," + (k) + ")", k, 1, l1长)
l4: {Name[l1] + "长=CopyFreeObject(Length(" + (Name[l1]) + "))"}
l3 = Sequence("SetDynamicColor(" + (Name[l1]) + "元素" + (k) + ",x(Point(Polyline({(1, 0, 0), (1, 0, 1), (0, 0, 1), (0, 1, 1), (0, 1, 0), (1, 1, 0), (1, 0, 0)}), " + (k) + "/ " + (Name[l1]) + "长)),y(Point(Polyline({(1, 0, 0), (1, 0, 1), (0, 0, 1), (0, 1, 1), (0, 1, 0), (1, 1, 0), (1, 0, 0)}), " + (k) + "/" + (Name[l1]) + "长)),z(Point(Polyline({(1, 0, 0), (1, 0, 1), (0, 0, 1), (0, 1, 1), (0, 1, 0), (1, 1, 0), (1, 0, 0)}), " + (k) + "/ " + (Name[l1]) + "长)))", k, 1, l1长)
l5 = Join({l4, l2, l3})