This MR fixes two issues in CubicSuperPath: it makes the superpath stable, i.e. when creating a superpath from a superpath array, the result doesn't change; and the detection whether a path is a line is improved.
CubicSuperPath by definition leads to a loss of information. Detecting whether csp.to_path() should be closed ("Z") has no way of differentiating between
- a path comprised of four line commands (five nodes) where the first node is identical with the last
- a path comprised of three line commands and a close command, because the super path is identical. The current method favours the latter constellation which should be significantly more common.
To counter the loss of information, the methods based on csp (such as "split at time", "center of math", "bezier segment length") should be deprecated in my opinion and rewritten in the class structure of the path command. This will fix issues such as #190 (closed) and #163.