PointCloudLibrary / PointCloudLibrary/pcl
addPolygon does not work as expected
Open
Nobody has claimed this yet.
kind: bug
module: visualization
needs: testing
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
A spurious line is sometimes drawn when using the addPolygon function
Test code
#include <pcl/point_types.h>
#include <pcl/visualization/pcl_visualizer.h>
typedef pcl::PointXYZ PointT;
typedef pcl::PointCloud<PointT> PointCloudT;
int main(int argc, char** argv)
{
PointCloudT::Ptr cloud(new PointCloudT);
cloud->push_back(PointT(-47, -41, 0));
cloud->push_back(PointT(-45, -39, 0));
cloud->push_back(PointT(-45, -37, 0));
cloud->push_back(PointT(-53, -18, 0));
cloud->push_back(PointT(-49, -18, 0));
pcl::visualization::PCLVisualizer viewer;
viewer.setBackgroundColor(0.5, 0.5, 0.5);
viewer.addPolygon<PointT>(cloud, 1, 1 ,1);
viewer.spin();
return (0);
}
Reported on the mailing list
Contributor guide
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.
Research direction
Start by building and running the provided C++ test program, focusing on PCLVisualizer::addPolygon and the reported spurious line. Compare the rendered polygon with the five-point input and use the linked mailing-list report for context. Done means addPolygon renders the polygon without the unwanted line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100