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

Method set_refinement

python/pymesh/wires/Inflator.py:46–61  ·  view source on GitHub ↗

Refine the output mesh using subdivision. Arguments: order: how many times to subdivide. mehtod: which subdivision scheme to use. Options are ``loop`` and ``simple``.

(self, order=1, method="loop")

Source from the content-addressed store, hash-verified

44 self.profile = PyMesh.WireProfile.create_isotropic(N)
45
46 def set_refinement(self, order=1, method="loop"):
47 """ Refine the output mesh using subdivision.
48
49 Arguments:
50 order: how many times to subdivide.
51 mehtod: which subdivision scheme to use.
52 Options are ``loop`` and ``simple``.
53 """
54 if not isinstance(order, int) or order < 0:
55 raise RuntimeError("Invalid subdivision order: {}".format(order))
56 if method not in ("loop", "simple"):
57 raise NotImplementedError(
58 "Unsupport subdivision method: {}".format(method))
59
60 self.subdivide_order = order
61 self.subdivide_method = method
62
63 def inflate(self, thickness, per_vertex_thickness=True,
64 allow_self_intersection=False):

Callers 1

mainFunction · 0.95

Calls 2

RuntimeErrorClass · 0.85
NotImplementedErrorClass · 0.85

Tested by

no test coverage detected