COLNEO Pro 1.0
Loading...
Searching...
No Matches
ToolsAPI

Description

Tools API interface.

This API object provides access to miscellaneous tools as well as object/domain specific tools.
It is accessed via the API object cnToolsAPI.

Since
1.0, May 2025

Functions

ApiJsonResponse checkOverlapOBB (QVariantMap &obb1, QVariantMap &obb2)
 
ApiJsonResponse checkOverlapObjects (QString &objId1, QString &objId2, QVariantMap &options=QVariantMap())
 

Function Documentation

◆ checkOverlapOBB

ApiJsonResponse checkOverlapOBB ( QVariantMap & obb1,
QVariantMap & obb2 )
slot

Tests whether two oriented bounding boxes (OBBs) overlap.

This function checks if two oriented bounding boxes intersect in 3D space using the Separating Axis Theorem (SAT). Each bounding box is expected to be provided in JSON containing the box parameters:

  • center : Array (3D vector) defining the box center.
  • axes : Array of three normalized 3D vectors defining the local axes.
  • halfSizes: Array (3D vector) with the half-lengths of the box along each axis.

Example input:

{
"center": [0.0, 0.0, 0.0],
"axis_x": [1.0, 0.0, 0.0],
"axis_y": [0.0, 1.0, 0.0],
"axis_z": [0.0, 0.0, 1.0]
"half_extends": [1.0, 2.0, 3.0]
}
Note
Example input has to be adjusted!
Parameters
obb1The first oriented bounding box (JSON).
obb2The second oriented bounding box (JSON).
Returns
Coverages: fraction of each OBB that is overlapped by the other.
  • 0.0 means no overlap
  • 1.0 means fully covered

Example JSON response:

{
"overlap": true,
"min_overlap": 0.178277, // smallest overlap distance
"coverage_obb1": 0.057161, // fraction of OBB1 volume overlapped by OBB2
"coverage_obb2": 0.114563 // fraction of OBB2 volume overlapped by OBB1
}
Since
1.0, Nov 2025

◆ checkOverlapObjects

ApiJsonResponse checkOverlapObjects ( QString & objId1,
QString & objId2,
QVariantMap & options = QVariantMap() )
slot

Checks if two objects overlap and gives the overlap amounts.

This function determines whether the minimal oriented bounding boxes in 3D space of two objects intersect and provides a simple measure of how much they overlap.

Parameters
objId1ID of the first object
objId2ID of the second object
optionsOptional options
{
"precheck": true, // If true (default), an axis-aligned bounding box check is performed before the OOBB check.
"tolerance": 0.1 // Allowed overlap [m]
}
\return Coverages: fraction of each OBB that is overlapped by the other.
- 0.0 means no overlap
- 1.0 means fully covered
Example JSON response:
\code
{
"overlap": true,
"min_overlap": 0.178277, // smallest overlap distance
"coverage_obb1": 0.057161, // fraction of OBB1 volume overlapped by OBB2
"coverage_obb2": 0.114563 // fraction of OBB2 volume overlapped by OBB1
}
Since
1.0, Nov 2025