MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / tile_with_mixed_patterns

Function tile_with_mixed_patterns

scripts/microstructure_gen.py:171–194  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

169 return inflator.mesh;
170
171def 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
196def parse_args():
197 parser = argparse.ArgumentParser(description=__doc__);

Callers 1

tileFunction · 0.85

Calls 11

inflateMethod · 0.95
TilerClass · 0.90
InflatorClass · 0.90
extract_optionsFunction · 0.85
trimMethod · 0.80
load_wiresFunction · 0.70
getMethod · 0.45
load_meshMethod · 0.45
write_to_fileMethod · 0.45
get_attributeMethod · 0.45

Tested by

no test coverage detected