OpenFOAM GUI Screening Task
Author: Kasim
Date: February 2026
This guide walks you through installing both parts of the screening task: a Python binary tree package and a Blender addon. The whole process should take about 10-15 minutes.
Task 1 - Binary Tree Package: A Python library for working with binary tree data structures, with built-in YAML file support for saving and loading trees.
Task 2 - Blender Addon: A tool for creating and managing cube arrays in Blender, with intelligent merging features for building geometric structures.
- Python 3.7 or newer
- pip (Python package installer)
- About 5 MB of disk space
- Works on Windows, Linux, and macOS
- Blender 3.0 or newer
- About 1 MB of disk space
- Works on Windows, Linux, and macOS
# Navigate to the package folder
cd binarytree_package
# Install it
pip install -e .
# Test that it works
python -c "from binarytree import Node; print('Success!')"If you see "Success!" printed out, you're all set!
First, make sure you have Python 3.7 or newer:
python --versionIf you see something like "Python 3.9.7" or any version 3.7 or higher, you're good to go.
If you need to install Python:
- Windows: Download from python.org
- Linux: Run
sudo apt install python3 python3-pip - macOS: Run
brew install python3(if you have Homebrew)
You'll also need pip (it usually comes with Python):
pip --versionIf pip isn't installed:
python -m ensurepip --upgradeThere are a few ways to install the package. I recommend the first method:
Method 1: Development Mode (recommended)
This creates a link to your source code, so any changes you make will take effect immediately:
cd binarytree_package
pip install -e .Method 2: Standard Installation
This copies the files to your Python installation:
cd binarytree_package
pip install .Method 3: User Installation (if you don't have admin rights)
cd binarytree_package
pip install --user -e .The package needs PyYAML to work with YAML files. It should install automatically, but if it doesn't:
pip install pyyamlLet's make sure everything works:
Test 1: Can you import it?
python -c "from binarytree import Node, BinaryTree; print('Imports work!')"Test 2: Does it actually work?
python << EOF
from binarytree import BinaryTree
tree = BinaryTree()
tree.insert("", 10)
tree.insert("L", 5)
tree.insert("R", 15)
assert tree.count_nodes() == 3
print("Everything works!")
EOFTest 3: Run the full test suite
cd binarytree_package
python tests/test_comprehensive.pyYou should see a bunch of checkmarks and "ALL TESTS PASSED" at the end.
"pip: command not found"
Try using python -m pip instead:
python -m pip install -e ."Permission denied"
Use the user installation method:
pip install --user -e .Or create a virtual environment (see the section below).
"ModuleNotFoundError: No module named 'binarytree'"
Check if it's installed:
pip list | grep binarytreeIf it's not there, try installing again. If it is there but imports still fail, you might have multiple Python installations. Try:
which python # Linux/macOS
where python # WindowsThen use that specific Python path to install.
Virtual environments keep your project dependencies separate. Here's how to set one up:
# Create the virtual environment
python -m venv tree_env
# Activate it
source tree_env/bin/activate # Linux/macOS
tree_env\Scripts\activate # Windows
# Install the package
cd binarytree_package
pip install -e .
# When you're done working
deactivate- Open Blender (version 3.0 or newer)
- Go to Edit → Preferences → Add-ons
- Click "Install..." and select
kasim_blender_addon/__init__.py - Enable "OpenFOAM Cube Array Manager" by checking the box
To use it: Press N in the 3D Viewport, then click the "Cube Array" tab.
Open Blender and go to Help → About Blender. You need version 3.0 or newer.
If you need to download Blender, get it from blender.org. Versions 3.6 or 4.0+ are recommended.
Step 1: Open Preferences
You can do this in three ways:
- Menu: Edit → Preferences
- Quick: Press F4, then P
- Search: Press F3, type "preferences", hit Enter
Step 2: Go to Add-ons
Click the "Add-ons" tab on the left side of the Preferences window.
Step 3: Install the File
- Click the "Install..." button in the top right
- Navigate to where you extracted the files
- Go into the
kasim_blender_addonfolder - Select the
__init__.pyfile (important: select the file, not the folder) - Click "Install Add-on"
Step 4: Enable It
- In the search box, type "OpenFOAM" or "Cube Array"
- You should see "OpenFOAM Cube Array Manager"
- Check the box next to it
- The addon is now active!
Step 5: Find the Panel
- Go to the 3D Viewport (the main window with the grid)
- Press N to open the sidebar
- Look for a tab called "Cube Array"
- Click it to see the tools
Let's test that everything works:
Test 1: Can you see the panel?
Press N in the 3D Viewport and look for the "Cube Array" tab. If you see it, you're good!
Test 2: Create a test array
- Set "Number of Cubes" to 4
- Click "Create Cube Array"
- You should see 4 cubes appear in a 2×2 grid
Test 3: Try the range validation
- Set "Number of Cubes" to 25
- Click "Create Cube Array"
- You should get an error message saying "The number is out of range"
If all three tests work, you're all set!
Addon doesn't appear in the add-ons list
- Make sure you selected
__init__.py, not the folder - Check that you're using Blender 3.0 or newer
- Look at the console for error messages (Window → Toggle System Console)
Addon won't enable
- Open the system console and try to enable it again
- Look for Python error messages
- Make sure no other addon is conflicting with it
Can't see the "Cube Array" tab
- Press N to make sure the sidebar is visible
- Verify the addon is enabled in Preferences
- Make sure you're in the 3D Viewport, not another editor
Buttons don't do anything
- Make sure you're in Object Mode (check the top left of the viewport)
- For delete/merge operations, you need to select objects first
- Check the console for error messages
If the standard installation doesn't work, you can manually copy the addon:
Find Blender's addon folder:
- Windows:
C:\Users\YourName\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\ - Linux:
~/.config/blender/3.6/scripts/addons/ - macOS:
~/Library/Application Support/Blender/3.6/scripts/addons/
(Replace "3.6" with your Blender version)
Copy the folder:
# Linux/macOS
cp -r kasim_blender_addon ~/.config/blender/3.6/scripts/addons/
# Windows Command Prompt
xcopy kasim_blender_addon "%APPDATA%\Blender Foundation\Blender\3.6\scripts\addons\kasim_blender_addon\" /E /IThen restart Blender and enable the addon in Preferences.
Try creating your first tree:
from binarytree import BinaryTree
tree = BinaryTree()
tree.insert("", 10) # Root node
tree.insert("L", 5) # Left child
tree.insert("R", 15) # Right child
tree.print_tree()
print(tree.inorder()) # [5, 10, 15]For more details, see README_TASK1.md.
Try creating your first array:
- Press N in the 3D Viewport
- Click the "Cube Array" tab
- Set "Number of Cubes" to 9
- Click "Create Cube Array"
You should see a 3×3 grid of cubes appear!
For more examples and details, see README_TASK2.md.
pip uninstall binarytree_kasimTo completely clean up:
pip uninstall binarytree_kasim -y
pip cache purge- Open Blender
- Edit → Preferences → Add-ons
- Find "OpenFOAM Cube Array Manager"
- Click the arrow to expand it
- Click "Remove"
- Restart Blender
- Read error messages carefully - they usually tell you what's wrong
- Check versions - make sure you meet the requirements
- Try a fresh install - sometimes starting over helps
- Use virtual environments - they prevent a lot of problems
Windows:
- Hidden folders: Enable "Show hidden files" in File Explorer
- Python command: Try both
pythonandpy - Paths: Use either
\or/in file paths
Linux:
- Python command: Usually
python3instead ofpython - Hidden folders: Press Ctrl+H in file manager
- Permissions: Use
--userflag if you're not root
macOS:
- Library folder: Press Shift+Cmd+G in Finder, then type the path
- Python: System Python or Homebrew Python both work
- Paths: Don't use sudo, use
--userinstead
If you run into problems:
- Check the error message carefully
- Look at the troubleshooting section above
- Review the detailed guides:
- README_TASK1.md for the Python package
- README_TASK2.md for the Blender addon
- Check the console output for more details
Before you start using the tools, make sure:
- Python 3.7+ is installed
- Package installs without errors
- You can import modules (
from binarytree import Node) - Basic tests pass
- Test suite runs successfully
- Blender 3.0+ is installed
- Addon appears in preferences
- Addon is enabled (box is checked)
- "Cube Array" tab shows up when you press N
- Test array creates successfully
# Install
pip install -e .
# Verify
python -c "from binarytree import Node; print('OK')"
# Test
python tests/test_comprehensive.py
# Uninstall
pip uninstall binarytree_kasimInstall: Edit → Preferences → Add-ons → Install → Select __init__.py
Enable: Check the box next to the addon
Access: Press N → Click "Cube Array" tab
Test: Set cubes to 9, click Create
That's it! Both tasks should now be installed and ready to use. The whole process takes about 10-15 minutes, and you'll need about 6 MB of disk space total.
If you want to learn how to use these tools, check out the README files for each task.