Viewer provides OccViewer.InteractiveClippingPlane interface for clipping scene content by defined clipping plane. Clipping might be helpful to look through inner elements of model structure.
Clipping plane parameters include the list of objects (or entire scene), plane normal, origin (relative to bounding box of model), and capping.
const aCP = new InteractiveClippingPlane(aViewer)
// normal of plane
aCP.normal = {x:0,y:1,z:0};
// origin of plane (if isRelative is true coordinates of original should be between 0..1)
aCP.origin = {x:0,y:0.5,z:0};
// enable capping
aCP.isCapping = true;
// flag signals that origin will depend on AABB size of selected objects e.g (0..1)->(mincorner..maxcorner).
aCP.isRelative= true;
aCP.isEnabled = true;
// objects to apply clipping plane
// '*' - all displayed objects,
// '' - all graphical objects (including ground for example),
// or special id or id list of of objects.
aCP.objects = ''
OccViewerModule.updateView();
For clipping box functionality you can create another OccViewer.InteractiveClippingPlane object and add it to the sequence of clipping planes of the first one.
const aNewPlane = new InteractiveClippingPlane(aViewer);
aNewPlane.normal = {x: 0, y: 1, z: 0};
aNewPlane.offset = 0.5;
aNewPlane.visible = true;
aNewPlane.isInteractive = true;
aCP.setPlaneSequence(aNewPlane);
OccViewerModule.updateView();