BHoM / BHoM/BHoM_Engine

Geometry_Engine: Handling of PolyCurves

Open
#1,963 6 comments 0 reactions 1 assignee Claimed by @LMarkowski View on GitHub
type:feature type:question
Dominant language
C#
Stars
30
Forks
13
Avg merge
7d 10h
Merged PRs (30d)
5

Description

#### Description:

We currently have no way of checking that a polycurve created is "valid", that is, continuous with all segments directed the "same way", that is in a loop; endpoint of segment i is startpoint of segment i+1.

We have a few methods that rely on the curves being clean in this matter, and we also have methods making sure the result is (Join), but as we are currently exposing property assignment methods in the UI, a user is able to create a polycurve that will nto work for methods such as "IsClosed" etc.

One suggestion would be to:

1. hide the property assignment method from the UI
1. Make the create method call the Join method and change it to return a list of polycurves

This would make it impossible to generate an invalid polycurve directly from the UI and should make sure any of the curves constructed will work in our methods.

Ofc, we would still have the possibility of a "invalid" curve being generated by someone using `SetProperty` etc, but then we kind of have to but the responsibility on the user.

Good to get other peoples thoughts on this as well.

@pawelbaran @al-fisher @FraserGreenroyd

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.