Stefan Pinnow - 2018-12-21
  • summary: \pgfintersectionofpaths yields an error when the lines are almost parallel --> [intersection] \pgfintersectionofpaths yields an error when the lines are almost parallel
  • Description has changed:

Diff:

--- old
+++ new
@@ -10,7 +10,11 @@
   \pgfpathlineto{\pgfpoint{19.54204pt}{-31.44316pt}}}
 ~~~~

-The error produced is `! Package PGF Math Error: You asked me to calculate 1/0.0', but I cannot divide any number by zero.`. The "call stack" is (`\pgfintersectionofpaths`, `\pgfpointintersectionoflines`, `\pgftransforminvert`): so the error occurs during `\pgftransforminvert`, just as the documentation of this macro claims would happen if the matrix its trying to invert is near-singular.
+The error produced is 
+
+> ! Package PGF Math Error: You asked me to calculate 1/0.0', but I cannot divide any number by zero.
+
+The "call stack" is (`\pgfintersectionofpaths`, `\pgfpointintersectionoflines`, `\pgftransforminvert`): so the error occurs during `\pgftransforminvert`, just as the documentation of this macro claims would happen if the matrix its trying to invert is near-singular.

 Prior to calling `\pgfpointintersectionoflines` to actually compute the intesection of lines, `\pgf@intersectionoflines` (indirectly called by `\pgfintersectionofpaths`) tries to figure out whether the lines intersect at all, and the problem seems to be in this part of the code, namely macro `\pgf@iflinesintersect`, which apparently reports the lines to intersect, although computing the intersection later yields an error.