Open MicahGale opened 2 hours ago
If you then try to avoid this by
cell.surfaces.append(surf4)
cell.surfaces.append(surf5)
You get:
AttributeError Traceback (most recent call last)
Cell In[10], line 1
----> 1 cell.geometry = (cell.geometry & -surf4) | +surf5
File ~/mambaforge/lib/python3.11/site-packages/montepy/utilities.py:160, in make_prop_pointer.<locals>.decorator.<locals>.setter(self, value)
158 value = base_type(value)
159 if validator:
--> 160 validator(self, value)
161 setattr(self, hidden_param, value)
File ~/mambaforge/lib/python3.11/site-packages/montepy/cell.py:30, in _link_geometry_to_cell(self, geom)
28 def _link_geometry_to_cell(self, geom):
29 geom._cell = self
---> 30 geom._add_new_children_to_cell(geom)
File ~/mambaforge/lib/python3.11/site-packages/montepy/surfaces/half_space.py:194, in HalfSpace._add_new_children_to_cell(self, other)
190 for container, parent in zip(
191 (cells, surfaces), (self._cell.complements, self._cell.surfaces)
192 ):
193 for item in container:
--> 194 if item not in parent:
195 parent.append(item)
File ~/mambaforge/lib/python3.11/site-packages/montepy/numbered_object_collection.py:371, in NumberedObjectCollection.__contains__(self, other)
370 def __contains__(self, other):
--> 371 return other in self._objects
File ~/mambaforge/lib/python3.11/site-packages/montepy/surfaces/surface.py:305, in Surface.__eq__(self, other)
303 def __eq__(self, other):
304 return (
--> 305 self.number == other.number
306 and self.surface_type == other.surface_type
307 and self.is_reflecting == other.is_reflecting
308 and self.is_white_boundary == other.is_white_boundary
309 and self.surface_constants == other.surface_constants
310 )
AttributeError: 'int' object has no attribute 'number'
To Reproduce
A short code snippet of what you have ran. Please change or remove any specific values or anything that can't be public. For example:
Error Message (if any)
If an error message was printed please include the entire stacktrace. If it includes any specific values please change or remove them. For example:
Version
Additional context
Add any other context about the problem here.