@@ -37,14 +37,14 @@ inline E_Int stepCorrection(E_Int isOpen, E_Int nUnique)
3737 // Case of a CLOSED curve with an ODD number of points
3838 if ((isOpen == 0 ) && (nUnique % 2 != 0 ))
3939 {
40- printf (" WARNING : consSmooth: step=2 is invalid for closed curve with odd number of points. Forcing step=1.\n " );
40+ printf (" Warning : consSmooth: step=2 is invalid for closed curve with odd number of points. Forcing step=1.\n " );
4141 return 1 ;
4242 }
4343
4444 // Case of an OPEN curve with an EVEN number of points
4545 if ((isOpen == 1 ) && (nUnique % 2 == 0 ))
4646 {
47- printf (" WARNING : consSmooth: step=2 is invalid for open curve with even number of points. Forcing step=1.\n " );
47+ printf (" Warning : consSmooth: step=2 is invalid for open curve with even number of points. Forcing step=1.\n " );
4848 return 1 ;
4949 }
5050
@@ -139,16 +139,16 @@ PyObject* K_TRANSFORM::consSmooth(PyObject* self, PyObject* args)
139139
140140 if (isOpen)
141141 {
142- printf (" consSmooth: open geometry: fixed nodes %d and %d.\n " , 0 , npts-1 );
142+ printf (" Info: consSmooth: open geometry: fixed nodes %d and %d.\n " , 0 , npts-1 );
143143 }
144144 {
145- printf (" consSmooth: closed geometry with double points" );
145+ printf (" Info: consSmooth: closed geometry with double points. \n " );
146146 }
147147
148148
149149 E_Int nUnique = (isOpen == 0 ) ? npts - 1 : npts;
150150 E_Int start = 0 ;
151- E_Int end = (isOpen == 0 ) ? nUnique : nUnique - 3 ;
151+ E_Int end = (isOpen == 0 ) ? nUnique : nUnique - 3 ;
152152
153153 // step 2 invalid for some cases, correction by taking step = 1
154154 if (step == 2 )
@@ -166,7 +166,6 @@ PyObject* K_TRANSFORM::consSmooth(PyObject* self, PyObject* args)
166166 {
167167
168168 if (isOpen == 0 )
169-
170169 {
171170 // Cycle, always in [0, nUnique-1]
172171 idx0 = (j == 0 ) ? i % nUnique : (nUnique - i % nUnique) % nUnique;
@@ -281,17 +280,17 @@ PyObject* K_TRANSFORM::consSmooth(PyObject* self, PyObject* args)
281280 if (isOpen == 0 )
282281 {
283282 // CASE 2: mesh is topologically OPEN, but geometrically CLOSED.
284- printf (" consSmooth: closed geometry with double points: %d and %d.\n " , n1, n2);
283+ printf (" Info: consSmooth: closed geometry with double points: %d and %d.\n " , n1, n2);
285284 }
286285 else // CASE 3: mesh is OPEN (extremities will stay fixed)
287286
288287 {
289- printf (" consSmooth: open geometry: fixed nodes %d and %d.\n " , n1, n2);
288+ printf (" Info: consSmooth: open geometry: fixed nodes %d and %d.\n " , n1, n2);
290289 }
291290 }
292291 else
293292 {
294- printf (" consSmooth: closed geometry \n " );
293+ printf (" Info: consSmooth: closed geometry. \n " );
295294 }
296295
297296 // Create a chained of ordered nodes
@@ -321,19 +320,19 @@ PyObject* K_TRANSFORM::consSmooth(PyObject* self, PyObject* args)
321320
322321 bar.push_back (next);
323322 prev = cur;
324- cur = next;
323+ cur = next;
325324 if (isOpen == 1 && cur == n2) break ; // we reach the end of opened curve
326325 }
327326
328327 E_Int nUnique = (E_Int)bar.size ();
329328
330329 E_Int start = 0 ;
331- E_Int end = (isOpen == 0 ) ? nUnique : nUnique - 3 ;
330+ E_Int end = (isOpen == 0 ) ? nUnique : nUnique - 3 ;
332331
333332 // step 2 invalid for some cases, correction by taking step = 1
334333 if (step == 2 )
335334 {
336- step = stepCorrection (isOpen, nUnique);
335+ step = stepCorrection (isOpen, nUnique);
337336 }
338337
339338 for (E_Int k = 0 ; k < sweeps; k++)
0 commit comments