(config)
| 169 | return inflator.mesh; |
| 170 | |
| 171 | def tile_with_mixed_patterns(config): |
| 172 | options = extract_options(config); |
| 173 | options["dof_type"] = str(config.get("dof_type", "isotropic")); |
| 174 | options["thickness_type"] = str(config.get("thickness_type", "vertex")); |
| 175 | networks = load_wires(str(config["wire_list_file"])); |
| 176 | guide_mesh = pymesh.load_mesh(config["guide_mesh"]); |
| 177 | per_vertex_thickness = options["thickness_type"] == "vertex"; |
| 178 | |
| 179 | tiler = Tiler(); |
| 180 | tiler.tile_with_mixed_patterns(mesh, |
| 181 | per_vertex_thickness, options["dof_type"] == "isotropic"); |
| 182 | network = tiler.wire_network; |
| 183 | |
| 184 | if config.get("trim", False): |
| 185 | network.trim(); |
| 186 | if "output_wire_network" in config: |
| 187 | network.write_to_file(config["output_wire_network"]); |
| 188 | |
| 189 | inflator = Inflator(network); |
| 190 | inflator.subdivide_order = options["subdiv"]; |
| 191 | inflator.subdivide_method = options["subdiv_method"]; |
| 192 | inflator.inflate(network.get_attribute("thickness").ravel(), |
| 193 | per_vertex_thickness); |
| 194 | return inflator.mesh; |
| 195 | |
| 196 | def parse_args(): |
| 197 | parser = argparse.ArgumentParser(description=__doc__); |
no test coverage detected