Why won’t the scripted component R- value behave like the R-Input (“Ratio of the segment weight”) of the Gh-component?
I am trying to develop a component in vs that uses the bi-arc and its bi-arc ratio value -Input,
with components in grasshopper I have everything up and running, now I’ve scripted most of the logic,
but I am having trouble getting the same results from the code as I get from the component.
As for my specific case, I have only values incoming between 0.5 and 1 (for the Gh-component).
The internalized points are on the XZ-Axis (so front-view works best in Rhino).
First I tried to use the “ArcBlend” from RhinoCommon:
The ratio of the control polygon lengths of the two arcs. Note, a value of 1.0 means the control polygon lengths for both arcs will be the same.
(this information is fine, but after 1.0 it does not behave the same way toward 2.0)
later I found this post from 2016:
and the “biArcFitter”, with a scripted component that helped me understand better:
/// Converts a factor (0.0 ~ 1.0) into a bi-arc ratio value (0.01 ~ 100.0)
Now assuming that “bi-arc ratio value” and “ratio of the control polygon lengths” correspond to the same thing,
I tried both, using the conversion from this class for the ArcBlend from Rhino
and also the Script Class from Grasshopper.
With the interpolated or converted factor in the ArcBlend, I have the same curve at 0.5 and at 1.0 as with the original one. However, I am only interested in the values in-between, where the ArcBlend seems to have distributed more values closer to the bounds and is thus faster in the middle.
With the Grasshopper Script Class, I seem not to fully grasp how to set the direction vectors, as it does not correspond to the same inputs as the comparing components.
I hope someone can help me with this or give me a hint where to read how to solve it.
Thanks in advance!
BiArcIssue.gh (12.8 KB)