;															
;	( SEC-HOMOL-TAG-01 )												
;															
;	CREA SECCION POLIGONAL de 5 Lados por TANGENTES a SECCION CURVA en PLANO (B) 					
;	HOMOLOGA a TANGENTES (PENTAGONO DE ARRANQUE) de SECCION CUERVA DADA EN (A) 								
;	PLANOS (A) Y (B) NO TIENEN QUE SER PARALELOS									
;															

;															
;       *** PROGRAMA *** PROGRAMA *** PROGRAMA *** PROGRAMA *** PROGRAMA*** PROGRAMA*** 				
;															
;	ENTRADAS: 
;	SALIDAS : 
;	INTERNAS: 

(DEFUN C:SEC-HOMOL-TAG-01 (/  )

	(SETVAR "blipmode" 0) (SETVAR "cmdecho" 0) (GRAPHSCR)
	(COMMAND "SCP" "U") (COMMAND "-REFENT" "DES")

;	TAMA DE DATOS  =>  FIJA PLANO (A) Y (B) CON =>									

;	PUNTOS DEL (PENTAGONO DE ARRANQUE)***PUNTOS PENTAGONO CONSECUTIVOS (A1 A2 A3 A4 A5)***				


	(COMMAND "-REFENT" "PUNTO")

	(SETQ A1 (GETPOINT    " Plano-A PUNTO PENTAGONO (A1)   ROJO "    )) 	(TERPRI)	; Eje-X
	(SETQ A2 (GETPOINT A1 " Plano-A PUNTO PENTAGONO (A2)   AMARILLO ")) 	(TERPRI)	; Origen
	(SETQ A3 (GETPOINT A1 " Plano-A PUNTO PENTAGONO (A3)   VERDE "   )) 	(TERPRI)	; Eje-Y
	(SETQ A4 (GETPOINT A1 " Plano-A PUNTO PENTAGONO (A4)   CIANO "   )) 	(TERPRI)	; Siguiente
	(SETQ A5 (GETPOINT A1 " Plano-A PUNTO PENTAGONO (A5)   AZUL "    )) 	(TERPRI)	; Siguiente
	(COMMAND "-REFENT" "DES")

	(SETQ SEC-B (ENTSEL " DESIGNAR SECCION PLANO (B) "))
	(SETQ N-SEC-B (CAR SEC-B))
	;(SETQ P-SEC-B (CADR SEC-B))

;	PUNTOS TRAZA PLANOS "A" "B"  ( TRAZ-1 TRAZ-2 )									

	(SETQ A0 A2 AX A1 AY A3)
	(COMMAND "SCP" "U")
	(COMMAND "SCP" "B" N-SEC-B)
	(SETQ T1 (LIST  20  20   0))
	(SETQ T2 (LIST 100  20   0))
	(SETQ T3 (LIST  20 100   0))
	(SETQ B1U (TRANS T1 1 0))
	(SETQ B2U (TRANS T2 1 0))
	(SETQ B3U (TRANS T3 1 0))
	(COMMAND "SCP" "U")
	(COMMAND "SCP" "3P" A0 AX AY)
	(SETQ B1UA (TRANS B1U 0 1))
	(SETQ B2UA (TRANS B2U 0 1))
	(SETQ B3UA (TRANS B3U 0 1))
	(SETQ B1UA0 (LIST (CAR B1UA) (CADR B1UA) 0))
	(SETQ B2UA0 (LIST (CAR B2UA) (CADR B2UA) 0))
	(SETQ B3UA0 (LIST (CAR B3UA) (CADR B3UA) 0))
	(SETQ B1UA0U (TRANS B1UA0 1 0))
	(SETQ B2UA0U (TRANS B2UA0 1 0))
	(SETQ B3UA0U (TRANS B3UA0 1 0))
	(COMMAND "SCP" "U")
	(SETQ TRAZ-1 (INTERS B1U B2U B1UA0U B2UA0U nil))
	(SETQ TRAZ-2 (INTERS B1U B3U B1UA0U B3UA0U nil))

	;(COMMAND "PUNTO" TRAZ-1)
	;(COMMAND "PUNTO" TRAZ-2)
	;(COMMAND "LINEA" TRAZ-1 TRAZ-2 "")

;	PUNTOS HOMOLOGIA EN TRAZA ( AB12 AB23 AB34 AB45 AB51)								

	(SETQ AB12 (INTERS TRAZ-1 TRAZ-2 A1 A2 nil))
	(SETQ AB23 (INTERS TRAZ-1 TRAZ-2 A2 A3 nil))
	(SETQ AB34 (INTERS TRAZ-1 TRAZ-2 A3 A4 nil))
	(SETQ AB45 (INTERS TRAZ-1 TRAZ-2 A4 A5 nil))
	(SETQ AB51 (INTERS TRAZ-1 TRAZ-2 A5 A1 nil))

;	PUNTOS HOMOLOGOS EN PLANO-B DE PUNTOS PLANO-A ( BB1 BB2 BB3 BB4 BB5)						

	(COMMAND "SCP" "B" N-SEC-B)
	(SETQ AB12B (TRANS AB12 0 1))
	(SETQ AB23B (TRANS AB23 0 1))
	(SETQ AB34B (TRANS AB34 0 1))
	(SETQ AB45B (TRANS AB45 0 1))
	(SETQ AB51B (TRANS AB51 0 1))
	(COMMAND "_PLAN" "A")
	(SETQ B51B (GETPOINT AB51B "  LINEA-PUNTO (B51) TANGENTE SECCION (B)  ROJO "    )) 	(TERPRI)
	(SETQ B12B (GETPOINT AB12B "  LINEA-PUNTO (B12) TANGENTE SECCION (B)  AMARILLO ")) 	(TERPRI)
	(SETQ B23B (GETPOINT AB23B "  LINEA-PUNTO (B23) TANGENTE SECCION (B)  VERDE "   )) 	(TERPRI)
	(SETQ B34B (GETPOINT AB34B "  LINEA-PUNTO (B34) TANGENTE SECCION (B)  CIAN "    )) 	(TERPRI)
	(SETQ B45B (GETPOINT AB45B "  LINEA-PUNTO (B45) TANGENTE SECCION (B)  AZUL "    )) 	(TERPRI)
	(COMMAND "_U")
	(SETQ B12 (TRANS B12B 1 0))
	(SETQ B23 (TRANS B23B 1 0))
	(SETQ B34 (TRANS B34B 1 0))
	(SETQ B45 (TRANS B45B 1 0))
	(SETQ B51 (TRANS B51B 1 0))
	(COMMAND "SCP" "U")

	(SETQ BB1 (INTERS AB51 B51 AB12 B12 nil))
	(SETQ BB2 (INTERS AB12 B12 AB23 B23 nil))
	(SETQ BB3 (INTERS AB23 B23 AB34 B34 nil))
	(SETQ BB4 (INTERS AB34 B34 AB45 B45 nil))
	(SETQ BB5 (INTERS AB45 B45 AB51 B51 nil))

	(COMMAND "COLOR" 1)
		(COMMAND "PUNTO" BB1)
		(COMMAND "LINEA" BB1 BB5 "")
	(COMMAND "COLOR" 2)
		(COMMAND "PUNTO" BB2)
		(COMMAND "LINEA" BB2 BB1 "")
	(COMMAND "COLOR" 3)
		(COMMAND "PUNTO" BB3)
		(COMMAND "LINEA" BB3 BB2 "")
	(COMMAND "COLOR" 4)
		(COMMAND "PUNTO" BB4)
		(COMMAND "LINEA" BB4 BB3 "")
	(COMMAND "COLOR" 5)
		(COMMAND "PUNTO" BB5)
		(COMMAND "LINEA" BB5 BB4 "")

;	PARANDO														
	(SETVAR "blipmode" 1) (SETVAR "cmdecho" 1)
) ;cierre DEFUN SEC-HOMOL-TAG-01 
;															