Add NX 2606 interactive hosting, modeling tools and agent API improvements - #5
Draft
xuio wants to merge 67 commits into
Draft
Add NX 2606 interactive hosting, modeling tools and agent API improvements#5xuio wants to merge 67 commits into
xuio wants to merge 67 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends NX_MCP for use with a graphical NX 2606 session. It addresses geometry and API failures, adds modeling and inspection workflows, and improves how MCP clients discover tools, inspect results and recover interrupted operations.
The changes are grouped below for review. Feedback on scope and architecture is welcome; I can split the implementation into smaller PRs if preferred.
Geometry correctness and operation recovery
Interactive NX control
An optional graphical host dispatches queued operations serially on the NX UI thread, allowing users to see modeling changes as they happen. Pause, resume and stop controls support handoff between the agent and manual editing.
The integration also adds loaded-part activation, viewport capture, visibility/color/transparency controls, collision highlighting and capped section views. Screenshots can be retrieved through MCP rather than returning only a Windows file path.
Long native operations can still block the UI; this does not run NXOpen mutations concurrently.
Geometry and assembly inspection
Modeling and documentation tools
The optional integration adds workflows for:
Capability metadata records operation-specific availability and tested scope. These additions do not imply that every NX operation, sheet-metal configuration or manufacturing standard is covered.
Manufacturing follow-up adds associative dimension formatting, hidden-edge and construction-geometry controls, and analytic planar DXF export with explicit frames, units and layers. Drawing scale is applied to sheets and base views; managed table ownership survives reopening. STEP failures return translator diagnostics and clean up failed new-part imports. Model-health reports include fault codes and entity references. Saving targets only the work-part file. Its receipt identifies saved files, records native save errors, and compares loaded-part flags and file hashes before and after the call. Unexpected changes return a partial-outcome error. Native full/agent tests verified an edited child remained unsaved and its disk bytes unchanged; component files require explicit activation and saving.
Native PDF checks verified a 2:1 view and physical +0.05/-0.02 mm dimension tolerances. Independent DXF checks covered principal/custom planes and inch conversion. Two vendor geometry failures remain documented: one STEP produces no NX translator output, and another contains self-intersecting faces that native healing did not repair. The native centerline preference remains read-only because its setter did not persist. Follow-up shell-by-shell import did not produce a valid CLIFF solid after recombination, and Optimize Face left the Adam Tech faults unchanged. Neither route is exposed as a repair. A separate centerline annotation-visibility probe did not complete; visibility behavior remains unverified.
A02 follow-up fixes section-view construction filtering: sheet-owned section lines are preserved instead of being passed to model-geometry erasure. Component inventory now reports unloaded prototypes without aborting; explicit loading can recover them on an already loaded parent, and closing referenced prototypes is rejected before saving. PDF export updates drafting views, includes shaded raster images and reports output settings. Hidden-line processing semantics are documented, including invisible font 0 for suppressing occluded edges.
MCP discovery, responses and files
The existing default tool surface remains available. The optional integration exposes 189 tools, with a separate compact agent profile exposing 13 entry points.
The agent profile provides:
File operations support nested workspace folders and absolute NX-host paths that remain inside the configured workspace. Artifact transfer includes metadata and checksums, and assembly packaging includes referenced-part dependencies.
Compatibility and review
The implementation retains the two-process architecture, NX-free sidecar imports, experimental/journal opt-ins and workspace confinement.
The main areas needing architectural review are:
The PR includes incremental implementation commits and tests. Documentation is consolidated into the three existing upstream pages plus tool contracts, the agent guide and the generated capability matrix. Release-by-release documents and overlapping guides have been removed; historical evidence remains in git history, with test-dependent examples retained as fixtures. I can extract focused PRs around agreed boundaries.
Validation
Dev22 runtime
6125b7dac2c85bc0df2c974bc032690bab4e3de0passed 918 automated tests, formatting checks and sidecar type checks. The Windows release is installed. Native fixtures verified section edits, shaded PDF output, hidden-edge invisibility after save/reopen, unloaded-prototype inventory and explicit recovery. The 28-part working session was restored with 340 occurrence paths/transforms unchanged. Earlier dev21 full/agent save-audit checks preserved an unsaved child and unrelated loaded files/flags.Earlier dev20 native checks covered empty-session STEP import, full/agent delivery of a 2,032-object appearance result, pagination, idempotent replay and appearance restoration. These remain recorded separately from the dev21 save checks.
The dedicated real-NX test is excluded from the ordinary suite. Separate NX 2606 runs exercised recorded native fixtures, Windows stdio/HTTP operation, installed-source verification and inline PNG delivery.
Two fresh agents completed matching plate, assembly and STEP round-trip tasks with analytic geometry checks. That comparison used the earlier full profile and initial compact profile; subsequent pagination and discovery fixes received a separate follow-up on the final runtime.
The remaining legacy-tool pass checks typed angle measurement, horizontal sketch constraints, feature deletion, inventories, nested Save As, relative-placement replay, explosion deletion and downloaded assembly packages. Capability labels now distinguish 181 native-scoped tools and eight sidecar/contract-scoped tools; option-level caveats remain.
See the validation guide, tool contracts and capability matrix.
NX 2606 results do not establish NX 2506 compatibility. Native evidence applies to the recorded fixtures; sampled analyses do not certify entire surfaces or parts. Provider token usage was unavailable, so response-size measurements are not presented as total token savings.