Used software:
Leica Cyclone 3DR v. 2025.2
Used hardware:
Intro
Create Reference Points in Sphere Centers
Length Measurements
Angle Measurements
Perpendicular Measurements
Reports
Welcome to this video tutorial! Today, I'm excited to introduce a new script for the Leica Cyclone 3DR software that automates routine measurements. This script is based on an original design by my colleague Bjorn Van Genechten, with some improvements I've added.
The main goal of this script is to enable you to create custom scenarios for automatic measurement extraction. It's particularly useful in pre-fabrication applications where you need to extract measurements according to predefined standards. This can be applied to a variety of settings, such as offshore platforms, structural steel components, shipbuilding projects, modular construction elements, and even the manufacturing of large-scale equipment.
With this script, you can extract lengths and angles, compare them with nominal values, and generate detailed reports. Let's dive in and see how it works!
Before running the script, it's essential to establish some reference points. You can use spheres to mark the points that will serve as tie points. Start by using the standard Draw Sphere tool to place spheres at all the locations between which you need to extract measurements. Depending on the scenario, different snapping options might be more effective.
For instance, when working on an offshore platform, you might need to extract measurements between pipe joints. In this case, you can fit a cylinder into poitn cloud and use their intersections as snapping points. Alternatively, in other scenarios, the new Edge/Corner snapping tool can be useful, allowing you to create a sphere directly in the corner of a room, for example. Additionally, you can use spherical targets while scanning, which enables you to automatically fit spheres into the point cloud. These sphere targets could also be 3D printed and physically placed into cylindrical holes of steel components or positioned on their edges. This provides a practical way to integrate physical reference points directly into the fabrication process, ensuring precise alignment and measurement.
Once all spheres are defined, you can run the script. In the popup window, you'll see various options:
Create Reference Points in Sphere Centers
Length Measurements
Angle Measurements
Perpendicular Measurements
You have the option to select all checkboxes and run them simultaneously, or you can execute them one by one. However, it's crucial to follow the specific order. You cannot perform the Angle measurement before running the Length measurements, as this tool requires the lines created during the Length Measurement step.
Create Reference Points in Sphere Centers involves generating a vertex point at each sphere center and automatically assigning a name to it. This step is necessary to view all the names for the spheres, which will be required for the next step where we'll create a rule for length measurements based on these names.
Now you can see the names of each sphere and define the order for creating lines between them. Select the "Length Measurements" option and click the "Start Operations" button. In the popup window, you'll see two options:
Simple Measurement - This option allows you to create lines between specified points and extract their measurements.
All Analysis with Tolerances - This option creates lines with the same behavior as Simple Measurement but also compares the length of the line with a nominal value that you can define. If the line is within or outside the specified tolerance, it will be marked with a special color.
After choosing one of the above options, the script will ask you to select a scenario for line creation. You have three options:
Default Set
This uses a predefined rule for line creation, useful when you need to extract measurements consistently in a specific order. You can change this order directly in the MeasureAll_Length.js file. Look for this section
// Preset combinations
var presetCombinations = [
{
name: "🎯 Default Set",
pairs: [[1, 2], [2, 3], [4, 5], [1, 4], [8, 10], [2, 5], [7, 9], [3, 6], [5, 6]],
description: "Original predefined measurement pairs"
The numbers in the brackets represent sphere names. Each pair of spheres will be used to generate a line. For example, [8, 10] means a line will be generated between the 8th and 10th spheres. You can change this order or add more pairs for line generation.
Sequential Pairs
Lines between spheres will be created in sequential order based on their names, from the 1st to the 2nd, from the 2nd to the 3rd, from the 3rd to the 4th, and so on, up to the 10th. You can change the maximum number of spheres in the MeasureAll_Length.js file. Modify it here:
{
name: "📏 Sequential Pairs",
pairs: [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]],
description: "Connect consecutive spheres in order"
},
Custom Selection
This option allows you to create your custom rule. You'll see available options for each sphere in the next window. For example, you can select checkboxes with all points for Sphere 1 where you'd like to create lines, and then do the same for Sphere 2, Sphere 3, etc.
Once you've defined the order, click "Continue," and the script will extract the lines in your specific order, creating a label for each line with its length value.
If you selected "All Analysis with Tolerances" in the first step, after setting the line order, another window will prompt you to specify the nominal value for each length and the tolerance used for marking the label and line. For example, you can define that the nominal length between spheres should be 8.5m, with a tolerance of 1cm for good values (green), 2cm for warnings (yellow), and anything above marked in red as error.
After performing the measurements, you'll see that lines are created and colored based on their difference from nominal values. Labels for each line will include information about length, nominal value, difference, and status. Additionally, a relevant report page will be generated.
Of course, all these measurements could be extracted manually, but this approach would be very inconvenient, especially when comparing them with nominal values. In my scenario, I need to use different nominal values for each line, which makes manual extraction tedious and repetitive. Automating this process saves time and ensures consistency, especially when extracting the same set of measurements repeatedly.
Now that we have the lines created, we can proceed to extract angles and perpendiculars. Keep in mind that these options will not work before the lines are defined, as they rely on the presence of lines for their calculations.
Run the "Angle Measurements" option, and you'll see options similar to those you encountered earlier for lines:
Simple Measurement
This option allows you to calculate angles between specified pairs of lines without additional comparisons.
All Analysis with Tolerances
This option calculates angles between lines but also compares the results with nominal values that you can define. If the angle is within or outside the specified tolerance, it will be marked with a corresponding color.
Next, define the order for angle extraction. The script will display all available options for each pair of lines. Each line will have a name based on its points. For example, a line between the 8th and 10th spheres will be named L8_10_Line. If you need to adjust the predefined order, you can edit the MeasureAll_Angles.js file.
After defining the order, specify the nominal values for each angle and its tolerance. For instance, you might define a nominal angle of 90° with a tolerance of ±1° for good values (green), ±2° for warnings (yellow), and anything outside this range marked as red.
Results
As a result, the script will generate arcs based on the selected pairs of lines. Each arc will have a label displaying the angle value, nominal value, tolerance, difference, and status. Additionally, a relevant report page will be created, similar to the length measurement scenario.
For the Perpendicular measurements, the process is very similar to the previous steps. You'll see the same options:
Simple Measurement - This option allows you to calculate perpendicular distances without comparing them to nominal values.
All Analysis with Tolerances - This option calculates perpendicular distances and compares them with nominal values that you define. Based on the tolerance, the results are marked with corresponding colors.
Define the Order: The main difference in this step is that the script will ask you to specify a pair consisting of a point and a line. For example, you might select a point (e.g., Sphere 8) and a line (e.g., L8_10_Line). The script will then calculate the perpendicular distance from the selected point to the specified line.
Add Nominal Values and Tolerances: Just like with length and angle measurements, you can define nominal values for each perpendicular measurement and specify tolerances. For instance, you could set a nominal perpendicular distance of 3.2m with a tolerance of ±1cm for good values (green), ±2cm for warnings (yellow), and anything beyond that marked in red.
Results
Once the perpendicular measurements are extracted, the script will generate lines representing the perpendiculars, colored based on their status (within tolerance, warning, or out of tolerance). Each line will have a label displaying the perpendicular distance, nominal value, tolerance, difference, and status.
Additionally, a relevant chapter will be added to the report, summarizing all the perpendicular measurements, their differences from nominal values, and their statuses.
Once you've completed all your measurements, you can organize your work by creating preferred views for each type of measurement. After that, navigate to the Report Generation tab to start building your own report.
Layout Settings
In the Layout section, you can customize the page list settings, such as:
Page size
Orientation
Header or Footer
Chapters Overview
In the Chapters tab, you'll see that separate pages have already been created for different types of measurements, including:
Lines
Angles
Perpendicular measurements.
Data Tables
In the Data tab, you'll find separate tables automatically generated for each type of measurement. These tables will serve as the foundation for your report.
Built Reports: Drag the relevant views into the report window. Adjust the view settings, such as:
Background color
Label size and position
Scale, etc.
Insert Data Tables: Drag and drop the corresponding tables from the Data tab into your report.
If needed, include additional dashboards to enhance your report. Once everything is set up, you can finalize your report and export it as a PDF for printing or sharing.
And that's it! You're now ready to create professional reports with customized views and data tables.