Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

pointcloudToMesh

> DevOps
Open source

C++ application to convert pcd file, ply file, txt file or xyz point cloud to MESH representation (Gp3).

186 stars0 likes1 views
WebsiteGitHub

About

C++ application to convert pcd file, ply file, txt file or xyz point cloud to MESH representation (Gp3).

pointcloudToMesh

C++ application to convert a pcd, ply, txt or xyz point cloud data file into a MESH representation (Gp3/poisson). This projects is based in the Point Cloud Library 1.12.1 as backend.


Input file structure support

Format Description
.pcd Point Cloud Data file format
.ply Polygon file format
.txt Text file format
.xyz X Y Z Text file format

Output file structure

Mesh Cloud Description
.ply Polygon mesh file

Example

Compile

You can either build the project from source or download a docker image.

Compiling from source code

  1. Download source code:
bash
git clone https://github.com/codebydant/pointcloudToMesh
  1. Create a "build" folder
  2. Run CMake
bash
cd build/ && cmake ../src && make
  1. Run project
./pointcloudToMESH    
    
    surface method estimation:
        1 --> for poisson
        2 --> for gp3
        
    normal method estimation.
        1 --> for normal estimation
        2 --> for mls normal estimation
        
     example:
     ./pointcloudToMESH /home/xXx/PCD-PLY_Files/cloud.txt 2 1 /home/xXx/Desktop 

Docker image

  1. Download the docker image
bash
docker pull ghcr.io/codebydant/pcdtomesh:latest
  1. Run a docker container
bash
docker run --rm -it \
           --volume=/tmp/.X11-unix:/tmp/.X11-unix:rw \
           --volume=/tmp/.docker.xauth:/tmp/.docker.xauth:rw \
           --env="XAUTHORITY=/tmp/.docker.xauth" \
           --env="DISPLAY" \
           --name="mesh" \
           --volume=[PATH TO YOUR PCD FOLDER]:/tmp \
           -t ghcr.io/codebydant/pcdtomesh:latest /tmp/[YOUR PCD FILENAME] [surface method] [normal method] /tmp

The previous command will run a docker container with the ghcr.io/codebydant/pcdtomesh:latest image and will share a .pcd file from the host machine ([PATH TO YOUR PCD FOLDER]) to the tmp folder in the container.

If you get something like this after setting --display flag it might be related to this:

bash
No protocol specified

Try running with the following command belowe or use the provided .sh script:

bash
sudo -sE docker run --rm -it \
           --env="DISPLAY" \
           --volume=/tmp/.X11-unix:/tmp/.X11-unix:rw \
           --volume=/tmp/.docker.xauth:/tmp/.docker.xauth:rw \
           --name="dbscan" \
           --volume=[PATH TO YOUR PCD FOLDER]:/tmp \
           -t ghcr.io/codebydant/dbscan-octrees:latest --cloudfile /tmp/[YOUR PCD FILENAME] --display

If this still does not work to display, run: xhost +local:docker and then run the option 1 command.

Note

These parameters can be modify in "create_mesh" method to get better results!

for GP3:

setKSearch(100);                         //It was 20
gp3.setSearchRadius(10);                 //It was 0.025
gp3.setMu(5);                            //It was 2.5
gp3.setMaximumNearestNeighbors(100);     //It was 100
gp3.setMaximumSurfaceAngle(M_PI/4);      //45 degrees   
gp3.setMinimumAngle(M_PI/18);            //10 degrees 
gp3.setMaximumAngle(M_PI/1.5);           //120 degrees     
gp3.setNormalConsistency(false); 

for POISSON:

poisson.setDepth(depth);//7
poisson.setInputCloud(cloud_with_normals);
poisson.setPointWeight(pointWeight);//2
poisson.setDegree(2);
poisson.setSamplesPerNode(samplePNode);//1.5
poisson.setScale(scale);//1.1
poisson.setIsoDivide(isoDivide);//8
poisson.setConfidence(confidence);
poisson.setOutputPolygons(outputPolygons);
poisson.setManifold(manifold);
poisson.setSolverDivide(solverDivide);//8
poisson.reconstruct(triangles);

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++meshpcdpclpcl-library

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理