Example #1
0
 def shape_is_equal(self,other):
     from popupcad.filetypes.genericshapebase import GenericShapeBase
     tolerance = GenericShapeBase.tolerance
     import popupcad.algorithms.points as points
     if type(self)==type(other):
         return points.twopointsthesame(self.getpos(),other.getpos(),tolerance)
     return False
Example #2
0
    def is_equal(self, other, tolerance = None):
        import popupcad.algorithms.points as points
        if tolerance is None:
            tolerance = popupcad.distinguishable_number_difference

        if isinstance(self, type(other)):
            return points.twopointsthesame(self.getpos(),other.getpos(),tolerance)
        return False
Example #3
0
    def is_equal(self, other, tolerance=None):
        import popupcad.algorithms.points as points
        if tolerance is None:
            tolerance = popupcad.distinguishable_number_difference

        if isinstance(self, type(other)):
            return points.twopointsthesame(self.getpos(), other.getpos(),
                                           tolerance)
        return False
Example #4
0
 def checkedge(self,edge):
     import popupcad.algorithms.points as points
     for pt1,pt2 in zip(edge[:-1],edge[1:]):
         if points.twopointsthesame(pt1,pt2,self.tolerance):
             raise(Exception('points too close together'))
Example #5
0
 def checkedge(self, edge):
     import popupcad.algorithms.points as points
     for pt1, pt2 in zip(edge[:-1], edge[1:]):
         if points.twopointsthesame(
                 pt1, pt2, popupcad.distinguishable_number_difference):
             raise Exception
Example #6
0
 def checkedge(self, edge):
     import popupcad.algorithms.points as points
     for pt1, pt2 in zip(edge[:-1], edge[1:]):
         if points.twopointsthesame(pt1, pt2, popupcad.distinguishable_number_difference):
             raise Exception
Example #7
0
 def is_equal(self,other,tolerance):
     import popupcad.algorithms.points as points
     if type(self)==type(other):
         return points.twopointsthesame(self.getpos(),other.getpos(),tolerance)
     return False