BHoM / BHoM/BHoM_Engine

Geometry_Engine: null checks for methods with default result

Open
#1,964 1 comment 0 reactions 0 assignees View on GitHub
type:feature type:question
Dominant language
C#
Stars
30
Forks
13
Avg merge
7d 10h
Merged PRs (30d)
5

Description

There are methods for which some types of input are more of less not applicable. (i.e. `Area(Line)`, `DiscontinuityPoints(Circle)`). Those method always return default results like empty list or value `0`.

It follows that even if they receive a null input they still return some result without logging any error.
Maybe it's worth adding some null check to help detecting errors.

Examples:
![image](https://user-images.githubusercontent.com/48125514/92235689-67ba2d80-eeb4-11ea-86e5-e88fa276c7cd.png)
![image](https://user-images.githubusercontent.com/48125514/92235806-959f7200-eeb4-11ea-9289-3ce1f5fa8925.png)

@pawelbaran @IsakNaslundBh @al-fisher @FraserGreenroyd

Contributor guide

Open the contributing guide

Research direction

Start by locating the Geometry_Engine methods represented by Area(Line) and DiscontinuityPoints(Circle), then inspect how null inputs currently produce default results. Determine the intended null-check and error-logging behavior for these methods, and verify that applicable inputs still return their existing results.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.