Replace Face through Blends for NX
==================================

Puts faces of a solid onto another face at an offset (a pocket ceiling or a flange's inner face onto
the outer mold line at a new thickness, for example) when the fillets around them stop NX's own
Replace Face. Menu > Replace Through Blends > Replace Face through Blends...

  Faces to Move       the faces to put somewhere else (one solid). Faces tangent to them at the
                      same distance from the target are moved with them.
  Target Face         the face(s) to put them on, e.g. the OML. Several faces must touch edge to
                      edge (sew separate sheets first).
  Offset              distance from the target, on the side the faces are on now. 0 = onto it.
  Largest Fillet Radius   faces with a smaller radius that are tangent to two faces count as
                      fillets. Hole walls and countersinks meet their faces at an angle and are
                      never taken.
  Method              Automatic (Replace Face first, then through the fillets if NX refuses),
                      Replace Face Only, Through the Fillets.

Through the fillets: each fillet's radius and the two faces it joins are recorded, the fillets are
deleted with heal, the faces are replaced, and the fillets are re-created with Edge Blend. Then every
moved face is sampled at the offset and every fillet is checked back. If anything falls short the
part is put back exactly as it was and the message says how far it got. Success is one Undo.

Fillets come back as constant-radius Edge Blends at the radius measured on the old fillet.

Install
  1. Put this "replace-through-blends" folder somewhere NX can read, e.g. D:\nx_custom\replace-through-blends
  2. Add that folder to the custom_dirs.dat your site uses (or a file named by
     UGII_CUSTOM_DIRECTORY_FILE). NX then loads startup\rtb.men and finds the dialog in application\.
  3. Restart NX. Try it on samples\flange_imported.prt: Faces to Move = the two pocket ceilings
     (seen from below), Target Face = the OML sheet, Offset 4.5. Plain Replace Face fails on this
     part; Automatic goes through the fillets. samples\flange_reference_4p5.prt is the same part
     built natively at 4.5, to compare.

Headless: import application\rtb_core.py in NX and call
  replace_through_blends(part, faces, onto_faces, offset, max_fillet_radius=20.0, mode="auto")

Verified on NX (Designcenter) 2606.5001. More: https://nxautomations.xcelerator.us/replace-through-blends
