The reason code worked before is that setbacks parameters were just ignored.
Sweep in the issue crashes because setback ends exactly on second vertex.
Setbacks need extra handling for special cases as it always assumes that start setback is on first segment, end - on last. This is not the case as they can easily exceed.
DESCRIPTION:
Changed GetSubdivisionParameters to use startSetbackDistance and endSetbackDistance since they were just ignored.
Changed Polyline.Frames and Polygon.Frames so they return only frames between setbacks. Since CreateMiterTransform and CreateOrthogonalTransform are focused on vertices, Transforms on setbacks are created manually.
TESTING:
Added tests for updated functions as well as regression Sweep.
FUTURE WORK:
Polyline.TransformAt feels incorrect as it says that u is "between 0.0 and length" but it's treated as 0 to 1 value. Also, since calculation inside is length based, including normal calculation, curve length can possibly influence frame vectors in a wrong way.
REQUIRED:
[x] All changes are up to date in CHANGELOG.md.
COMMENTS:
I will be away for a while, so feel free to steal this code if necessery.
BACKGROUND:
DESCRIPTION:
GetSubdivisionParameters
to use startSetbackDistance and endSetbackDistance since they were just ignored.Polyline.Frames
andPolygon.Frames
so they return only frames between setbacks. SinceCreateMiterTransform
andCreateOrthogonalTransform
are focused on vertices, Transforms on setbacks are created manually.TESTING:
FUTURE WORK:
Polyline.TransformAt
feels incorrect as it says that u is "between 0.0 and length" but it's treated as 0 to 1 value. Also, since calculation inside is length based, including normal calculation, curve length can possibly influence frame vectors in a wrong way.REQUIRED:
CHANGELOG.md
.COMMENTS:
This change is