solidipes.viewers package

Submodules

Module contents

class solidipes.viewers.Viewer(data_container=None, add_kwargs={}, show_kwargs={}, **kwargs)[source]

Bases: ABC

Abstract class for viewers.

If istanciated with data, it will directly display it.

Parameters:
  • data – data to display

  • add_kwargs – kwargs to pass to the add method. Note: cannot be passed as a positional argument because of get_data_from_container decorator.

  • show_kwargs – kwargs to pass to the show method

  • **kwargs – kwargs to pass to the init method

_abc_impl = <_abc._abc_data object>
abstractmethod add(data, **kwargs) None[source]

Add data to the viewer.

check_data_compatibility(data) bool[source]

Check if data is compatible with the viewer.

class_path = 'solidipes.viewers.viewer.Viewer'
compatible_data_types

List of data types (apart from DataContainers) that are compatible with the viewer DataContainers themselves already declare their compatible Viewers

save(path, **kwargs) NoReturn[source]

Save the view to a file.

abstractmethod show(**kwargs)[source]

Show the viewer.