1. Purpose Of This Theory Note
This document explains, in a simple and complete way, the logic behind the two weld-path solvers available in WeldPathShell. It is a theory-oriented guide: the focus is on geometric reasoning, not software implementation details.
2. Two Solvers Available
Solver A: Legacy (Initial, Simpler)
- Main idea: classify elements through global normal grouping.
- Best for: regular weld paths with low curvature and limited normal drift.
- Typical benefit: straightforward behavior and fast interpretation.
- Main risk: curved crowns can be split into disconnected regions.
Solver B: Curved-Robust (Advanced)
- Main idea: classify through local continuity on element adjacency graph.
- Best for: circular and free-form weld paths with gradual normal rotation.
- Typical benefit: better path continuity and closed-loop reconstruction.
- Main cost: more local checks than purely global grouping.
3. Common Geometric Foundations
Both solvers share the same geometric basis and differ mainly in how grouping and pairing are decided.
- Element normal from Quad4 centroid-triangle averaging.
- Angular compatibility with target opening angle and tolerance.
- Candidate pair validation using shared-edge geometry.
4. Solver A (Legacy) Logic
Legacy performs a global interpretation of the mesh: elements are grouped by similar normal vectors, then groups are paired if their average normals are compatible with the target weld angle.
4.1 Legacy Step-by-Step
- Filter to managed element types (Quad4).
- Compute element normal and centroid.
- Build global normal groups using normal similarity threshold.
- Compute average normal for each group.
- Select compatible group pairs by angular rule.
- Build candidate element pairs from compatible groups (shared nodes).
- Apply geometric pair consistency filter.
- Estimate bead vs toe and build weld paths.
4.2 Legacy Workflow Graphic
5. Solver B (Curved-Robust) Logic
Curved-Robust performs a local interpretation: instead of relying mainly on global average normals, it follows local continuity between adjacent elements. This makes it robust when normals rotate gradually, which is typical for circular weld paths.
5.1 Curved-Robust Step-by-Step
- Filter to managed element types (Quad4).
- Compute element normal and centroid.
- Build adjacency graph: elements connected by shared edge.
- Propagate local groups through neighbors with local normal-angle tolerance.
- Create candidate pairs from adjacent elements only.
- Check local angular compatibility with target opening angle.
- Apply geometric pair consistency filter.
- Estimate bead vs toe and build weld paths.
5.2 Curved-Robust Workflow Graphic
6. How To Choose Between The Two Solvers
- Use Legacy if geometry is mostly linear and normals are almost constant along the weld.
- Use Curved-Robust if geometry contains circular crowns, elbows, or smooth free-form curvature.
- For critical analyses, run both and compare continuity and physical plausibility.
7. Comparison Table
| Criterion | Legacy Solver | Curved-Robust Solver |
|---|---|---|
| Grouping principle | Global normal similarity groups | Local continuity on adjacency graph |
| Pair generation | From compatible global groups | From adjacent local neighbors |
| Curved-path robustness | Medium to low (can fragment) | High (tracks gradual normal rotation) |
| Interpretability | Very intuitive for simple joints | Intuitive with local-graph mindset |
| Recommended use | Linear or quasi-linear welds | Circular / highly curved welds |
8. Conceptual Example: Circular Tube On Plate
Scenario: a circular tube is welded orthogonally on a flat plate. Along the weld crown, element normals rotate continuously around the tube.
- Legacy behavior: global grouping splits the crown into several sectors; path reconstruction may become discontinuous or partially open.
- Curved-Robust behavior: local adjacency propagation follows the rotation smoothly; the toe path is typically reconstructed as one dominant closed loop.
8.1 Representative Numeric Illustration
| Metric | Legacy | Curved-Robust |
|---|---|---|
| Toe sectors detected | 6 sectors | 1 dominant loop |
| Incomplete/open residual paths | 2 | 0 |
| Estimated circular toe-line coverage | 72% | 96% |
| Continuity improvement | +24 percentage points in favor of Curved-Robust | |
9. Detailed Theoretical Process (Step By Step)
This section is intentionally theory-focused. It explains what is done from an engineering perspective, why each step exists, and what physical meaning each output has.
9.1 Define The Analysis Domain
- The mesh is first restricted to the structural domain of interest.
- If Named Selections are used, only elements connected to those selected nodes are considered in the weld analysis.
- This avoids contaminating the process with remote, irrelevant, or non-target regions of the model.
- Only supported shell topology (Quad4 in the current theory scope) is retained for coherent geometric treatment.
9.2 Compute A Normal For Each Element
- For each quadrilateral element, a centroid is evaluated from its four nodal coordinates.
- The quad is interpreted through four centroid-based triangles to reduce distortion sensitivity.
- A unit normal is computed for each triangle and then averaged.
- The final element normal is the normalized mean direction:
9.3 Group Elements By Similar Orientation
Legacy View (Global Similarity)
- Element normals are compared globally.
- Normals considered similar (within tolerance) are grouped together.
- Each group represents a macro-surface family with approximately common orientation.
Curved-Robust View (Local Continuity)
- Elements are connected by shared edge, then analyzed as a local neighborhood network.
- Grouping propagates from one element to adjacent ones when local normal rotation remains below a local angular threshold.
- This preserves continuity on circular or free-form weld crowns where global grouping can fragment.
9.4 Build Angularly Compatible Surface Pairs
- The weld opening criterion is applied using the target angle and tolerance band.
- Two surface families are considered compatible when their relative orientation is close to the target angle (or its complementary value).
- At the element scale, candidate pairs are generated only where shared-edge continuity exists, so the pair is physically plausible as a local joint interface.
9.5 Remove Geometrically Inconsistent Pairs
- Not all angularly compatible pairs are physically valid weld interfaces.
- A second geometric check uses the shared-edge direction and the surrounding element geometry to reject false positives.
- This filtering is essential to remove spurious pairings from nearby but non-weld surfaces.
9.6 Separate Connected Regions Inside The Same Orientation Family
- Two regions can have similar normals but be spatially disconnected.
- Topological continuity is used to split such regions into independent connected components.
- This prevents mixing different physical weld neighborhoods into a single logical cluster.
9.7 Estimate Bead-Side And Toe-Side
- For each connected orientation family, the retained portion is compared with the initial population.
- Higher retained fraction is interpreted as bead-side dominance; lower retained fraction is interpreted as toe-side dominance.
- Safety fallback rules avoid degenerate all-bead or all-toe classification when geometry is ambiguous.
9.8 Reconstruct Ordered Toe Paths
- Toe-side elements are connected into ordered paths.
- Each path is classified as open loop or closed loop.
- For each path segment, previous and next path nodes are identified to define local marching direction.
9.9 Compute Path Metrics For Engineering Use
- Edge length is computed between ordered path nodes.
- Midpoint coordinates are computed for spatial referencing.
- A local coordinate system is defined at each midpoint to support directional post-processing (for example projection of forces and stress components along the weld path).
10. Didactic Reading Trace (What The Student Should Understand In Order)
- Define where weld detection is allowed to operate (global mesh or Named Selection domain).
- Compute reliable element normals from nodal geometry.
- Organize the mesh into orientation-consistent regions (global or local continuity logic).
- Identify orientation pairs compatible with the target weld opening angle.
- Reject geometrically inconsistent candidate pairs.
- Split disconnected regions that accidentally share similar orientation.
- Label bead-side and toe-side by retained-portion logic.
- Build ordered toe paths and determine open/closed topology.
- Extract edge length, midpoint position, and local orientation basis for downstream structural interpretation.
11. Final Validation Checklist
- Check bead/toe maps visually in the mesh plot.
- Check that reconstructed toe paths are topologically continuous.
- Verify closed-loop behavior on circular welds where expected.
- Compare Legacy and Curved-Robust outputs before downstream stress analysis.