Skip to content

Commit

Permalink
Merge 845d28b into 9f8d411
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey committed Aug 9, 2021
2 parents 9f8d411 + 845d28b commit b91156a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ladybug_geometry/geometry3d/plane.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def y(self):

def flip(self):
"""Get a flipped version of this plane (facing the opposite direction)."""
return Plane(self.n.reverse(), self.o, self.x.reverse())
return Plane(self.n.reverse(), self.o, self.x)

def move(self, moving_vec):
"""Get a plane that has been moved along a vector.
Expand Down
7 changes: 6 additions & 1 deletion ladybug_geometry/geometry3d/polyface.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,12 @@ def from_faces(cls, faces, tolerance):
face_indices.append(tuple(ind))

# get the polyface object and assign correct faces to it
return cls(vertices, face_indices)
face_obj = cls(vertices, face_indices)
if face_obj._is_solid:
face_obj._faces = cls.get_outward_faces(faces, 0.01)
else:
face_obj._faces = tuple(faces)
return face_obj

@classmethod
def from_box(cls, width, depth, height, base_plane=None):
Expand Down
4 changes: 2 additions & 2 deletions tests/plane_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def test_plane_init():
plane_flip = plane.flip()
assert plane_flip.o == Point3D(2, 0, 2)
assert plane_flip.n == Vector3D(0, -1, 0)
assert plane_flip.x == Vector3D(-1, 0, 0)
assert plane_flip.y == Vector3D(0, 0, -1)
assert plane_flip.x == Vector3D(1, 0, 0)
assert plane_flip.y == Vector3D(0, 0, 1)
assert plane_flip.k == 0


Expand Down

0 comments on commit b91156a

Please sign in to comment.