WeldPathShell Theory Reference

Conceptual reference for the current mesh-based weld bead and weld toe detection logic. This document explains the engineering workflow and geometric criteria, not software implementation details.

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.

Target domain: shell meshes with linear quadrilateral elements (Quad4), mainly from Ansys result datasets.

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.

n_elem = normalize(mean(n_tri_1, n_tri_2, n_tri_3, n_tri_4))
theta = arccos( dot(nA, nB) / (|nA| |nB|) )

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

4.2 Legacy Workflow Graphic

Mesh Input Compute Element Normals + Centroids Global Normal Grouping Group-Average Angle Compatibility Candidate Element Pairs (shared nodes) Geometric Pair Consistency Filter (axis/plane angle check) Estimate Bead vs Toe from selected groups Build Toe Paths + Metrics (open/closed loop, edge data)

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

5.2 Curved-Robust Workflow Graphic

Mesh Input Compute Element Normals + Centroids Build Element Adjacency Graph (shared-edge neighborhood) Local Group Propagation by normal continuity Adjacent Candidate Pairs Local Angle Check vs target opening angle Geometric Pair Consistency Filter (remove false positives) Estimate Bead vs Toe with robust fallback Build Ordered Toe Path open loop or closed loop Compute Path Metrics prev/next nodes, edge length, midpoint CS

6. How To Choose Between The Two Solvers

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
The numerical illustration above is conceptual and representative. The exact values depend on mesh density, quality, angle tolerance, and local grouping tolerance.

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:
n_elem = normalize(mean(n_tri_1, n_tri_2, n_tri_3, n_tri_4))

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.
theta = arccos( dot(nA, nB) / (|nA| |nB|) )

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)

  1. Define where weld detection is allowed to operate (global mesh or Named Selection domain).
  2. Compute reliable element normals from nodal geometry.
  3. Organize the mesh into orientation-consistent regions (global or local continuity logic).
  4. Identify orientation pairs compatible with the target weld opening angle.
  5. Reject geometrically inconsistent candidate pairs.
  6. Split disconnected regions that accidentally share similar orientation.
  7. Label bead-side and toe-side by retained-portion logic.
  8. Build ordered toe paths and determine open/closed topology.
  9. Extract edge length, midpoint position, and local orientation basis for downstream structural interpretation.
If results are not physically convincing, verify first: orientation grouping quality, geometric consistency filtering, and path continuity. These three checks explain most practical misclassifications.

11. Final Validation Checklist