Ejemplo n.º 1
0
    def add_segment(self):
        x0 = float(self.start_x_in.get())
        y0 = float(self.start_y_in.get())
        x1 = float(self.end_x_in.get())
        y1 = float(self.end_y_in.get())
        start = [x0, y0]
        end = [x1, y1]
        weld = wem.weld_segment(start, end)

        self.weld_segments.append(weld)
        self.build_weld_group()

        self.fill_segment_list()
Ejemplo n.º 2
0
    def add_circle_function(self):
        x = float(self.add_circle_ins[0].get())
        y = float(self.add_circle_ins[1].get())
        r = float(self.add_circle_ins[2].get())

        for a in range(0, 360):
            x0 = r * math.cos(math.radians(a))
            y0 = r * math.sin(math.radians(a))
            x1 = r * math.cos(math.radians(a + 1))
            y1 = r * math.sin(math.radians(a + 1))

            start = [x0 + x, y0 + y]
            end = [x1 + x, y1 + y]
            weld = wem.weld_segment(start, end)

            self.weld_segments.append(weld)

        self.build_weld_group()

        self.fill_segment_list()