diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-10-30 17:00:11 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-10-30 17:00:11 +0400 |
commit | e3747f7bee194e8dc1a56292bdb247ccc8207062 (patch) | |
tree | 462256aa4a0f77e540d697c9040d8f0c68041afe /source/blender | |
parent | bc1b41eca5eeb0e4013371e2d3fc1b283254fa14 (diff) |
Yet another attempt to fix a fatal error in the constructor of the
CurvePoint class (cf. revision 32688). Also added a few printf calls
for debugging, with the aim of making bug reports more informative.
Problem reported by edna in the BA Freestyle thread together with a
.blend file for reproducing the fatal error, thanks!
Diffstat (limited to 'source/blender')
-rwxr-xr-x | source/blender/freestyle/intern/stroke/Curve.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp index 5d5cfd98cdc..a4bf2ae85f2 100755 --- a/source/blender/freestyle/intern/stroke/Curve.cpp +++ b/source/blender/freestyle/intern/stroke/Curve.cpp @@ -127,6 +127,12 @@ iA_B_eq_iB_A: //_t2d = t3; _t2d=t2*t3; } + else if((iA->getPoint2D() - iA->getPoint2D()).norm() < 1e-6) { + __A = iB->A(); + __B = iB->B(); + //_t2d = t3; + _t2d=t2*t3; + } } else if(iA->A() != 0 && iB->A() != 0 && (iA->A()->point3d() - iB->A()->point3d()).norm() < 1e-6) { @@ -141,7 +147,13 @@ iA_B_eq_iB_A: goto iA_B_eq_iB_A; } if (!__A || !__B) { - cerr << "Fatal error in CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3)" << endl; + printf("iA A 0x%p p (%f, %f)\n", iA->A(), iA->A()->getPoint2D().x(), iA->A()->getPoint2D().y()); + printf("iA B 0x%p p (%f, %f)\n", iA->B(), iA->B()->getPoint2D().x(), iA->B()->getPoint2D().y()); + printf("iB A 0x%p p (%f, %f)\n", iB->A(), iB->A()->getPoint2D().x(), iB->A()->getPoint2D().y()); + printf("iB B 0x%p p (%f, %f)\n", iB->B(), iB->B()->getPoint2D().x(), iB->B()->getPoint2D().y()); + printf("iA t2d %f p (%f, %f)\n", iA->t2d(), iA->getPoint2D().x(), iA->getPoint2D().y()); + printf("iB t2d %f p (%f, %f)\n", iB->t2d(), iB->getPoint2D().x(), iB->getPoint2D().y()); + cerr << "Fatal error in CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3)" << endl; } assert(__A != 0 && __B != 0); |