def _load_holder_positions(self, holder): self.irradiated_positions = [] geom = holder.geometry with dirty_ctx(self): if geom: with no_update(self): self.irradiated_positions = [IrradiatedPosition(hole=c + 1, pos=(x, y)) for c, (x, y, r) in iter_geom(geom)] elif holder.name: self._load_holder_positons_from_file(holder.name)
def _load_holder_positions(self, holder): self.irradiated_positions = [] geom = holder.geometry if geom: self.initialized = False self.irradiated_positions = [IrradiatedPosition(hole=c + 1, pos=(x, y)) for c, (x, y, r) in iter_geom(geom)] self.initialized = True elif holder.name: self._load_holder_positons_from_file(holder.name)
def _load_holder_positions(self, holder): self.irradiated_positions = [] geom = holder.geometry with dirty_ctx(self): if geom: with no_update(self): self.irradiated_positions = [ IrradiatedPosition(hole=c + 1, pos=(x, y)) for c, (x, y, r) in iter_geom(geom) ] elif holder.name: self._load_holder_positons_from_file(holder.name)