P.S. la linea è orizzontale e incrocia solo un lato del cerchio.
In alternativa esiste qualche funziona che dati due oggetti emetta le
coordinate di intersezione?
Ringrazio tutti in anticipo.
Emiliano
(defun C:ALE_GetInters_Test ( )
(safearray-value
(vlax-variant-value
(vla-IntersectWith
(vlax-ename->vla-object (car (entsel)))
(vlax-ename->vla-object (car (entsel)))
acExtendNone
)
)
)
)
--
----------------------------------------------------------
Marc'Antonio Alessi - http://xoomer.virgilio.it/alessi
Per AutoCAD:
- Elaborazione dati from/to Excel
- Librerie manufatti in assonometria
- Travi 2D: disegno automatico travi in C.A.
- Autolayers: gestione automatica dei layers
- Elaborazioni e stampe multiple e automatiche
- Parametrico 2D, Viterie 2D/3D, Esplosi 2D/3D
- AutoGroups: gestione automatica gruppi di layers
- SetUp del disegno con gestione automatica DimStyles
- Conversione automatica files Inventor a DWG e viceversa
anche senza avere Inventor installato
- ...
----------------------------------------------------------
Ti viene in mente qualcosa?
Ciao e grazie.
Emiliano
"Marco" <nos...@nospam.com> ha scritto nel messaggio
news:4395184e$0$7316$4faf...@reader4.news.tin.it...
Avanzo una bevuta.
Ciao.
; Marc'Antonio Alessi - http://xoomer.virgilio.it/alessi
; 07/12/2005 - per Emilio
;
(defun C:ALE_GetIntersecLineCircleEmi ( / EntLin EntCrc Ptn010 Ptn011
PtnCen CrcRad IntDst IntDst
HlfCrd PtnOut)
(and
(setq EntLin (car (entsel)))
(setq EntCrc (car (entsel)))
(setq
Ptn010 (cdr (assoc 10 (entget EntLin)))
Ptn011 (cdr (assoc 11 (entget EntLin)))
PtnCen (cdr (assoc 10 (entget EntCrc)))
CrcRad (cdr (assoc 40 (entget EntCrc)))
)
(not (equal Ptn010 Ptn011 1e-14))
(setq
PtnInt (inters
Ptn010 Ptn011
PtnCen
(polar PtnCen (+ (angle Ptn010 Ptn011) (* pi 0.5)) CrcRad)
nil
)
IntDst (distance PtnCen PtnInt)
)
(<= IntDst CrcRad)
(setq HlfCrd (sqrt (- (* CrcRad CrcRad) (* IntDst IntDst))))
(if (equal HlfCrd IntDst 1e-14)
(setq PtnOut (list PtnInt))
(setq PtnOut
(if (> (distance Ptn010 PtnInt) (distance Ptn011 PtnInt))
(polar PtnInt (angle Ptn011 Ptn010) HlfCrd)
(polar PtnInt (angle Ptn010 Ptn011) HlfCrd)
)
)
)
)
PtnOut
)
Visto che siamo vicini, è probabile che ti possa offrire un bel spriz... o
se preferisci qualcos'altro... a te la scelta.
Ciao e ancora grazie.
Emiliano
"Marco" <nos...@nospam.com> ha scritto nel messaggio
news:439669c5$0$7312$4faf...@reader4.news.tin.it...
Perfetto, prima o poi ti verrò a trovare.
Ciao.