3.1. Install Engineering Sketch Pad (ESP)

Engineering Sketch Pad is used to model geometry throughout the design process.

In this page you can find step-by-step instructions on how to:

  1. Install Engineering Sketch Pad (ESP)

  2. Compile Edge Attribute Plugin

  3. Compile Engineering Sketch Pad (ESP)

3.1.1. Prerequisites

The most important prerequisite for ESP is OpenCASCADE (included with pre-built versions). The recent ESP release only supports the versions marked 7.4.1 and 7.6.0, which are available at ESP’s website. Another prerequisite is a WebGL/Websocket capable browser. For example, Mozilla’s Firefox, Google Chrome and Apple’s Safari. CAPS depends on UDUNITS2 and Python.

3.1.2. Install Pre-Built Versions

In order to install ESP, please follow the instructions below relevant to your operating system:

3.1.2.1. Linux and MAC OS

  1. Download the pre-built ESP file for Linux or for MAC OS from above. For example for Linux:

wget https://acdl.mit.edu/ESP/PreBuilts/ESP121Lin.tgz
  1. Unpack the tar file in your desired location. There must be no space in the path to the installation directory.

% cd <TheDirecoryThatContainsESP.tgz>
% tar xvzf ESP121Lin.tgz

The *.tgz file can be deleted, if you wish. The unpack distribution includes OpenCASCADE and Python.

  1. Open a terminal and direct to the installation directory and setup the ESP.

% cd ESP121
% ./setup.sh
  1. Source the ESP environment in your terminal.

% source EngSketchPad/ESPenv.sh
  1. Test running ESP by issuing the below command:

% serveCSM EngSketchPad/data/tutorial1.csm

3.1.2.2. Windows

  1. Download the pre-built ESP *.exe file from the above section.

  2. Run the install file and select your desired directory for ESP to be unpacked. Please note that the desired path must not include spaces (eg, C:Program Files). The *.exe file can be deleted, if you wish. The unpack distribution includes OpenCASCADE and Python.

  3. From Start search for “environment” and select ‘Edit environment variables for your account’. Under User variables, select Path and click Edit. In the example below replace <path> with the appropriate path to where ESP was extracted in the previous step. Click on New and copy-paste the ESP directory path into the new row. Click OK and OK.

C:\<path>\ESP121\EngSketchPad\bin
  1. Open a Command Prompt as administrator, direct to ESP’s root directory, and set the environment for ESP.

cd C:\<path>\ESP121
.\ESPenv.bat
  1. Test running ESP by issuing the below command in the Command Prompt:

% serveCSM EngSketchPad/data/tutorial1.csm

3.1.2.3. Windows Subsystem for Linux (WSL)

  1. From the Microsft Store, find Ubuntu-22.04 LTS and install it. Then, open the Ubuntu-22.04 terminal as administrator. Follow the below commands in terminal:

% sudo apt update
% sudo apt upgrade
% sudo apt-get install firefox

After installing Firefox, make sure you can launch it from the terminal. In the event that you cannot launch Firefox from WSL, ensure that WSL is updated to the latest version and restart it.

To update WSL, from a Command Prompt or PowerShell (not Ubuntu terminal):

% wsl --update
% wsl --shutdown
  1. After installing Firefox and confirming launch from the Ubuntu terminal, follow the ESP installation procedure in the previous section Linux and MAC OS within the Ubuntu terminal.

Note

The above instruction is tested on Windows 11. If you use WSL to install ESP, please make sure you can launch GUI app from your terminal.

3.1.3. Compile Edge Attribute Plugin

The Flow360 automated meshing workflow requires an additional plugin for ESP. The Edge Attribute plugin can be retrieved from Flexcompute’s GitHub repository:

git clone https://github.com/flexcompute/EngineeringSketchPad.git
mv EngineeringSketchPad/PlugIn .
rm -rf EngineeringSketchPad

Or in Windows:

git clone https://github.com/flexcompute/EngineeringSketchPad.git
move EngineeringSketchPad\PlugIn .
rmdir /s EngineeringSketchPad

3.1.3.1. Linux and MAC OS

After installing ESP for Linux and MAC OS, make sure the terminal has the ESP’s environment and go to the directory where the Plugin is downloaded. If the terminal doesn’t have the environment, you can source the environment and compile the Edge Attribute Plugin:

cd <DirectoryContainingPlugIn>/PlugIn/EdgeAttr/
make

3.1.3.2. Windows

  1. We use Microsoft Visual Studio in order to build the EdgeAttr Plugin. Make sure that you have installed Python3. You can download Microsoft Visual Studio 2022 Community from https://visualstudio.microsoft.com/downloads/.

  2. After downloading the Visual Studio Installer, launch it and check “Desktop development with C++”. Prior to installing take note of the Windows SDK version on the right panel (eg, 10.0.19041.0). Select install.

  3. Next, open a Command Prompt and execute the following commands to set the required Visual Studio variables. The ‘x64’ below is your machine architecture and ‘10.0.19041.0’ is the Windows SDK version.

cd C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\
.\vcvarsall.bat x64 10.0.19041.0
  1. Open a Command Prompt and make sure it has ESP’s environment. If the Command Prompt doesn’t have the environment, you can set the environment in Windows.

  2. In the Command Prompt go to the directory where the Plugin is downloaded and compile it:

cd PlugIn\EdgeAttr
nmake -f NMakefile

3.1.3.3. Windows Subsystem for Linux (WSL)

Building the Edge Attribute Plugin on Windows Subsystem for Linux (WSL) is similar to compiling edge attribute plugin in Linux and MAC OS.

3.1.3.4. Test the Edge Attribute Plugin

To test if the EdgeAttr Plugin is built correctly, in the same terminal or Command Prompt and the same directory where the plugin is built, issue the following command:

serveCSM test.csm

The ESP GUI should open in a browser window. Turn off Viz for faces from the Body tree on the left. Hold the mouse pointer on an edge (i.e. with green colors) and press 6. In the message panel, you should see EdgeName= String for the selected edge (e.g. Body 9 Edge 4).

3.1.4. Compile

This section explains how to build the ESP step-by-step as a software relevant to your operating system.

3.1.4.1. Linux and MAC OS

  1. From the ESP’s website download the *.tgz file according to your machine and unpack it in your desired directory. There must be no space in the path.

  2. In order to built the software follow the instruction:

% cd EngSketchPad/config
% ./makeEnv <path_of_OpenCASCADE_directory_containing_inc_and_lib>

This procedure produces two files at the top level including: ESPenv.sh and ESPenv.csh. They can be used to source the ESP environment. In order to build the ESP, the terminal must contains ESP’s environment.

For example, if you are using csh or tsch:

% source ESPenv.csh

or if you are using bash/zsh:

% source ESPenv.csh
  1. From the terminal go to the source directory and compile the software:

% cd EngSketchPad/src
% make

3.1.4.2. Windows

In order to compile the ESP in windows we use Microsoft Visual Studio. This section explains how to install and setup the Microsoft Visual Studio.

  1. Download the pre-built ESP *.exe file from ESP’s website and unpack it your desired directory that doesn’t have space in the path.

  2. Open a Command Prompt and issue the below commands to compile the software.

cd C:\<path>\ESP121\EngSketchPad\config
.\bash.exe winEnv C:\path\to\ESP_ROOT\OpenCASCADE-7.6.0
cd ..
.\ESPenv.bat
cd src
.\make.bat

3.1.4.3. Windows Subsystem for Linux (WSL)

Building ESP in Windows Subsystem for Linux (WSL) is similar to compiling ESP in Linux and MAC OS.