Four-View CAD Engineering Quad & Uncapped Section View
Install
npm install -g @lmctl-ai/lmctl
lmvideo 0.1.38 is released. Source examples are pinned to public commit aab2677.
900x560 still; real pinned lmcad B-Rep housing exported in millimetres, consumed at 0.001 m/mm in one scene across three orthographic views and one perspective uncapped clip-plane section, with dimensions.
Verified acceptance capture, reproducible with the lmvideo 0.1.38 prerelease runtime.
Run this example
lmctl autorun https://raw.githubusercontent.com/lmctl-ai/lmvideo/aab2677a4b6264ae6afae8ad64a1d7c1dcd3a052/examples/showcase/bench-14-cad-four-view-section.lms
Source
# 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));