Enhanced expression extraction to find ALL named expressions in .prt files,
not just specific format. Added pyNastran-based result extraction example.
Expression Extraction Improvements:
- Updated regex to handle all NX expression format variations:
* #(Type [units]) name: value;
* (Type [units]) name: value;
* *(Type [units]) name: value;
* ((Type [units]) name: value;
- Added Root:expression_name: pattern detection
- Finds expressions even when value is not immediately available
- Deduplication to avoid duplicates
- Filters out NX internal names
Test Results with Bracket.prt:
- Previously: 1 expression (tip_thickness only)
- Now: 5 expressions found:
* support_angle = 30.0 degrees
* tip_thickness = 20.0 mm
* p3 = 10.0 mm
* support_blend_radius = 10.0 mm
* p11 (reference found, value unknown)
OP2 Result Extraction (pyNastran):
- Created example extractor: op2_extractor_example.py
- Functions for common optimization metrics:
* extract_max_displacement() - max displacement magnitude on any node
* extract_max_stress() - von Mises or max principal stress
* extract_mass() - total mass and center of gravity
- Handles multiple element types (CQUAD4, CTRIA3, CTETRA, etc.)
- Returns structured JSON for optimization engine integration
- Command-line tool for testing with real OP2 files
Usage:
python optimization_engine/result_extractors/op2_extractor_example.py <file.op2>
Integration Ready:
- pyNastran already in requirements.txt
- Result extractor pattern established
- Can be used as template for custom metrics
Next Steps:
- Integrate result extractors into MCP tool framework
- Add safety factor calculations
- Support for thermal, modal results
- Update project name in all documentation files
- Update GitHub repository references to Anto01/Atomizer
- Update Python package name to 'atomizer'
- Update conda environment name references
- Update all module docstrings with new branding
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Set up Python package structure with pyproject.toml
- Created MCP server, optimization engine, and NX journals modules
- Added configuration templates
- Implemented pluggable result extractor architecture
- Comprehensive README with architecture overview
- Project ready for GitHub push
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>