comparison extra/nurbs/inst/nrbcoons.m @ 12667:1411b4cf3c81 octave-forge

Check that the curves formed a closed surface
author rafavzqz
date Tue, 28 Jul 2015 10:24:42 +0000
parents 37d08939bb7b
children
comparison
equal deleted inserted replaced
12666:fc325d64210b 12667:1411b4cf3c81
87 87
88 if nargin ~= 4 88 if nargin ~= 4
89 error('Incorrect number of input arguments'); 89 error('Incorrect number of input arguments');
90 end 90 end
91 91
92 if (max (abs (nrbeval (u1, u1.knots(1)) - nrbeval (v1, v1.knots(1)))) > 1e-10 || ...
93 max (abs (nrbeval (u1, u1.knots(end)) - nrbeval (v2, v2.knots(1)))) > 1e-10 || ...
94 max (abs (nrbeval (u2, u2.knots(1)) - nrbeval (v1, v1.knots(end)))) > 1e-10 || ...
95 max (abs (nrbeval (u2, u2.knots(end)) - nrbeval (v2, v2.knots(end)))) > 1e-10)
96 error ('The four curves do not define a closed boundary')
97 end
98
99
100
92 r1 = nrbruled(u1, u2); 101 r1 = nrbruled(u1, u2);
93 r2 = nrbtransp(nrbruled(v1, v2)); 102 r2 = nrbtransp(nrbruled(v1, v2));
94 t = nrb4surf(u1.coefs(:,1), u1.coefs(:,end), u2.coefs(:,1), u2.coefs(:,end)); 103 t = nrb4surf(u1.coefs(:,1), u1.coefs(:,end), u2.coefs(:,1), u2.coefs(:,end));
95 104
96 % raise all surfaces to a common degree 105 % raise all surfaces to a common degree