Closed dalcde closed 2 years ago
There is a frustrating compromise here: I am not sure how to calculate the right start location of the bent line, but people sometimes use dots with no fill, and then it doesn't look correct. Maybe there could be a setting to choose which way, since going to the center is faster and better as long as the shape is filled, but with no fill it's better to use the setback.
I implemented a real solution to the problem of calculating Bezier setbacks at one point in Rust, but it is pretty tricky -- I do a first order approximation of Bezier arclength and then set back the start point by that much, then calculate the error and estimate again. This generally produces a point right on the boundary of the shape. I think on a diagram with lots of bent lines, this would take an unacceptably long time in latex.
As you pointed out, all of the math is much easier if you use circular paths rather than Bezier curves.
You can use:
\begin{sseqpage}
\class(0, 0)
\class(1, 1)
\structline[bend left = 50, source anchor=center, target anchor=center]
\end{sseqpage}
for this.
But it doesn't seem like source anchor
and target anchor
work as a style option: edges={source anchor=center, target anchor=center}
doesn't seem to work.
Okay, but the following also works fine:
\begin{sseqpage}[structlines={source anchor=center, target anchor=center}]
\class(0, 0)
\class(1, 1)
\structline[bend left = 50]
\end{sseqpage}
That results in the structline being drawn on top of the class though, which is less desirable.
Fair enough, I will look into it and see what I can do.
I guess this was simpler than I expected.
Minimal example:
Instead of the structline starting from the center of the class, it starts at the point where it would have left the node if it were straight. This looks extremely odd for a very bent structline.