boostorg / boostorg/geometry

side_robust causes regressions when rescaling is turned off

Open
#918 6 comments 0 reactions 1 assignee Assigned to @vissarion View on GitHub
bug
Dominant language
C++
Stars
517
Forks
232
PR merge metrics
No merged PRs in 30d

Description

There are several test cases which were OK, but since commit e38c093b5 they are failing now.

From there, there are even simple tests such as `difference_simplex_multi_mp_p_s`

now missing one triangle:

![image](https://user-images.githubusercontent.com/334849/136575410-956c26ad-0ac2-4f2c-b322-d6cbf3961d9e.png)

I added some comparison code in the sides, and this gives me many cases where the sides were left or right, but they are now calculated as 0 (on segment). See below (`p1`, `p2`, `p`, new result, old result)

In the first line you can see that it's wrong now, because the x-coordinate of `p2` and `p` match, but the y-coordinate does not match and therefore (AFAICS without picture) `p` is not located on the line.

How can we fix this?

```
(4 5) (3.7647058823529411242247988411691 3.8235294117647056211239942058455) (3.7647058823529411242247988411691 3.8235294117647060652132040559081) 0 -1
(1.4285714285714286031492292750045 1.5714285714285713968507707249955) (3.4782608695652172947632152499864 2.3913043478260869179052860999946) (5 3) 0 1
(5 3) (3.4782608695652172947632152499864 2.3913043478260869179052860999946) (1.4285714285714286031492292750045 1.5714285714285713968507707249955) 0 1
(3.4782608695652172947632152499864 2.3913043478260869179052860999946) (3.3157894736842106198082547052763 1.5789473684210526549520636763191) (3.7647058823529411242247988411691 3.8235294117647060652132040559081) 0 1
(3.4782608695652172947632152499864 2.3913043478260869179052860999946) (3.7647058823529411242247988411691 3.8235294117647060652132040559081) (3.3157894736842106198082547052763 1.5789473684210526549520636763191) 0 -1
(4 5) (3.7647058823529411242247988411691 3.8235294117647056211239942058455) (3.4782608695652172947632152499864 2.3913043478260869179052860999946) 0 -1
(4 5) (3.7647058823529411242247988411691 3.8235294117647056211239942058455) (3.7647058823529411242247988411691 3.8235294117647060652132040559081) 0 -1
```

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.