Files
Atomizer/tools/adaptive-isogrid
Anto01 8efa8ba0d1 feat(isogrid): Add update-in-place NX import + 3 density field variations
Major improvements to NX import workflow and rib pattern generation:

**NX Import (import_profile.py)**
- Smart sketch management: detects existing sketches and updates in-place
- Preserves extrude references (no manual re-reference needed!)
- First run: creates new sketch + auto-extrude
- Subsequent runs: clears geometry, redraws, extrude regenerates automatically
- Added _find_sketch_by_name() and _clear_sketch_geometry() functions

**Rib Pattern Variations**
Generated 3 different density field strategies for testing NX updates:
- Balanced (α=1.0, β=0.3): Original moderate density - 86 pockets, 2,499g
- Edge-focused (α=0.3, β=1.5): Dense ribs near boundaries - 167 pockets, 2,328g
- Hole-focused (α=1.8, β=0.15): Dense around holes - 62 pockets, 3,025g

**New Files**
- import_profile_update_test.py: Standalone update-only test script
- params_large_triangles.json: s_min=30mm, s_max=100mm (larger triangles)
- params_edge_focused.json: β=1.5 (boundary reinforcement)
- params_hole_focused.json: α=1.8 (hole reinforcement)
- sandbox_results/{edge_focused,hole_focused}/: Complete rib profile sets

**Test Results (Sandbox 1)**
- 833 triangles with large triangle params (vs 1,501 with previous params)
- Edge-focused: 1,155 triangles, 167 pockets (2x denser)
- Hole-focused: 523 triangles, 62 pockets (sparse pattern)

This enables rapid rib pattern iteration in NX without losing extrude references!

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-17 22:02:41 -05:00
..

Adaptive Isogrid — Plate Lightweighting Tool

Status: Foundation / Pre-Implementation
Architecture: Python Brain + NX Hands + Atomizer Manager

What It Does

Takes a plate with holes → generates an optimally lightweighted isogrid pattern → produces manufacturing-ready geometry. Isogrid density varies across the plate based on hole importance, edge proximity, and optimization-driven meta-parameters.

Architecture

Component Role Runtime
Python Brain Density field → Gmsh Frontal-Delaunay → rib profile ~1-2 sec
NX Hands Import profile → mesh → AFEM merge → Nastran solve → extract results ~60-90 sec
Atomizer Manager Optuna TPE sampling → objective evaluation → convergence 500-2000 trials

Key Insight: Assembly FEM with Superposed Models

  • Model A (permanent): Spider elements at holes + edge BC nodes. All loads/BCs applied here.
  • Model B (variable): 2D shell mesh of ribbed plate. Rebuilt each iteration.
  • Node merge at fixed interface locations connects them reliably every time.

Loads and BCs never need re-association. Only the rib pattern changes.

Directory Structure

adaptive-isogrid/
├── README.md
├── requirements.txt
├── docs/
│   └── technical-spec.md          # Full architecture spec
├── src/
│   ├── brain/                     # Python geometry generator
│   │   ├── __init__.py
│   │   ├── density_field.py       # η(x) evaluation
│   │   ├── triangulation_gmsh.py  # Gmsh Frontal-Delaunay meshing (production)
│   │   ├── pocket_profiles.py     # Pocket inset + filleting
│   │   ├── profile_assembly.py    # Final plate - pockets - holes
│   │   └── validation.py          # Manufacturing constraint checks
│   ├── nx/                        # NXOpen journal scripts
│   │   ├── extract_geometry.py    # One-time: face → geometry.json
│   │   ├── build_interface_model.py  # One-time: Model A + spiders
│   │   └── iteration_solve.py     # Per-trial: rebuild Model B + solve
│   └── atomizer_study.py          # Atomizer/Optuna integration
└── tests/
    └── test_geometries/           # Sample geometry.json files

Implementation Phases

  1. Python Brain standalone (1-2 weeks) — geometry generator with matplotlib viz
  2. NX extraction + AFEM setup (1-2 weeks) — one-time project setup scripts
  3. NX iteration script (1-2 weeks) — per-trial mesh/solve/extract loop
  4. Atomizer integration (1 week) — wire objective function + study management
  5. Validation + first real project (1-2 weeks) — production run on client plate

Quick Start (Phase 1)

cd tools/adaptive-isogrid
pip install -r requirements.txt
python -m src.brain --geometry tests/test_geometries/sample_bracket.json --params default

Parameter Space

15 continuous parameters optimized by Atomizer (Optuna TPE):

  • Density field: η₀, α, R₀, κ, p, β, R_edge
  • Spacing: s_min, s_max
  • Rib thickness: t_min, t₀, γ
  • Manufacturing: w_frame, r_f, d_keep

See docs/technical-spec.md for full formulation.