Exemple #1
0
 def bezier(self, update = None):
     "Decompose surface to bezier patches and return overlaping control points."
     if update or not self._bezier:
         cntrl = np.resize(self.cntrl,(4*self.cntrl.shape[1], self.cntrl.shape[2]))
         cntrl = bspbezdecom(self.degree[1], cntrl, self.vknots)
         cntrl = np.resize(cntrl, (4, self.cntrl.shape[1], cntrl.shape[1]))
         temp1 = cntrl.shape[1]
         temp2 = cntrl.shape[2]
         cntrl = np.transpose(cntrl,(0, 2, 1))
         cntrl = np.resize(cntrl,(4*temp2, temp1))
         cntrl = bspbezdecom(self.degree[0], cntrl, self.uknots)
         cntrl = np.resize(cntrl, (4, temp2, cntrl.shape[1]))
         self._bezier = np.transpose(cntrl,(0, 2, 1))
     return self._bezier
Exemple #2
0
 def bezier(self, update = None):
     "Decompose curve to bezier segments and return overlaping control points"
     if update or not self._bezier:
         self._bezier = bspbezdecom(self.degree, self.cntrl, self.uknots)
     return self._bezier
Exemple #3
0
 def bezier(self, update=None):
     "Decompose curve to bezier segments and return overlaping control points"
     if update or not self._bezier:
         self._bezier = bspbezdecom(self.degree, self.cntrl, self.uknots)
     return self._bezier