https://github.com/compas-dev/compas_viewer
Viewer for COMPAS based on PyOpenGL and PySide6.
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 9 committers (22.2%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.6%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Viewer for COMPAS based on PyOpenGL and PySide6.
Basic Info
- Host: GitHub
- Owner: compas-dev
- License: other
- Language: Python
- Default Branch: main
- Homepage: http://compas.dev/compas_viewer/
- Size: 261 MB
Statistics
- Stars: 9
- Watchers: 5
- Forks: 7
- Open Issues: 46
- Releases: 22
Topics
Metadata Files
README.md
COMPAS VIEWER
A standalone, high-performance 3D viewer for COMPAS 2.0, built with PySide6 and OpenGL.
More information is available in the docs: https://compas.dev/compas_viewer/
Features
Core Functionality
- High-Performance Rendering: Modern OpenGL 3.3 Core Profile with optimized buffer management and instanced rendering
- Complete COMPAS Integration: Full support for all COMPAS objects based on the compas.scene architecture
- Multiple Rendering Modes: Shaded, ghosted, lighted, and wireframe rendering with configurable opacity
- Interactive Navigation: Smooth camera controls with perspective, orthographic, and preset views (top, front, right)
- Advanced Selection: Object selection with window/box selection, multi-selection, and selection highlighting
User Interface
- Customizable UI: Fully configurable interface with dockable panels, toolbars, and sidebars
- Scene Management: Hierarchical scene tree with show/hide controls and object settings
- Real-time Controls: Dynamic sliders, buttons, and form controls for interactive parameter adjustment
- Property Editing: Built-in object property dialogs for colors, line widths, point sizes, and transformations
Supported Geometry Types
- Primitives: Point, Line, Vector, Plane, Frame
- Curves: Polyline, Circle, Ellipse, NurbsCurve
- Surfaces: Polygon, NurbsSurface, BRep (via compas_occ)
- Solids: Box, Sphere, Cylinder, Cone, Torus, Capsule, Polyhedron
- Data Structures: Mesh, Graph, Pointcloud, Collection
- Special: Text tags, Grid, Custom buffer objects
Advanced Features
- Dynamic Animations: Built-in animation system with
@viewer.on()decorator for time-based updates - Multi-Unit Support: Automatic scaling for meters, centimeters, and millimeters
- Command System: Extensive keyboard and mouse shortcuts with customizable bindings
- File I/O: Load/save scenes in JSON format, drag and drop COMPAS scene, geometries and data structures
- Command Line Interface: Direct launching with
python -m compas_viewer -f filename.json - Extensible Architecture: Plugin system for custom scene objects and UI components
Installation
Requirements
- Python >= 3.9
- COMPAS >= 2.2.0
Quick Install
bash
pip install compas_viewer
Development Install
bash
git clone https://github.com/compas-dev/compas_viewer.git
cd compas_viewer
pip install -e .
See the Getting Started instructions in the docs for detailed installation guidelines.
Quick Start
Basic Usage
```python from compas_viewer import Viewer from compas.geometry import Box, Sphere
Create viewer
viewer = Viewer()
Add geometry
box = Box(1, 2, 3) sphere = Sphere(0.5)
viewer.scene.add(box, name="My Box") viewer.scene.add(sphere, name="My Sphere")
Show viewer
viewer.show() ```
Command Line Usage
```bash
Launch with a empty scene
python -m compas_viewer
Launch with a specific file
python -m compas_viewer -f path/to/geometry.json
Launch with multiple files from a directory
python -m compas_viewer --files path/to/directory/ ```
Dynamic Animations
```python from compas_viewer import Viewer from compas.geometry import Box, Translation
viewer = Viewer() box = viewer.scene.add(Box(1, 1, 1))
@viewer.on(interval=50) # Update every 50ms def animate(frame): T = Translation.from_vector([0.01 * frame, 0, 0]) box.transformation = T
viewer.show() ```
Key Controls
| Action | Shortcut | |--------|----------| | Rotate | Right-click + drag | | Pan | Right-click + shift + drag | | Zoom | Mouse wheel | | Select object | Left-click | | Select multiple | Left-click + shift + drag | | Delete selected | Delete key | | Zoom to selected | F key (with selection) | | Zoom to All | F key (without selection) |
Documentation
- Tutorial: Basic concepts, configuration, and software architecture
- Examples: Comprehensive examples covering all features
- API Reference: Complete API documentation
Contributing
We welcome contributions! Please see our Contributing Guidelines for: - Bug reports and feature requests - Code contributions and pull requests - Documentation improvements - Community guidelines
Dependencies
- PySide6: Qt6 bindings for Python
- PyOpenGL: OpenGL bindings for Python
- freetype-py: Font rendering
- COMPAS: COMPAS framework (>= 2.2.0)
License
The code in this repo is licensed under the MIT License.
Known Issues
Please check the Issue Tracker for known issues and their solutions.
Changelog
See CHANGELOG.md for version history and release notes.
Owner
- Name: compas-dev
- Login: compas-dev
- Kind: organization
- Website: https://compas.dev
- Repositories: 45
- Profile: https://github.com/compas-dev
COMPAS - an open source computational framework for research and collaboration in AEC
GitHub Events
Total
- Create event: 13
- Release event: 5
- Issues event: 8
- Watch event: 5
- Issue comment event: 18
- Push event: 105
- Pull request event: 13
- Pull request review event: 10
- Pull request review comment event: 5
- Fork event: 4
Last Year
- Create event: 13
- Release event: 5
- Issues event: 8
- Watch event: 5
- Issue comment event: 18
- Push event: 105
- Pull request event: 13
- Pull request review event: 10
- Pull request review comment event: 5
- Fork event: 4
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Zac Zhang | z****g@o****m | 300 |
| Licini | l****0@g****m | 217 |
| pitsai | p****2@g****m | 132 |
| tomvanmele | t****e@g****m | 126 |
| Li Chen | l****7@a****h | 6 |
| petras | p****s@g****m | 2 |
| Jelle Feringa | j****a@g****m | 2 |
| ChiaChing-Yen | c****n@u****u | 2 |
| Lucius / | z****e@t****o | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 55
- Total pull requests: 68
- Average time to close issues: about 1 month
- Average time to close pull requests: 6 days
- Total issue authors: 7
- Total pull request authors: 5
- Average comments per issue: 0.98
- Average comments per pull request: 0.96
- Merged pull requests: 50
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 6
- Pull requests: 17
- Average time to close issues: 6 months
- Average time to close pull requests: 13 days
- Issue authors: 4
- Pull request authors: 4
- Average comments per issue: 0.17
- Average comments per pull request: 0.29
- Merged pull requests: 9
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Licini (25)
- tomvanmele (20)
- ZacZhangzhuo (19)
- petrasvestartas (7)
- PingHsunTsai (5)
- djy89 (4)
- jf--- (2)
- zaczhuozhang (2)
- yck011522 (1)
Pull Request Authors
- ZacZhangzhuo (69)
- Licini (41)
- PingHsunTsai (24)
- ChiaChing-Yen (2)
- jf--- (2)
- tomvanmele (2)
- ninjacore (2)
- petrasvestartas (1)
- chenkasirer (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 1,024 last-month
- Total dependent packages: 3
- Total dependent repositories: 0
- Total versions: 21
- Total maintainers: 1
pypi.org: compas-viewer
Standalone viewer for COMPAS 2 based on PyOpenGL and PyQt6.
- Homepage: https://compas-dev.github.io/compas_viewer
- Documentation: https://compas-dev.github.io/compas_viewer
- License: MIT License COMPAS Association Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
Latest release: 1.6.1
published 8 months ago
Rankings
Maintainers (1)
Dependencies
- compas-dev/compas-actions.build v3 composite
- compas-dev/compas-actions.docs v2 composite
- Zomzog/changelog-checker v1.2.0 composite
- actions/checkout v1 composite
- compas-dev/compas-actions.build v3 composite
- compas-dev/compas-actions.publish v2 composite
- attrs >=17.4 development
- black ==22.12.0 development
- bump2version >=1.0.1 development
- check-manifest >=0.36 development
- compas_invocations * development
- doc8 * development
- flake8 * development
- invoke >=0.14 development
- isort * development
- sphinx_compas2_theme * development
- twine * development
- wheel * development
- PySide6 *
- freetype-py *
- pyopengl *