What is the difference between commands Blend and BlendCrv. When I use BlendCrv and G2 option the curve is longer thаn using Blend command.
I’m using SDK function RhinoSdkBlend::CurveBlend(). For example, I have two curves and with the parameters in it ON_Curve* crv = RhinoSdkBlend::CurveBlend(pC0, pC0->Domain(), false, 2, pC1, pC1->Domain(), false, 2);
I have curve exactly like BlendCrv command, but I want the shorter like Blend does. How to achieve this with SDK functions?
Blend is the ‘original’ blend command, and it is fairly simple in that you don’t get much control over the results. There is no SDK support for creating these types of blends.
BlendCrv is the newer command and provides the user with a lot more control over the resulting blend curve. There is SDK support for this in the form of
RhinoSdkBlend::CurveBlend(), as you know.
Can you post a screen shot and/or some geometry that will give an indication of what you are trying to produce?
As you see the curve with Blend command is shorter than others with BlendCrv and looks at least G1 continuous .
So, is there are no chance for some use of Quick Curve Blend with SDK function somehow?
Blend is a quick way of doing a G2 BlendCrv with a preset control point distance. Check this by making a Blend first, then create points at the locations of the blend piece’s middle control points. Next, do a BlendCrv on the same two curves, tick curvature continuity and move the middle control points to the positions of the control points obtained with Blend. The resulting blend piece will be identical (SelDup).
Now, your question boils down to: how is the Blend distance of the control points calculated?
Thank you Menno.
Yes, that is true. But how can I modified curve throw control points with SDK function in first place
Interestingly, it seems that this cannot be done by C++, at least not directly. In RhinoCommon there is a CreateBlendCurve function that takes two bulge-parameters, but I cannot find this in the C++ API. Looking at this more closely, I hit a dead end at
UnsafeNativeMethods.RHC_RhinoBlendG2Curve, which is, as far as I can see, internal to Rhino SDK.
Thank you menno for the previous advice. I’m creating curve with CurveBlend() and then with using GetCV(), Transform() and SetCV() (on control points on NURBS) actually I’m so close of that I want to achieve.
This should help:
Thank you dale, this was very helpful