When a click this filter, it give me a default scalar factor value of number 1. But when I click reset button, it picked a reasonable value for me, but i don’t really know what Paraview did behind this action.
It’s handled by the vtkSMBoundsDomain, in array scaled extent mode.
<DoubleVectorProperty command="SetScaleFactor"
default_values="1.0"
name="ScaleFactor"
number_of_elements="1"
panel_visibility="default">
<BoundsDomain name="range" mode="array_scaled_extent">
<RequiredProperties>
<Property function="Input" name="Input" />
<Property function="ArraySelection" name="SelectInputVectors" />
</RequiredProperties>
</BoundsDomain>
<Hints>
<NoDefault/>
</Hints>
<Documentation>Each component of the selected vector array will be
multiplied by the value of this property before being used to compute
new point coordinates.</Documentation>
</DoubleVectorProperty>
ARRAY_SCALED_EXTENT: the range is set to (0, (arrayMagnitude / maxbounds) * this->ScaleFactor)
where maxbounds is the length of the longest axis for the bounding box. and arrayMagnitude the maximum magnitude of the array.
But in all case, the default scalarFactor value is set to 0.1.
So, when I use this formula (arrayMagnitude / maxbounds) * this->ScaleFactor) this->ScaleFactor value is always 0.1. And finally, the results is not equal to paraview app value.
No, I mean according that code, I can only get maxbounds value, and this->ScaleFactor value is always default 0.1, so at last the results is not equal to Paraview app results. So I wonder if I miss something?
In this function above, i think this->ArrayRangeDomain->GetNumberOfEntries() = 3,
and then arrayScaleFactor is 349.1066640218099 after line 300;
At line 302, maxbounds is 16.51. So in line 303 maxbounds equals (0.1 / 349.1066640218099) * 16.51 = 0.004729213647714433.
Thus, the max value of scalar factor should be this value 0.004729213647714433.
But when i use paraview to warpbyvector, and paraview give me the max value of scalar factor is 0.00519717. and it’s not equal. 0.00519717 != 0.004729213647714433