Description:
The reason for observed behaviour is the fact that in the lines below an overload of HashArray taking ICurve is called, which attempts to call other overloads with skipEndPoint argument downstream (second snippet). That throws an exception for the simple reason that most overloads do not have the parameter mentioned.
As far as I understand, the solution for that bug should be cleaning up skipEndPoint for all HashArray overloads taking sub-classes of ICurve - either implement it properly or just remove if not needed.
|
return obj.ExternalBoundary.HashArray(translationFactor, |
|
comparisonConfig, |
|
fullName.AppendPropertyName($"{nameof(obj.ExternalBoundary)}")) |
|
.Concat(obj.InternalBoundaries.SelectMany((ib, i) => ib.HashArray(translationFactor, |
|
comparisonConfig, |
|
fullName.AppendPropertyName($"{nameof(obj.InternalBoundaries)}[{i}]")) |
|
)).ToArray(); |
|
for (int i = 0; i < subParts.Count - 1; i++) |
|
{ |
|
hashes.AddRange(HashArray(subParts[i] as dynamic, |
|
translationFactor, |
|
skipEndPoint: true, |
|
comparisonConfig: comparisonConfig, |
|
fullName: fullName.AppendPropertyName($"[{i}]")) |
|
); |
|
} |
|
|
|
//Include endpoint for hashing for last curve |
|
hashes.AddRange(HashArray(subParts.Last() as dynamic, |
|
translationFactor, |
|
skipEndPoint: false, |
|
comparisonConfig: comparisonConfig, |
|
fullName: fullName.AppendPropertyName($"[{subParts.Count - 1}]") |
|
) |
|
); |
Test file(s):
On SharePoint
Description:
The reason for observed behaviour is the fact that in the lines below an overload of
HashArraytakingICurveis called, which attempts to call other overloads withskipEndPointargument downstream (second snippet). That throws an exception for the simple reason that most overloads do not have the parameter mentioned.As far as I understand, the solution for that bug should be cleaning up
skipEndPointfor allHashArrayoverloads taking sub-classes ofICurve- either implement it properly or just remove if not needed.BHoM_Engine/Geometry_Engine/Query/HashArray.cs
Lines 307 to 313 in 723a03f
BHoM_Engine/Geometry_Engine/Query/HashArray.cs
Lines 115 to 132 in 723a03f
Test file(s):
On SharePoint