This question has been flagged
230 Vistas

O objetivo deste UCS é permitir ajustes em ilhargas e partições.

1 - Para ajustar as ilhargas usamos um UCS chamado BIT_GEN - AJUSTAR PECA, selecionando a peca e colocando o valor da formula para o ajuste como neste caso á a espessura iremos usar a expressão DZ

2 - Na vista de face selecionamos a peça em que queremos eliminar a conexão e usando o novo editor de conexões


3 - Resta adicionar uma conexão na outra ilharga

4 - Para isso vamos usar um UCS que aplica conexões a uma aresta, ativando a opção CM) CONE

Podemos desativar os números e o resultado final será este:

UCS:

BIT_GEN - AJUSTAR PECA

;Links Aplicado to Assembly

For Each * Part

if object != 17 then
exit
end if

;EDITAR CONEXÕES
If ADJ_PART = null then
ADJ_PART<bool> := FALSE
End if
ADJ_PART<Style> := 1
ADJ_PART<Desc> = 'AJUSTES) EDITAR'

IF ADJ_PART = TRUE THEN

;EDITAR AJUSTES
If ADJ_PART_DX_ESQ = null then
ADJ_PART_DX_ESQ<TEXT> = '0'
End if
ADJ_PART_DX_ESQ<Style> := 1
ADJ_PART_DX_ESQ<Desc> = 'AJUSTES)MED. ESQ'
 
If ADJ_PART_DX_DIR = null then
ADJ_PART_DX_DIR<TEXT> = '0'
End if
ADJ_PART_DX_DIR<Style> := 1
ADJ_PART_DX_DIR<Desc> = 'AJUSTES)MED. DIR'
 
If ADJ_PART_DX_CIMA = null then
ADJ_PART_DX_CIMA<TEXT> = '0'
End if
ADJ_PART_DX_CIMA<Style> := 1
ADJ_PART_DX_CIMA<Desc> = 'AJUSTES)MED. CIMA'
 
If ADJ_PART_DX_BAIXO = null then
ADJ_PART_DX_BAIXO<TEXT> = '0'
End if
ADJ_PART_DX_BAIXO<Style> := 1
ADJ_PART_DX_BAIXO<Desc> = 'AJUSTES)MED. BAIXO'
 
IF NAME = 'RU' OR NAME = 'LU' OR NAME = 'PT' OR NAME = 'UB' THEN 
 
IF AY = 90 OR AY = -90 THEN
Z<MEAS> += {ADJ_PART_DX_ESQ}
ELSE
X<MEAS> += {ADJ_PART_DX_ESQ}
END IF 
 
DY += {ADJ_PART_DX_BAIXO} + {ADJ_PART_DX_CIMA}
Y -= {ADJ_PART_DX_BAIXO}
DX += {ADJ_PART_DX_ESQ} + {ADJ_PART_DX_DIR}
 
END IF
 
ELSE

DELETE ADJ_PART_DX_ESQ
DELETE ADJ_PART_DX_DIR
DELETE ADJ_PART_DX_CIMA
DELETE ADJ_PART_DX_BAIXO

END IF

BIT_GEN - CONECTORES NOVO

;UCS PARA COLOCAÇÃO DE CONECTORES MANUALMENTE

For Each * Part

Public BITCON_1<TEXT> = '1) PAR PG'
Public BITCON_2<TEXT> = '2) CAV 8X35 PG'
Public BITCON_3<TEXT> = '3) PAR+CAV PG'
Public BITCON_4<TEXT> = '4) RASGO 9MM'
Public BITCON_5<TEXT> = '5) RASGO 6MM'
Public BITCON_6<TEXT> = '6) PRT 3F 5x11'
Public BITCON_7<TEXT> = '7) PAR PP'
Public BITCON_8<TEXT> = '8) CAV 8X35 PP'
Public BITCON_9<TEXT> = '9) PAR+CAV PP'
Public BITCON_10<TEXT> = '10) MINIFIX PG'
Public BITCON_11<TEXT> = '11) MINIFIX+CAV PG'
Public BITCON_12<TEXT> = '12) GAV RASGO 6MM'
Public BITCON_13<TEXT> = '13) GAV CAV'
Public BITCON_14<TEXT> = '14) MINIFIX PP'
Public BITCON_15<TEXT> = '15) MINIFIX+CAV PP'
Public BITCON_16<TEXT> = '16) PAR BD PG'
Public BITCON_17<TEXT> = '17) GAV RASGO PASSANTE 6MM'
Public BITCON_18<TEXT> = '18) GAV RASGO MEDIDA 6MM'
Public BITCON_19<TEXT> = '19) GAV CAV 8x35 T'
Public BITCON_20<TEXT> = '20) PRT 5F 5x10'
Public BITCON_21<TEXT> = '21) PAR BD PP'
Public BITCON_22<TEXT> = '22) CLAMEX'

if object != 13 and object != 17 then
exit
end if
 
;OPÇÃO PARA ADICIONAR CONECTORES MANUALMENTE
IF CONP_ADD_NEW = NULL THEN
CONP_ADD_NEW<bool> = False
END IF
CONP_ADD_NEW<STYLE> = 1
CONP_ADD_NEW<DESC> = 'CM) CONEXÃO?'
 
If CONP_ADD_NEW = TRUE THEN
 
;OPÇÃO PARA MOSTRAR O NUMERO DAS ARESTAS
IF CONP_NUM = NULL THEN
CONP_NUM<bool> = True
CONP_NUM<STYLE> = 1
CONP_NUM<DESC> = 'CM) NUMEROS?'
END IF
 
public CON_NUMBER_Y<MEAS> = 1MM ;N) ALTURA NUMERO
public CON_NUMBER_Z<MEAS> = 60MM ;N) LARGURA NUMERO
public CON_NUMBER_X<MEAS> = 30MM ;N) ESPESSURA NUMERO
public CON_NUMBER_AF<MEAS> = 5MM ;N) AFASTAMENTO NUMERO
 
totalEdges<int> := 99
count<int> := 1
 
while count <= totalEdges do
 
;SE FOR UMA ARESTA VALIDA
IF _EDG{count}DY != null THEN
 
;MOSTRAR NUMEROS
CON_LOGIC{count}_X<MEAS> := _EDG{count}X
CON_LOGIC{count}_Y<MEAS> := _EDG{count}Y
CON_LOGIC{count}_Z<MEAS> := _EDG{count}Z
CON_LOGIC{count}_AX<DEG> := _EDG{count}AX
CON_LOGIC{count}_AY<DEG> := _EDG{count}AY
CON_LOGIC{count}_AZ<DEG> := _EDG{count}AZ
 
;Calcular o ponto final
CON_FINAL_X_{count} := _EDG{count}X + ((_EDG{count}DY) * cos(_EDG{count}AZ + 90))
CON_FINAL_Y_{count} := _EDG{count}Y + ((_EDG{count}DY) * sin(_EDG{count}AZ + 90))
 
;Calcular o ponto final n2
CON_FINAL_X2_{count} := _EDG{count}X + ((_EDG{count}DY + CON_NUMBER_X + 30mm) * cos(_EDG{count}AZ + 90))
CON_FINAL_Y2_{count} := _EDG{count}Y + ((_EDG{count}DY + CON_NUMBER_X + 30mm) * sin(_EDG{count}AZ + 90))
 
;ADICIONAR DESENHO
Dim BLACK as New Part 
BLACK.Visible<bool> = True
BLACK.DX<MEAS> := CON_NUMBER_X
BLACK.DZ<MEAS> := CON_NUMBER_Z
BLACK.DY<MEAS> := CON_NUMBER_Y
BLACK.X<MEAS> := (_EDG{count}X + CON_FINAL_X_{count}) / 2 - CON_NUMBER_AF
BLACK.Y<MEAS> := (_EDG{count}Y + CON_FINAL_Y_{count}) / 2 + CON_NUMBER_AF
BLACK.Z<MEAS> := _EDG{count}Z 
BLACK.AX<deg> := -90
BLACK.AY<deg> := 180
BLACK.AZ<deg> := _EDG{count}AZ + 90
BLACK.QTY = CONP_NUM
 
;IMAGEM NUMERO
If count = 1 then 
BLACK.LibPart = 'Numeros\1'
end if
 
If count = 2 then 
BLACK.LibPart = 'Numeros\2'
end if
 
If count = 3 then 
BLACK.LibPart = 'Numeros\3'
end if
 
If count = 4 then 
BLACK.LibPart = 'Numeros\4'
end if
 
If count = 5 then 
BLACK.LibPart = 'Numeros\5'
end if
 
If count = 6 then 
BLACK.LibPart = 'Numeros\6'
end if
 
If count = 7 then 
BLACK.LibPart = 'Numeros\7'
end if
 
If count = 8 then 
BLACK.LibPart = 'Numeros\8'
end if
 
If count = 9 then 
BLACK.LibPart = 'Numeros\9'
end if
 
if count > 9 and count < 20 then
BLACK.LibPart = 'Numeros\1'
end if
 
if count = 20 then
BLACK.LibPart = 'Numeros\2'
end if
 
;SE FOR DE 2 DIGITOS
if count > 9 then
 
BLACK.Y<MEAS> := (_EDG{count}Y + CON_FINAL_Y2_{count}) / 2 + CON_NUMBER_AF 
BLACK.X<MEAS> := (_EDG{count}X + CON_FINAL_X2_{count}) / 2 - CON_NUMBER_AF 
 
;ADICIONAR DESENHO
Dim BLACK as New Part 
BLACK.Visible<bool> = True
BLACK.DX<MEAS> := CON_NUMBER_X
BLACK.DZ<MEAS> := CON_NUMBER_Z
BLACK.DY<MEAS> := CON_NUMBER_Y
BLACK.X<MEAS> := (_EDG{count}X + CON_FINAL_X_{count}) / 2 - CON_NUMBER_AF
BLACK.Y<MEAS> := (_EDG{count}Y + CON_FINAL_Y_{count}) / 2 + CON_NUMBER_AF
BLACK.Z<MEAS> := _EDG{count}Z 
BLACK.AX<deg> := -90
BLACK.AY<deg> := 180
BLACK.AZ<deg> := _EDG{count}AZ + 90
BLACK.QTY = CONP_NUM
 
if count = 10 then
BLACK.LibPart = 'Numeros\0'
end if
 
if count = 11 then
BLACK.LibPart = 'Numeros\1'
end if
 
if count = 12 then
BLACK.LibPart = 'Numeros\2'
end if
 
if count = 13 then
BLACK.LibPart = 'Numeros\3'
end if
 
if count = 14 then
BLACK.LibPart = 'Numeros\4'
end if
 
if count = 15 then
BLACK.LibPart = 'Numeros\5'
end if
 
if count = 16 then
BLACK.LibPart = 'Numeros\6'
end if
 
if count = 17 then
BLACK.LibPart = 'Numeros\7'
end if
 
if count = 18 then
BLACK.LibPart = 'Numeros\8'
end if
 
if count = 19 then
BLACK.LibPart = 'Numeros\9'
end if
 
if count = 20 then
BLACK.LibPart = 'Numeros\0'
end if
 
end if
 
If CON_{count}_TYPE = Null then
 
Text_Options_Counter<int> := 1
Text_Option<text> := BITCON_{Text_Options_Counter}
Text_Options<text> = 'Nenhum=0|{Text_Option}={Text_Option}'
Text_Options_Counter<int> += 1
 
while BITCON_{Text_Options_Counter} != null do
Text_Option<text> := BITCON_{Text_Options_Counter}
Text_Options<text> = '{Text_Options}|{Text_Option}={Text_Option}'
Text_Options_Counter<int> += 1
end while
 
CON_{count}_TYPE<text> = '<LST>{Text_Options}'
end if
CON_{count}_TYPE<style> := 1
CON_{count}_TYPE<desc> = '{count}.1) Conecção'
 
textChoose<text> := CON_{count}_TYPE
 
if textChoose != 'Nenhum' and textChoose != '0' then
 
IF CON_Flip_{count} = NULL THEN
CON_Flip_{count}<bool> = False
END IF
CON_Flip_{count}<STYLE> = 1
CON_Flip_{count}<DESC> = '{count}.2) Virar'
 
IF CON_Rev_{count} = NULL THEN
CON_Rev_{count}<bool> = False
END IF
CON_Rev_{count}<STYLE> = 1
CON_Rev_{count}<DESC> = '{count}.3) Inverter'
 
Dim CONNECTOR_{count} as New Connection
CONNECTOR_{count}._EDGWP<int> := count
CONNECTOR_{count}.X := 0
CONNECTOR_{count}.Y := 0
CONNECTOR_{count}.Z := 0
CONNECTOR_{count}.DX = :DZ
CONNECTOR_{count}.DY := _EDG{count}DY
CONNECTOR_{count}.DZ := 0
CONNECTOR_{count}.AZ<DEG> := 0
CONNECTOR_{count}.AY<DEG> := 0 
CONNECTOR_{count}.AX<DEG> := 0
CONNECTOR_{count}._CONNID<int> := ConnectionID('{textChoose}')
CONNECTOR_{count}._CONNID_text<text> = '{textChoose}'
CONNECTOR_{count}._MATCH<INT> := 1
CONNECTOR_{count}.IJLOCAL<INT> := 1
 
 
if CON_Flip_{count} = true then
CONNECTOR_{count}._CONNFLIP := true
end if
 
if CON_Rev_{count} = true then
CONNECTOR_{count}._CONNREV := true
end if
 
end if
 
END IF
 
count<int> := count + 1
 
end while
 
else
 
delete CONP_NUM
delete CONP_ESP
delete CONP_FACE 
 
totalEdges<int> := 99
count<int> := 1
 
while count <= totalEdges do
 
;SE FOR UMA ARESTA VALIDA
IF _EDG{count}DY != null THEN
 
DELETE CON_{count}_TYPE
DELETE CON_Flip_{count}
DELETE CON_Rev_{count}
 
END IF
 
count<int> := count + 1
 
end while
 
end if

Avatar
Descartar