Enforce lower_left in lattice geometry (#2982)

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
kmeag 2024-06-10 15:54:59 -04:00 committed by GitHub
parent 88f3e4d21f
commit 12a278b1ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -884,6 +884,10 @@ class RectLattice(Lattice):
dimension = ET.SubElement(lattice_subelement, "dimension")
dimension.text = ' '.join(map(str, self.shape))
# Make sure lower_left has been specified
if self.lower_left is None:
raise ValueError(f"Lattice {self.id} does not have lower_left specified.")
# Export Lattice lower left
lower_left = ET.SubElement(lattice_subelement, "lower_left")
lower_left.text = ' '.join(map(str, self._lower_left))