325{
327
328 REAL stepsize = geo_stepsize * arc_stepsize;
329
331
333 {
335 REAL min_u, min_v, max_u,max_v;
336 min_u = max_u = bezierArc->
cpts[0];
337 min_v = max_v = bezierArc->
cpts[1];
339 {
340 if(bezierArc->
cpts[
j] < min_u)
341 min_u = bezierArc->
cpts[
j];
342 if(bezierArc->
cpts[
j] > max_u)
343 max_u = bezierArc->
cpts[
j];
344 if(bezierArc->
cpts[
j+1] < min_v)
345 min_v = bezierArc->
cpts[
j+1];
346 if(bezierArc->
cpts[
j+1] > max_v)
347 max_v = bezierArc->
cpts[
j+1];
348 }
349
350 size = max_u - min_u;
351 if(
size < max_v - min_v)
352 size = max_v - min_v;
353 }
354
355
356
357 int nsteps = (
int) (
size/stepsize);
358 if(nsteps <=0)
359 nsteps=1;
360
362 REAL dp = 1.0/nsteps;
363
364
366 arc->pwlArc->
pts = vert;
367
368 if( isrational ) {
373
374
378
379
380 int step;
381#ifndef NOELIMINATION
382 int ocanremove = 0;
383#endif
385 for( step=1, ++vert; step<nsteps; step++, vert++ ) {
391 u =
u *
p + pow_u[
i];
392 v =
v *
p + pow_v[
i];
393 w =
w *
p + pow_w[
i];
394 }
397#ifndef NOELIMINATION
400 int canremove = (
ds<geo_stepsize && dt<geo_stepsize) ? 1 : 0;
401 REAL ods=0.0, odt=0.0;
402
403 if( ocanremove && canremove ) {
406 if( nds<geo_stepsize && ndt<geo_stepsize ) {
407
408 --vert;
411 ods = nds;
412 odt = ndt;
413 ocanremove = 1;
414 } else {
415 ocanremove = canremove;
417 odt = dt;
418 }
419 } else {
420 ocanremove = canremove;
422 odt = dt;
423 }
424#endif
425 }
426
427
431
432 } else {
436
437
441
442
443 int step;
444#ifndef NOELIMINATION
445 int ocanremove = 0;
446#endif
448 for( step=1, ++vert; step<nsteps; step++, vert++ ) {
452 for(
int i = 1;
i < bezierArc->
order;
i++ ) {
453 u =
u *
p + pow_u[
i];
454 v =
v *
p + pow_v[
i];
455 }
458#ifndef NOELIMINATION
461 int canremove = (
ds<geo_stepsize && dt<geo_stepsize) ? 1 : 0;
462 REAL ods=0.0, odt=0.0;
463
464 if( ocanremove && canremove ) {
467 if( nds<geo_stepsize && ndt<geo_stepsize ) {
468
469 --vert;
472 ods = nds;
473 odt = ndt;
474 ocanremove = 1;
475 } else {
476 ocanremove = canremove;
478 odt = dt;
479 }
480 } else {
481 ocanremove = canremove;
483 odt = dt;
484 }
485#endif
486 }
487
488
492 }
493 arc->pwlArc->npts = vert - arc->pwlArc->pts + 1;
494
495
496
497
498
499
500
501
502}
static void trim_power_coeffs(BezierArc *, REAL[MAXORDER], int)
GLuint GLdouble GLdouble GLint GLint order
GLubyte GLubyte GLubyte GLubyte w
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j