Skip to content

Commit

Permalink
Merge pull request #218 from ManuelHu/patch-3
Browse files Browse the repository at this point in the history
fix VtkViewerNew for VTK 9.4.0
  • Loading branch information
gipert authored Dec 7, 2024
2 parents cf097c1 + 79a06cb commit a973484
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ build:
python: "3.10"
jobs:
post_install:
- pip install --upgrade --upgrade-strategy only-if-needed furo sphinx>=7.2.2 sphinx-autoapi sphinx-copybutton sphinx-inline-tabs
- pip install --upgrade --upgrade-strategy only-if-needed furo "sphinx>=7.2.2" "sphinx-autoapi<3.4.0" sphinx-copybutton sphinx-inline-tabs
6 changes: 3 additions & 3 deletions src/pyg4ometry/visualisation/VtkViewerNew.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def clear(self):
self.clippers = [] # clip filters
self.axes = [] # axes actors

self.pdNameDict = {} # polydata to LV name
self.instanceNameDict = {} # instance transformation to PV name

self.bBuiltPipelines = False
Expand Down Expand Up @@ -326,7 +325,6 @@ def buildPipelinesAppend(self):
pd = _Convert.pycsgMeshToVtkPolyData(self.localmeshes[k])
# pd.SetObjectName(k)
self.polydata[k] = pd
self.pdNameDict[pd] = k

appFltDict = {}
visOptDict = {}
Expand Down Expand Up @@ -708,7 +706,9 @@ def rightButtonPressEvent(self, obj, event):
pdmin = pd
pdamin = pda

lvName = self.vtkviewer.pdNameDict[pdamin.GetInputAlgorithm().GetInput()]
for name, pd in self.vtkviewer.polydata.items():
if pd == pdamin.GetInputAlgorithm().GetInput():
lvName = name
pvName = self.vtkviewer.instanceNameDict[pdamin]
pvTrans = pdamin.GetTransform()
[mtra, tra] = _Convert.vtkTransformation2PyG4(pvTrans.GetConcatenatedTransform(0))
Expand Down

0 comments on commit a973484

Please sign in to comment.