Skip to main content

Live visual previewer for OpenSeesPy models

Project description

openseespy-viewer

Viewer for openseespy models. Monitors your model file(s) and produces a live 3D drawing that updates each time you save. Works with 2D/3dof and 3D/6dof models.

Installation

pip install openseespy-viewer

Or install from source:

pip install .

Usage

Python API:

from viewer import view

# Single file
view('my_model.py')

# Multiple files
view('nodes.py', 'elements.py', 'boundary.py')

# With custom style options
view('my_model.py', bg_colour='white', node_size=16, ele_width=3)

Command line:

# Basic usage
openseespy-viewer my_model.py

# Multiple files with custom refresh rate
openseespy-viewer nodes.py elements.py --refresh 1.0

# Or via python -m
python -m viewer my_model.py

Live reload

The viewer watches your model file(s) for changes and redraws automatically on save. It also watches the viewer source files — any change to the viewer library is hot-reloaded without restarting the window.

Screenshots

Press S in the viewer window to save a screenshot. Screenshots are saved to the images/ folder with incrementing names (model_screenshot_001.png, model_screenshot_002.png, etc.). The counter resets each time you restart the viewer.

Examples

Example usage gif

See the examples/ directory for sample model files.

Dependencies

pip install pyvista numpy watchdog

Feature wish-list

  • Plot nodes as they are saved in a watched script
  • Add node labels
  • Add support for elements
  • Add support for fixity conditions
  • Add support for variables and expressions in scripts
  • Add support for watching multiple files (for models made up of many files)
  • Add support for nodal loads
  • Add support for nodes created within loop
  • Add support for 3D models
  • Screenshot capture (press S in viewer)
  • Hot reload viewer source without restarting
  • Add support for element loads
  • Add support for rotational dofs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openseespy_viewer-0.2.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openseespy_viewer-0.2.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file openseespy_viewer-0.2.0.tar.gz.

File metadata

  • Download URL: openseespy_viewer-0.2.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for openseespy_viewer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 faa0a0afafae2afe97d4d33de996d49cbd1acb479e8f1568bdbcd3b313ba852f
MD5 a7ec5c268d534d8a1538722366b484ab
BLAKE2b-256 ebb8705b11dcfdd4d4324cea3a32cbb4a8a2948e35765c1667a30ec364dc07ed

See more details on using hashes here.

File details

Details for the file openseespy_viewer-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openseespy_viewer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5893ce62156df8ba8578cb18a430d68b9f4b29c16d380bb7e8f5c5f8d8a4826
MD5 19a283745ed57a9f35aa94acb1cc663d
BLAKE2b-256 a08f62e52b8ee718580ea427316206f7d58a4fa93bc901094f4028dc08d4a64c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page