INNER CODE UNIT · Python
_bool_cell
wzyn20051216/solidworks-automation-skill · apps/desktop/cad_workbench/app.py:509
def _bool_cell(self, table: QTableWidget, row: int, column: int) -> bool:
return self._cell(table, row, column).lower() in {"true", "1", "yes", "是"}
def collect_parameters(self) -> dict[str, Any]:
holes = []
for row in range(self.holes_table.rowCount()):
holes.append(
{
"id": self._cell(self.holes_table, row, 0),
"name": self._cell(self.holes_table, row, 1),
"hole_type": self._cell(self.holes_table, row, 2),
"face": self._cell(self.holes_table, row, 3),
"diameter": self._float_cell(self.holes_table, row, 4),
"quantity": self._int_cell(self.holes_table, row, 5),
"datum_x": self._cell(self.holes_table, row, 6),
"datum_y": self._cell(self.holes_table, row, 7),
"center_x": self._float_cell(self.holes_table, row, 8),
"center_y": self._float_cell(self.holes_table, row, 9),