Beispiel #1
0
 def __eq__(self, dxflist):
     if len(self) != len(dxflist):
         return False
     for atom1, atom2 in izip(self, dxflist):
         if atom1 != atom2:
             return False
     return True
Beispiel #2
0
 def __eq__(self, dxflist):
     if len(self) != len(dxflist):
         return False
     for atom1, atom2 in izip(self, dxflist):
         if atom1 != atom2:
             return False
     return True
Beispiel #3
0
    def approximate(self, segments):
        """Approximate spline curve with  <segments> line-segments.

        Generates <segments>+1 2D points (float, float).
        """
        return izip(self._cubic_spline(_coords(self.breakpoints, 0), segments), # x-coords
                    self._cubic_spline(_coords(self.breakpoints, 1), segments)) # y-coords
Beispiel #4
0
    def approximate(self, segments):
        """Approximate spline curve with  <segments> line-segments.

        Generates <segments>+1 2D points (float, float).
        """
        return izip(
            self._cubic_spline(_coords(self.breakpoints, 0),
                               segments),  # x-coords
            self._cubic_spline(_coords(self.breakpoints, 1),
                               segments))  # y-coords