COLNEO Pro 1.2
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

GEOMETRY
ApiJsonResponse checkOverlapObjects (QString &objId1, QString &objId2, QVariantMap &options=QVariantMap())
ApiJsonResponse checkOverlapOBB (QVariantMap &obb1, QVariantMap &obb2)
ApiJsonResponse splitObjectsByPlane (QStringList &id, QVariantMap &options)
ApiJsonResponse checkToplogy (QString &id, QVariantMap &options)
ApiJsonResponse checkGeometry (QString &id, QVariantMap &options)
ApiJsonResponse calcContactAreas (QStringList &left_objects, QStringList &right_objects, QVariantMap &options)
ApiJsonResponse checkInclusions (QStringList &selectionA, QStringList &selectionB, QVariantMap &options)
ApiJsonResponse checkCoincidences (QStringList &left_objects, QStringList &right_objects, QVariantMap &options)
ApiJsonResponse addObjectGeometry (QString &object_a, QString &object_b, QVariantMap &options)
ApiJsonResponse subtractObjectGeometry (QString &object_a, QString &object_b, QVariantMap &options)
JSON Web Token
ApiJsonResponse createJwt (QString secret, QJsonObject payload)
ApiJsonResponse getJwtPayload (QString token)
ApiJsonResponse verifyJwt (QString &token, QString &secret)
FILES JSON/CSV/TXT
ApiJsonResponse readTextFile (QString fn)
ApiJsonResponse writeTextFile (QString fn, QString content)
ApiJsonResponse appendToTextFile (QString handle, QString content)
ApiJsonResponse closeTextFile (QString handle)
ApiJsonResponse getOpenFiles ()
ApiJsonResponse readJsonFile (QString fn)
ApiJsonResponse writeJsonFile (QString &fn, QJsonValue &jsonValue)
ApiJsonResponse readCsvFile (QString fn, QVariantMap &options)
ApiJsonResponse writeCsvFile (QString fn, QJsonArray jsonObj, QVariantMap &options)
ApiJsonResponse readXmlFile (QString fn)
ApiJsonResponse createDirectory (QString dirname)
Dimensions
ApiJsonResponse getDimensionIds ()
ApiJsonResponse getDimensions ()
ApiJsonResponse getDimension (QString &id)
ApiJsonResponse createDimension (QString &groupId, QVariantMap &data)
ApiJsonResponse createDimensionGroup (QVariantMap &data)
ApiJsonResponse deleteDimensions (QStringList &ids)
ApiJsonResponse updateDimension (QString &id, QVariantMap &data)
ApiJsonResponse deleteDimensionGroups (QStringList &ids, bool deleteContents)
ApiJsonResponse setDimensionsVisible (QStringList &ids, bool visible)
ApiJsonResponse createObjectFromDimension (QString &dimensionId, QVariantMap &options={})

Function Documentation

◆ addObjectGeometry

ApiJsonResponse addObjectGeometry ( QString & object_a,
QString & object_b,
QVariantMap & options )
slot

Add object A to object Bm return new object with merged geometry.

◆ appendToTextFile

ApiJsonResponse appendToTextFile ( QString handle,
QString content )
slot
Since
1.1, 05.2026, jh

◆ calcContactAreas

ApiJsonResponse calcContactAreas ( QStringList & left_objects,
QStringList & right_objects,
QVariantMap & options )
slot

Calculates contact areas between two selections of faceted triangle mesh objects.

IDs identify the meshes themselves; children and smart-set contents are not expanded. Meshes use common world coordinates in metres and may be open surfaces without consistent winding or enclosed volume. Self-pairs are skipped and symmetric pairs are evaluated once. Source geometry is not modified.

Contact requires surface separation no greater than distance_tolerance (metres). For pairs of closed, consistently oriented solids, intersection volume must also not exceed maximum_intersection_volume (cubic metres); such solids must not self-intersect. Both limits must be finite and non-negative. Area measures projected overlap of parallel faces within tolerance, counting overlapping projections once per surface. Faces must oppose each other only when both meshes are closed solids; otherwise surfaces are two-sided and either winding is accepted. Point/edge contacts and nonparallel faces contribute zero area.

The treatment option accepts:

  • ignore: return no contact results.
  • clash: report contacts with is_clash set to true.
  • separate_result (default): report contacts with is_clash set to false.

The degenerate_triangle_handling option accepts ignore (default), which skips zero-area triangles, or prevent_calculation, which reports an error for an affected object and excludes its pairs. The remaining valid triangles are used even if they form an open surface. Invalid indices, non-finite triangle geometry and meshes with no remaining valid triangles still produce errors. Source meshes are not modified.

Set include_contact_geometry to true (default false) to also return contact_geometry_a and contact_geometry_b in each contact result. These mesh objects lie on the respective source surfaces and use flat vertices [x, y, z, ...] in world metres and triangles [i0, i1, i2, ...] with zero-based indices. Geometry covers the measured areas; zero-area contacts return empty arrays. The option consumes additional work and response memory. Generated triangles collapsing at world-coordinate precision are discarded from both area measurements and geometry, independently of the input degenerate_triangle_handling policy. With contact_geometry_output set to json (default), the object structure is unchanged. With object_structure and include_contact_geometry true, non-empty patches become Object3d surfaces in a new "Contact areas" Design model, using the configured contact style. Source objects remain in their original models. data.contact_model_id identifies the new model. Results contain contact_object_a_id/contact_object_b_id instead of contact_geometry_a/contact_geometry_b. New objects have fresh IDs and class-defined properties. Source properties, type assignments, links and relations are not copied; the objects belong to the new contact model and use the configured contact style. Equivalent patches within a pair share one object; both IDs then match and contact_geometry_shared is true. Opposite winding or different triangulations do not prevent deduplication; numerical plane tolerance and relative area tolerance 1e-9 apply. Empty patches create no object and have no object IDs; if all patches are empty, no model is created. Only complete calculations are published; preparation failures return 422 and leave the structure unchanged. Repeated calls create separate models. Disabled geometry creates no model or objects.

style accepts id, name and color strings and defaults to { "id": "contact", "name": "ContactStyle", "color": "#3aa5ff" }. Colors use #rrggbb or #rrggbbaa with alpha last. Missing style fields retain defaults. New objects use this persistent facet style. Matching repository styles are reused; a conflicting style ID returns 409 without changing existing styles. Invalid style fields return 400 in object-structure mode. JSON mode does not create or modify styles.

Example options (the defaults allow 2 mm separation and 1 mm3 intersection):

{
"treatment": "separate_result",
"degenerate_triangle_handling": "ignore",
"include_contact_geometry": true,
"contact_geometry_output": "json",
"style": { "id": "contact", "name": "ContactStyle", "color": "#3aa5ff" },
"distance_tolerance": 0.002,
"maximum_intersection_volume": 1e-9
}

Example call with repository object IDs:

const QVariantMap options {
{ "treatment", "separate_result" },
{ "degenerate_triangle_handling", "ignore" },
{ "include_contact_geometry", true },
{ "contact_geometry_output", "json" },
{ "distance_tolerance", 0.002 },
{ "maximum_intersection_volume", 1e-9 }
};
const auto response = calcContactAreas(QStringList { "object-a-id" }, QStringList { "object-b-id" }, options);
ApiJsonResponse calcContactAreas(QStringList &left_objects, QStringList &right_objects, QVariantMap &options)
Calculates contact areas between two selections of faceted triangle mesh objects.

Calculation data contains results, errors, complete, checked_pairs and failed_pairs. data.used_options contains the effective options, including defaults, on success and errors; before calculation starts it describes the settings prepared for the request. Each result identifies selection_a_index/selection_b_index and object_a_id/object_b_id, and includes surface_distance, is_clash and contact_area_a/contact_area_b in square metres. contact_area is the mean of the two surface areas, counting an ordinary shared interface once. Contacts may have zero area. Inspect complete and errors before treating an empty result list as absence of contact. volume_a/volume_b are reported only for the respective closed solid; intersection_volume and intersection_ratio are omitted when either mesh is an open surface, and its volume limit does not apply.

Parameters
left_objectsIDs of the first mesh selection.
right_objectsIDs of the second mesh selection.
optionsSettings accepted by gom::ContactOptions; omitted fields retain their defaults.
Returns
Status 200 for complete calculations, 400 for incompatible objects or invalid options, 206 for partial calculations, or 422 when geometry errors occur without any successfully evaluated pair. ID resolution can instead return 204 for an empty selection, 404 when no IDs in a selection are found, or 206 for missing or duplicate IDs; these responses return immediately without performing calculations.
See also
Project::calculateContactAreas(), gom::ContactOptions
Since
1.1, 09/2026

◆ checkCoincidences

ApiJsonResponse checkCoincidences ( QStringList & left_objects,
QStringList & right_objects,
QVariantMap & options )
slot

Detects geometrically coincident objects between two selections using Project::checkCoincidences(). Selections resolve to triangle meshes with finite coordinates and valid indices. Open surfaces and either winding are supported; closed topology and volume are unnecessary. Zero-area triangles are ignored; meshes with no remaining valid triangles produce errors. Source objects are unchanged. Self-pairs are skipped and symmetric pairs are reported once. Geometry failures are reported by object ID while other pairs continue, subject to the shared geometry work and candidate limits.

Parameters
left_objectsObject IDs for selection A; smart sets are not expanded.
right_objectsObject IDs for selection B; smart sets are not expanded.
optionsgom::CoincidenceOptions map. Omitted keys retain these defaults:
  • position_tolerance: 0.002 metres, maximum target vertex distance from a source triangle plane.
  • angular_tolerance: 0.5 degrees, maximum angular difference between corresponding surface normals, ignoring their sign. Matching is evaluated in both directions.
  • minimum_coincidence_ratio: 0.95, minimum fraction of each triangle covered by the union of matching projected triangles on the other object. Every valid triangle must pass in both directions.
  • minimum_volume_similarity and minimum_bounding_box_similarity: legacy values (default 0.98), echoed and range-validated but unused by surface coincidence checks. Different triangulations are supported. Projected triangle edges are not expanded; numerical plane tolerance and relative area tolerance 1e-9 apply. Values must be finite; position tolerance must be non-negative, angular tolerance in [0, 180], and ratios in [0, 1]. A coincidence ratio of 1 requires full coverage; zero still requires positive overlap for each triangle.
Returns
JSON envelope with status, message and data. data.used_options contains effective options, including defaults, on success and errors. Calculation data also contains results, errors, complete, checked_pairs and failed_pairs. Each result contains object_a_id, object_b_id, types ["coincidence"], is_clash true and an empty inclusion_directions array. Selection indices and volume fields are omitted. Status is 200 for a complete calculation, 400 for invalid options or a non-mesh object, 206 for partial calculation results, or 422 when geometry errors occur without any successfully evaluated pair. Object lookup can instead return 204 for an empty selection, 404 when no IDs resolve, or 206 for missing/duplicate IDs; calculation does not start on lookup failure. Inspect complete and errors when calculation data is present before treating absent results as absence of coincidences.
return cnToolsAPI.calcCoincidences(["object_a_id"], ["object_b_id"], {
"position_tolerance": 0.002,
"angular_tolerance": 0.5,
"minimum_coincidence_ratio": 0.95
});
Since
1.1, 09/2026

◆ checkGeometry

ApiJsonResponse checkGeometry ( QString & id,
QVariantMap & options )
slot

Checks the geometric validity of one faceted triangle mesh object.

The identified object itself must be a faceted triangle mesh; child objects are not included. Checks are cumulative according to the selected level.

Example options:

{
"level": "geometric_validity",
"linear_tolerance": 1e-6,
"area_tolerance": 1e-12,
"volume_tolerance": 1e-18,
"coordinate_limit": 0.0,
"check_triangle_quality": false,
"minimum_triangle_angle_degrees": 1.0,
"maximum_triangle_aspect_ratio": 100.0
}

A successful request returns status 200 and data.valid. Invalid geometry is described in message and as individual strings in data.issues. Invalid options return status 400.

Parameters
idID of the faceted triangle mesh object to check.
optionsGeometry options in the format accepted by geometry::GeometryCheckOptions.
Returns
Status 200 with validation results, 404 if the ID is unknown, or 400 for an incompatible object or invalid options.
Since
1.1, 08/2026

◆ checkInclusions

ApiJsonResponse checkInclusions ( QStringList & selectionA,
QStringList & selectionB,
QVariantMap & options )
slot

Checks containment between objects in selectionA and selectionB, in both directions by default. Selections contain object IDs resolving to triangle meshes. Only the potential container needs valid closed solid geometry; all vertices of the inner object are tested, regardless of its triangle topology. Invalid containers produce errors by ID while other checks continue. Returns each matching pair; an object contained in several objects produces several results. Source objects are unchanged. Options use gom::InclusionOptions keys. direction defaults to "either", checking A inside B and B inside A; explicit "a_inside_b" or "b_inside_a" values restrict the check. boundary_tolerance defaults to 0.002 metres. containment_threshold is validated and echoed but unused here: every vertex must pass the containment test. Edges/faces extending outside concave containers are not tested. Empty/non-finite inner vertex sets do not match.

Returns
Project::checkInclusions() results with effective used_options, or an object lookup/type error. Inspect complete and errors before treating absent results as absence of inclusions.
return cnToolsAPI.checkInclusions(["object_a_id"], ["object_b_id"], {
"direction": "either",
"boundary_tolerance": 0.002
});
Since
1.1, 09/2026

◆ 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

◆ checkToplogy

ApiJsonResponse checkToplogy ( QString & id,
QVariantMap & options )
slot

Checks the topology of one faceted triangle mesh object.

The identified object itself must be a faceted triangle mesh. Child objects are not included. The selected validation level is cumulative.

Example options:

{
"level": "topological_manifold",
"check_duplicate_triangles": true,
"check_unused_vertices": true
}

Supported levels are triangle_validity, topological_manifold, geometric_validity, and solid_validity. For this topology check, levels from topological_manifold onward enable the manifold checks.

Example response:

{
"status": 200,
"message": "Topology check completed successfully for 1 object(s).",
"data": {
"valid": true,
"level": "topological_manifold",
"object_count": 1,
"invalid_object_count": 0,
"empty_mesh_count": 0,
"manifold_checks_performed": true,
"invalid_vertex_references": 0,
"repeated_vertex_triangles": 0,
"duplicate_triangles": 0,
"invalid_face_references": 0,
"invalid_facet_references": 0,
"boundary_edges": 0,
"non_manifold_edges": 0,
"orientation_errors": 0,
"non_manifold_vertices": 0,
"unused_vertices": 0,
"objects": [
{
"object_index": 0,
"valid": true,
"empty_mesh": false,
"manifold_checks_performed": true,
"vertex_count": 8,
"triangle_count": 12,
"face_count": 6,
"facet_count": 1,
"shell_count": 1,
"invalid_vertex_references": 0,
"repeated_vertex_triangles": 0,
"duplicate_triangles": 0,
"invalid_face_references": 0,
"invalid_facet_references": 0,
"boundary_edges": 0,
"non_manifold_edges": 0,
"orientation_errors": 0,
"non_manifold_vertices": 0,
"unused_vertices": 0
}
]
}
}

If validation fails, message describes every detected issue and data.issues contains the individual explanations. For example:

{
"status": 200,
"message": "Invalid topology. 16 non-manifold edges belong to more than two triangles; 16 non-manifold vertices do not form one closed triangle fan or are incident to invalid edges.",
"data": {
"valid": false,
"issues": [
"16 non-manifold edges belong to more than two triangles",
"16 non-manifold vertices do not form one closed triangle fan or are incident to invalid edges"
]
}
}
Parameters
idID of the faceted triangle mesh object to check.
optionsTopology options in the format accepted by geometry::TopologyCheckOptions.
Returns
Status 200 with validation results, 404 if the ID is unknown, or 400 if the identified object is not a faceted triangle mesh.
Since
1.1, 08/2026

◆ closeTextFile

ApiJsonResponse closeTextFile ( QString handle)
slot

Close an currently opend file.

Returns
data: {
"file" : str // filePath and name
"size" : int // file size in byte
},
message: str
Since
1.1, 05.2026, jh

◆ createDimension

ApiJsonResponse createDimension ( QString & groupId,
QVariantMap & data )
slot

Creates a dimension from an API-specific geometry description.

Required members are type and geometry. Optional members are name, comment, and style. Supported types are point, linear, angle, polygon, clearance, area, and volume.

Example creation data:

{
"type": "linear",
"name": "Length",
"comment": "Overall length",
"geometry": {
"points": [
{ "position": [0.0, 0.0, 0.0] },
{ "position": [1.0, 0.0, 0.0] }
]
}
}

An empty parentId creates the dimension at the root level. The parent is a structural argument and must not be included as parent_id in data.

Parameters
groupIdID of the parent dimension group, or an empty string for the root.
dataDimension creation data.
Returns
API response whose data is the created dimension data object.
See also
getDimension
Since
1.1, 07/2026

◆ createDimensionGroup

ApiJsonResponse createDimensionGroup ( QVariantMap & data)
slot

Creates a dimension group.

Example creation data:

{
"name": "Storey 1",
"comment": "Dimensions for the first storey",
"parent_id": "46966125-c400-4af8-bc49-7783df1cfbd7"
}

An empty or omitted parent_id creates a top-level group.

Parameters
dataObject containing name and optional comment and parent_id.
Returns
API response whose data is a QVariantMap describing the created group.

Example response data:

{
"id": "a7283401-d64a-4528-91c6-5536244bb144",
"kind": "group",
"name": "Storey 1",
"comment": "Dimensions for the first storey",
"parent_id": "46966125-c400-4af8-bc49-7783df1cfbd7",
"children": []
}
Since
1.1, 07/2026

◆ createDirectory

ApiJsonResponse createDirectory ( QString dirname)
slot

Create directory relative to project directory

Parameters
dirnameDirectory name, relative to project directory.
Returns
data =
{
"path" : str // absolute path
}
Since
1.1, 06.2026, jh

◆ createJwt

ApiJsonResponse createJwt ( QString secret,
QJsonObject payload )
slot

Create JSON web token using secret for encoding.

Parameters
payloadAny JSON object to be encoded using 'secret'
Since
1.0, 04.2026 jh

◆ createObjectFromDimension

ApiJsonResponse createObjectFromDimension ( QString & dimensionId,
QVariantMap & options = {} )
slot

Creates independent design geometry from a permanent dimension.

Point dimensions create an ObjectPoint, linear, clearance, angular and polygon dimensions create an ObjectLines, and area dimensions create an Object3d. Volume dimensions are not supported yet.

Without a parent, an existing DesignModel named "Dimensions" is used or created when none exists. A supplied parent must be a model or container in the design domain. Source colors are copied into independent styles and do not link the new object to source styles.

Parameters
dimensionIdID of the permanent dimension.
optionsOptional object creation settings:
{
"parent_id": "optional-design-model-or-container-id",
"color": "dimension"
}
color accepts dimension (default), source for area dimensions, or a hexadecimal RGBA color such as #3aa5ffff.
Returns
Status 201 with dimension_id, parent_id, object_id and object_type; 400 for invalid input, 404 when the dimension or parent is missing, 409 for an unsuitable parent or style registration failure, or 422 when the dimension cannot be converted.
Since
1.1, 09/2026

◆ deleteDimensionGroups

ApiJsonResponse deleteDimensionGroups ( QStringList & ids,
bool deleteContents )
slot

Deletes or dissolves dimension groups.

If deleteContents is false, the contained entries are moved to the respective parent group before the groups are removed.

Parameters
idsIDs of the groups.
deleteContentstrue to delete contained entries; false to move them to the parent.
Returns
API response without application-specific data.
Since
1.1, 07/2026

◆ deleteDimensions

ApiJsonResponse deleteDimensions ( QStringList & ids)
slot

Deletes dimensions from the current project.

Parameters
idsIDs of the dimensions to delete.
Returns
API response whose data is a QStringList containing the deleted dimension IDs.
Since
1.1, 07/2026

◆ getDimension

ApiJsonResponse getDimension ( QString & id)
slot

Returns a dimension by ID.

The following example shows the relevant members of the QVariantMap in data. The item member contains the runtime serialization of the DimensionItem and is shown only in part.

{
"id": "9fe2a355-366f-437a-ab80-957369312f16",
"kind": "dimension",
"name": "Width",
"comment": "Clear opening",
"parent_id": "46966125-c400-4af8-bc49-7783df1cfbd7",
"visible": true,
"item": {
"type": "Line",
"points": [
{ "world_pos": [0.0, 0.0, 0.0] },
{ "world_pos": [1.0, 0.0, 0.0] }
]
}
}
Parameters
idID of the dimension.
Returns
API response whose data is a QVariantMap containing the dimension data object.
Since
1.1, 07/2026

◆ getDimensionIds

ApiJsonResponse getDimensionIds ( )
slot

Returns the IDs of all dimensions in the current project.

Returns
API response whose data is a QStringList containing the dimension IDs.
Since
1.1, 07/2026

◆ getDimensions

ApiJsonResponse getDimensions ( )
slot

Returns all dimensions in the current project.

This batch operation avoids a separate API call for every dimension ID.

Returns
API response whose data is a QVariantList of dimension data objects.
See also
getDimension
Since
1.1, 07/2026

◆ getJwtPayload

ApiJsonResponse getJwtPayload ( QString token)
slot

Decode JWT and return payload.

Since
1.0, 04.2026 jh

◆ getOpenFiles

ApiJsonResponse getOpenFiles ( )
slot

Get list of currently opened files.

Since
1.1, 05.2026, jh

◆ readCsvFile

ApiJsonResponse readCsvFile ( QString fn,
QVariantMap & options )
slot

Read CSV text file.

Parameters
fnFilename, absolute path or relative to project directory
options
Definition gom.options.h:1723
Returns
data : object
{
"colname" : colvalue
}
Since
1.1, 05.2026, jh

◆ readJsonFile

ApiJsonResponse readJsonFile ( QString fn)
slot

Read file whicj contains data in JSON format and return JSON objects

Since
1.1, 05.2026, jh

◆ readTextFile

ApiJsonResponse readTextFile ( QString fn)
slot
Returns
data : str / content of text file
Since
1.1, 05.2026, jh

◆ readXmlFile

ApiJsonResponse readXmlFile ( QString fn)
slot

Read XML file and convert it to JSON

Returns
data : object
Since
1.1, 05.2026, jh

◆ setDimensionsVisible

ApiJsonResponse setDimensionsVisible ( QStringList & ids,
bool visible )
slot

Shows or hides dimensions.

Parameters
idsIDs of the dimensions whose visibility is changed.
visibletrue to show the dimensions; false to hide them.
Returns
API response whose data is a QVariantMap containing ids as a QStringList and visible as a bool.

Example response data:

{
"ids": ["9fe2a355-366f-437a-ab80-957369312f16"],
"visible": true
}
Since
1.1, 07/2026

◆ splitObjectsByPlane

ApiJsonResponse splitObjectsByPlane ( QStringList & id,
QVariantMap & options )
slot

Split object by a given clipping plane into two or more pieces.

Parameters
idObject ID
optionsOptions such as clipping plane
{
geometry::CuttingObjectsOptions
}
Returns
Result
status : 200 // success
data : {
...
}
Since
1.1, 08.2026, jh

◆ subtractObjectGeometry

ApiJsonResponse subtractObjectGeometry ( QString & object_a,
QString & object_b,
QVariantMap & options )
slot

Subtract object B from object A

◆ updateDimension

ApiJsonResponse updateDimension ( QString & id,
QVariantMap & data )
slot

Updates the editable metadata of a dimension.

Only the members name, comment, and style are accepted. All members are optional, but at least one must be supplied. Geometry, type, ID, and visibility cannot be changed by this method. Visibility is controlled by its dedicated method.

Example update data:

{
"name": "Clear width",
"comment": "Measured between finished surfaces",
"style": {
"text_color": "#ffffff"
}
}
Parameters
idID of the dimension to update.
dataObject containing one or more of name, comment, and style.
Returns
API response whose data is the updated dimension data object.
See also
getDimension
Since
1.1, 07/2026

◆ verifyJwt

ApiJsonResponse verifyJwt ( QString & token,
QString & secret )
slot

Check if JWT is valid using 'secret'

Since
1.0, 04.2026 jh

◆ writeCsvFile

ApiJsonResponse writeCsvFile ( QString fn,
QJsonArray jsonObj,
QVariantMap & options )
slot

Write a CSV file from a list of JSON objects

Parameters
options
{
"columns" : [ // default object members/keys
{ "A" : "abc" },
{ "B" : "xyz" },
{ "C" : "ghj" }
],
"separator" : "," // default : ','
}
Returns
data: {
"file" : str // filePath and name
"size" : int // file size in byte
},
message: str
Since
1.1, 05.2026, jh

◆ writeJsonFile

ApiJsonResponse writeJsonFile ( QString & fn,
QJsonValue & jsonValue )
slot

Write JSON object to file

Parameters
fnFilename, either relative (to project directory) or absolute filepath
jsonValueObject or Array in JSON format
Returns
data: {
"file" : str // filePath and name
"size" : int // file size in byte
},
message: str
Since
1.1, 05.2026, jh

◆ writeTextFile

ApiJsonResponse writeTextFile ( QString fn,
QString content )
slot

Write text to file

Parameters
fnFilename, either relative (to project directory) or absolute filepath
contentUTF-8 encoded text
Returns
data: {
"file" : str // filePath and name
"size" : int // file size in byte
},
message: str
Since
1.1, 05.2026, jh