Skip to content
Snippets Groups Projects
Commit 3ffa593d authored by ojs1g14's avatar ojs1g14
Browse files

Merge branch 'master' into Tests

parents 7c3a0b48 25fa90e3
No related branches found
No related tags found
No related merge requests found
Pipeline #700 passed
......@@ -341,7 +341,7 @@ class AmpObject(trimMixin, smoothMixin, analyseMixin, visMixin):
>>> ang = [np.pi/2, -np.pi/4, np.pi/3]
>>> amp.rotateAng(ang, ang='rad')
"""
if type(rot)==type([]):
if isinstance(rot, (tuple, list, np.ndarray)):
R = self.rotMatrix(rot, ang)
self.rotate(R, norms)
else:
......
......@@ -30,6 +30,7 @@ class trimMixin(object):
>>> amp.planarTrim(100, 2)
"""
if isinstance(height, float) and isinstance(plane, int):
# planar values for each vert on face
fv = self.vert[self.faces, plane]
# Number points on each face are above cut plane
......@@ -49,3 +50,5 @@ class trimMixin(object):
self.faces = vInd[self.faces]
self.vert = self.vert[~delv, :]
self.calcStruct()
else:
raise TypeError("height arg must be a float and plane arg must be an int")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment