The sitmap OccViewer.SitMap can be used to show how deep one object is inside another, based on the relationship between the seating object and the reference object. This depth can be represented through the percentage property of the SitMap, which provides the proportion of distances covered by the map, excluding the first distance.
How Depth is Calculated Distances The distances array represents the distance values between the seating object and the reference object. These values determine the relative positions of the objects in space.
Percentage The percentage property returns the proportion of the distances (excluding the first distance) relative to the total SitMap coverage. This percentage effectively shows how deep the seating object is within the reference object.
The result can be used to display or visualize how deep the seating object is within the reference object, based on the spatial relationships defined in the SitMap.
Practical Application This feature can be used in scenarios such as determining how much of a seating area is covered within a defined region or how deep an object (such as a medical device or structure) is embedded in a specific environment. It can also help in visualizing objects in relation to each other for collision detection, fitting optimization, or spatial planning.
sitmap = new InteractiveSitMap(Viewer);
sitmap.seatingObject = mesh1;
sitmap.referenceObject = mesh2;
sitmap.colors = ['#cc6677', '#88ccee', '#332288'];
sitmap.distances = [0, 2];
sitmap.viewSize = {x: 100, y: 100};