{"format":"relay-web-workflow","version":1,"title":"Four-Arch Pavilion · Line on a Subdivided Shell","request":"we need to make the exact geometry from the video the default in both lessons. The code should generate same geometry. And it shouldnt be hardcoded. But we should have same ampunt of steps.","workflow":{"kind":"workflow","schema_version":1,"inputs":{},"tasks":[{"schema_version":3,"id":"grow-shell","objective":"Grow Shell","operation":"geometry.metric_shell","inputs":{"rimGrowthPercent":{"value":300}}},{"id":"subdivide","operation":"code.javascript","objective":"Subdivide Shell","inputs":{"code":{"value":"function run([scene]) {\n  const shell = scene?.objects?.[0];\n  const xyz = shell?.vertices;\n  const triangles = shell?.faces;\n  if (xyz?.length !== 3000 || triangles?.length !== 5760 || triangles.some(face=>face.length!==3)) {\n    throw Error('Connect the completed four-arch shell.');\n  }\n  const vertices=[...xyz], faces=[], mids=new Map();\n  function midpoint(a,b) {\n    const key=Math.min(a,b)*3000+Math.max(a,b);\n    if (!mids.has(key)) {\n      mids.set(key,vertices.length);\n      vertices.push(xyz[a].map((p,i)=>(p+xyz[b][i])/2));\n    }\n    return mids.get(key);\n  }\n  for (const [a,b,c] of triangles) {\n    const u=midpoint(a,b),v=midpoint(b,c),w=midpoint(c,a);\n    faces.push([a,u,w],[u,b,v],[w,v,c],[u,v,w]);\n  }\n  return {version:2,units:'metres',objects:[{type:'MESH',name:'Subdivided four-arch shell',color:'#bd5488',vertices,faces}]};\n}\n"},"controls":{"value":{}},"files":{"value":[{"task":"grow-shell","output":"result"}]}},"schema_version":3},{"schema_version":3,"id":"grow-line","objective":"Grow Line","operation":"geometry.surface_perimeter","inputs":{"surface":{"task":"subdivide","output":"result"}}},{"id":"viewer","operation":"scene.view","objective":"3D Viewer","inputs":{"scene":{"task":"grow-line","output":"result"},"azimuth":{"value":-130},"elevation":{"value":30},"resolution":{"value":640}},"schema_version":3}]}}
