Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
471 views

Minesight Python

This document contains code for a Python program that generates radii of influence in Minesight. It defines a class called Radius that contains code to build a GUI interface with Tkinter for inputting radius size, precision, and day of the week to draw or intersect radii on that day.

Uploaded by

junior
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
471 views

Minesight Python

This document contains code for a Python program that generates radii of influence in Minesight. It defines a class called Radius that contains code to build a GUI interface with Tkinter for inputting radius size, precision, and day of the week to draw or intersect radii on that day.

Uploaded by

junior
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Codigo Minesight Python

import os
import math
from Tkinter import *
from grail import gsys
from grail import messages
from grail import ag
from grail.engines import pclip
from grail.ms3d import datamanager
from grail.ms3d import selectionbuffer
from grail.ms3d import element
from grail.ms3d import elementop
from grail.data.geometry import *
from grail.data import geometry

class Radius:
def __init__(self, root):
frame = Frame(root) #root representa el parent window'
frame.pack() #Ordena la interfaz en filas y columnas'
root.title("Radios de influencia 2.0")
root.geometry("300x300")

#titulo
Label(frame,text="\nGenerar radios", font = "Arial 15 bold").grid(row=0,
column=2, columnspan=2, sticky ="WENS")
Label(frame,text="Type values\n").grid(row=1, column=2, sticky ="WENS")
#etiqueta radio
Label(frame,text="Radio ").grid(row=2, column=1, columnspan=1)
#Crea un espacio vacio
Label(frame,text="").grid(row=3, column=1, columnspan=1)
#Es la casilla de entrada para
c = Entry(frame, width=5)
c.grid(row=2,column=2, sticky=W)
c.insert(END, '200')
#define una variable tkinter usada en el spinbox
var = IntVar()
var.set("3")
#Etiqueta precision
Label(frame,text="Presicion ", font = "Arial 8").grid(row=2, column=3,
columnspan=1)
sb2 = Spinbox(frame, from_=1, to=5,width=3,textvariable=var)
sb2.grid(row=2,column=4,sticky=W)
#Define la variable tkinter string
var1 = StringVar()
#Define otro espacio en blanco
Label(frame,text="").grid(row=5, column=1, columnspan=1)
#define el texto
Label(frame,text="Dia").grid(row=4, column=1, columnspan=1)
sb3 = Spinbox(frame,width=10, values
=("Domingo","Sabado","Viernes","Jueves","Miercoles","Martes","Lunes"),
textvariable=var1)
var1.set("Lunes")
sb3.grid(row=4,column=2,sticky=W)

botondraw= Button(frame,text="Draw", command = lambda :self.draw(sb2,sb3,c)


, font = "Arial 12 bold").grid(row=7,column=1,columnspan=2,ipadx=25)
botonint= Button(frame,text="Intersect", command = lambda
:self.intersect(), font = "Arial 12
bold").grid(row=8,column=1,columnspan=2,ipadx=12)
botonexit = Button(frame,text="Cerrar",fg="red",command= root.destroy ,
font = "Arial 12 bold").grid(row=7,column=3,columnspan=2,ipadx=20, padx=1)
root.mainloop()

You might also like