Esempio n. 1
0
    def __init__(self, indices, valences=None):
        indices, valences = _flatten_args(indices, valences)
        valences = _process_valences(indices, valences)
        _check_topology(indices, valences)

        self.indices = np.array(indices, 'int32')
        self.valences = np.array(valences, 'uint8')
        self.shim = shim.Topology(self.indices, self.valences)
        self.boundaryMode = BoundaryMode.EDGE_ONLY
        self._vertexListAdapter = VertexListAdapter(self.shim)
        self._faceListAdapter = FaceListAdapter(self.shim)
Esempio n. 2
0
    def reset(self):
        '''Un-finalizes the mesh to allow adjustment of sharpness and
        custom data.

        This is a costly operation since it effectively recreates the
        HBR mesh.
        '''
        topo = shim.Topology(self.indices, self.valences)
        topo.copyAnnotationsFrom(self.shim)
        self._vertexListAdapter = VertexListAdapter(topo)
        self._faceListAdapter = FaceListAdapter(topo)
        self.shim = topo