This question has been flagged
101 Vistas


O objetivo deste UCS adicionar uma furação para pré-cortar a orla antes da maquinação do puxador gola.



Para adicionar esta funcionalidade devemos adicionar este UCS:

;Aplica furo no entalhe do gola para quebrar orla

For each LU|RU Part

Public DIAMETRO_FURO = 5MM ;DIAMETRO
Public POSICAO_FURO1_C = 1 ;POS. FURO 1 C - 1=CIMA/2=BAIXO
Public POSICAO_FURO2_C = 2 ;POS. FURO 2 C - 1=CIMA/2=BAIXO
Public POSICAO_FURO1_J = 1 ;POS. FURO 1 J - 1=CIMA/2=BAIXO
Public POSICAO_FURO2_J = 2 ;POS. FURO 2 J - 1=CIMA/2=BAIXO

;GOLA C ----------------------------------------------------------------------------------------

IF CAB.CLASS = ASM_CLASS_BASE OR CAB.CLASS = ASM_CLASS_TALL OR CAB.CLASS = ASM_CLASS_UPPER THEN

;FAZER AMBOS OS FUROS

IF POSICAO_FURO1_C != POSICAO_FURO2_C THEN

counter := 1

WHILE CAB.FACE.S_SHHRDW@{counter}.DX != NULL DO

POS_Y := CAB.FACE.S_SHHRDW@{counter}.Y
DIM_X := CAB.FACE.S_SHHRDW@{counter}.DX

DIM FURO AS NEW HOLE ;FURO 1
FURO._FACEWP := 1
FURO.Z := 0

IF POSICAO_FURO1_C = 2 THEN
FURO.Y := POS_Y - (Y - CAB.FACE.Y) + (DIAMETRO_FURO / 2)
ELSE
FURO.Y := POS_Y - (Y - CAB.FACE.Y) + DIM_X - (DIAMETRO_FURO / 2)
END IF

IF NAME = 'LU' THEN
FURO.X := 0
ELSE
FURO.X := DX
END IF

FURO.NAME = ' FURO 1 GOLA C' 
FURO.DX := DIAMETRO_FURO
FURO.DY := DIAMETRO_FURO
FURO.DZ = :DZ
FURO.AX := 0
FURO.AY := 0
FURO.AZ := 0
FURO.GROUP := -1

DIM FURO AS NEW HOLE ;FURO 2
FURO._FACEWP := 1
FURO.Z := 0

IF POSICAO_FURO2_C = 2 THEN
FURO.Y := POS_Y - (Y - CAB.FACE.Y) + (DIAMETRO_FURO / 2)
ELSE
FURO.Y := POS_Y - (Y - CAB.FACE.Y) + DIM_X - (DIAMETRO_FURO / 2)
END IF

IF NAME = 'LU' THEN
FURO.X := 0
ELSE
FURO.X := DX
END IF

FURO.NAME = ' FURO 2 GOLA C' 
FURO.DX := DIAMETRO_FURO
FURO.DY := DIAMETRO_FURO
FURO.DZ = :DZ
FURO.AX := 0
FURO.AY := 0
FURO.AZ := 0
FURO.GROUP := -1

counter += 1

END WHILE

END IF

;---------------------------------------------------------------------------------------

;FAZER APENAS FURO 1

IF POSICAO_FURO1_C = POSICAO_FURO2_C THEN

counter := 1

WHILE CAB.FACE.S_SHHRDW@{counter}.DX != NULL DO

POS_Y := CAB.FACE.S_SHHRDW@{counter}.Y
DIM_X := CAB.FACE.S_SHHRDW@{counter}.DX

DIM FURO AS NEW HOLE ;FURO 1
FURO._FACEWP := 1
FURO.Z := 0

IF POSICAO_FURO1_C = 2 THEN
FURO.Y := POS_Y - (Y - CAB.FACE.Y) + (DIAMETRO_FURO / 2)
ELSE
FURO.Y := POS_Y - (Y - CAB.FACE.Y) + DIM_X - (DIAMETRO_FURO / 2)
END IF

IF NAME = 'LU' THEN
FURO.X := 0
ELSE
FURO.X := DX
END IF

FURO.NAME = ' FURO 1 GOLA C' 
FURO.DX := DIAMETRO_FURO
FURO.DY := DIAMETRO_FURO
FURO.DZ = :DZ
FURO.AX := 0
FURO.AY := 0
FURO.AZ := 0
FURO.GROUP := -1

counter += 1

END WHILE

END IF

END IF



;GOLA J TOPO--------------------------------------------------------------------------

IF CAB.CLASS = ASM_CLASS_BASE OR CAB.CLASS = ASM_CLASS_TALL THEN

;FAZER AMBOS OS FUROS

IF POSICAO_FURO1_J != POSICAO_FURO2_J THEN

counter := 1

WHILE CAB.FACE.S_SHHRDWE@{counter}.DX != NULL DO

POS_Y := CAB.FACE.S_SHHRDWE@{counter}.Y
DIM_X := CAB.FACE.S_SHHRDWE@{counter}.DX
DIM_Z := CAB.FACE.S_SHHRDWE@{counter}.DZ

DIM FURO AS NEW HOLE ;FURO 1
FURO._FACEWP := 1
FURO.Z := 0

IF POSICAO_FURO1_J = 2 THEN
FURO.Y := POS_Y - (Y - CAB.FACE.Y) + (DIAMETRO_FURO / 2)
ELSE
FURO.Y := POS_Y - (Y - CAB.FACE.Y) + DIM_X
END IF

IF NAME = 'LU' THEN

IF POSICAO_FURO1_J = 2 THEN
;FURO.X := DX
FURO.X := 0
ELSE
;FURO.X := DX - DIM_Z + (DIAMETRO_FURO / 2)
FURO.X := DIM_Z - (DIAMETRO_FURO / 2)
END IF

ELSE

IF POSICAO_FURO1_J = 2 THEN
;FURO.X := 0
FURO.X := DX
ELSE
;FURO.X := DIM_Z - (DIAMETRO_FURO / 2)
FURO.X := DX - DIM_Z + (DIAMETRO_FURO / 2)
END IF

END IF

FURO.NAME = 'FURO 1 GOLA J' 
FURO.DX := DIAMETRO_FURO
FURO.DY := DIAMETRO_FURO
FURO.DZ = :DZ
FURO.AX := 0
FURO.AY := 0
FURO.AZ := 0
FURO.GROUP := -1

DIM FURO AS NEW HOLE ;FURO 2
FURO._FACEWP := 1
FURO.Z := 0

IF POSICAO_FURO2_J = 2 THEN
FURO.Y := POS_Y - (Y - CAB.FACE.Y) + (DIAMETRO_FURO / 2)
ELSE
FURO.Y := POS_Y - (Y - CAB.FACE.Y) + DIM_X
END IF

IF NAME = 'LU' THEN

IF POSICAO_FURO2_J = 2 THEN
;FURO.X := DX
FURO.X := 0
ELSE
;FURO.X := DX - DIM_Z + (DIAMETRO_FURO / 2)
FURO.X := DIM_Z - (DIAMETRO_FURO / 2)
END IF

ELSE

IF POSICAO_FURO2_J = 2 THEN
;FURO.X := 0
FURO.X := DX
ELSE
;FURO.X := DIM_Z - (DIAMETRO_FURO / 2)
FURO.X := DX - DIM_Z + (DIAMETRO_FURO / 2)
END IF

END IF

FURO.NAME = 'FURO 2 GOLA J' 
FURO.DX := DIAMETRO_FURO
FURO.DY := DIAMETRO_FURO
FURO.DZ = :DZ
FURO.AX := 0
FURO.AY := 0
FURO.AZ := 0
FURO.GROUP := -1

counter += 1

END WHILE

END IF

;-------------------------------------------------------------------------

;FAZER APENAS FURO 1

IF POSICAO_FURO1_J = POSICAO_FURO2_J THEN

counter := 1

WHILE CAB.FACE.S_SHHRDWE@{counter}.DX != NULL DO

POS_Y := CAB.FACE.S_SHHRDWE@{counter}.Y
DIM_X := CAB.FACE.S_SHHRDWE@{counter}.DX
DIM_Z := CAB.FACE.S_SHHRDWE@{counter}.DZ

DIM FURO AS NEW HOLE ;FURO 1
FURO._FACEWP := 1
FURO.Z := 0

IF POSICAO_FURO1_J = 2 THEN
FURO.Y := POS_Y - (Y - CAB.FACE.Y) + (DIAMETRO_FURO / 2)
ELSE
FURO.Y := POS_Y - (Y - CAB.FACE.Y) + DIM_X
END IF

IF NAME = 'LU' THEN

IF POSICAO_FURO1_J = 2 THEN
;FURO.X := DX
FURO.X := 0
ELSE
;FURO.X := DX - DIM_Z + (DIAMETRO_FURO / 2)
FURO.X := DIM_Z - (DIAMETRO_FURO / 2)
END IF

ELSE

IF POSICAO_FURO1_J = 2 THEN
;FURO.X := 0
FURO.X := DX
ELSE
;FURO.X := DIM_Z - (DIAMETRO_FURO / 2)
FURO.X := DX - DIM_Z + (DIAMETRO_FURO / 2)
END IF

END IF

FURO.NAME = 'FURO 1 GOLA J' 
FURO.DX := DIAMETRO_FURO
FURO.DY := DIAMETRO_FURO
FURO.DZ = :DZ
FURO.AX := 0
FURO.AY := 0
FURO.AZ := 0
FURO.GROUP := -1

counter += 1

END WHILE

END IF

END IF

;GOLA J FUNDO--------------------------------------------------------------------------

IF CAB.CLASS = ASM_CLASS_UPPER THEN

;FAZER AMBOS OS FUROS

IF POSICAO_FURO1_J != POSICAO_FURO2_J THEN

counter := 1

WHILE CAB.FACE.S_SHHRDWE@{counter}.DX != NULL DO

POS_Y := CAB.FACE.S_SHHRDWE@{counter}.Y
DIM_X := CAB.FACE.S_SHHRDWE@{counter}.DX
DIM_Z := CAB.FACE.S_SHHRDWE@{counter}.DZ

DIM FURO AS NEW HOLE ;FURO 1
FURO._FACEWP := 1
FURO.Z := 0

IF POSICAO_FURO1_J = 2 THEN
FURO.Y := POS_Y - (Y - CAB.FACE.Y) - (DIAMETRO_FURO / 2)
ELSE
FURO.Y := POS_Y - (Y - CAB.FACE.Y) - DIM_X
END IF

IF NAME = 'LU' THEN

IF POSICAO_FURO1_J = 2 THEN
;FURO.X := DX
FURO.X := 0
ELSE
;FURO.X := DX - DIM_Z + (DIAMETRO_FURO / 2)
FURO.X := DIM_Z - (DIAMETRO_FURO / 2)
END IF

ELSE

IF POSICAO_FURO1_J = 2 THEN
;FURO.X := 0
FURO.X := DX
ELSE
;FURO.X := DIM_Z - (DIAMETRO_FURO / 2)
FURO.X := DX - DIM_Z + (DIAMETRO_FURO / 2)
END IF

END IF

FURO.NAME = 'FURO 1 GOLA J' 
FURO.DX := DIAMETRO_FURO
FURO.DY := DIAMETRO_FURO
FURO.DZ = :DZ
FURO.AX := 0
FURO.AY := 0
FURO.AZ := 0
FURO.GROUP := -1

DIM FURO AS NEW HOLE ;FURO 2
FURO._FACEWP := 1
FURO.Z := 0

IF POSICAO_FURO2_J = 2 THEN
FURO.Y := POS_Y - (Y - CAB.FACE.Y) - (DIAMETRO_FURO / 2)
ELSE
FURO.Y := POS_Y - (Y - CAB.FACE.Y) - DIM_X
END IF

IF NAME = 'LU' THEN

IF POSICAO_FURO2_J = 2 THEN
;FURO.X := DX
FURO.X := 0
ELSE
;FURO.X := DX - DIM_Z + (DIAMETRO_FURO / 2)
FURO.X := DIM_Z - (DIAMETRO_FURO / 2)
END IF

ELSE

IF POSICAO_FURO2_J = 2 THEN
;FURO.X := 0
FURO.X := DX
ELSE
;FURO.X := DIM_Z - (DIAMETRO_FURO / 2)
FURO.X := DX - DIM_Z + (DIAMETRO_FURO / 2)
END IF

END IF

FURO.NAME = 'FURO 2 GOLA J' 
FURO.DX := DIAMETRO_FURO
FURO.DY := DIAMETRO_FURO
FURO.DZ = :DZ
FURO.AX := 0
FURO.AY := 0
FURO.AZ := 0
FURO.GROUP := -1

counter += 1

END WHILE

END IF

;-------------------------------------------------------------------------

;FAZER APENAS FURO 1

IF POSICAO_FURO1_J = POSICAO_FURO2_J THEN

counter := 1

WHILE CAB.FACE.S_SHHRDWE@{counter}.DX != NULL DO

POS_Y := CAB.FACE.S_SHHRDWE@{counter}.Y
DIM_X := CAB.FACE.S_SHHRDWE@{counter}.DX
DIM_Z := CAB.FACE.S_SHHRDWE@{counter}.DZ

DIM FURO AS NEW HOLE ;FURO 1
FURO._FACEWP := 1
FURO.Z := 0

IF POSICAO_FURO1_J = 2 THEN
FURO.Y := POS_Y - (Y - CAB.FACE.Y) - (DIAMETRO_FURO / 2)
ELSE
FURO.Y := POS_Y - (Y - CAB.FACE.Y) - DIM_X
END IF

IF NAME = 'LU' THEN

IF POSICAO_FURO1_J = 2 THEN
;FURO.X := DX
FURO.X := 0
ELSE
;FURO.X := DX - DIM_Z + (DIAMETRO_FURO / 2)
FURO.X := DIM_Z - (DIAMETRO_FURO / 2)
END IF

ELSE

IF POSICAO_FURO1_J = 2 THEN
;FURO.X := 0
FURO.X := DX
ELSE
;FURO.X := DIM_Z - (DIAMETRO_FURO / 2)
FURO.X := DX - DIM_Z + (DIAMETRO_FURO / 2)
END IF

END IF

FURO.NAME = 'FURO 1 GOLA J' 
FURO.DX := DIAMETRO_FURO
FURO.DY := DIAMETRO_FURO
FURO.DZ = :DZ
FURO.AX := 0
FURO.AY := 0
FURO.AZ := 0
FURO.GROUP := -1

counter += 1

END WHILE

END IF

END IF
Avatar
Descartar