frompathlibimportPathfromcompas.geometryimportPointcloud,Translationfromcompas_view2.appimportAppfromcompas_cgal.reconstructionimportpointset_reduction# Define the file path for the point cloud dataFILE=Path(__file__).parent.parent.parent/"data"/"forked_branch_1.ply"# Load the original point cloudoriginal_points=Pointcloud.from_ply(FILE)# Create a copy of the point cloud for processingcloud=Pointcloud.from_ply(FILE)# Translate the original point cloudcloud.transform(Translation.from_vector([-1000,0,0]))# Apply point set reduction to the translated point cloudpoints=pointset_reduction(cloud,50)print(f"Original points: {len(cloud)}, Reduced points: {len(points)}")# Initialize the COMPAS viewerviewer=App(width=1600,height=900)# Adjust viewer settingsviewer.view.camera.scale=1000viewer.view.grid.cell_size=1000# Add the reduced point cloud and the original point cloud to the viewerviewer.add(Pointcloud(points))viewer.add(Pointcloud(original_points))# Set the camera to zoom to fit all pointsviewer.view.camera.zoom_extents()# Run the viewerviewer.run()