Explore the scripting journey in Leica Cyclone 3DR
Capture and deliver 3D data faster with total reliability
Leica Cyclone 3DR is an extension of the Leica Cyclone product family, used to create the final deliverables from reality capture data, for example extracting the one piece of information needed out of millions of point clouds. One of the key features of Cyclone 3DR is the ability to create scripts that automate the processing of scan data. Through scripts, complex problems are solved with user-friendly tools, so that 3D data can be analysed with total reliability.
Scripts are customisable pieces of code that can be created within software to help automate and complete repetitive tasks, or to simplify complex tasks. They essentially create shortcuts for the user so that processes can be completed in a few clicks. Using scripts has many benefits: from saving time, to reducing human error and even making reality capture more accessible to new users. In this expert insight - the first of two articles in our series on Scripting in Cyclone 3DR - Yannick Stenger, the Product Manager at Hexagon, Leica Cyclone 3DR, explains how scripting works, how it benefits users and where to find more information to get started.
The freedom to write code for your regular tasks
Leica Cyclone 3DR is our all-in-one deliverable solution for reality capture workflow at the office. Part of the Cyclone family of software, it offers a user-friendly interface to process any kind of scan data to get deliverables for Scan to Verify or Scan to Model operations. Cyclone 3DR provides a large and flexible range of tools to allow users to create the deliverables they need. In addition to all the features and commands accessible from the product interface, the application also provides a scripting interface.
The scripting interface lets you write codes to execute any kind of regular Cyclone 3DR tasks. This includes actions like: cleaning, meshing, inspection or modelling, manipulating 3D objects, defining function parameters, generating customised analysis reports or delivering 2D and 3D models.
Since a script code is defined according to the end-user’s needs, the possibilities within the Cyclone 3DR ecosystem are unlimited. Scripting enables a path to build on-demand operations. It lets users create workflows composed of 3DR functions that are scheduled step by step and that are adjusted with whatever options or parameters are required to get the most accurate result for each specific job.
How to create your script in Cyclone 3DR
Each class contains a series of functions which can be used to process 3D objects. These functions include cleaning, reduction, extraction, meshing, comparison, reporting and file exchange. In this way, any regular 3DR workflow can be executed with a script.
Why create a script?
The key benefits of using scripting are to streamline workflows and automate repetitive tasks. Whatever industry you are in and whatever your scanning task, there will always be sub-tasks that need to be repeated. Although each job is unique, the processes will be the same to achieve similar deliverables for multiple and various projects. For those processes, using a script immediately results in efficiency by automating basic tasks. The script for a specific task only needs to be executed once at the beginning of using Cyclone 3DR. From then on, the job becomes a series of clicks for the users, based on the instructions of the script.
To bring even more automation and to reduce the human interaction in repetitive processes, Cyclone 3DR scripting capacity also offers a batch-mode execution, meaning that operators don’t need to open the Cyclone 3DR desktop application to get their final deliverable. This means that 3D data processing in cyclone 3DR through scripting can be part of a wider data processing environment.
Another benefit of automating repetitive tasks is reliability: reducing human error. Thanks to the consistency of a computer code, repeated operations are executed with the same parameters and with the same procedure. That means that the risk of errors coming from human interventions is removed, bringing robustness to the processes that are scripted.
Scripts create time savings straight away. Since workflows can be fully streamlined and executed with a few basic clicks, the operator interventions that would be requested by the Cyclone 3DR application are removed from the daily part of the job. That allows operators to execute calculations whenever it is relevant in their organisation and also while they achieve other kinds of tasks or even with the script doing the work for them while they are off-duty.
Using scripts to create unique solutions
One of the main benefits of the script experience is the possibility for users to create solutions that may not exist in the product interface. By using scripts, users can create their own unique solutions, totally adjusted to the job requirements. Each function in the script can be edited with custom parameters to extract the best from the process.
Moreover, scripting can be leveraged to create an on-demand user-interface that meets the knowledge and the expertise of the end users at a company. Even to create tools that are accessible for other colleagues who are new to Cyclone 3DR, or new to reality capture. Users can choose for themselves the most appropriate options when they want to deliver results for different kinds of projects but with the same core features.
The Cyclone 3DR package includes by default a group of predefined scripts that are automatically saved as favourites. The most popular predefined script is the Curb Extraction tool. The purpose of the Curb Extraction script is simply to extract edges from a point cloud. It fits perfectly for the modelling of roads, streets and corners in urban environments. For the Road industry, this tool is powerful to extract polylines of road edges when Scan to Model jobs are required.
There are predefined scripts available for a wide range of industries. Some examples of those suitable for rail, for example, include electric and railway lines extraction and collision volume avoidance for tunnels. The collision avoidance script calculates the tunnel dimensions required for each point along the railway track using a Boolean operation that sums up carriage width and heights. It’s a complex calculation, solved with a zero user clicks thanks to the script.
Examples of other scripts available are: to import a *.3dr project in the same open session of Cyclone 3DR, to replay a saved matrix of alignment, to apply conditional colours to an inspected cloud or to mesh trees in order to estimate the volume of their crown. These scripts are editable so you can start from them and customise them to your own application. You can also use scripts shared by other users on our sharing platform.
We know that customers have been using scripting for a wide range of industries, from maintenance of infrastructure for telecoms to sewers to the verification of facades in vertical construction. Another common use is for the verification of as-built manufacturing parts in production factories. In our upcoming article in this series on scripting, I talk to Olivier Côté, Reality Capture Solutions Consultant at R-E-A-L.IT about how his company uses scripting to create standard, repeatable workflows for its clients to save them time and ensure accuracy.
For users interested in scripting we provide a range of documents and training materials to get you started. For easy to digest tutorials, check out our Cyclone 3DR Scripting YouTube Playlist. Our comprehensive document centre includes links to lots of resources, including: a style guide explaining the class architecture and code syntax to write scripts; Frequently Asked Questions to help beginners; and some tutorials to browse advanced components in the script API such as reporting. There is also a public hub where users can share scripts - the Cyclone 3DR public GitHub - and the Laser Scanning Forum offering expert advice.
In the long term, as part of Hexagon’s mission to make reality capture available to more people, we plan to deliver a visual scripting interface allowing Cyclone 3DR users with no computer skills to leverage the power to automation without writing a line of code. And using generative AI in some capacity is definitely on our radar. Watch this space. Visit Leica Cyclone 3DR for more information and further resources.
Product Manager, Leica Cyclone 3DR
Reality Capture Division