Geometry_Engine: Improve Offset method (includes Fillet() and ExtendToPoint())
- Dominant language
- C#
- Stars
- 30
- Forks
- 13
- Avg merge
- 7d 10h
- Merged PRs (30d)
- 5
Description
#### Description:
Following the discussion in PR #1314 following items should be improved in `Offset()` method for `Polyline` and `PolyCurve` classes:
- Offset value below which method is split into two offsets one by one. For now it is arbitrarily set as `0.05 * Curve.Length()`. Instead should be calculated or exposed as an input parameter. [Link to the specific comment in a PR.](https://github.com/BHoM/BHoM_Engine/pull/1314#discussion_r346778370)
- The way errors from nested methods are being erased. Currently it uses `Reflection.Compute.ClearCurrentEvents()`. Probably there is a better way to cover it. [Link to the specific comment in a PR.](https://github.com/BHoM/BHoM_Engine/pull/1314#discussion_r346760105) Refers also to #1306.
- `Fillet()` now works only on pairs of Lines and Arcs and rather trims/extends them to the intersection point than really fillet. It was inspired by Autocad Fillet method. Could be improved and added as separate public method or maybe renamed.
- `ExtendToPoint()` as above. `Extend(curve, double, double)` is implemented for most of `ICurve` classes, only Nurbs are missing. Now we could decide if separate method for extending to a given point instead of extending by a given length would be useful. If so, there is a private method working on lines and arcs in `Offset.cs` file. It could be used as a draft.
Contributor guide
Assessment
This issue has not been assessed yet.