Skip to content

Clash Detection Export

KaiUR edited this page May 22, 2026 · 4 revisions

Clash Detection Export

File: Product_Document_Scripts/Clash_Detection_Export.py
Version: 1.1
Document Type: Product


Description

Runs an interference/clash detection analysis on the active CATProduct using the SPA (Space Analysis) workbench and exports all detected conflicts to a CSV file. The script creates or reuses a clash check set named Python_Clash_Check, sets it to check all components against all others, runs the analysis, and iterates the results. Results are shown in a wx dialog. Detected clashes, contacts, and clearance violations are all reported.


Requirements

Requirement Value
Python >= 3.10
pycatia >= 0.8.3
wxPython Required
Open document Product
CATIA licence DMU Space Analysis or DMU Navigator required

Usage

  1. Open a CATProduct in CATIA
  2. Run the script
  3. The analysis runs automatically
  4. A results dialog shows all conflicts found and the CSV save path
  5. The CSV is saved next to the CATProduct file (or to ~/Downloads if unsaved)

Dialog Output

When conflicts are found, a scrollable results dialog shows a formatted table:

Clash analysis complete — 3 conflict(s) found
--------------------------------------------------------------------------------

  Type                 Component 1                    Component 2                     Value (mm)  Status
  -------------------- ------------------------------ ------------------------------ ------------ ----------------
  Clash                Bracket_L                      Cover_Plate                       -1.234567  Relevant
  Contact              Hinge_Pin                      Frame_Assy                         0.000000  Relevant
  Clearance            Seal_Ring                      Housing                            0.450000  Relevant

CSV saved to: D:\Assembly\Assembly_ClashReport.csv

When no conflicts are found, a confirmation dialog is shown and no CSV is created.


Output

CSV file: <ProductName>_ClashReport.csv

Column Content
Type Conflict type from CatConflictType enum (e.g. Clash, Contact, Clearance)
Component1 Name of the first component in the pair
Component2 Name of the second component in the pair
Value_mm Penetration depth (negative for clash) or clearance distance in mm
Status Conflict status from CatConflictStatus enum (e.g. Relevant, Irrelevant)

Notes

  • The SPA workbench (SPAWorkbench) is used — not the DMU Navigator workbench
  • If the DMU Space Analysis or DMU Navigator licence is not available, an error dialog is shown and the script exits
  • An existing Python_Clash_Check clash set is reused if present; otherwise a new one is created
  • The check is configured as all-vs-all (catClashComputationTypeBetweenAll)
  • Value_mm is the penetration length for clashes (negative) or clearance distance — it is not a volume
  • If no conflicts are found the script shows a confirmation dialog and exits without creating a CSV file

Home


Getting Started


Contributing


Any Document Scripts


Drawing Document Scripts


Part Document Scripts


Shape Generation Scripts


Process Document Scripts


Product Document Scripts


Utility Scripts


Legal

Clone this wiki locally