NRBGLUE: Glues two NURBS patches together with C^0-continuity at the
 interface. 
 
 Calling Sequence:
 
   glued = nrbglue(nrb1, nrb2, [side1, side2])
 
 INPUT:
 
   nrb1	: first NURBS struct.
   nrb2	: second NURBS struct.
   side1	: index of the boundary side of nrb1 to be glued (optional).
   side2	: index of the boundary side of nrb2 to be glued (optional).

 OUTPUT:
 
   glued : Glued NURBS struct.

 The resulting NURBS struct has the same orientation as nrb1.
 
 Description:
 
   The orientation of the NURBS boundaries:
 
                 ^ V direction
                 |
                 |     
                 |              
                 |             
                 /---------> U direction
                /
               /
              v  W direction

   The indices of the NURBS boundaries (see also nrbextract): 
 
   1 : U = 0
   2 : U = 1
   3 : V = 0
   4 : V = 1
   5 : W = 0
   6 : W = 1

    Copyright (C) 2019 Ondine Chanon, Rafael Vazquez

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

Demonstration 1

The following code

 nrb1 = nrbline([0,0],[1,1]);
 nrb2 = nrbline([1,1],[3,4]);
 glued = nrbglue(nrb1, nrb2);
 nrbkntplot(glued)
 title ('Gluing of two straight lines')

Produces the following figure

Figure 1

Demonstration 2

The following code

 nrb1 = nrbsquare([0,0],1,1,[1,1],[1,2]);
 nrb2 = nrbsquare([1,0],3,1,[1,1],[2,2]);
 glued = nrbglue(nrb1, nrb2);
 nrbkntplot(glued)
 title ('Gluing of two bilinear patches')

Produces the following figure

Figure 1

Demonstration 3

The following code

 nrb1 = nrbsquare([0,0],1,1,[1,1],[1,2]);
 nrb2 = nrbsquare([1,0],3,1,[1,1],[2,2]);
 nrb1 = nrbextrude(nrb1,[0,0,1]);
 nrb2 = nrbextrude(nrb2,[0,0,1]);
 glued = nrbglue(nrb1, nrb2);
 nrbkntplot(glued)
 title ('Gluing of two trilinear patches')

Produces the following figure

Figure 1

Package: nurbs