def mousepress(self, point): import numpy point = tuple(numpy.array(qh.to_tuple(point)) / popupcad.view_scaling) if not self.temphandle: a = ShapeVertex(point) self.temphandle = a.gen_interactive() self.temphandle.setParentItem(self) self.temphandle.updatescale() if self.generic.len_exterior() == 0: self.addhandle(self.temphandle) a = ShapeVertex(point) self.temphandle = a.gen_interactive() self.temphandle.setParentItem(self) self.temphandle.updatescale() self.updateshape() return elif self.generic.len_exterior() == 1: if self.addhandle(self.temphandle): self.finish_definition() self.updateshape() return else: return else: raise Exception self.finish_definition() self.updateshape() return self.updateshape()
def mousepress(self,point): if not self.temphandle: a = ShapeVertex() a.setpos(point.toTuple()) self.temphandle = a.gen_interactive() self.temphandle.setParentItem(self) self.temphandle.updatescale() if len(self.generic.get_exterior())==0: self.addhandle(self.temphandle) a = ShapeVertex() a.setpos(point.toTuple()) self.temphandle = a.gen_interactive() self.temphandle.setParentItem(self) self.temphandle.updatescale() self.updateshape() return elif len(self.generic.get_exterior())==1: if self.addhandle(self.temphandle): self.finish_definition() self.updateshape() return else: return else: raise(Exception('should never get here')) self.finish_definition() self.updateshape() return self.updateshape()
def mousepress(self,point): if not self.temphandle: a = ShapeVertex() a.setpos(point.toTuple()) self.temphandle = a.gen_interactive() self.temphandle.setParentItem(self) self.temphandle.updatescale() self.addhandle(self.temphandle) else: self.addhandle(self.temphandle) if not self.temphandle: a = ShapeVertex() a.setpos(point.toTuple()) self.temphandle = a.gen_interactive() self.temphandle.setParentItem(self) self.temphandle.updatescale() self.updateshape()
def mousepress(self, point): import numpy point = tuple(numpy.array(qh.to_tuple(point)) / popupcad.view_scaling) if not self.temphandle: a = ShapeVertex(point) self.temphandle = a.gen_interactive() self.temphandle.setParentItem(self) self.temphandle.updatescale() self.addhandle(self.temphandle) else: self.addhandle(self.temphandle) if not self.temphandle: a = ShapeVertex(point) self.temphandle = a.gen_interactive() self.temphandle.setParentItem(self) self.temphandle.updatescale() self.updateshape()