Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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'))
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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