Page MenuHome

Fix T91093: Off by one error in curve resample node.
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on Sep 7 2021, 1:26 PM.

Details

Summary

Example: When the length of the spline is 3 and the expected distance between two points is 1, then we need 4 points. Previously it only created 3.

Diff Detail

Repository
rB Blender
Branch
curve-resample-off-by-one (branched from master)
Build Status
Buildable 16854
Build 16854: arc lint + arc unit

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.Sep 7 2021, 1:26 PM
Jacques Lucke (JacquesLucke) created this revision.

Thanks for the fix. I guess int( does a floor operation, I probably should have known that. Using ceil first seems to also fix the issue for me.

For some reason (probably not using that explicit "int" conversion, the curve to points node doesn't need the same fix

This revision is now accepted and ready to land.Sep 7 2021, 3:35 PM

I was wrong about that, it doesn't have the same behavior, and curve to points does need the same fix.

  • also fix curve to points node