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

Method offset

python/pymesh/wires/WireNetwork.py:145–153  ·  view source on GitHub ↗

Offset vertices by per-vertex ``offset_vector``. Args: offset_vector (:py:class:`numpy.ndarray`): A :math:`N \times dim` matrix representing per-vertex offset vectors.

(self, offset_vector)

Source from the content-addressed store, hash-verified

143 self.raw_wires.scale(factors)
144
145 def offset(self, offset_vector):
146 """ Offset vertices by per-vertex ``offset_vector``.
147
148 Args:
149 offset_vector (:py:class:`numpy.ndarray`): A :math:`N \times dim`
150 matrix representing per-vertex offset vectors.
151 """
152 vertices = self.vertices + offset_vector
153 self.vertices = vertices
154
155 def center_at_origin(self):
156 """ Translate the wire networks to have its center at the origin.

Callers 1

set_base_patternMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected