# STEP Parser - FikoYT

## 📄 Parser v3.0

**Multi-strategy name resolution:**
1. **Shape.Tag** → Direct entity mapping
2. **FreeCAD Label** → Entity match
3. **Relationship map** → Hierarchical traversal
4. **Metadata fallback** → Internal properties

## 🔍 Entity Analysis

**Core entities:**
- **PRODUCT_DEFINITION** - Product definition
- **PRODUCT** - Product assembly
- **SHAPE_DEFINITION_REPRESENTATION** - 3D representation
- **MANIFOLD_SOLID** - Solid geometry

## 🌳 Name Resolution

**10-level deep traversal:**
```python
def find_object_name(obj) -> Tuple[str, str, Dict]:
    """Multi-source name candidate collection"""

    # Priority 1: Shape.Tag
    if hasattr(obj, 'Tag') and obj.Tag:
        tag_name = obj.Tag

    # Priority 2: FreeCAD.Label
    if hasattr(obj, 'Label') and obj.Label:
        label_name = obj.Label

    # Priority 3: Entity relationships
    # ... 10 levels deep
```

## 📊 Product Tree Generation

**Assembly hierarchy:**
```python
product_tree = {
    "name": object_name,
    "type": object_type,
    "volume": volume,
    "mass": mass,
    "children": [child_objects],
    "level": depth
}
```

## 🎯 Advanced Features

- **Entity relationship mapping**
- **Multi-language support**
- **Custom density database**
- **Bounding box calculations**
- **Matrix of inertia**

---
2025-11-06