# B14 / G.7: real lmcad housing STL (mm) consumed as metres by four cameras. mkdir("build"); cad=_lmcode_ cli="lmcad" install="github:lmctl-ai/lmcad@v0.1.5"; let alloy=material().color(0.72,0.78,0.84).roughness(0.55).specular(0.22).shininess(48.0); let housing=scene.box(120.0,70.0,80.0,alloy); let bore=scene.cylinder(15.0,80.0,alloy).position(0.0,0.0,0.0); housing.cut(bore); bore.visible(false); scene.export_stl("build/b14-housing.stl"); end _lmcode_ r=run_lmcode(cad); assert(r.ok,(r.ok ? "" : r.message));println(json_stringify(r.result)); program=_lmcode_ cli="lmvideo" install="github:lmctl-ai/lmvideo@v0.1.38"; let mesh=mesh_load("build/b14-housing.stl"); let scene=scene3d().threads(4).background("#edf3f8").ambient(0.2).threads(4); scene.directional_light(1.0,3.0,4.0,"#ffffff",1.8); let node=scene.add(mesh,material("#b8c5d1",0.35,0.72)); node.scale(0.001,0.001,0.001); image_assert_true(mesh.triangles()>100); let front=camera3d().look_at(0.0,0.04,0.22,0.0,0.0,0.0).ortho(0.18,0.001,2.0); let side=camera3d().look_at(0.22,0.04,0.0,0.0,0.0,0.0).ortho(0.18,0.001,2.0); let top=camera3d().up(0.0,0.0,-1.0).look_at(0.0,0.22,0.0,0.0,0.0,0.0).ortho(0.18,0.001,2.0); let cut=camera3d().look_at(0.20,0.14,0.20,0.0,0.0,0.0).perspective(40.0,0.001,2.0); let sheet=layout_sheet().add(scene.render_camera(front,440,260)).add(scene.render_camera(side,440,260)).add(scene.render_camera(top,440,260)); scene.clip_plane(1.0,0.0,0.0,0.0); sheet.add(scene.render_camera(cut,440,260)); let image=sheet.render(2,14,0.88,0.92,0.96,1.0).resize(900,560); image.line(60.0,520.0,300.0,520.0,0.09,0.21,0.30,1.0,2.0).line(60.0,515.0,60.0,525.0,0.09,0.21,0.30,1.0,2.0).line(300.0,515.0,300.0,525.0,0.09,0.21,0.30,1.0,2.0).text(24.0,540.0,"B14 housing | lmcad B-rep STL | 120 x 70 x 80 mm | scale 0.001 m/mm | uncapped section",18.0,0.09,0.21,0.30,1.0).save("build/bench-14-cad-four-view-section.png"); end _lmcode_ r=run_lmcode(program); assert(r.ok,(r.ok ? "" : r.message));println(json_stringify(r.result));