Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blender #173

Merged
merged 2 commits into from
Sep 1, 2024
Merged

Blender #173

merged 2 commits into from
Sep 1, 2024

Conversation

stewartboogert
Copy link
Member

First attempt at a blender interface

  1. Make and activate python3.11 venv
  2. cd pyg4ometry
  3. python -m build
  4. Find blender python location (/Applications/Blender.app/Contents/Resources/4.2/python/bin/python3.11)
  5. /path_to_blender_python/python3.11 -m pip install vtk
  6. cd dist
  7. /path_to_blender_python/python3.11 -m pip wheel_just_built --force-reinstall
  8. Maybe you have edit the vtk.py (remove the matplotlb import)

To use

  1. Start blender
  2. Open scripting interface
  3. import sys
  4. sys.path.append("/Users/stewart.boogert/.local/lib/python3.11/site-packages/")
  5. Use pyg4ometry as usual
  6. v = pyg4ometry.visualisation.BlenderViewer()
  7. v.addLogicalVolume(lv)
  8. v.createBlenderObjects()

Copy link

codecov bot commented Sep 1, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 26 lines in your changes missing coverage. Please review.

Project coverage is 70.54%. Comparing base (83e15eb) to head (ef3c08d).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/pyg4ometry/visualisation/BlenderViewer.py 31.57% 26 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #173      +/-   ##
==========================================
- Coverage   70.61%   70.54%   -0.07%     
==========================================
  Files         145      146       +1     
  Lines       22475    22514      +39     
==========================================
+ Hits        15870    15883      +13     
- Misses       6605     6631      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stewartboogert stewartboogert merged commit e3e75fe into g4edge:main Sep 1, 2024
13 checks passed
@stewartboogert stewartboogert deleted the blender branch September 1, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant