Esempio 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
Esempio 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
Esempio 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
Esempio 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'))
Esempio 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
Esempio 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
Esempio 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