The result of polygon_90_set_data::get with argument vthreshold is incorrect
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- computer-graphics
Research direction
Reproduce the issue with the provided C++ example and inspect polygon_90_set_data::get, especially its vthreshold argument and coordinate handling. Compare the returned polygon points with the input coordinates; done means the output preserves the expected horizontal and vertical coordinates when vthreshold is 8.
Written by the indexing model from the issue text.
Description
The code is as follows:
#include "boost/polygon/gtl.hpp"
#include <vector>
#include <iostream>
using namespace std;
int main(int argc, char** argv)
{
gtl::point_data<int> point[] = {{53, 17}, {53, 68}, {33, 68}, {33, 17}};
gtl::polygon_90_data<int> p90;
p90.set(point, point + 5);
gtl::rectangle_data<int> r1 = {10, 20, 30, 40};
gtl::rectangle_data<int> r2 = {10, 25, 35, 45};
gtl::rectangle_data<int> r3 = {10, 55, 43, 62};
gtl::polygon_90_set_data<int> ps1(gtl::VERTICAL), ps2(gtl::VERTICAL);
ps1.insert(r1);
ps1.insert(r3);
ps2.insert(r2);
ps2.insert(p90);
gtl::polygon_90_set_data<int> ps3 = ps1 | ps2;
vector<gtl::polygon_90_data<int>> p90s;
ps3.get(p90s, 8);
for (auto& p : p90s) {
for (auto& x : p) {
cout << "(" << x.x() << " " << x.y() << ")";
}
cout << endl;
}
return 0;
}
The result is:
(17 33)(25 33)(25 30)(20 30)(20 10)(45 10)(17 10)
(53 17)(33 17)(33 55)(10 55)(10 62)(33 62)(33 68)(53 68)
The input 17(point{53,17}) is the vertical coordinate, and the output 17(point{17,33}) is the horizontal coordinate.
- Dominant language
- C++
- Stars
- 70
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/polygon
-
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in boostorg/polygon
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·