BHoM / BHoM/BHoM_Engine

Geometry_Engine: Restore coherency and add tolerance to PointAtParameter methods

Open
#2,044 1 comment 0 reactions 1 assignee Claimed by @LMarkowski View on GitHub
type:compliance
Dominant language
C#
Stars
30
Forks
13
Avg merge
7d 10h
Merged PRs (30d)
5

Description

#### Broken rules:

Some of `PointAtParameter` methods allow the parameter to be outside of 0 to 1 domain while others in those cases return nulls.
Also `Polyline` and `PolyCurve` methods has hard coded check to return endpoint while parameter is equal 1 (to avoid computational errors). This could be replaced by using tolerance.

#### Suggestions to restore compliance:

- Make all methods prohibit input parameter from being outside of the 0 to 1 domain. Ensure that 0 means the startpoint and 1 the endpoint of the curve.
- Add proper descriptions and return null with logging an error when parameter is outside the 0 to 1 domain.

#### Additional notes:
- Circles and other closed curves are discussable.
- ~~In case of Nurbs parameter could be scaled to meet the requirement from first suggestion.~~

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.