Changeset View
Changeset View
Standalone View
Standalone View
add_mesh_extra_objects/add_mesh_honeycomb.py
| Context not available. | |||||
| def vert(self, row, col): | def vert(self, row, col): | ||||
| # full cell | # full cell | ||||
| if row >= 0 and row < self.rows and col >= 0 and col < self.cols: return [0, 1, 2, 3, 4, 5] | if 0 <= row < self.rows and 0 <= col < self.cols: return [0, 1, 2, 3, 4, 5] | ||||
| # right down corner | # right down corner | ||||
| if row == -1 and col == self.cols - 1: return [1, 2] | if row == -1 and col == self.cols - 1: return [1, 2] | ||||
| if row == 0 and self.rows > 1 and col == self.cols: return [1, 2, 3] | if row == 0 and self.rows > 1 and col == self.cols: return [1, 2, 3] | ||||
| Context not available. | |||||
| # right up corner | # right up corner | ||||
| if row == self.rows and col == self.cols: return [3, 4] | if row == self.rows and col == self.cols: return [3, 4] | ||||
| # horizontal lines | # horizontal lines | ||||
| if col >= 0 and col < self.cols: | if 0 <= col < self.cols: | ||||
| if row == -1: return [0, 1, 2] | if row == -1: return [0, 1, 2] | ||||
| if row == self.rows: return [3, 4, 5] | if row == self.rows: return [3, 4, 5] | ||||
| # vertical lines | # vertical lines | ||||
| if row >= 0 and row < self.rows: | if 0 <= row < self.rows: | ||||
| if col == -1: | if col == -1: | ||||
| if row % 2: return [0, 1, 4, 5] | if row % 2: return [0, 1, 4, 5] | ||||
| else: return [0, 5] | else: return [0, 5] | ||||
| Context not available. | |||||