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

Function tile_with_guide_box

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

Source from the content-addressed store, hash-verified

121 return tile_with_guide_box(config);
122
123def tile_with_guide_box(config):
124 options = extract_options(config);
125 network = load_wire(str(config["wire_network"]));
126 parameters = load_parameters(network, config);
127 tiler = Tiler();
128 tiler.set_base_pattern(network);
129 tiler.tile_with_guide_bbox(
130 config["bbox_min"][:network.dim],
131 config["bbox_max"][:network.dim],
132 config["repeats"][:network.dim],
133 parameters);
134 network = tiler.wire_network;
135
136 if config.get("trim", False):
137 network.trim();
138 if "output_wire_network" in config:
139 network.write_to_file(config["output_wire_network"]);
140
141 inflator = Inflator(network);
142 inflator.subdivide_order = options["subdiv"];
143 inflator.subdivide_method = options["subdiv_method"];
144 inflator.inflate(network.get_attribute("thickness").ravel(),
145 parameters.per_vertex_thickness);
146 return inflator.mesh;
147
148def tile_with_guide_mesh(config):
149 options = extract_options(config);

Callers 1

tileFunction · 0.85

Calls 12

set_base_patternMethod · 0.95
tile_with_guide_bboxMethod · 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
getMethod · 0.45
write_to_fileMethod · 0.45
get_attributeMethod · 0.45

Tested by

no test coverage detected