This is a python wrapper for CloudCompare CLI based on this Wiki Page.
You can build and chain commands which can be executed.
This package is uploaded to pypi, so you can install it with pip:
pip install pyCloudCompareCLI
Otherwise you can just install it from source using the Github-Repository.
- Python3.6+
- An installed version of CloudCompare
Read ply-file and save in ascii-format with extension ".xyz".
import pyCloudCompare as cc
cli = cc.CloudCompareCLI()
cmd = cli.new_command()
cmd.silent() # Disable console
cmd.open("pointcloud.ply") # Read file
cmd.cloud_export_format(cc.CLOUD_EXPORT_FORMAT.ASCII, extension="xyz")
cmd.save_clouds("newPointcloud.xyz")
print(cmd)
cmd.execute()
Same example with Context-Manager:
import pyCloudCompare as cc
cli = cc.CloudCompareCLI()
with cli.new_command() as cmd:
cmd.silent() # Disable console
cmd.open("pointcloud.ply") # Read file
cmd.cloud_export_format(cc.CLOUD_EXPORT_FORMAT.ASCII, extension="xyz")
cmd.save_clouds("newPointcloud.xyz")
print(cmd)
The work in the scope of the CloudCompare CLI Python Wrapper in this repository is supported by the Institute of Geo-Engineering at Clausthal University of Technology.