Trimming by tangent points is a fundamental issue here.
The proper way to address this issue would be introduction of topological entities here(like a vertex of tangential).
Using only geometry info is not enough. A tangent point by definition is when two intersection points are degenerate into one. Direct intersection calculation may give us 0, 1, or two intersections, depending on the tolerance level.
That being said, the initial fillet looks quite bad. Could you upload an example dxf, so I can verify the fillet feature works as expected.
To add topological entities is clearly a huge project, but we will see.
Dobro wrote
Thanks to everybody taking care of my problem.
This small inaccuracy would not be an issue, as it is not visible at normal size. However since the two lines do not intersect, I cannot use the Trim option, which is already a problem.
I will try to solve this issue on an other path: first trimming and then fillet.
Anyway, thanks again.