iOSiOS · 2026
CADViewer
手机上真的能转的 CAD 图纸:STEP / IGES / STL / OBJ,带装配树。CAD drawings that actually rotate on a phone: STEP, IGES, STL and OBJ, with an assembly tree.
问题The problem
工程图纸在手机上基本不可读:浏览器里转不动,转得动的又不认 STEP。Engineering drawings are close to unreadable on a phone: the ones that orbit do not open STEP, and the ones that open STEP do not orbit.
做法What I did
B-Rep 交给 Open CASCADE 离散化,用 Objective-C++ 桥到 Swift;STL 与 OBJ 走原生解析器。SceneKit 负责 PBR 材质、三点打光、程序化环境贴图、地面网格、接触阴影与 SSAO。装配树用 union-find 把壳体焊接分群,可以逐零件显示、隔离、聚焦。B-Rep is tessellated by Open CASCADE behind an Objective-C++ bridge; STL and OBJ go through native parsers. SceneKit handles PBR materials, three-point lighting, a procedural environment map, a ground grid, contact shadows and SSAO. The assembly tree groups shells with union-find, and each part can be shown, isolated or focused.
结果What changed
第一阶段在模拟器上跑通了整条链路。STEP / IGES 需要先编译 OCCT——这是刻意的:没有 C++ 工具链的机器也能完整验证渲染管线。Phase one runs the whole chain in the simulator. STEP and IGES need OCCT compiled first, and that is deliberate: a machine without the C++ toolchain can still verify the entire render pipeline.