示例#1
0
    def __init__(self, degree=0, Knots=[], Weights=None, CPoints=None):
        self.degree = degree  # Spline degree
        self.Knots = Knots  # Knot Vector
        self.CPoints = CPoints  # Control points of splines [2D]
        self.Weights = Weights  # Weighting of the individual points

        # Initializing calculated variables
        self.HCPts = []  # Homogeneous points vectors [3D]

        # Convert Points in Homogeneous points
        self.CPts_2_HCPts()

        # Creating the BSplineClass to calculate the homogeneous points
        self.BSpline = BSplineClass(degree=self.degree,
                                    Knots=self.Knots,
                                    CPts=self.HCPts)