Repository navigation
fix(evaluate): fail a mate connector outside its part, as review_cad does - #1029
Merged
Merged
Conversation
…does evaluate_script (and so open_in_studio) accepted DRAW 01 v8 rev 9 with 47 assembly.mechanical.connector-not-in-solid errors that only review_cad reported. A publish gate must not pass what review flags as an error. evaluate_script now runs the same rule (connectorsInSolidDiagnostics: review's checkMateConnectorsInSolid, same 6 mm tolerance, severity error) on every captured assembly of a successful build and returns ok:false. skipMechanismCheck opts out with the rest of the mechanism gate. Cost: one bounding box per mated part from the cached BREPs, 16 ms on the 69-part DRAW 01 v8.
w1ne
enabled auto-merge
October 17, 2026 17:20
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.
Problem
evaluate_script, and thereforeopen_in_studio, accepted DRAW 01 v8 rev 9 with 47assembly.mechanical.connector-not-in-soliderrors. The connectors were 2.6–130 mm from their parts, and onlyreview_cadreported them. A publish gate must not pass what review flags as an error.Change
connectorsInSolidDiagnostics(arm)inmechanicalPlausibility.tsruns review's owncheckMateConnectorsInSolid: same code, same 6 mm bounding-box tolerance, sameerrorseverity.evaluate_scriptruns it on every captured assembly of a successful build and merges the errors intodiagnostics. Any such error makesok:false.skipMechanismCheck: trueopts out of this check together with the rest of the mechanism gate. Existing fixtures that use the opt-out keep passing.Cost
One local bounding box per mated part, read from the already lowered (cached) BREPs, with no meshing. On DRAW 01 v8 (69 parts, 64 fastened mates) this takes 16 ms and yields 47 errors, the same count review_cad reports. The first message is: "Mate 'front-panel-3mm-fixed' connector 'front-panel-3mm.seat' is 38.0 mm away from modeled material on part 'front-panel-3mm'."
Tests
evaluateScript.connectorGate.test.ts: a fastened mate whose connector is 60 mm from both parts givesok:falsewith 2 errors. Negative control: the same mate with the connector on the shared face givesok:trueand no such errors.