Skip to content

Divepit/pointcloud-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pointcloud Toolkit

AI Declaration

This GUI is a mostly AI generated piece of software that I created to unify some AI generated scripts that I commonly used to edit/process some pointclouds. The code is in no way representative of my coding abilities :^)

Introduction

This project provides a collection of Python scripts and a small GUI for working with pointcloud and mesh data. The tools are based on Open3D and make it easy to convert between common formats or extract meshes from IFC models.

Installation

Install the dependencies with pip:

pip install -r requirements.txt

Note: The mesh cropping tool uses PyVista (VTK + Qt). On Linux you may need the Qt base libraries from your package manager if they are not already present.

Some packages (e.g. open3d and ifcopenshell) may require additional system libraries. Refer to their documentation if the installation fails.

Usage

All functionality is available both via command line and through a simple GUI. Launch the GUI with:

python -m pointcloud_tools.gui

Docker

Build the image:

docker build -t pointcloud-tools .

Run the GUI with X forwarding (Linux host):

xhost +local:docker
docker run --rm \
  -e DISPLAY=$DISPLAY \
  -v /tmp/.X11-unix:/tmp/.X11-unix:ro \
  -v "$(pwd)":/app \
  -v "$HOME/.Xauthority:/root/.Xauthority:ro" \
  pointcloud-tools

Or with Docker Compose:

export DISPLAY=${DISPLAY:-:0}
export XAUTHORITY=$(xauth info | awk '/Authority file/ {print $3}')
xhost +SI:localuser:root
docker compose up --build
xhost -SI:localuser:root

This shares your current directory so the container can read/write pointcloud files alongside your host workspace. On macOS/Windows use your X server of choice and adjust the DISPLAY/volume flags accordingly. If you get an X11 authorization error, ensure .Xauthority exists and is mounted (compose mounts ${XAUTHORITY:-$HOME/.Xauthority} to /tmp/.Xauthority by default) and that you have allowed root via xhost +SI:localuser:root.

The main tabs provide operations for PCD files, OBJ meshes, E57 pointclouds, IFC models, a viewer for inspecting results and an upload page to send files via SSH.

Use the Crop Mesh (box) button in the PCD tab to trim a mesh interactively. A PyVista/VTK window opens with a white crop box—drag its handles anywhere in space, then press Enter/C or simply close the window to accept the crop (Esc cancels). The cropped mesh is written to the selected path.

Every script in pointcloud_tools/ can also be run directly from the command line. Use the --help flag on any module for details.

Package overview

pointcloud_tools/
├── e57_convert.py   # Convert E57 files to PCD or PLY
├── downsample_pcd.py  # Downsample PCD files to a new file
├── mesh_to_pcd.py   # Sample a pointcloud from a mesh
├── obj_convert.py   # Convert OBJ meshes to PLY mesh
├── ifc.py           # Extract meshes from IFC models
├── gui.py           # Tkinter interface wrapping the tools
└── utils.py         # Helper functions

Feel free to extend these scripts for your own workflows.

The GUI also keeps track of recently generated files and provides an Upload tab to send them to a remote machine via SSH. Files can be chosen from the recent list or browsed directly from disk.

The Chain tab lets you build a sequence of operations. When running the chain, the output from each step becomes the default input of the next one, making it easy to convert an IFC to a mesh, turn that mesh into a point cloud and upload the result in one go.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors