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