From 07e9aa1811762bbe6edd8f24ad37813578a218be Mon Sep 17 00:00:00 2001 From: Ken Patel Date: Thu, 29 Apr 2010 18:06:00 +0000 Subject: [PATCH] Rope.getPoints returns points correctly spaced for curves whose knot values are outside of the range 0 to 1 --- direct/src/showutil/Rope.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/direct/src/showutil/Rope.py b/direct/src/showutil/Rope.py index 6971aaf552..9f4a3b1c90 100644 --- a/direct/src/showutil/Rope.py +++ b/direct/src/showutil/Rope.py @@ -131,10 +131,13 @@ class Rope(NodePath): Rope itself.""" result = self.curve.evaluate(self) + startT = result.getStartT() + sizeT = result.getEndT() - startT + numPts = len ropePts = [] for i in range(numPts): pt = Point3() - result.evalPoint(i / float(numPts - 1), pt) + result.evalPoint(sizeT * i / float(numPts - 1) + startT, pt) ropePts.append(pt) return ropePts