|
From: <kin...@us...> - 2024-07-12 19:23:43
|
Revision: 7207
http://sourceforge.net/p/teem/code/7207
Author: kindlmann
Date: 2024-07-12 19:23:37 +0000 (Fri, 12 Jul 2024)
Log Message:
-----------
recognizing that having one corner in path is possible
Modified Paths:
--------------
teem/trunk/src/limn/splineFit.c
Modified: teem/trunk/src/limn/splineFit.c
===================================================================
--- teem/trunk/src/limn/splineFit.c 2024-07-12 19:15:08 UTC (rev 7206)
+++ teem/trunk/src/limn/splineFit.c 2024-07-12 19:23:37 UTC (rev 7207)
@@ -1892,13 +1892,12 @@
return 1;
}
} else {
- assert(fctx->cnum >= 2);
- /* we do have corners: find segments between corners. The corner vertex part of two
- segments: the last point in segment I and first point in segment I+1. How many
- segments we analyze depends on whether they're in a loop: if they're in a loop
- then we do one more */
- uint cii, ciLast = fctx->cnum - 2 + !!lpnt->isLoop;
- for (cii = 0; cii <= ciLast; cii++) {
+ /* we do have corners: find segments between corners, but maybe as few as one corner.
+ The corner vertex part of two segments: the last point in segment I and first point
+ in segment I+1. How many segments we analyze depends on whether they're in a loop: if
+ they're in a loop then we do one more */
+ uint cii, ciNum = fctx->cnum - 1 + !!lpnt->isLoop;
+ for (cii = 0; cii < ciNum; cii++) {
uint cjj = (cii + 1) % fctx->cnum;
limnCbfPath *subpath = limnCbfPathNew(0);
/* 0: left tangent 2: vertex 4: right tangent */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|