pygeo/parameterization/DVGeo.py
def _finalizeAxis(self):
        """
        Internal function that sets up the collection of curve that
        the user has added one at a time. This will create the
        internal pyNetwork object
        """
        if len(self.axis) == 0:
            return

        curves = []
        for axis in self.axis:
            curves.append(self.axis[axis]["curve"])

        # Setup the network of reference axis curves
        self.refAxis = pyNetwork(curves)
        # These are the rotations
        self.rot_x = OrderedDict()
        self.rot_y = OrderedDict()
        self.rot_z = OrderedDict()
        self.rot_theta = OrderedDict()
        self.scale = OrderedDict()
        self.scale_x = OrderedDict()
        self.scale_y = OrderedDict()
        self.scale_z = OrderedDict()
        self.coef = self.refAxis.coef  # pointer
        self.coef0 = self.coef.copy().astype(self.dtype)

        i = 0
        for key in self.axis:
            # curves in ref axis are indexed sequentially...this is ok
            # since self.axis is an ORDERED dict
            t = self.refAxis.curves[i].t
            k = self.refAxis.curves[i].k
            N = len(self.refAxis.curves[i].coef)
            z = np.zeros((N, 1), self.dtype)
            o = np.ones((N, 1), self.dtype)
            self.rot_x[key] = Curve(t=t, k=k, coef=z.copy())
            self.rot_y[key] = Curve(t=t, k=k, coef=z.copy())
            self.rot_z[key] = Curve(t=t, k=k, coef=z.copy())
            self.rot_theta[key] = Curve(t=t, k=k, coef=z.copy())
            self.scale[key] = Curve(t=t, k=k, coef=o.copy())
            self.scale_x[key] = Curve(t=t, k=k, coef=o.copy())
            self.scale_y[key] = Curve(t=t, k=k, coef=o.copy())
            self.scale_z[key] = Curve(t=t, k=k, coef=o.copy())
            i += 1

        # Need to keep track of initail scale values
        self.scale0 = self.scale.copy()
        self.scale_x0 = self.scale_x.copy()
        self.scale_y0 = self.scale_y.copy()
        self.scale_z0 = self.scale_z.copy()
        self.rot_x0 = self.rot_x.copy()
        self.rot_y0 = self.rot_y.copy()
        self.rot_z0 = self.rot_z.copy()
        self.rot_theta0 = self.rot_theta.copy()

        Internal function that sets up the collection of curve that
        the user has added one at a time. This will create the
        internal pyNetwork object
        
Internal function that sets up the collection of curve that
the user has added one at a time. This will create the
internal pyNetwork object
Internal function that sets up the collection of curve that the user has added one at a time . This will create the internal pyNetwork object
def _finalizeAxis(self):
        if len(self.axis) == 0:
            return
        curves = []
        for axis in self.axis:
            curves.append(self.axis[axis]["curve"])
        self.refAxis = pyNetwork(curves)
        self.rot_x = OrderedDict()
        self.rot_y = OrderedDict()
        self.rot_z = OrderedDict()
        self.rot_theta = OrderedDict()
        self.scale = OrderedDict()
        self.scale_x = OrderedDict()
        self.scale_y = OrderedDict()
        self.scale_z = OrderedDict()
        self.coef = self.refAxis.coef  
        self.coef0 = self.coef.copy().astype(self.dtype)
        i = 0
        for key in self.axis:
            t = self.refAxis.curves[i].t
            k = self.refAxis.curves[i].k
            N = len(self.refAxis.curves[i].coef)
            z = np.zeros((N, 1), self.dtype)
            o = np.ones((N, 1), self.dtype)
            self.rot_x[key] = Curve(t=t, k=k, coef=z.copy())
            self.rot_y[key] = Curve(t=t, k=k, coef=z.copy())
            self.rot_z[key] = Curve(t=t, k=k, coef=z.copy())
            self.rot_theta[key] = Curve(t=t, k=k, coef=z.copy())
            self.scale[key] = Curve(t=t, k=k, coef=o.copy())
            self.scale_x[key] = Curve(t=t, k=k, coef=o.copy())
            self.scale_y[key] = Curve(t=t, k=k, coef=o.copy())
            self.scale_z[key] = Curve(t=t, k=k, coef=o.copy())
            i += 1
        self.scale0 = self.scale.copy()
        self.scale_x0 = self.scale_x.copy()
        self.scale_y0 = self.scale_y.copy()
        self.scale_z0 = self.scale_z.copy()
        self.rot_x0 = self.rot_x.copy()
        self.rot_y0 = self.rot_y.copy()
        self.rot_z0 = self.rot_z.copy()
        self.rot_theta0 = self.rot_theta.copy()
def _finalizeAxis ( self ) : if len ( self . axis ) == 0 : return curves = [ ] for axis in self . axis : curves . append ( self . axis [ axis ] [ "curve" ] ) self . refAxis = pyNetwork ( curves ) self . rot_x = OrderedDict ( ) self . rot_y = OrderedDict ( ) self . rot_z = OrderedDict ( ) self . rot_theta = OrderedDict ( ) self . scale = OrderedDict ( ) self . scale_x = OrderedDict ( ) self . scale_y = OrderedDict ( ) self . scale_z = OrderedDict ( ) self . coef = self . refAxis . coef self . coef0 = self . coef . copy ( ) . astype ( self . dtype ) i = 0 for key in self . axis : t = self . refAxis . curves [ i ] . t k = self . refAxis . curves [ i ] . k N = len ( self . refAxis . curves [ i ] . coef ) z = np . zeros ( ( N , 1 ) , self . dtype ) o = np . ones ( ( N , 1 ) , self . dtype ) self . rot_x [ key ] = Curve ( t = t , k = k , coef = z . copy ( ) ) self . rot_y [ key ] = Curve ( t = t , k = k , coef = z . copy ( ) ) self . rot_z [ key ] = Curve ( t = t , k = k , coef = z . copy ( ) ) self . rot_theta [ key ] = Curve ( t = t , k = k , coef = z . copy ( ) ) self . scale [ key ] = Curve ( t = t , k = k , coef = o . copy ( ) ) self . scale_x [ key ] = Curve ( t = t , k = k , coef = o . copy ( ) ) self . scale_y [ key ] = Curve ( t = t , k = k , coef = o . copy ( ) ) self . scale_z [ key ] = Curve ( t = t , k = k , coef = o . copy ( ) ) i += 1 self . scale0 = self . scale . copy ( ) self . scale_x0 = self . scale_x . copy ( ) self . scale_y0 = self . scale_y . copy ( ) self . scale_z0 = self . scale_z . copy ( ) self . rot_x0 = self . rot_x . copy ( ) self . rot_y0 = self . rot_y . copy ( ) self . rot_z0 = self . rot_z . copy ( ) self . rot_theta0 = self . rot_theta . copy ( )
Internal function that sets up the collection of curve that
the user has added one at a time.
Internal function that sets up the collection of curve that the user has added one at a time .
"""
        Internal function that sets up the collection of curve that
        the user has added one at a time. This will create the
        internal pyNetwork object
        """ # Setup the network of reference axis curves # These are the rotations # pointer # curves in ref axis are indexed sequentially...this is ok # since self.axis is an ORDERED dict # Need to keep track of initail scale values
self