A comprehensive guide for setting up and deploying the iTwinC Modeler Engine on a Linux system.


 

Table of Contents

Introduction

This document provides a comprehensive guide for setting up and deploying the iTwin Capture Modeler Engine on a Linux system. By following this guide, users will be able to successfully install, configure, and run the iTwin Capture Modeler Engine and execute Automaster for project processing.

Prerequisites

Environment Setup

Step 1: Create Directories

Create directories to store job queues and temporary files. These directories will help organize your files and make the installation process smoother.

  1. Open Terminal: Press Ctrl + Alt + T to open the terminal.
  2. Create Job Queue Directory:
    • Type the following command and press Enter:

      mkdir -p ~/jobqueue
    • This command creates a new directory called jobqueue inside the home directory.

Step 2: Set Environment Variables

Environment variables are used to configure the iTwin Capture Modeler. Lets setup the necessary environment variables so that the software knows where to find the job queue and temporary files.

  1. Open the Bash Configuration File:
    • Use your preferred text editor to open the bash configuration file (~/.bashrc). (Note : Nano is used for this Guide)
  2. Add Environment Variables:

Save and Exit: - If using Nano, to save the file, press Ctrl + O and then press Enter. - If using Nano, to exit the text editor, press Ctrl + X.

Apply the Changes: - Type the following command and press Enter to apply the changes:

source ~/.bashrc

Step 3: Verify Environment Variables

It’s important to verify that the environment variables are set correctly.

  1. Check Environment Variables:
    • Type the following command and press Enter | Note: Replace “XXX” with the appropriate edition (“DESKTOP” or “CENTER”)::

      echo $CC_XXX_JOBQUEUE
      echo $CC_XXX_LICENSING_ACCESSKEY
      echo $CC_XXX_LICENSING_AGNOSTIC_ULTIMATEID
      echo $TEMP

      The output should display the paths you set for each variable.

Troubleshooting Tips

cp ~/.bashrc ~/.bashrc_backup

Installation Steps

Step 1: Download the Installation Package

  1. Download the Installation Package:
    • First, download the iTwin Capture Modeler installation package (.deb file) from the official Bentley website or your provided link.
    • Place the downloaded .deb file in a directory of your choice, for example, /tmp.

Step 2: Install the .deb File

  1. Open Terminal: Press Ctrl + Alt + T to open the terminal.
  2. Navigate to the Directory:
    • Navigate to the directory where you placed the downloaded file:

      cd /tmp
  3. Install the .deb File:
    • Instead of using dpkg, use the apt command to install the package, which automatically manages and installs any missing dependencies:

      sudo apt install ./itwincapturemodeler???_YY.MM.mm.pp-1_x64.deb -y

Step 3: Verify the Installation

  1. Verify Installation:
    • To confirm that iTwin Capture Modeler has been installed correctly, open a terminal and run the following command:

      iTwinCaptureModelerEngine --version
    • This command will display the version of the iTwin Capture Modeler Engine, confirming that the installation was successful.

  2. Locate Additional Resources:
    • While the executable is accessible globally, you may want to access the SDK and sample files located in the installation directory:

      ls /opt/iTwinCaptureModeler/sdk

    This step is optional but useful if you need to explore or utilize additional resources provided with the installation.

Troubleshooting Tips

Installing Python and iTwin Capture Modeler Python SDK

This section will guide you through installing Python and the iTwin Capture Modeler Python SDK on your Linux system.

Step 1: Install Python 3.10

  1. Update Package Lists:
    • Open a terminal and update your package lists:

      sudo apt update
  2. Install Dependencies:
    • Install the necessary dependencies for adding new repositories:

      sudo apt install -y software-properties-common
  3. Add the Deadsnakes PPA:
    • Add the Deadsnakes PPA, which contains newer Python versions:

      sudo add-apt-repository ppa:deadsnakes/ppa
      sudo apt update
  4. Install Python 3.10:
    • Install Python 3.10:

      sudo apt install -y python3.10 python3.10-venv python3.10-dev
  5. Verify the Installation:
    • Check the Python version to ensure it’s installed correctly:

      python3.10 --version
  1. Create a Virtual Environment:
    • Navigate to the directory where you want to create the virtual environment and run:

      python3.10 -m venv myenv
  2. Activate the Virtual Environment:
    • Activate the virtual environment:

      source myenv/bin/activate
  3. Upgrade pip:
    • Upgrade pip to the latest version within the virtual environment:

      pip install --upgrade pip

Step 3: Install the iTwin Capture Modeler Python SDK

  1. Install the SDK Package:
    • You can install the iTwin Capture Modeler Python SDK directly using pip without navigating to the SDK directory. Open your terminal and run the following command:

      pip install /opt/itwincapturemodeler/sdk/itwincapturemodeler-YY.MM.mm.pp-cp310-cp310-linux_x86_64.whl

    Replace itwincapturemodeler-YY.MM.mm.pp-cp310-cp310-linux_x86_64.whl with the actual file name of the SDK package.

  2. Verify the Installation:
    • To ensure the SDK was installed correctly, you can check the installed packages by running:

      pip list
    • Look for the iTwin Capture Modeler SDK in the list to confirm it is installed.

Troubleshooting Tips

Running the Engine & Automaster.py

Step 1: Running the iTwin Capture Modeler Engine

  1. Open a Terminal:
    • Press Ctrl + Alt + T to open a new terminal window.
  2. Run the Engine:
    • Start the engine by typing the following command in the terminal.

      iTwinCaptureModelerEngine

      This command will launch the iTwin Capture Modeler Engine using the global path settings, which should already be configured during installation

Step 2: Setting Up automaster.py

  1. Download Sample Data (Optional):
    • You can use the provided sample data or your own data.

    • To use the sample data, download it from the provided link: Download Sample Data

    • Extract the downloaded data to a directory of your choice. For example:

      mkdir -p ~/SampleData
      tar -xzf path_to_downloaded_file -C ~/SampleData
  2. Prepare automaster.py:
    • Copy the automaster.py script from the installation directory to a working directory in your home folder:

      cp /opt/itwincapturemodeler/sdk/samples/automaster.py ~/MyProjects/
    • Navigate to the directory where you copied the script:

      cd ~/MyProjects
  3. Edit automaster.py:
    • Open the automaster.py script in a text editor:

    • Replace the paths with your local references. If you are using the sample data:

      photosDirPath = '~/SampleData/Photos'
      projectDirPath = '~/Projects/automaster'
    • If you are using your own data, set the photosDirPath and projectDirPath to your data directories:

      photosDirPath = '/path/to/your/photos'
      projectDirPath = '/path/to/your/project'
    • Save the file by pressing Ctrl + O and then Enter. Exit the text editor by pressing Ctrl + X.

Step 3: Running automaster.py

  1. Open a New Terminal:
    • Open a new terminal window by pressing Ctrl + Alt + T.
  2. Activate Virtual Environment (Optional):
    • If you set up a virtual environment, activate it:

      source ~/myenv/bin/activate
  3. Navigate to the directory:
    • Navigate to the directory where you copied the script: containing automaster.py:

      cd ~/MyProjects
  4. Run automaster.py:
    • Execute the script using Python:

      python3 automaster.py
  5. Monitor the Output: > The script will process the sample data (or your data) and generate output in the specified project directory. Monitor the terminal output for progress and any potential errors.

Troubleshooting Tips

Network Whitelist Requirements

To ensure the smooth and uninterrupted operation of iTwin Capture Modeler, it is mandatory to whitelist the following URLs within your organization’s network. These URLs are essential for authentication, licensing, data management, and auxiliary services critical to the product's functionality. Failure to whitelist these URLs may result in restricted access to key features or disruptions in service.

Core Services

OIDC

URL: https://imsoidc.bentley.com/
Description: Manages authentication and authorization services.

IMS

URL: https://ims.bentley.com/
Description: Identity Management System for user accounts.

Data and Reality Management

Reality Management API

URL: https://connect-realitydataservices.bentley.com
Description: Used for reality data management and services.

Reality Analysis API

URL: https://api.bentley.com/realitydataanalysis
Description: Supports analysis of reality datasets.

APIs

iTwin APIs

URL 1: https://api.bentley.com/itwins
URL 2: https://api.bentley.com/accesscontrol
Description: APIs for managing and accessing iTwin models and resources.

Miscellaneous Resources

Camera Database

URL: http://www.acute3d.com/s3c_resources/CameraDB_2.bin
Description: Resource file for camera metadata.Community Forum