Open andrewheumann opened 11 months ago
TransformAt is working wrong for polyline. At one point it does var d = this.Length() * u;
which is wrong since u is no longer from 0 to 1. Since it's known that that each segment has domain of 1, much simpler approach can be used.
Also, you can see that corner points have rotated transformation, but only two. This is because averaging is used on every vertex except first and last vertices. But for Polygon every vertex should be averaged, in my opinion.
Third issue I have found is not related but would be nice to clarify. IndexedPolycurve.CreateVerticesAndCurveIndices produces unique indexes. For two lines and arc in between it would be [0, 1], [2, 3, 4], [5, 6]. It's not only in contrast with CreateCurveIndices but also changes indices when polyline is copies. If the TransformedPolycurve is called on polycurve with indices [0, 1], [1, 2, 3], [3, 4], new polycurve will have indices as described above: [0, 1], [2, 3, 4], [5, 6] indices that out of range of verticies.
The result I got
@andrewheumann
To reproduce:
produces:
The positions are incorrect; there should be some along the shorter edges. The axes are also incorrect — many Y and Z appear to be zero-length.
Note that the code for
PointAtNormalized
finds the correct positions: