Download app/agents/rendering.py from dellweb3/build3d: direct link, hf CLI and curl.
- Browser
- Download file 794 Bytes
-
https://huggingface.co/spaces/dellweb3/build3d/resolve/main/app/agents/rendering.py
- Command line
-
hf download hf://spaces/dellweb3/build3d/app/agents/rendering.py
-
curl -L -o rendering.py https://huggingface.co/spaces/dellweb3/build3d/resolve/main/app/agents/rendering.py
794 Bytes
| """Apply catalog materials and render the completed geometry without changing it.""" | |
| from gateways import geometry | |
| def run(scene,analysis,project,out,render): | |
| catalog={m['id'] for m in scene['materials']} | |
| bindings=[dict(room=r['id'],material=r['material']) for r in scene['rooms']] | |
| if any(b['material'] not in catalog for b in bindings):raise ValueError('材料映射未通过登记校验') | |
| args=['--json',out/'input.json','--out',out,'--project',project]+(['--render'] if render else []) | |
| geometry.execute('render_fitout.py' if scene.get('schemaVersion')==2 else 'render_interior.py',args,out,'render.log') | |
| return dict(bindings=bindings,issues=[i for i in analysis.get('issues',[]) if i['kind']=='material'],rendered=render,geometry_changed=False,analysis_reused=True) | |