upxo.meshing.gbconformant.d3v2p0.surface_angles module
Raise the smallest surface-triangle angles by guarded local operations.
Additive companion to surface_quality.improve_surface_quality (flips only). Operations, all inside one labelled patch (grain pair and RVE face):
diagonal flips (topology only, shape change bounded by max_deviation);
node relocation: patch-interior nodes move on their 1-ring surface, nodes on a patch-boundary curve (junction line or RVE-face trace) slide along that curve; RVE-plane coordinates are kept exactly;
short-edge collapse: a movable node merges into a neighbour.
A node or triangle that touches a frozen grain never changes. Corner nodes of curves (three or more curve edges) never move. Every operation must raise the smallest angle of the triangles it changes and keep each changed triangle’s orientation; changed triangles are checked against the whole complex for intersections and for facet openings below minimum_facet_angle, and rejected operations are rolled back. Run the full tetrahedral surface validation after.
- upxo.meshing.gbconformant.d3v2p0.surface_angles.triangle_angles(points, triangles)[source]
Interior angles (degrees), shape (n, 3); column k is the angle at vertex k.
- upxo.meshing.gbconformant.d3v2p0.surface_angles.improve_surface_angles(surface, enabled=True, minimum_angle=30.0, max_passes=10, max_deviation=None, minimum_facet_angle=0.1, frozen_grain_ids=(), flips=True, relocation=True, collapses=True, max_normal_change=60.0, wedge_limit=None)[source]
Raise triangle angles toward minimum_angle (degrees) on a ClosedRVE.
max_deviation bounds how far the surface may move at any changed point (physical units); None uses 0.1 x the median edge length. A triangle is worked on while its smallest angle is below minimum_angle; operations stop when no further local improvement passes all checks. The target is not guaranteed: geometric corners sharper than it (patch corners, wedges) cannot be removed without changing the geometry beyond max_deviation. wedge_limit (degrees) adds the no-sharpening rule at every edge an operation changes: an opening below the limit may not get sharper, one at or above it may not fall below it.