Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Synchronize surface inspection state for Preview 4 qualification

Yuechen Li2f6fbf8a2f9e
diff --git a/aetheris.client/src/viewer/AetherisViewport.tsx b/aetheris.client/src/viewer/AetherisViewport.tsx
index acb390ba..dbe65a2c 100644
--- a/aetheris.client/src/viewer/AetherisViewport.tsx
+++ b/aetheris.client/src/viewer/AetherisViewport.tsx
@@ -60,6 +60,14 @@ function TelosViewport(props: AetherisViewportProps & { onRetry(): void }) {
const [labelHost, setLabelHost] = useState<TelosHost | null>(null);
const [inspectionMode, setInspectionMode] = useState<SurfaceInspectionMode>("normal");
const [isolatedFaceKey, setIsolatedFaceKey] = useState("");
+ const [inspectionModel, setInspectionModel] = useState({
+ assemblyPacket: props.assemblyPacket, displayScene: props.displayScene,
+ });
+ // Reset patch selection before committing a different model; keep the GPU host.
+ if (inspectionModel.assemblyPacket !== props.assemblyPacket || inspectionModel.displayScene !== props.displayScene) {
+ setInspectionModel({ assemblyPacket: props.assemblyPacket, displayScene: props.displayScene });
+ setIsolatedFaceKey("");
+ }
const inspectionFaces = useMemo(() => {
const scene = cadmataTelosScene(props);
const faces = new Map<string, SurfaceInspectionFace>();
@@ -78,7 +86,6 @@ function TelosViewport(props: AetherisViewportProps & { onRetry(): void }) {
}, [props]);
const isolatedFace = inspectionFaces.find(f => f.key === isolatedFaceKey);
const inspection = useRef({ mode: inspectionMode, face: isolatedFace });
- inspection.current = { mode: inspectionMode, face: isolatedFace };
const lastModel = useRef<unknown>(undefined);
const apply = () => {
const current = host.current;
@@ -190,9 +197,9 @@ function TelosViewport(props: AetherisViewportProps & { onRetry(): void }) {
}, []);
useEffect(() => {
latest.current = props;
+ inspection.current = { mode: inspectionMode, face: isolatedFace };
apply();
- }, [props, inspectionMode, isolatedFaceKey]);
- useEffect(() => { setIsolatedFaceKey(""); }, [props.assemblyPacket, props.displayScene]);
+ }, [props, inspectionMode, isolatedFaceKey, isolatedFace]);
return (
<div
ref={container}
diff --git a/docs/release/P4-02-CADMATA-DISTRIBUTION-X0.md b/docs/release/P4-02-CADMATA-DISTRIBUTION-X0.md
index f4e7df15..a0a93c13 100644
--- a/docs/release/P4-02-CADMATA-DISTRIBUTION-X0.md
+++ b/docs/release/P4-02-CADMATA-DISTRIBUTION-X0.md
@@ -129,6 +129,12 @@ isolated failing test passed. Original and subsequent complete-run logs are
retained, with outcomes recorded in the release qualification asset. No
production display budget is relaxed.
+Two pre-existing frontend lint errors were corrected locally: inspection refs
+now synchronize in the effect, and a changed model resets its patch selection
+before commit rather than triggering a second render from an effect. The GPU
+host and inspection behavior are retained. Frontend lint/typecheck and 89 tests
+in 19 files pass after this correction.
+
```powershell
dotnet build Aetheris.slnx -c Release -m:1
dotnet test Aetheris.Kernel.Core.Tests -c Release --no-build --filter "Category!=SlowCorpus"