| 101 | } |
| 102 | |
| 103 | void TilerEngine::normalize_unit_wire(const VectorF& cell_size) { |
| 104 | if (cell_size.minCoeff() <= 1e-30) { |
| 105 | const size_t dim = cell_size.size(); |
| 106 | if (dim == 3) |
| 107 | throw RuntimeError("It seems the 3D wires are flat."); |
| 108 | else if (dim == 2) |
| 109 | throw RuntimeError("It seems the 2D wires are degenerated/linear."); |
| 110 | else |
| 111 | throw NotImplementedError("Unsupported dimension!"); |
| 112 | } |
| 113 | |
| 114 | VectorF factors = cell_size.cwiseQuotient( |
| 115 | m_unit_wire_network->get_bbox_max() - m_unit_wire_network->get_bbox_min()); |
| 116 | m_unit_wire_network->center_at_origin(); |
| 117 | m_unit_wire_network->scale(factors); |
| 118 | } |
| 119 | |
| 120 | void TilerEngine::update_attributes(WireNetwork& wire_network, size_t num_repetitions) { |
| 121 | std::vector<std::string> attr_names = m_unit_wire_network->get_attribute_names(); |
nothing calls this directly
no test coverage detected