PageSourceSearch

https://app.partwork.io/assets/index-Cx6gtYke.js

js partwork.io collected 2026-10-04 04:58:22 UTC 2,218 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BhP99che.js","assets/mui-vendor-B-hwGbdr.js","assets/with-selector-C4jdu6-c.js","assets/index-Bl114oWb.js","assets/react-vendor-Bgw0FvAT.js","assets/index-w7a8p27o.css"])))=>i.map(i=>d[i]);
2import{_ as p}from"./index-Bl114oWb.js";import{u as x,r as o,j as r,ao as f,i as y,h as s,A as j,B as c,C as m}from"./mui-vendor-B-hwGbdr.js";import"./react-vendor-Bgw0FvAT.js";const v=o.lazy(()=>p(()=>import("./index-BhP99che.js"),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.CadViewer}))),C="/playground/model.glb",b="/playground/topology.json";function $(e){return e.record?e.kind==="face"?`${e.kind} ${e.id} (${e.record.surfaceType})`:`${e.kind} ${e.id} (${e.record.curveType})`:`${e.kind} ${e.id}`}function P(){const e=x(),[l,u]=o.useState(null),[a,h]=o.useState(null),[i,g]=o.useState(null);return o.useEffect(()=>{let n=!1;return fetch(b).then(t=>{if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.json()}).then(t=>{n||u(t)}).catch(t=>{n||h(t.message)}),()=>{n=!0}},[]),r.jsx(f,{maxWidth:"lg",sx:{py:4},children:r.jsxs(y,{spacing:2,children:[r.jsx(s,{variant:"h5",children:"CAD topology viewer — playground"}),r.jsx(s,{variant:"body2",color:"text.secondary",children:"Hover a face or edge on the model below. Data is a hardcoded demo export (glb + topology sidecar) — hover picks read live analytic geometry (radius, length, area) straight from the sidecar JSON, no CAD kernel in the browser."}),a&&r.jsxs(j,{severity:"error",children:["Failed to load topology.json: ",a]}),r.jsx(c,{sx:{height:520,border:1,borderColor:"divider",borderRadius:1,overflow:"hidden"},children:l?r.jsx(o.Suspense,{fallback:r.jsx(d,{}),children:r.jsx(v,{glbUrl:C,topology:l,onPick:g,backgroundColor:e.palette.steel[50],faceColor:e.palette.teal[300],edgeColor:e.palette.teal[600],faceHoverColor:e.palette.teal[800],darkHoverColor:e.palette.navy[900]})}):!a&&r.jsx(d,{})}),r.jsx(s,{variant:"caption",color:"text.secondary",children:i?`Last pick: ${$(i)}`:"Nothing picked yet."})]})})}function d(){return r.jsx(c,{sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(m,{})})}export{P as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.