newProxy_g = simple.servermanager.filters.ClipClosedSurface(Input=parentProxy)
pm.RegisterProxy("sources", "ClipClosed", newProxy_g)
rep = simple.GetRepresentation(newProxy_g, simple.GetActiveView())
newProxy_g.ClippingPlane.GetProperty('Origin').SetData([1670,800,-1400])
# newProxy_g.MarkModified(newProxy_g.ClippingPlane)
proxy = simple.servermanager.CreateProxy("representations", 'ImplicitPlaneWidgetRepresentation', None)
pythonWrap = simple.servermanager.rendering.findClass(proxy)()
pythonWrap.GetProperty('WidgetBounds').SetElements(initialValues['bounds']);
simple.GetActiveView().Representations.append(pythonWrap)
class IPWCallback:
def __init__(self):
pass
def __call__(self, caller, ev):
rep.Input.ClippingPlane.SetPropertyWithName('Origin', pythonWrap.GetProperty('Origin'))
my_callback = IPWCallback()
pythonWrap.AddObserver(vtkCommand.InteractionEvent, my_callback)
these are my codes.
Firstly when I make clip fillter and set origin, It works.
But When I set origin by dragging widget, I dose not work.
I can see origin of ClippingPlane Property in filter is changed after I dragged widget.
However, Only the REPRESENTATION!! of clip filter dose not chnage.
(VIsibility ON/OFF do work.)
I think algorithm? reuqestdata? dose not being called when I change origin of clipping-plane in filter…
Maybe related to this changing?
https://kitware.github.io/paraview-docs/v5.8.0/cxx/MajorAPIChanges.html
… Thank you…