コード例 #1
0
    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()
コード例 #2
0
ファイル: proto.py プロジェクト: heiko114514/popupcad
    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()
コード例 #3
0
ファイル: proto.py プロジェクト: apullin/popupcad
    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()
コード例 #4
0
ファイル: proto.py プロジェクト: apullin/popupcad
    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()
コード例 #5
0
    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()
コード例 #6
0
ファイル: proto.py プロジェクト: heiko114514/popupcad
    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()