Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fsinfo mesh information to some __init__ calls #62

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lapy/tria_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ def rm_free_vertices_(self):
# convert vkeep to index list
vkeep = np.nonzero(vkeep)[0]
# set new vertices and tria and re-init adj matrices
self.__init__(vnew, tnew)
self.__init__(vnew, tnew, self.fsinfo)
return vkeep, vdel

def refine_(self, it=1):
Expand Down Expand Up @@ -893,7 +893,7 @@ def refine_(self, it=1):
t4 = np.column_stack((e1, e2, e3))
tnew = np.reshape(np.concatenate((t1, t2, t3, t4), axis=1), (-1, 3))
# set new vertices and tria and re-init adj matrices
self.__init__(vnew, tnew)
self.__init__(vnew, tnew, self.fsinfo)

def normal_offset_(self, d):
"""Move vertices along normal by distance ``d``.
Expand Down Expand Up @@ -1006,12 +1006,12 @@ def orient_(self):
idx = idx.reshape(-1)
tnew = self.t
tnew[np.ix_(idx, [1, 0])] = tnew[np.ix_(idx, [0, 1])]
self.__init__(self.v, tnew)
self.__init__(self.v, tnew, self.fsinfo)
flipped = idx.sum()
# flip orientation on all trias if volume is negative:
if self.volume() < 0:
tnew[:, [1, 2]] = tnew[:, [2, 1]]
self.__init__(self.v, tnew)
self.__init__(self.v, tnew, self.fsinfo)
flipped = tnew.shape[0] - flipped
return flipped

Expand Down
Loading