13 #ifndef piecewise_surface_test_suite_hpp
14 #define piecewise_surface_test_suite_hpp
33 template<
typename data__>
109 index_type i, j, pp, qq, nup, nvp;
110 data_type umin, vmin, umax, vmax;
117 std::cout <<
"figure(" << figno <<
");" << std::endl;
203 std::vector<data__> u(31), v(31);
204 for (i=0; i<static_cast<index_type>(u.size()); ++i)
206 u[i]=umin+(umax-umin)*static_cast<data__>(i)/(u.size()-1);
208 for (j=0; j<static_cast<index_type>(v.size()); ++j)
210 v[j]=vmin+(vmax-vmin)*static_cast<data__>(j)/(v.size()-1);
214 std::cout <<
"surf_x=[";
215 for (i=0; i<static_cast<index_type>(u.size()); ++i)
217 std::cout << ps.
f(u[i], v[0]).x();
218 for (j=1; j<static_cast<index_type>(v.size()-1); ++j)
220 std::cout <<
", " << ps.
f(u[i], v[j]).x();
222 j=
static_cast<index_type
>(v.size()-1);
223 std::cout <<
", " << ps.
f(u[i], v[j]).x();
224 if (i<static_cast<index_type>(u.size()-1))
225 std::cout <<
"; " << std::endl;
227 std::cout <<
"];" << std::endl;
229 std::cout <<
"surf_y=[";
230 for (i=0; i<static_cast<index_type>(u.size()); ++i)
232 std::cout << ps.
f(u[i], v[0]).y();
233 for (j=1; j<static_cast<index_type>(v.size()-1); ++j)
235 std::cout <<
", " << ps.
f(u[i], v[j]).y();
237 j=
static_cast<index_type
>(v.size()-1);
238 std::cout <<
", " << ps.
f(u[i], v[j]).y();
239 if (i<static_cast<index_type>(u.size()-1))
240 std::cout <<
"; " << std::endl;
242 std::cout <<
"];" << std::endl;
244 std::cout <<
"surf_z=[";
245 for (i=0; i<static_cast<index_type>(u.size()); ++i)
247 std::cout << ps.
f(u[i], v[0]).z();
248 for (j=1; j<static_cast<index_type>(v.size()-1); ++j)
250 std::cout <<
", " << ps.
f(u[i], v[j]).z();
252 j=
static_cast<index_type
>(v.size()-1);
253 std::cout <<
", " << ps.
f(u[i], v[j]).z();
254 if (i<static_cast<index_type>(u.size()-1))
255 std::cout <<
"; " << std::endl;
257 std::cout <<
"];" << std::endl;
259 std::cout <<
"setenv('GNUTERM', 'x11');" << std::endl;
260 std::cout <<
"mesh(surf_x, surf_y, surf_z, zeros(size(surf_z)), 'EdgeColor', [0 0 0]);" << std::endl;
268 surface_type s, s1, s2, s3, s4, s5, s6, s_patches[6];
269 piecewise_surface_type ps1, ps2;
278 index_type i, j, n(3), m(3);
279 point_type pt[3+1][3+1], pt_out;
282 pt[0][0] << -15, 0, 15;
283 pt[1][0] << -5, 5, 15;
284 pt[2][0] << 5, 5, 15;
285 pt[3][0] << 15, 0, 15;
286 pt[0][1] << -15, 5, 5;
287 pt[1][1] << -5, 5, 5;
289 pt[3][1] << 15, 5, 5;
290 pt[0][2] << -15, 5, -5;
291 pt[1][2] << -5, 5, -5;
292 pt[2][2] << 5, 5, -5;
293 pt[3][2] << 15, 5, -5;
294 pt[0][3] << -15, 0, -15;
295 pt[1][3] << -5, 5, -15;
296 pt[2][3] << 5, 5, -15;
297 pt[3][3] << 15, 0, -15;
303 s.set_control_point(pt[i][j], i, j);
307 s.split_v(s1, s2, 0.5);
308 s1.split_u(s3, s4, 0.5);
309 err=ps1.
set(s3, 0, 0); s_patches[0]=s3;
311 s2.split_u(s5, s6, 0.5);
312 err=ps1.
set(s5, 0, 1); s_patches[3]=s5;
314 s4.split_u(s1, s2, 0.5);
315 err=ps1.
set(s1, 1, 0); s_patches[1]=s1;
317 err=ps1.
set(s2, 2, 0); s_patches[2]=s2;
319 s6.split_u(s1, s2, 0.5);
320 err=ps1.
set(s1, 1, 1); s_patches[4]=s1;
322 err=ps1.
set(s2, 2, 1); s_patches[5]=s2;
326 data_type umax, vmax;
328 TEST_ASSERT(tol.approximately_equal(umax, 3));
329 TEST_ASSERT(tol.approximately_equal(vmax, 2));
332 piecewise_surface_type ps1c(ps1);
333 TEST_ASSERT(ps1==ps1c);
337 TEST_ASSERT(ps1c.get_u0()==-1.5);
339 TEST_ASSERT(ps1c.get_v0()==-1.5);
343 TEST_ASSERT(ps2==ps1);
348 surface_type s, s1, s2, s3, s4, s5, s6, s_patches[6];
349 piecewise_surface_type ps1, ps2;
358 index_type i, j, n(3), m(3);
359 point_type pt[3+1][3+1], pt_out;
362 pt[0][0] << -15, 0, 15;
363 pt[1][0] << -5, 5, 15;
364 pt[2][0] << 5, 5, 15;
365 pt[3][0] << 15, 0, 15;
366 pt[0][1] << -15, 5, 5;
367 pt[1][1] << -5, 5, 5;
369 pt[3][1] << 15, 5, 5;
370 pt[0][2] << -15, 5, -5;
371 pt[1][2] << -5, 5, -5;
372 pt[2][2] << 5, 5, -5;
373 pt[3][2] << 15, 5, -5;
374 pt[0][3] << -15, 0, -15;
375 pt[1][3] << -5, 5, -15;
376 pt[2][3] << 5, 5, -15;
377 pt[3][3] << 15, 0, -15;
383 s.set_control_point(pt[i][j], i, j);
387 s.split_v(s1, s2, 0.5);
388 s1.split_u(s3, s4, 0.5);
389 err=ps1.
set(s3, 0, 0); s_patches[0]=s3;
391 s2.split_u(s5, s6, 0.5);
392 err=ps1.
set(s5, 0, 1); s_patches[3]=s5;
394 s4.split_u(s1, s2, 0.5);
395 err=ps1.
set(s1, 1, 0); s_patches[1]=s1;
397 err=ps1.
set(s2, 2, 0); s_patches[2]=s2;
399 s6.split_u(s1, s2, 0.5);
400 err=ps1.
set(s1, 1, 1); s_patches[4]=s1;
402 err=ps1.
set(s2, 2, 1); s_patches[5]=s2;
407 point_type pmin_ref, pmax_ref;
410 pmin_ref << -15, 0, -15;
411 pmax_ref << 15, 4.6875, 15;
412 TEST_ASSERT(bb.get_min()==pmin_ref);
413 TEST_ASSERT(bb.get_max()==pmax_ref);
419 piecewise_surface_type ps1, ps2;
420 data_type u, v, umax, vmax;
428 surface_type s, s1, s2, s3, s4, s5, s6;
429 index_type i, j, n(3), m(3);
430 point_type pt[3+1][3+1], pt_out;
433 pt[0][0] << -15, 0, 15;
434 pt[1][0] << -5, 5, 15;
435 pt[2][0] << 5, 5, 15;
436 pt[3][0] << 15, 0, 15;
437 pt[0][1] << -15, 5, 5;
438 pt[1][1] << -5, 5, 5;
440 pt[3][1] << 15, 5, 5;
441 pt[0][2] << -15, 5, -5;
442 pt[1][2] << -5, 5, -5;
443 pt[2][2] << 5, 5, -5;
444 pt[3][2] << 15, 5, -5;
445 pt[0][3] << -15, 0, -15;
446 pt[1][3] << -5, 5, -15;
447 pt[2][3] << 5, 5, -15;
448 pt[3][3] << 15, 0, -15;
454 s.set_control_point(pt[i][j], i, j);
459 s.split_v(s1, s2, 0.5);
460 s1.split_u(s3, s4, 0.5);
461 err=ps1.
set(s3, 0, 0);
463 s2.split_u(s5, s6, 0.5);
464 err=ps1.
set(s5, 0, 1);
466 s4.split_u(s1, s2, 0.5);
467 err=ps1.
set(s1, 1, 0);
469 err=ps1.
set(s2, 2, 0);
471 s6.split_u(s1, s2, 0.5);
472 err=ps1.
set(s1, 1, 1);
474 err=ps1.
set(s2, 2, 1);
486 TEST_ASSERT(tol.approximately_equal(ps1.
f(u, v), ps2.
f(umax-u, v)));
487 TEST_ASSERT(tol.approximately_equal(ps1.
f_u(u, v), -ps2.
f_u(umax-u, v)));
488 TEST_ASSERT(tol.approximately_equal(ps1.
f_v(u, v), ps2.
f_v(umax-u, v)));
493 TEST_ASSERT(tol.approximately_equal(ps1.
f(u, v), ps2.
f(umax-u, v)));
494 TEST_ASSERT(tol.approximately_equal(ps1.
f_u(u, v), -ps2.
f_u(umax-u, v)));
495 TEST_ASSERT(tol.approximately_equal(ps1.
f_v(u, v), ps2.
f_v(umax-u, v)));
504 TEST_ASSERT(tol.approximately_equal(ps1.
f(u, v), ps2.
f(u, vmax-v)));
505 TEST_ASSERT(tol.approximately_equal(ps1.
f_u(u, v), ps2.
f_u(u, vmax-v)));
506 TEST_ASSERT(tol.approximately_equal(ps1.
f_v(u, v), -ps2.
f_v(u, vmax-v)));
511 TEST_ASSERT(tol.approximately_equal(ps1.
f(u, v), ps2.
f(u, vmax-v)));
512 TEST_ASSERT(tol.approximately_equal(ps1.
f_u(u, v), ps2.
f_u(u, vmax-v)));
513 TEST_ASSERT(tol.approximately_equal(ps1.
f_v(u, v), -ps2.
f_v(u, vmax-v)));
518 piecewise_surface_type ps1, ps2;
529 surface_type s, s1, s2, s3, s4, s5, s6;
530 index_type i, j, n(3), m(3);
531 point_type pt[3+1][3+1], pt_out;
534 pt[0][0] << -15, 0, 15;
535 pt[1][0] << -5, 5, 15;
536 pt[2][0] << 5, 5, 15;
537 pt[3][0] << 15, 0, 15;
538 pt[0][1] << -15, 5, 5;
539 pt[1][1] << -5, 5, 5;
541 pt[3][1] << 15, 5, 5;
542 pt[0][2] << -15, 5, -5;
543 pt[1][2] << -5, 5, -5;
544 pt[2][2] << 5, 5, -5;
545 pt[3][2] << 15, 5, -5;
546 pt[0][3] << -15, 0, -15;
547 pt[1][3] << -5, 5, -15;
548 pt[2][3] << 5, 5, -15;
549 pt[3][3] << 15, 0, -15;
555 s.set_control_point(pt[i][j], i, j);
560 s.split_v(s1, s2, 0.5);
561 s1.split_u(s3, s4, 0.5);
562 err=ps1.
set(s3, 0, 0);
564 s2.split_u(s5, s6, 0.5);
565 err=ps1.
set(s5, 0, 1);
567 s4.split_u(s1, s2, 0.5);
568 err=ps1.
set(s1, 1, 0);
570 err=ps1.
set(s2, 2, 0);
572 s6.split_u(s1, s2, 0.5);
573 err=ps1.
set(s1, 1, 1);
575 err=ps1.
set(s2, 2, 1);
589 TEST_ASSERT(ps1.
f(u, v)==ps2.
f(v, u));
590 TEST_ASSERT(ps1.
f_u(u, v)==ps2.
f_v(v, u));
591 TEST_ASSERT(ps1.
f_v(u, v)==ps2.
f_u(v, u));
596 TEST_ASSERT(ps1.
f(u, v)==ps2.
f(v, u));
597 TEST_ASSERT(ps1.
f_u(u, v)==ps2.
f_v(v, u));
598 TEST_ASSERT(ps1.
f_v(u, v)==ps2.
f_u(v, u));
604 piecewise_surface_type ps1, ps2;
612 surface_type s, s1, s2, s3, s4, s5, s6;
613 index_type i, j, n(3), m(3);
614 point_type pt[3+1][3+1], pt_out;
617 pt[0][0] << -15, 0, 15;
618 pt[1][0] << -5, 5, 15;
619 pt[2][0] << 5, 5, 15;
620 pt[3][0] << 15, 0, 15;
621 pt[0][1] << -15, 5, 5;
622 pt[1][1] << -5, 5, 5;
624 pt[3][1] << 15, 5, 5;
625 pt[0][2] << -15, 5, -5;
626 pt[1][2] << -5, 5, -5;
627 pt[2][2] << 5, 5, -5;
628 pt[3][2] << 15, 5, -5;
629 pt[0][3] << -15, 0, -15;
630 pt[1][3] << -5, 5, -15;
631 pt[2][3] << 5, 5, -15;
632 pt[3][3] << 15, 0, -15;
638 s.set_control_point(pt[i][j], i, j);
643 s.split_v(s1, s2, 0.5);
644 s1.split_u(s3, s4, 0.5);
645 err=ps1.
set(s3, 0, 0);
647 s2.split_u(s5, s6, 0.5);
648 err=ps1.
set(s5, 0, 1);
650 s4.split_u(s1, s2, 0.5);
651 err=ps1.
set(s1, 1, 0);
653 err=ps1.
set(s2, 2, 0);
655 s6.split_u(s1, s2, 0.5);
656 err=ps1.
set(s1, 1, 1);
658 err=ps1.
set(s2, 2, 1);
674 TEST_ASSERT(ps1.
f(u, v)==ps2.
f(u, v));
675 TEST_ASSERT(ps1.
f_u(u, v)==ps2.
f_u(u, v));
676 TEST_ASSERT(ps1.
f_v(u, v)==ps2.
f_v(u, v));
680 nudge << 0, static_cast<data_type>(0.01), 0;
683 s.set_control_point(s.get_control_point(0, 0)+nudge, 0, 0);
690 piecewise_surface_type ps1, ps2;
699 surface_type s, s1, s2, s3, s4, s5, s6;
700 index_type i, j, n(3), m(3);
701 point_type pt[3+1][3+1], pt_out;
704 pt[0][0] << -15, 0, 15;
705 pt[1][0] << -5, 5, 15;
706 pt[2][0] << 5, 5, 15;
707 pt[3][0] << 15, 0, 15;
708 pt[0][1] << -15, 5, 5;
709 pt[1][1] << -5, 5, 5;
711 pt[3][1] << 15, 5, 5;
712 pt[0][2] << -15, 5, -5;
713 pt[1][2] << -5, 5, -5;
714 pt[2][2] << 5, 5, -5;
715 pt[3][2] << 15, 5, -5;
716 pt[0][3] << -15, 0, -15;
717 pt[1][3] << -5, 5, -15;
718 pt[2][3] << 5, 5, -15;
719 pt[3][3] << 15, 0, -15;
725 s.set_control_point(pt[i][j], i, j);
730 s.split_v(s1, s2, 0.5);
731 s1.split_u(s3, s4, 0.5);
732 err=ps1.
set(s3, 0, 0);
734 s2.split_u(s5, s6, 0.5);
735 err=ps1.
set(s5, 0, 1);
737 s4.split_u(s1, s2, 0.5);
738 err=ps1.
set(s1, 1, 0);
740 err=ps1.
set(s2, 2, 0);
742 s6.split_u(s1, s2, 0.5);
743 err=ps1.
set(s1, 1, 1);
745 err=ps1.
set(s2, 2, 1);
759 TEST_ASSERT(tol.approximately_equal(ps2.
f(u, v), ps1.
f(u, v)+trans));
769 rmat << std::cos(one), 0, -std::sin(one),
771 std::sin(one), 0, std::cos(one);
773 TEST_ASSERT(tol.approximately_equal(ps2.
f(u, v), ps1.
f(u, v)*rmat.transpose()));
785 rmat << std::cos(one), 0, -std::sin(one),
787 std::sin(one), 0, std::cos(one);
789 TEST_ASSERT(tol.approximately_equal(ps2.
f(u, v), rorig+(ps1.
f(u, v)-rorig)*rmat.transpose()));
795 surface_type s_patches[6];
796 piecewise_surface_type ps1;
797 data_type u, v, up, vp;
805 surface_type s, s1, s2, s3, s4, s5, s6;
806 index_type i, j, n(3), m(3);
807 point_type pt[3+1][3+1], pt_out;
810 pt[0][0] << -15, 0, 15;
811 pt[1][0] << -5, 5, 15;
812 pt[2][0] << 5, 5, 15;
813 pt[3][0] << 15, 0, 15;
814 pt[0][1] << -15, 5, 5;
815 pt[1][1] << -5, 5, 5;
817 pt[3][1] << 15, 5, 5;
818 pt[0][2] << -15, 5, -5;
819 pt[1][2] << -5, 5, -5;
820 pt[2][2] << 5, 5, -5;
821 pt[3][2] << 15, 5, -5;
822 pt[0][3] << -15, 0, -15;
823 pt[1][3] << -5, 5, -15;
824 pt[2][3] << 5, 5, -15;
825 pt[3][3] << 15, 0, -15;
831 s.set_control_point(pt[i][j], i, j);
836 s.split_v(s1, s2, 0.5);
837 s1.split_u(s3, s4, 0.5);
838 err=ps1.
set(s3, 0, 0); s_patches[0]=s3;
840 s2.split_u(s5, s6, 0.5);
841 err=ps1.
set(s5, 0, 1); s_patches[3]=s5;
843 s4.split_u(s1, s2, 0.5);
844 err=ps1.
set(s1, 1, 0); s_patches[1]=s1;
846 err=ps1.
set(s2, 2, 0); s_patches[2]=s2;
848 s6.split_u(s1, s2, 0.5);
849 err=ps1.
set(s1, 1, 1); s_patches[4]=s1;
851 err=ps1.
set(s2, 2, 1); s_patches[5]=s2;
860 TEST_ASSERT(tol.approximately_equal(ps1.
f(u, v), s_patches[0].f(up, vp)));
861 TEST_ASSERT(tol.approximately_equal(ps1.
f_u(u, v), s_patches[0].f_u(up, vp)));
862 TEST_ASSERT(tol.approximately_equal(ps1.
f_v(u, v), s_patches[0].f_v(up, vp)));
863 TEST_ASSERT(tol.approximately_equal(ps1.
f_uu(u, v), s_patches[0].f_uu(up, vp)));
864 TEST_ASSERT(tol.approximately_equal(ps1.
f_uv(u, v), s_patches[0].f_uv(up, vp)));
865 TEST_ASSERT(tol.approximately_equal(ps1.
f_vv(u, v), s_patches[0].f_vv(up, vp)));
872 TEST_ASSERT(tol.approximately_equal(ps1.
f(u, v), s_patches[2].f(up, vp)));
873 TEST_ASSERT(tol.approximately_equal(ps1.
f_u(u, v), s_patches[2].f_u(up, vp)));
874 TEST_ASSERT(tol.approximately_equal(ps1.
f_v(u, v), s_patches[2].f_v(up, vp)));
875 TEST_ASSERT(tol.approximately_equal(ps1.
f_uu(u, v), s_patches[2].f_uu(up, vp)));
876 TEST_ASSERT(tol.approximately_equal(ps1.
f_uv(u, v), s_patches[2].f_uv(up, vp)));
877 TEST_ASSERT(tol.approximately_equal(ps1.
f_vv(u, v), s_patches[2].f_vv(up, vp)));
884 TEST_ASSERT(tol.approximately_equal(ps1.
f(u, v), s_patches[5].f(up, vp)));
885 TEST_ASSERT(tol.approximately_equal(ps1.
f_u(u, v), s_patches[5].f_u(up, vp)));
886 TEST_ASSERT(tol.approximately_equal(ps1.
f_v(u, v), s_patches[5].f_v(up, vp)));
887 TEST_ASSERT(tol.approximately_equal(ps1.
f_uu(u, v), s_patches[5].f_uu(up, vp)));
888 TEST_ASSERT(tol.approximately_equal(ps1.
f_uv(u, v), s_patches[5].f_uv(up, vp)));
889 TEST_ASSERT(tol.approximately_equal(ps1.
f_vv(u, v), s_patches[5].f_vv(up, vp)));
894 piecewise_surface_type ps1, ps2;
903 surface_type s, s1, s2, s3, s4, s5, s6;
904 index_type i, j, n(3), m(3);
905 point_type pt[3+1][3+1], pt_out;
908 pt[0][0] << -15, 0, 15;
909 pt[1][0] << -5, 5, 15;
910 pt[2][0] << 5, 5, 15;
911 pt[3][0] << 15, 0, 15;
912 pt[0][1] << -15, 5, 5;
913 pt[1][1] << -5, 5, 5;
915 pt[3][1] << 15, 5, 5;
916 pt[0][2] << -15, 5, -5;
917 pt[1][2] << -5, 5, -5;
918 pt[2][2] << 5, 5, -5;
919 pt[3][2] << 15, 5, -5;
920 pt[0][3] << -15, 0, -15;
921 pt[1][3] << -5, 5, -15;
922 pt[2][3] << 5, 5, -15;
923 pt[3][3] << 15, 0, -15;
929 s.set_control_point(pt[i][j], i, j);
934 s.split_v(s1, s2, 0.5);
935 s1.split_u(s3, s4, 0.5);
936 err=ps1.
set(s3, 0, 0);
938 s2.split_u(s5, s6, 0.5);
939 err=ps1.
set(s5, 0, 1);
941 s4.split_u(s1, s2, 0.5);
942 err=ps1.
set(s1, 1, 0);
944 err=ps1.
set(s2, 2, 0);
946 s6.split_u(s1, s2, 0.5);
947 err=ps1.
set(s1, 1, 1);
949 err=ps1.
set(s2, 2, 1);
960 TEST_ASSERT(tol.approximately_equal(ps1.
f(u, v), ps2.
f(u, v)));
961 TEST_ASSERT(tol.approximately_equal(ps1.
f_u(u, v), ps2.
f_u(u, v)));
962 TEST_ASSERT(tol.approximately_equal(ps1.
f_v(u, v), ps2.
f_v(u, v)));
967 TEST_ASSERT(tol.approximately_equal(ps1.
f(u, v), ps2.
f(u, v)));
968 TEST_ASSERT(tol.approximately_equal(ps1.
f_u(u, v), ps2.
f_u(u, v)));
969 TEST_ASSERT(tol.approximately_equal(ps1.
f_v(u, v), ps2.
f_v(u, v)));
974 TEST_ASSERT(tol.approximately_equal(ps1.
f(u, v), ps2.
f(u, v)));
975 TEST_ASSERT(tol.approximately_equal(ps1.
f_u(u, v), ps2.
f_u(u, v)));
976 TEST_ASSERT(tol.approximately_equal(ps1.
f_v(u, v), ps2.
f_v(u, v)));
981 TEST_ASSERT(tol.approximately_equal(ps1.
f(u, v), ps2.
f(u, v)));
982 TEST_ASSERT(tol.approximately_equal(ps1.
f_u(u, v), ps2.
f_u(u, v)));
983 TEST_ASSERT(tol.approximately_equal(ps1.
f_v(u, v), ps2.
f_v(u, v)));
992 TEST_ASSERT(tol.approximately_equal(ps1.
f(u, v), ps2.
f(u, v)));
993 TEST_ASSERT(tol.approximately_equal(ps1.
f_u(u, v), ps2.
f_u(u, v)));
994 TEST_ASSERT(tol.approximately_equal(ps1.
f_v(u, v), ps2.
f_v(u, v)));
999 TEST_ASSERT(tol.approximately_equal(ps1.
f(u, v), ps2.
f(u, v)));
1000 TEST_ASSERT(tol.approximately_equal(ps1.
f_u(u, v), ps2.
f_u(u, v)));
1001 TEST_ASSERT(tol.approximately_equal(ps1.
f_v(u, v), ps2.
f_v(u, v)));
1006 TEST_ASSERT(tol.approximately_equal(ps1.
f(u, v), ps2.
f(u, v)));
1007 TEST_ASSERT(tol.approximately_equal(ps1.
f_u(u, v), ps2.
f_u(u, v)));
1008 TEST_ASSERT(tol.approximately_equal(ps1.
f_v(u, v), ps2.
f_v(u, v)));
1013 piecewise_surface_type ps1, ps2;
1023 index_type i, j, n(5), m(4);
1024 point_type pt[5+1][4+1], pt_out;
1027 pt[0][0] << 0, 0, 15;
1028 pt[1][0] << 2, 6, 15;
1029 pt[2][0] << 3, 0, 15;
1030 pt[3][0] << 5, 4, 15;
1031 pt[4][0] << 7, 1, 15;
1032 pt[5][0] << 9, 1, 15;
1033 pt[0][1] << 0, 0, 11;
1034 pt[1][1] << 2, 6, 11;
1035 pt[2][1] << 3, 0, 11;
1036 pt[3][1] << 5, 4, 11;
1037 pt[4][1] << 7, 1, 11;
1038 pt[5][1] << 9, 1, 11;
1039 pt[0][2] << 0, 0, 3;
1040 pt[1][2] << 2, 6, 3;
1041 pt[2][2] << 3, 0, 3;
1042 pt[3][2] << 5, 4, 3;
1043 pt[4][2] << 7, 1, 3;
1044 pt[5][2] << 9, 1, 3;
1045 pt[0][3] << 0, 0, 0;
1046 pt[1][3] << 2, 6, 0;
1047 pt[2][3] << 3, 0, 0;
1048 pt[3][3] << 5, 4, 0;
1049 pt[4][3] << 7, 1, 0;
1050 pt[5][3] << 9, 1, 0;
1051 pt[0][4] << 0, 0, -5;
1052 pt[1][4] << 2, 6, -5;
1053 pt[2][4] << 3, 0, -5;
1054 pt[3][4] << 5, 4, -5;
1055 pt[4][4] << 7, 1, -5;
1056 pt[5][4] << 9, 1, -5;
1059 for (i=0; i<=n; ++i)
1061 for (j=0; j<=m; ++j)
1063 s.set_control_point(pt[i][j], i, j);
1067 err=ps1.
set(s, 0, 0);
1072 data_type ttol =
static_cast<data_type
>(1e-3);
1079 index_type mind, maxd;
1083 TEST_ASSERT(mind==3);
1084 TEST_ASSERT(maxd==3);
1090 TEST_ASSERT((ps1.
f(u, v)-ps2.
f(u, v)).norm() < ttol);
1094 TEST_ASSERT((ps1.
f(u, v)-ps2.
f(u, v)).norm() < ttol);
1098 TEST_ASSERT((ps1.
f(u, v)-ps2.
f(u, v)).norm() < ttol);
1102 TEST_ASSERT((ps1.
f(u, v)-ps2.
f(u, v)).norm() < ttol);
1109 ps2.degree_v(mind, maxd);
1111 TEST_ASSERT(mind==3);
1112 TEST_ASSERT(maxd==3);
1118 TEST_ASSERT((ps1.
f(u, v)-ps2.f(u, v)).norm() < ttol);
1122 TEST_ASSERT((ps1.
f(u, v)-ps2.f(u, v)).norm() < ttol);
1126 TEST_ASSERT((ps1.
f(u, v)-ps2.f(u, v)).norm() < ttol);
1133 ps2.degree_u(mind, maxd);
1135 TEST_ASSERT(mind==3);
1136 TEST_ASSERT(maxd==3);
1138 ps2.degree_v(mind, maxd);
1140 TEST_ASSERT(mind==3);
1141 TEST_ASSERT(maxd==3);
1147 TEST_ASSERT((ps1.
f(u, v)-ps2.f(u, v)).norm() < ttol);
1151 TEST_ASSERT((ps1.
f(u, v)-ps2.f(u, v)).norm() < ttol);
1155 TEST_ASSERT((ps1.
f(u, v)-ps2.f(u, v)).norm() < ttol);
1161 data_type eps(std::numeric_limits<data__>::epsilon());
1162 piecewise_surface_type c1;
1164 data_type dt[3], len, bc_len[3], ref_len, t0, t1, temp0, temp1;
1165 typename curve_type::control_point_type cntrl1_in[4], cntrl2_in[5], cntrl3_in[3];
1167 data_type
tol(std::sqrt(eps));
1170 cntrl1_in[0] << 2.0, 2.0, 0.0;
1171 cntrl1_in[1] << 1.0, 1.5, 0.0;
1172 cntrl1_in[2] << 3.5, 0.0, 0.0;
1173 cntrl1_in[3] << 4.0, 1.0, 0.0;
1176 for (index_type i=0; i<4; ++i)
1178 bc[0].set_control_point(cntrl1_in[i], i);
1181 cntrl2_in[0] << 4.0, 1.0, 0.0;
1182 cntrl2_in[1] << 5.0, 2.5, 0.0;
1183 cntrl2_in[2] << 5.5, 1.0, 0.0;
1184 cntrl2_in[3] << 6.0, 0.0, 0.0;
1185 cntrl2_in[4] << 6.5,-0.5, 0.0;
1188 for (index_type i=0; i<5; ++i)
1190 bc[1].set_control_point(cntrl2_in[i], i);
1193 cntrl3_in[0] << 6.5,-0.5, 0.0;
1194 cntrl3_in[1] << 6.0,-1.0, 0.0;
1195 cntrl3_in[2] << 5.5,-2.0, 0.0;
1198 for (index_type i=0; i<3; ++i)
1200 bc[2].set_control_point(cntrl3_in[i], i);
1203 err=c1.
set(bc, bc+3, dt);
1205 TEST_ASSERT(c1.number_segments()==3);
1209 ref_len=bc_len[0]+bc_len[1]+bc_len[2];
1210 TEST_ASSERT(len==ref_len);
1217 TEST_ASSERT(len==ref_len);
1225 ref_len=temp0+temp1;
1226 TEST_ASSERT(std::abs(len-ref_len)<2*tol);
1234 ref_len=temp0+bc_len[1]+temp1;
1235 TEST_ASSERT(std::abs(len-ref_len)<166*tol);
1241 const index_type n(3), m(3);
1242 surface_type s(n, m);
1243 point_type cp[3+1][3+1], pt_out, pt_ref;
1244 point_type pt, norm, u_contra, v_contra;
1247 piecewise_surface_type pws;
1248 piecewise_curve_type pwc;
1254 cp[0][0] << -15, 0, 15;
1255 cp[1][0] << -5, 5, 15;
1256 cp[2][0] << 5, 5, 15;
1257 cp[3][0] << 15, 0, 15;
1258 cp[0][1] << -15, 5, 5;
1259 cp[1][1] << -5, 5, 5;
1260 cp[2][1] << 5, 5, 5;
1261 cp[3][1] << 15, 5, 5;
1262 cp[0][2] << -15, 5, -5;
1263 cp[1][2] << -5, 5, -5;
1264 cp[2][2] << 5, 5, -5;
1265 cp[3][2] << 15, 5, -5;
1266 cp[0][3] << -15, 0, -15;
1267 cp[1][3] << -5, 5, -15;
1268 cp[2][3] << 5, 5, -15;
1269 cp[3][3] << 15, 0, -15;
1272 for (i=0; i<=n; ++i)
1274 for (j=0; j<=m; ++j)
1276 s.set_control_point(cp[i][j], i, j);
1279 TEST_ASSERT(s.open_u());
1280 TEST_ASSERT(s.open_v());
1282 err=pws.
set(s, 0, 0);
1285 pws.
split_u(static_cast<data_type>(0.2));
1286 pws.
split_u(static_cast<data_type>(0.3));
1287 pws.
split_u(static_cast<data_type>(0.6));
1288 pws.
split_u(static_cast<data_type>(0.7));
1290 pws.
split_v(static_cast<data_type>(0.2));
1291 pws.
split_v(static_cast<data_type>(0.412));
1292 pws.
split_v(static_cast<data_type>(0.6));
1293 pws.
split_v(static_cast<data_type>(0.895));
1302 TEST_ASSERT(pt_out==pt_ref);
1304 v=
static_cast<data_type
>(0.1);
1307 TEST_ASSERT(pt_out==pt_ref);
1309 v=
static_cast<data_type
>(0.2);
1312 TEST_ASSERT(pt_out==pt_ref);
1314 v=
static_cast<data_type
>(0.4);
1317 TEST_ASSERT(pt_out==pt_ref);
1319 v=
static_cast<data_type
>(0.6);
1322 TEST_ASSERT(pt_out==pt_ref);
1324 v=
static_cast<data_type
>(0.8);
1327 TEST_ASSERT(pt_out==pt_ref);
1332 TEST_ASSERT(pt_out==pt_ref);
1335 u=
static_cast<data_type
>(0.1);
1341 TEST_ASSERT(pt_out==pt_ref);
1343 v=
static_cast<data_type
>(0.1);
1346 TEST_ASSERT(pt_out==pt_ref);
1348 v=
static_cast<data_type
>(0.2);
1351 TEST_ASSERT(pt_out==pt_ref);
1353 v=
static_cast<data_type
>(0.4);
1356 TEST_ASSERT(pt_out==pt_ref);
1358 v=
static_cast<data_type
>(0.6);
1361 TEST_ASSERT(pt_out==pt_ref);
1363 v=
static_cast<data_type
>(0.8);
1366 TEST_ASSERT(pt_out==pt_ref);
1371 TEST_ASSERT(pt_out==pt_ref);
1374 u=
static_cast<data_type
>(0.2);
1380 TEST_ASSERT(pt_out==pt_ref);
1382 v=
static_cast<data_type
>(0.1);
1385 TEST_ASSERT(pt_out==pt_ref);
1387 v=
static_cast<data_type
>(0.2);
1390 TEST_ASSERT(pt_out==pt_ref);
1392 v=
static_cast<data_type
>(0.4);
1395 TEST_ASSERT(pt_out==pt_ref);
1397 v=
static_cast<data_type
>(0.6);
1400 TEST_ASSERT(pt_out==pt_ref);
1402 v=
static_cast<data_type
>(0.8);
1405 TEST_ASSERT(pt_out==pt_ref);
1410 TEST_ASSERT(pt_out==pt_ref);
1413 u=
static_cast<data_type
>(0.5);
1419 TEST_ASSERT(pt_out==pt_ref);
1421 v=
static_cast<data_type
>(0.1);
1424 TEST_ASSERT(pt_out==pt_ref);
1426 v=
static_cast<data_type
>(0.2);
1429 TEST_ASSERT(pt_out==pt_ref);
1431 v=
static_cast<data_type
>(0.4);
1434 TEST_ASSERT(pt_out==pt_ref);
1436 v=
static_cast<data_type
>(0.6);
1439 TEST_ASSERT(pt_out==pt_ref);
1441 v=
static_cast<data_type
>(0.8);
1444 TEST_ASSERT(pt_out==pt_ref);
1449 TEST_ASSERT(pt_out==pt_ref);
1458 TEST_ASSERT(pt_out==pt_ref);
1460 v=
static_cast<data_type
>(0.1);
1463 TEST_ASSERT(pt_out==pt_ref);
1465 v=
static_cast<data_type
>(0.2);
1468 TEST_ASSERT(pt_out==pt_ref);
1470 v=
static_cast<data_type
>(0.4);
1473 TEST_ASSERT(pt_out==pt_ref);
1475 v=
static_cast<data_type
>(0.6);
1478 TEST_ASSERT(pt_out==pt_ref);
1480 v=
static_cast<data_type
>(0.8);
1483 TEST_ASSERT(pt_out==pt_ref);
1488 TEST_ASSERT(pt_out==pt_ref);
1499 TEST_ASSERT(pt_out==pt_ref);
1501 u=
static_cast<data_type
>(0.1);
1504 TEST_ASSERT(pt_out==pt_ref);
1506 u=
static_cast<data_type
>(0.2);
1509 TEST_ASSERT(pt_out==pt_ref);
1511 u=
static_cast<data_type
>(0.4);
1514 TEST_ASSERT(pt_out==pt_ref);
1516 u=
static_cast<data_type
>(0.6);
1519 TEST_ASSERT(pt_out==pt_ref);
1521 u=
static_cast<data_type
>(0.8);
1524 TEST_ASSERT(pt_out==pt_ref);
1529 TEST_ASSERT(pt_out==pt_ref);
1532 v=
static_cast<data_type
>(0.1);
1538 TEST_ASSERT(pt_out==pt_ref);
1540 u=
static_cast<data_type
>(0.1);
1543 d=(pt_ref - pt_out).norm();
1544 TEST_ASSERT(d<std::numeric_limits<data_type>::epsilon()*30);
1546 u=
static_cast<data_type
>(0.2);
1549 TEST_ASSERT(pt_out==pt_ref);
1551 u=
static_cast<data_type
>(0.4);
1554 d=(pt_ref - pt_out).norm();
1555 TEST_ASSERT(d<std::numeric_limits<data_type>::epsilon()*30);
1557 u=
static_cast<data_type
>(0.6);
1560 d=(pt_ref - pt_out).norm();
1561 TEST_ASSERT(d<std::numeric_limits<data_type>::epsilon()*30);
1563 u=
static_cast<data_type
>(0.8);
1566 d=(pt_ref - pt_out).norm();
1567 TEST_ASSERT(d<std::numeric_limits<data_type>::epsilon()*30);
1572 TEST_ASSERT(pt_out==pt_ref);
1575 v=
static_cast<data_type
>(0.2);
1581 TEST_ASSERT(pt_out==pt_ref);
1583 u=
static_cast<data_type
>(0.1);
1586 TEST_ASSERT(pt_out==pt_ref);
1588 u=
static_cast<data_type
>(0.2);
1591 TEST_ASSERT(pt_out==pt_ref);
1593 u=
static_cast<data_type
>(0.4);
1596 d=(pt_ref - pt_out).norm();
1597 TEST_ASSERT(d<std::numeric_limits<data_type>::epsilon()*30);
1599 u=
static_cast<data_type
>(0.6);
1602 d=(pt_ref - pt_out).norm();
1603 TEST_ASSERT(d<std::numeric_limits<data_type>::epsilon()*30);
1605 u=
static_cast<data_type
>(0.8);
1608 d=(pt_ref - pt_out).norm();
1609 TEST_ASSERT(d<std::numeric_limits<data_type>::epsilon()*30);
1614 TEST_ASSERT(pt_out==pt_ref);
1617 v=
static_cast<data_type
>(0.4);
1623 TEST_ASSERT(pt_out==pt_ref);
1625 u=
static_cast<data_type
>(0.1);
1628 d=(pt_ref - pt_out).norm();
1629 TEST_ASSERT(d<std::numeric_limits<data_type>::epsilon()*30);
1631 u=
static_cast<data_type
>(0.2);
1634 d=(pt_ref - pt_out).norm();
1635 TEST_ASSERT(d<std::numeric_limits<data_type>::epsilon()*30);
1637 u=
static_cast<data_type
>(0.4);
1640 d=(pt_ref - pt_out).norm();
1641 TEST_ASSERT(d<std::numeric_limits<data_type>::epsilon()*30);
1643 u=
static_cast<data_type
>(0.6);
1646 TEST_ASSERT(pt_out==pt_ref);
1648 u=
static_cast<data_type
>(0.8);
1651 d=(pt_ref - pt_out).norm();
1652 TEST_ASSERT(d<std::numeric_limits<data_type>::epsilon()*30);
1657 TEST_ASSERT(pt_out==pt_ref);
1666 TEST_ASSERT(pt_out==pt_ref);
1668 u=
static_cast<data_type
>(0.1);
1671 TEST_ASSERT(pt_out==pt_ref);
1673 u=
static_cast<data_type
>(0.2);
1676 TEST_ASSERT(pt_out==pt_ref);
1678 u=
static_cast<data_type
>(0.4);
1681 TEST_ASSERT(pt_out==pt_ref);
1683 u=
static_cast<data_type
>(0.6);
1686 TEST_ASSERT(pt_out==pt_ref);
1688 u=
static_cast<data_type
>(0.8);
1691 TEST_ASSERT(pt_out==pt_ref);
1696 TEST_ASSERT(pt_out==pt_ref);
1704 piecewise_surface_type ps;
1705 std::vector<data_type> du(3), dv(2);
1715 ps.
init_uv(du.begin(), du.end(), dv.begin(), dv.end(), -1, -2);
1720 index_type i, j, n, m;
1721 point_type pt[3+1][3+1], pt_out;
1726 pt[0][0] << -20, 0, 15;
1727 pt[0][1] << -20, 5, 5;
1728 pt[0][2] << -20, 5, -5;
1729 pt[0][3] << -20, 0, -15;
1730 pt[1][0] << -15, 0, 15;
1731 pt[1][1] << -15, 5, 5;
1732 pt[1][2] << -15, 5, -5;
1733 pt[1][3] << -15, 0, -15;
1735 for (i=0; i<=n; ++i)
1737 for (j=0; j<=m; ++j)
1739 s.set_control_point(pt[i][j], i, j);
1742 err=ps.
set(s, 0, 0);
1748 pt[0][0] << -15, 0, 15;
1749 pt[1][0] << -5, 5, 15;
1750 pt[2][0] << 5, 5, 15;
1751 pt[3][0] << 15, 0, 15;
1752 pt[0][1] << -15, 5, 5;
1753 pt[1][1] << -5, 5, 5;
1754 pt[2][1] << 5, 5, 5;
1755 pt[3][1] << 15, 5, 5;
1756 pt[0][2] << -15, 5, -5;
1757 pt[1][2] << -5, 5, -5;
1758 pt[2][2] << 5, 5, -5;
1759 pt[3][2] << 15, 5, -5;
1760 pt[0][3] << -15, 0, -15;
1761 pt[1][3] << -5, 5, -15;
1762 pt[2][3] << 5, 5, -15;
1763 pt[3][3] << 15, 0, -15;
1765 for (i=0; i<=n; ++i)
1767 for (j=0; j<=m; ++j)
1769 s.set_control_point(pt[i][j], i, j);
1772 err=ps.
set(s, 1, 0);
1778 pt[0][0] << 15, 0, 15;
1779 pt[0][1] << 15, 5, 5;
1780 pt[0][2] << 15, 5, -5;
1781 pt[0][3] << 15, 0, -15;
1782 pt[1][0] << 20, 0, 15;
1783 pt[1][1] << 20, 5, 5;
1784 pt[1][2] << 20, 5, -5;
1785 pt[1][3] << 20, 0, -15;
1787 for (i=0; i<=n; ++i)
1789 for (j=0; j<=m; ++j)
1791 s.set_control_point(pt[i][j], i, j);
1794 err=ps.
set(s, 2, 0);
1800 pt[0][0] << -20, 0, -15;
1801 pt[0][1] << -20, -3, -7;
1802 pt[0][2] << -20, -7, -10;
1803 pt[1][0] << -15, 0, -15;
1804 pt[1][1] << -15, -3, -7;
1805 pt[1][2] << -15, -7, -10;
1808 for (i=0; i<=n; ++i)
1810 for (j=0; j<=m; ++j)
1812 s.set_control_point(pt[i][j], i, j);
1815 err=ps.
set(s, 0, 1);
1821 pt[0][0] << -15, 0, -15;
1822 pt[0][1] << -15, -3, -7;
1823 pt[0][2] << -15, -7, -10;
1824 pt[1][0] << -5, 5, -15;
1825 pt[1][1] << -5, -1, -7;
1826 pt[1][2] << -5, -4, -10;
1827 pt[2][0] << 5, 5, -15;
1828 pt[2][1] << 5, -1, -7;
1829 pt[2][2] << 5, -4, -10;
1830 pt[3][0] << 15, 0, -15;
1831 pt[3][1] << 15, -3, -7;
1832 pt[3][2] << 15, -7, -10;
1835 for (i=0; i<=n; ++i)
1837 for (j=0; j<=m; ++j)
1839 s.set_control_point(pt[i][j], i, j);
1842 err=ps.
set(s, 1, 1);
1848 pt[0][0] << 15, 0, -15;
1849 pt[0][1] << 15, -3, -7;
1850 pt[0][2] << 15, -7, -10;
1851 pt[1][0] << 20, 0, -15;
1852 pt[1][1] << 20, -3, -7;
1853 pt[1][2] << 20, -7, -10;
1856 for (i=0; i<=n; ++i)
1858 for (j=0; j<=m; ++j)
1860 s.set_control_point(pt[i][j], i, j);
1863 err=ps.
set(s, 2, 1);
1867 std::vector<data_type> disc_ujoints, disc_ujoints_ref(2), disc_vjoints, disc_vjoints_ref(1);
1872 ujoints[1]=ujoints[0]+du[0]/2;
1873 ujoints[2]=ujoints[0]+du[0];
1874 ujoints[3]=ujoints[2]+du[1]/2;
1875 ujoints[4]=ujoints[2]+du[1];
1876 ujoints[5]=ujoints[4]+du[2]/2;
1877 ujoints[6]=ujoints[4]+du[2];
1879 vjoints[1]=vjoints[0]+dv[0]/2;
1880 vjoints[2]=vjoints[0]+dv[0];
1881 vjoints[3]=vjoints[2]+dv[1]/2;
1882 vjoints[4]=vjoints[2]+dv[1];
1885 disc_ujoints_ref[0]=ujoints[2];
1886 disc_ujoints_ref[1]=ujoints[4];
1887 disc_vjoints_ref[0]=vjoints[2];
1904 TEST_ASSERT(disc_ujoints.size()==disc_ujoints_ref.size());
1905 TEST_ASSERT(disc_vjoints.size()==disc_vjoints_ref.size());
1906 TEST_ASSERT(tol.approximately_equal(disc_ujoints[0], disc_ujoints_ref[0]));
1907 TEST_ASSERT(tol.approximately_equal(disc_ujoints[1], disc_ujoints_ref[1]));
1908 TEST_ASSERT(tol.approximately_equal(disc_vjoints[0], disc_vjoints_ref[0]));
void to_cubic(const data_type &ttol)
Definition: piecewise.hpp:720
surface_type::point_type point_type
Definition: piecewise.hpp:59
void split_test()
Definition: piecewise_surface_test_suite.hpp:892
void AddTests(const float &)
Definition: piecewise_surface_test_suite.hpp:48
void reverse_u()
Definition: piecewise.hpp:421
void replace_test()
Definition: piecewise_surface_test_suite.hpp:601
tolerance_type tol
Definition: piecewise_surface_test_suite.hpp:45
piecewise_surface_type::surface_type surface_type
Definition: piecewise_surface_test_suite.hpp:38
void translate(const point_type &trans)
Definition: piecewise.hpp:407
data__ data_type
Definition: piecewise.hpp:66
point_type f_u(const data_type &u, const data_type &v) const
Definition: piecewise.hpp:910
data_type get_u0() const
Definition: piecewise.hpp:133
void get_parameter_max(data_type &umax, data_type &vmax) const
Definition: piecewise.hpp:175
void get_uconst_curve(piecewise_curve_type &pwc, const data_type &u) const
Definition: piecewise.hpp:726
error_code get(surface_type &surf, const index_type &ui, const index_type &vi) const
Definition: piecewise.hpp:487
eli::geom::surface::piecewise< eli::geom::surface::bezier, data__, 3 > piecewise_surface_type
Definition: piecewise_surface_test_suite.hpp:37
point_type f(const data_type &u, const data_type &v) const
Definition: piecewise.hpp:897
index_type number_v_patches() const
Definition: piecewise.hpp:143
void to_cubic_v(const data_type &ttol)
Definition: piecewise.hpp:674
void transformation_test()
Definition: piecewise_surface_test_suite.hpp:688
Definition: piecewise.hpp:76
piecewise_surface_test_suite()
Definition: piecewise_surface_test_suite.hpp:98
Definition: piecewise.hpp:37
void reverse_v()
Definition: piecewise.hpp:436
point_type f_vv(const data_type &u, const data_type &v) const
Definition: piecewise.hpp:975
void swap_test()
Definition: piecewise_surface_test_suite.hpp:516
void bounding_box_test()
Definition: piecewise_surface_test_suite.hpp:346
void to_cubic_test()
Definition: piecewise_surface_test_suite.hpp:1011
error_code replace(const surface_type &surf, const index_type &ui, const index_type &vi)
Definition: piecewise.hpp:524
void reverse_test()
Definition: piecewise_surface_test_suite.hpp:416
error_code split_u(const data_type &u_in)
Definition: piecewise.hpp:582
void find_interior_C0_edges(std::vector< data_type > &uconst, std::vector< data_type > &vconst) const
Definition: piecewise.hpp:842
tol__ tolerance_type
Definition: piecewise.hpp:68
void octave_print(int figno, const piecewise_surface_type &ps) const
Definition: piecewise_surface_test_suite.hpp:107
error_code split_v(const data_type &v_in)
Definition: piecewise.hpp:605
void rotate(const rotation_matrix_type &rmat)
Definition: piecewise.hpp:379
void swap_uv()
Definition: piecewise.hpp:451
error_code
Definition: piecewise.hpp:69
void length(typename piecewise< curve__, data__, dim__, tol__ >::data_type &len, const piecewise< curve__, data__, dim__, tol__ > &pc, const typename piecewise< curve__, data__, dim__, tol__ >::data_type &tol)
Definition: length.hpp:43
point_type f_uu(const data_type &u, const data_type &v) const
Definition: piecewise.hpp:942
data_type get_v0() const
Definition: piecewise.hpp:136
piecewise_surface_type::data_type data_type
Definition: piecewise_surface_test_suite.hpp:40
void get_parameter_min(data_type &umin, data_type &vmin) const
Definition: piecewise.hpp:169
void get_curve_test()
Definition: piecewise_surface_test_suite.hpp:1239
point_type f_uv(const data_type &u, const data_type &v) const
Definition: piecewise.hpp:958
surface_type::index_type index_type
Definition: piecewise.hpp:58
void to_cubic_u(const data_type &ttol)
Definition: piecewise.hpp:628
void AddTests(const long double &)
Definition: piecewise_surface_test_suite.hpp:80
index_type number_u_patches() const
Definition: piecewise.hpp:142
Definition: piecewise.hpp:71
piecewise_surface_type::point_type point_type
Definition: piecewise_surface_test_suite.hpp:39
Definition: piecewise_surface_test_suite.hpp:34
void continuity_test()
Definition: piecewise_surface_test_suite.hpp:1699
void area_test()
Definition: piecewise_surface_test_suite.hpp:1158
surface_type::bounding_box_type bounding_box_type
Definition: piecewise.hpp:62
surface_type::rotation_matrix_type rotation_matrix_type
Definition: piecewise.hpp:61
point_type f(const data_type &t) const
Definition: piecewise.hpp:1732
void evaluation_test()
Definition: piecewise_surface_test_suite.hpp:793
void init_uv(const index_type &nsegu, const index_type &nsegv, const data_type &du=1, const data_type &dv=1, const data_type &u0=0, const data_type &v0=0)
Definition: piecewise.hpp:219
~piecewise_surface_test_suite()
Definition: piecewise_surface_test_suite.hpp:102
void get_vconst_curve(piecewise_curve_type &pwc, const data_type &v) const
Definition: piecewise.hpp:756
piecewise_surface_type::tolerance_type tolerance_type
Definition: piecewise_surface_test_suite.hpp:42
void AddTests(const double &)
Definition: piecewise_surface_test_suite.hpp:64
void get_bounding_box(bounding_box_type &bb) const
Definition: piecewise.hpp:360
surface__< data__, dim__, tol__ > surface_type
Definition: piecewise.hpp:57
error_code set(const surface_type &surf, const index_type &ui, const index_type &vi)
Definition: piecewise.hpp:509
piecewise_surface_type::piecewise_curve_type piecewise_curve_type
Definition: piecewise_surface_test_suite.hpp:43
void creation_test()
Definition: piecewise_surface_test_suite.hpp:266
piecewise_surface_type::index_type index_type
Definition: piecewise_surface_test_suite.hpp:41
void degree_u(index_type &mind, index_type &maxd)
Definition: piecewise.hpp:252
point_type f_v(const data_type &u, const data_type &v) const
Definition: piecewise.hpp:926