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

Function tile_with_guide_mesh

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

Source from the content-addressed store, hash-verified

146 return inflator.mesh;
147
148def tile_with_guide_mesh(config):
149 options = extract_options(config);
150 network = load_wire(str(config["wire_network"]));
151 parameters = load_parameters(network, config);
152 guide_mesh = pymesh.load_mesh(config["guide_mesh"]);
153
154 tiler = Tiler();
155 tiler.set_base_pattern(network);
156 tiler.tile_with_guide_mesh(guide_mesh, parameters);
157 network = tiler.wire_network;
158
159 if config.get("trim", False):
160 network.trim();
161 if "output_wire_network" in config:
162 network.write_to_file(config["output_wire_network"]);
163
164 inflator = Inflator(network);
165 inflator.subdivide_order = options["subdiv"];
166 inflator.subdivide_method = options["subdiv_method"];
167 inflator.inflate(network.get_attribute("thickness").ravel(),
168 parameters.per_vertex_thickness);
169 return inflator.mesh;
170
171def tile_with_mixed_patterns(config):
172 options = extract_options(config);

Callers 1

tileFunction · 0.85

Calls 13

set_base_patternMethod · 0.95
tile_with_guide_meshMethod · 0.95
inflateMethod · 0.95
TilerClass · 0.90
InflatorClass · 0.90
extract_optionsFunction · 0.85
load_parametersFunction · 0.85
trimMethod · 0.80
load_wireFunction · 0.70
load_meshMethod · 0.45
getMethod · 0.45
write_to_fileMethod · 0.45

Tested by

no test coverage detected