Esempio n. 1
0
    def load_local_connectivity(self, local_connectivity_gid, from_step=None):
        """
        Loads an existing local connectivity.
        """
        lconn_index = load_entity_by_gid(local_connectivity_gid)
        existent_lconn = LocalConnectivityCreatorModel()
        lconn_h5_path = h5.path_for_stored_index(lconn_index)
        with LocalConnectivityH5(lconn_h5_path) as lconn_h5:
            lconn_h5.load_into(existent_lconn)

        existent_lconn.surface = uuid.UUID(lconn_index.fk_surface_gid)

        common.add2session(KEY_LCONN, existent_lconn)
        existent_lconn.display_name = lconn_index.user_tag_1

        if existent_lconn.equation:
            msg = "Successfully loaded existent entity gid=%s" % (
                local_connectivity_gid, )
        else:
            msg = "There is no equation specified for this local connectivity. "
            msg += "The default equation is displayed into the spatial field."
        common.set_message(msg)

        if int(from_step) == 1:
            return self.step_1()
        if int(from_step) == 2:
            return self.step_2()
 def load_local_connectivity(self, local_connectivity_gid, from_step=None):
     """
     Loads the interface for an existing local connectivity.
     """
     context = common.get_from_session(KEY_LCONN_CONTEXT)
     context.selected_entity = local_connectivity_gid
     msg = "Successfully loaded existent entity gid=%s" % (local_connectivity_gid,)
     common.set_message(msg)
     if int(from_step) == 1:
         return self.step_1()
     if int(from_step) == 2:
         return self.step_2()
Esempio n. 3
0
 def load_local_connectivity(self, local_connectivity_gid, from_step=None):
     """
     Loads the interface for an existing local connectivity.
     """
     context = common.get_from_session(KEY_LCONN_CONTEXT)
     context.selected_entity = local_connectivity_gid
     msg = "Successfully loaded existent entity gid=%s" % (local_connectivity_gid,)
     common.set_message(msg)
     if int(from_step) == 1:
         return self.step_1()
     if int(from_step) == 2:
         return self.step_2()