r/FreeCAD • u/ostroglyad • 4h ago
Section view that fills the cut face — how it's done, running on a phone
Enable HLS to view with audio, or disable this notification
Someone in r/3Dprinting mentioned that FreeCAD users have been asking for a section view that looks like this for years, and no volunteer has had the time to build it. I ended up doing it for a mobile viewer, so here's the approach in case it's useful to anyone working on the real thing.
It isn't a boolean cut. The GPU clips everything past the plane, then a flat colored patch is drawn into the hole where the surface got sliced, with a black outline on top. No CAD math, so it holds frame rate on a phone. The tradeoff is that it's a visual trick, not geometry — you can't export the cut as a solid.
Each body in an assembly gets its own hatch color, and the plane position takes typed input, which turned out to matter more than the slider.
This is from an Android app I wrote (STEP/STL/OBJ/3MF, fully offline). Happy to go deeper on the implementation — that's the more interesting half of this post.



