# Intersection of two extended lines in TikZ without having to draw them

This question is a follow up of TikZ: how to find the intersection of two extended lines?

I have a moderately complicated TikZ graphic that shows the setup of an optical system. I need to calculate the intersection of two extended lines defined as the lines which pass respectively through (A)--(B) and (C)--(D).

I have a few \def at the beginning which I can modify to alter some parameters of the optics. These \def obviously also alter the relative positioning of the four points. The solution proposed in the question I linked is not perfect for me, because I can't a priorii know the length I should use in the calc command $(A)!length!(B)$, neither I can do \path [name path=AB] (A) -- ($(B)!-100cm!(A)$);, which creates an enormous line, even if not drawn.

Mi ideal solution would be something like the one proposed by Count-Zero using tkz-euclide package, which it's quite hard for me to use because I can't translate my whole drawing in tkz-euclide style due to the lack of english documentation of the package...

• Try to add the overlay option to your "enormous" \path... – Paul Gaborit May 13 '16 at 8:09
• Enclose the extended path in a pgfinterruptboundingbox environment. This way the bounding box is not adjusted to fit the invisible path. The same can be achieved by the overlay option as noted by Paul Gaborit. – Henri Menke May 13 '16 at 8:09
• If you read this answer: tex.stackexchange.com/a/31402/15036 you will see a method that only uses tkzeuclide to find the intersection... So you would not have to rewrite your whole diagram. – Thruston May 13 '16 at 8:23
• For optical setups you could have a look at my pst-optexp package – Christoph Jun 1 '16 at 19:12