A Python-based automation framework built using PyCATIA for optimizing CATIA V5 models by automatically cleaning geometry, consolidating surfaces, removing unnecessary entities, and preparing CAD data for visualization and XR workflows.
Engineering teams often receive CAD models containing:
- Excessive surface fragmentation
- Redundant construction geometry
- Unused parameters
- Sketch entities
- Inconsistent geometry organization
Manual cleanup can be time-consuming and error-prone.
This tool automates the optimization process by traversing CATIA Hybrid Bodies, joining surfaces, cleaning unused geometry, preserving visual properties, and generating optimized output models.
Processes multiple CATPart files automatically from a source directory.
- Detects Hybrid Shapes
- Creates Join operations
- Consolidates fragmented surfaces
- Removes redundant geometry
Automatically traverses nested Hybrid Bodies and processes them recursively.
- Samples existing surface colors
- Preserves appearance during optimization
- Reapplies colors to generated geometry
Removes:
- Lines
- Curves
- Circles
- Sketch geometry
- 2D entities
Deletes predefined parameters such as:
- BackCircle
- FrontCircle
- RoadLine
- ACTIVE_AREA
Generates:
- Hybrid Bodies Processed
- Shapes Joined
- Shapes Deleted
- Parameters Deleted
- Geometry Cleanup Statistics
- Processing Time
Input CATPart Files
│
▼
Open in CATIA V5
│
▼
Scan Hybrid Bodies
│
▼
Join Geometry
│
▼
Preserve Colors
│
▼
Delete Redundant Shapes
│
▼
Remove Parameters
│
▼
Remove 2D Geometry
│
▼
Save Optimized CATPart
│
▼
Generate Summary Report
| Technology | Purpose |
|---|---|
| Python | Core Automation |
| PyCATIA | CATIA V5 Automation API |
| NumPy | Data Utilities |
| tqdm | Progress Tracking |
| Threading | User Feedback / Progress Animation |
This tool is useful for:
- CAD Data Preparation
- XR Model Preparation
- Visualization Pipelines
- Digital Twin Workflows
- Design Review Environments
- Engineering Data Cleanup
- Automotive CAD Optimization
Hybrid Bodies Processed: 45
Stable Shapes Joined: 312
Unstable Shapes Joined: 78
Shapes Deleted: 390
Parameters Deleted: 8
2D Geometries Deleted: 52
Processing Time: 14.8 seconds
git clone https://github.com/YOUR_USERNAME/cad-workflow-automation.git
cd cad-workflow-automationpip install -r requirements.txt- CATIA V5
- Python 3.10+
- PyCATIA
Update source and destination folders:
source_folder = r"C:\Input"
destination_folder = r"C:\Output"Run:
python cad_workflow_automation.py- AI-assisted geometry classification
- Automated CAD quality scoring
- Optimization recommendations using LLMs
- Intelligent component grouping
- CAD analytics dashboard
- LangChain-powered engineering assistant
Praveen Mark
Automation Engineer | Python Developer | XR & Engineering Workflow Automation