BlendCrv with G4 continuity produces a curve that is only G3

Tested in Rhino 7.38, 8.33 and 9.0.26230 beta, Windows x64. Same result in all three.

What happens

BlendCrv with Continuity set to G4 on both ends returns a degree-9 curve that satisfies G0, G1, G2 and G3 to machine precision, but misses the fourth-order condition. d²κ/ds² differs across the joint by 32 % to 104 % depending on the input geometry.

The same command with G1, G2 or G3 is exact every time. Only G4 fails.

Reproduction

  1. Two degree-5 control-point curves with a gap between them, roughly uniform parameterisation.
  2. BlendCrv, Continuity_1 = G4, Continuity_2 = G4, accept. Bulge handles untouched.
  3. Evaluate the arc-length derivatives on both sides of each joint.

Attached script does steps 1 and 3 and runs unmodified in Rhino 7, 8 and 9.

Measurement

Planar pair, degree 5, Rhino 9, start joint. Since G3 holds and the curves are planar, G4 reduces exactly to matching κ''.

             input curve        blend            difference
kappa        1.748251955e-04    1.748251955e-04    0.0000 %
kappa'      -4.987658938e-10   -4.987658936e-10    0.0000 %
tau          0.000000000e+00   -0.000000000e+00    0.0000 %
kappa''     -2.632070539e-11   -1.602999262e-11   39.0974 %

Across seven test pairs the G4 deviation ranges from 0.050 to 1.001. A G3 blend on the same curves gives 8e-13 to 1e-9.

In absolute terms the miss is small: on a 2.5 m blend, moving a single control point by 0.055 mm would satisfy G4 exactly.

Ruled out

Document tolerance (0.01 → 0.0001 gives results identical to the last digit, which also rules out a solver stopping at a tolerance), model scale (the same shape at 1:100 gives identical relative deviations), and the narrower reading of G4 as “curvature acceleration only” (that is exactly what the table above measures).

Possible lead

The deviation grows with how far the input parameterisation is from uniform. At max|C'| / min|C'| ≈ 1.1 the miss is 5–33 %; at 37 and 61 it is total. That is what one would expect if the fourth-order term assumed near-uniform parameterisation rather than applying the exact chain rule. Inference from measurements only.

Question

Is this expected — a deliberate trade-off for blend shape — or should the fourth-order constraint be exact? The docs describe G4 as “curvature acceleration equal in three dimensions”, which is the quantity measured above.

Separately: with a strongly non-uniformly parameterised input, G4 BlendCrv produced a 45 m blend across a 2.5 m gap.

Python script: GCon4.py (31.5 KB)

Nobody’s gonna read that AI stuff. These automated dubious “bug reports” are murdering huge chunks of open-source code because no one wants to deal with the deluge.

Hi @Teo,

I am looking at this.

Thanks,

– Dale

disclaimer: i just skimmed over your code, but could not really make sense of it.

direct your LLM towards:
• “Bell-Polynomial”,
• the works of Veltkamp
• setup a system of Beziér shape functions and evaluate them at the start and end
• setup a linear system of equations and solve for each end. the system is actually two block matrices and can be solved independently via forward/backward substituion as they are triangular/anti-triangular.

What is the practical relevance of this? When is G4 continuity relevant?

What manufacturing method ofor arbitrary shaped curves/surfaces has accuracy better than 0.05 mm over a length of 2.5 m?

Is Jim correct that this is AI generated?

Hi everyone, I’ve been working on a Python script—assisted by AI—to test continuity between curves, as I noticed that the BlendCrv command allows for continuity up to G4, whereas Rhino’s GCon command only detects up to G2.
Through testing and cross-verification, I concluded that the G4 setting does not actually produce G4 continuity, while G1, G2 and G3 come out exact every time.

@dn.aur it does use Bell polynomials, Faà di Bruno. Thanks for the Veltkamp link.

@davidcockey you are probably right that it does not matter in practice. Nobody machines to 0.05 mm over 2.5 m.
I did not report it because it causes me problems. I reported it because the command offers G4 and I wanted to know if it really gives G4.

Hi @Teo,

I’ve logged an issue so developer can look into this.

– Dale