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

Method test_profile

python/pymesh/wires/tests/test_inflator.py:56–78  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

54 self.assertTrue(mesh.is_closed())
55
56 def test_profile(self):
57 wire_network = self.get_brick5()
58 params = Parameters(wire_network, 0.1)
59 tiler = Tiler()
60 tiler.set_base_pattern(wire_network)
61 tiler.tile_with_guide_bbox(
62 np.zeros(3), np.ones(3), np.ones(3)*2, params)
63 tiled_wire_network = tiler.wire_network
64
65 inflator = Inflator(tiled_wire_network)
66 inflator.inflate(
67 tiled_wire_network.get_attribute("thickness").ravel())
68 mesh1 = inflator.mesh
69
70 inflator.set_profile(6)
71 inflator.inflate(
72 tiled_wire_network.get_attribute("thickness").ravel())
73 mesh2 = inflator.mesh
74
75 self.assertTrue(mesh1.is_closed())
76 self.assertTrue(mesh2.is_closed())
77 self.assertLess(mesh1.num_vertices, mesh2.num_vertices)
78 self.assertLess(mesh1.num_faces, mesh2.num_faces)
79

Callers

nothing calls this directly

Calls 10

set_base_patternMethod · 0.95
tile_with_guide_bboxMethod · 0.95
inflateMethod · 0.95
set_profileMethod · 0.95
ParametersClass · 0.90
TilerClass · 0.90
InflatorClass · 0.90
get_brick5Method · 0.80
get_attributeMethod · 0.45
is_closedMethod · 0.45

Tested by

no test coverage detected