PointCloudLibrary / PointCloudLibrary/pcl

addPolygon does not work as expected

Open
#1,148 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.