Skip to content

Commit

Permalink
refactor: adionada constantes em parametros
Browse files Browse the repository at this point in the history
  • Loading branch information
paulosergiocf committed May 4, 2024
1 parent cf77b43 commit 065adc9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
4 changes: 3 additions & 1 deletion src/entities/ponto.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ def __init__(self, descricao: str, coordenada_x: float, coordenada_y: float):
self.coordenada_y: str = coordenada_y

def __str__(self) -> str:
return(f"{self.descricao} - X: {(self.coordenada_x):.2f} - Y: {self.coordenada_y:.2f}")
return(f"{self.descricao} - X: {(self.coordenada_x):.2f} - Y: {self.coordenada_y:.2f}")


1 change: 0 additions & 1 deletion src/ui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
class App(tk.Frame):
# ------- Cores --------
FUNDO = "#23272B"
ROSA_CLARO = "#7E3735"
LARANJA_MOSTARDA = "#8C3F23"
CINZA_CLARO = "#F2F2F2"
ERRO_CAMPO = "#F2BFBB"
Expand Down
11 changes: 1 addition & 10 deletions src/usecases/autocad.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@ def __iniciar(self):
self.__logger.log_error(erro)
raise FileExistsError("Nenhum arquivo DWG aberto.")

def prompt(self, msg: str):
"""
Apresenta mensagem no cli autocad.
Args:
msg (str): mensagem para cli autocad
"""
self.acad.prompt(f"{msg}{self.QUEBRA_LINHA}")

def inserir_ponto(self, ponto: Ponto):
"""
Insere ponto do Autocad.
Expand All @@ -48,7 +39,7 @@ def inserir_ponto(self, ponto: Ponto):
try:
ponto_tmp = APoint(ponto.coordenada_x, ponto.coordenada_y)
self.acad.model.AddText('%s' % ponto.descricao, ponto_tmp, self.TAMANHO_TXT)
self.acad.model.AddCircle(ponto_tmp, 2)
self.acad.model.AddCircle(ponto_tmp, self.RAIO_CIRCLE)

for text in self.acad.iter_objects('Text'):
text.InsertionPoint = APoint(text.InsertionPoint)
Expand Down

0 comments on commit 065adc9

Please sign in to comment.