Cyclone 3DR and Dynamo for Revit / Extraction of junction boxes automatically

Preview:

  • Segment point cloud

  • Extract features

  • Export data

  • Insert Revit families in points from Excel files

  • Create orthoimages

  • Place orthoimages as decals on the element's surface

One of the common tasks for surveyors it represents the real location of repeatable elements. It could be a pile field, trees, furniture, etc. Thanks to Cyclone 3DR, cause it got a lot of different point cloud filters that you could combine to reach the desired outcome. I decided to take junction boxes for cables as an example.


First of all segment in the point cloud manually the needed zone, it's very easy to do with the limit box or by using X, Y, and Z sections. Wires and cable boxes are small objects so there are in the point cloud a lot of noisy points, use the Noise filter in Cyclone 3DR for cleaning them. Adjust the Intensity slider. The computation is automatically launched and the points considered as noise are highlighted. Just click ok and they will be deleted.

Cyclone 3DR - Noise filter

As we could see the cable boxes got a flat bottom surface, that we could use. To separate horizontal points from others I will use the Wall and Floors filter. This command splits points of a cloud into 3 categories: walls, floors and ceilings, and others. Set the angular tolerance for floors and ceilings (maximum slope) and click Ok. After that select Floors and ceilings cloud and apply on it the Noise filter again to delete redundant points that don't relevant to the boxes' surfaces.

Cyclone 3DR - Walls and Floors filter

When you get the clean point cloud of the surfaces you could apply on it filter by Distance. This command splits cloud(s) into a group of clouds based on the distance between points. Define the Segmentation distance. You can use the default value, so the software will calculate a relevant value using the average distance between two points in the selected cloud(s). All points, which have at least one neighbor less or equal to this distance, are placed in the same sub-cloud. The distance between sub-clouds of the resulting list is greater than the specified distance. You can also specify a minimum number of points for the resulting cloud, by checking the option Filter small sub-clouds (with fewer points than the specified number). After this tool, many different cloud segments are obtained, some of them are not what we need, just select unnecessary segments and click the Delete button.

Cyclone 3DR - Distance filter

Select all the resulting point cloud segments and use Best fit Plane into them. Don't forget to enable the "One shape per input" option, this will allow you to create a separate best plane for each selected element.

Cyclone 3DR - Best Plane

There are two ways to extract the coordinates for each plane's center point:

  1. You could use the Measure Geometry tool. This command allows you to create labels from geometries and define what exactly you want to include in this label. Also, it allows you to compare values to nominal data, but we don't need them right now. Select all labels and Create Custom Chapter for them, after that go to the Report window and export all coordinates to CSV format.

  2. Or you could use a simple script that extracts all coordinates and output them to the script window. You could find it below.

Coordinate center script

//Select all Planes

//Press Play button

//Copy the output


var mySelection=SFeature.FromSel();

var oString=new String();

for(var i=0; i<mySelection.length;i++){

var centroid=mySelection[i].GetCenter();

oString+=centroid.GetX();

oString+=",";

oString+=centroid.GetY();

oString+=",";

oString+=centroid.GetZ();

oString+=",";

oString+=""+ '\n';

}


print(oString);

Cyclone 3DR - Measure Geometry

In Excel, you just need to split all data into three collumns and delete all extra information. Save this file somewhere you could easily reach it and run the Revit. Open the Construction project and go to Manage / Dynamo menu. In appeared window select Create New file and you'll see the main Dynamo window. Here we need to add nodes that will represent our script. Switch the Dynamo to the Manual mode and first of all, add nodes that allow you to read the Excel file:

  • File Path - set the path to the file

  • File.FromPath

  • Excel.ReadFromFile

  • Code Block - Add your sheet name in quotes

Dynamo - Read from Excel, group of nodes

To place a virtual point in each coordinate add the below nodes:

  • List.Transpose - convert columns to rows and create three lists of coordinates (for each axis)

  • List.GetItemAtIndex - allows you to take only one of the three lists with coordinates

  • Number Slider - allows you to define which exact list you want to take (set Min - 0: Max - 2; Step - 1)

  • Copy two times List.GetItemAtIndex and Number Slider but change the slider status

  • Point.ByCoordinates - allows you to create a virtual point

Dynamo - Add points from X, Y, Z coordinates

To place in each point requested family type first of all load this family to the project and then add the below nodes:

  • Family Types - allows choosing the family from existing families in the project (I created a simple generic model as a box)

  • FamilyInstance.ByPoint - add the requested family to the virtual point

Dynamo - Add Family Instance to the point

Click the RUN button and you'll see in the Revit window all specified elements. All of them are Revit native elements and placed at the point from the Excel file. It's a simple Dynamo script, you could improve it by adding rotation and size information for each element.

Dynamo - Full Script
Revit - all junction boxes in right place

To add more information about wires you could create Orhtoimage in Cyclone 3DR and add it as Decol to the surface of ceiling. Don't forget to switch to the Realistic Mode to see the image.

Revit - OrthoImage as decol

If you still have a question or you want to repeat this tutorial by yourself, but don't have a valid license then you could reach me by clicking the below button.