예제 #1
0
파일: base.py 프로젝트: pprodano/pputils
 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
예제 #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
예제 #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
예제 #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