Cockroach - PointCloud Processing for Rhino

Cockroach 0.0.1

We released point cloud processing plugin for Rhino.
Authors: Petras Vestartas, Andrea Settimi.

Current version is Rhino Command for Rhino 6 and Rhino 7 written in C++ for windows.
You can already download it from YAK (package manager) or food4rhino: Cockroach | Food4Rhino. I compiled Rhino 6 for not earlier than 6.32.20340.21001 and Rhino 7.0.20314.3001.

We are sharing our IBOIS, EPFL (Laboratory for Timber Constructions ‐ EPFL) research tool-sets outside the lab as a free resource (free as a beer, writing plugins and maintaining them takes time).
Full description below.


Cockroach is a plug-in developed to introduce various commands for point cloud post-processing and meshing into Rhinoceros® environment based on reference functions already existing in the open source library Open3D [1].

The pointcloud processing tools focus on:

  1. fast and easy-to-use geometric manipulation, characterization and decomposition of point clouds directly in Rhinoceros6 and 7®.
  2. the better link between CAD modelling software (Rhino) and point-cloud processing.
  3. integration of point-cloud processing with other frameworks such as easy-to-use .NET programming languages (C#, IronPython, VB) using the interface of Grasshopper, Rhino.
  4. unified (as much as possible) approach across multiple backends to help researchers collaborate within academic or industrial partners. At IBOIS - EPFL, among other research lines, we have also being focusing on structures with unpredictable geometries such as raw wood and mineral scraps. These construction elements are scanned and post-processed into low-poly meshes or NURBS for design i.e. 3D timber joinery representation and fabrication tool-paths for 5-axis CNC, ABBIRB6400 Robot and XR manufacture.

We would like to thank @dale for his help during C++ plugin development into Rhinoceros®.

[1] Zhou, Park, and Koltun, Open3D: A Modern Library for 3D Data Processing.

Core Features

The first release includes 13 Rhino commands:

Cockroach_BallPivoting : a mesh reconstruction algorithm to reconstruct a triangulated mesh from a point cloud;

Cockroach_Poisson : a mesh reconstruction algorithm to obtain water-tight smoothed meshes from point clouds;

Cockroach_Crop : to crop a point cloud with a box;

Cockroach_DBSCANclustering : a density-based clustering method to obtain separate point clouds from a bigger one;

Cockroach_Downsample : reduce the size of a point cloud by a number threshold of points;

Cockroach_VoxelDownsample : reduce the number of point clouds by voxelization;

Cockroach_MeshSmooth : to uniformly smooth a mesh;

Cockroach_PlaneSegmentation : removal of point cloud planes by RANSAC;

Cockroach_PointCloudNormals : to estimate and correctly orient normal even for unstructured point clouds;

Cockroach_PopulatePoints : to obtain a randomly populated point cloud from a mesh;

Cockroach_PopulatePointsUniform : to obtain an uniformly populated point cloud from a mesh;

Cockroach_RadiusOutlierRemoval : to filter noise (outlier points) from point clouds by distance radius;

Cockroach_RemoveStatisticalOutliers : to filter noise (outlier points) from point clouds by KdTree search;

Citation

Please use this citation if you use Cockroach in published work. In addition, please cite also the third-party libraries we used: Open3D (Open3D/README.md at main · isl-org/Open3D · GitHub).

@misc{IBOIS2020, author = {Petras Vestartas and Andrea Settimi}, title = {{Cockroach}: {A} plug-in for point cloud post-processing and meshing in {Rhino} environment}, journal = {EPFL ENAC ICC IBOIS}, url = {https://github.com/9and3/Cockroach}, year = {2020} }

License

Cockroach is released under the MIT license. If you use Cockroach in published work, please cite also the third-party libraries we used: Open3D. The code is not yet fully open as there are still developments in progress but will be soon. Nevertheless, the code can be made available upon request. We encourage use for both research and commercial purposes, as long as proper attribution is given. Feel free to also send us an email and let us know how Cockroach has been useful to you and how it can be improved.

Contact

For code request or chat i.e. open github issue or contact us by email. Some data, models or generated code using our research are available from the corresponding authors by request: Petras Vestartas, petrasvestartas@gmail.com Andrea Settimi, andrea.settimi@epfl.ch

Install via Package Manager or Food4Rhino

55 Likes

Hi @Petras_Vestartas,

Impressive work - looking forward to watching its progress.

– Dale

6 Likes

Hi @Petras_Vestartas

Amazing. I cannot wait to test Cockroach package.
Thank you.

3 Likes

Very Impressive indeed. I’m excited about the confluence of some new tools. These techniques combine with QuadRemesh and new ToNurbs means that reverse engineering from scanned objects to clean nurbs geometry can be fairly quick and painless. Great stuff!

4 Likes

Thanks @Andrew_Schiffer and Grasshopper version is on its way. I wish I could have more time on this, nevertheless slowly but .NET version is coming:

https://vimeo.com/500897142

6 Likes

Thank you so much :heart: Just amazing incredible work

1 Like

just saw this, very interesting for us!

1 Like

I like it!

A new Cockroach version for Grasshopper has been released and uploaded on Food4Rhino. The plugin is compiled for Windows Rhino 6 and 7.

This time we also open-source the full code of Cockroach, which employs three libraries: Open3D, CGAL, Cilantro. All of the C++ libraries are correctly cited and follows necessary license agreements. The Cockroach plugin provides wrappers for the .NET via PInvoke. GitHub - 9and3/Cockroach: A plug-in for Rhino point cloud post-processing and meshing

The goal is to create an open-source PointCloud processing tool for .NET that people would contribute to and add more features in the long term. We hope that there will be contributors because NET lacks PointCloud processing in general. The repository is created as part of research at IBOIS, EPFL. For implementing new features, we are working with C# and C++.

24 Likes

Cool :heart: :heart:

2 Likes

This is really interesting, we have many projects with huge pointclouds ( landscape parts, 2 km X 2 km) we currently use a combination of different SW Meshlab, cloud compare…) to correct, simplify and mesh the original ´data sets to be usable in Rhino and other CAD packages. Do you possibly plan to introduce something like an adaptive meshing algorithm that would increase the mesh density in areas with higher topological contrast like e.g. rough shaped mountains vs. smooth horizontal plains? That would be something really useful for our work, we would also be willing to pay for such a feature.

2 Likes

Hi @walther ,

The Cockroach started from a joint interest for fabrication purpose of raw-trees and research in stone. We are using a laser scanner just to mesh a tree trunk and obtain a central-axis:

Since IBOIS has a Faro scanner, for sure it got “misused” by applying it to architectural applications. I think we have already scanned buildings for a 4th or 5th studio including this year. So definitely I understand what you mean by working with large clouds.

The meshing algorithm that is part of Cockroach comes from here: CGAL 5.2 - Poisson Surface Reconstruction: User Manual The scale of meshing can be tweaked to larger resolution by changing min value from 8 to higher number. To my knowledge Poisson is already adaptive meshing. But I am aware that meshing large scenes may require a different algorithm since it is mainly used for relatively small objects. If you know another method that is open-source, let me know I can try to wrap it for .NET We also have ball-pivoting implementation, but I doubt that it is any better. Another way is to subdivided large clouds into chunks and mesh them separately.

Also, we open sourced code willing that someone would joint this venture to have a collaborative tool contributing by more than us. Currently, we are developing Cockroach at our own pace within time left from research and have a Slack channel for collaboration if needed.

6 Likes

Congratulations for this plugin, it’s awesome!
I’m trying to use it in a bigger scale. It works very well. But how can i achieve that it takes only the points as a mesh without the rest like in the attached image? In the description was written something about the iso-value explanation. Is that the right way to achieve this? I just don’t understand where I can find that?

Thank you very much for help!
Best Regards,
Ivan

Set the last boolean toggle to false.
Also I suggest meshing separate objects individually instead of large scene.

Thank you for the hint to separate the mesh. But I don’t understand which toggle to set to false. I still have the same issue. Maybe it’s more clear if you can see the file:

The normal estimation. Then you will need to clean up mesh by removing faces that are approximated.

Sorry to bother you, but I still don’t understand completely. Is the normal estimation the one in the screenshot? Or am I missing something? I set all off them to false. and it’s the same result as before.
And to remove the face, I can’t use cockroach, right?

The normal estimation is good, but now you need to remove faces from clouds like this because your clouds are incomplete. The D Output gives the mesh vertex values.

Sample File.gh (121.8 KB)

3 Likes

Now I understand. Thank you very much!!! Appreciate it a lot!

@Petras_Vestartas Thank you for the plugin!
I am trying to use Mesh Skeleton on this mesh:
Mesh_Skeleton_Test.gh (353.3 KB)
But instead of a centerline I seem to be getting a network of mesh edges:


Result in red above, original mesh in black below.
What am I doing wrong?