OccViewer.InteractiveContour represents a line formed by connecting multiple segments. This feature allows users to manage and interact with contours that consist of a series of 3D segments, providing an easy way to create and manipulate complex lines and shapes in a 3D environment.

const contour = new InteractiveContour(Viewer);

// Define segments to add to the contour
const segment1 = { from: new WasmVector3d(0, 0, 0), to: new WasmVector3d(1, 0, 0) };
const segment2 = { from: new WasmVector3d(1, 0, 0), to: new WasmVector3d(1, 1, 0) };
const segment3 = { from: new WasmVector3d(1, 1, 0), to: new WasmVector3d(0, 1, 0) };

// Add individual segments to the contour
contour.addSegment(segment1);
contour.addSegment(segment2);
contour.addSegment(segment3);

// Set the line width for the contour
contour.lineWidth = 2;

// (Optional) Add multiple segments at once using an array
const segmentsArray = [
{ from: new WasmVector3d(0, 0, 1), to: new WasmVector3d(1, 0, 1) },
{ from: new WasmVector3d(1, 0, 1), to: new WasmVector3d(1, 1, 1) }
];
contour.addSegments(segmentsArray);