3D

Models

AsyncCogniteClient.three_d.models.create(name)

Create new 3d models.

AsyncCogniteClient.three_d.models.delete(id)

Delete 3d models.

AsyncCogniteClient.three_d.models.list([...])

List 3d models.

AsyncCogniteClient.three_d.models.retrieve(id)

Retrieve a 3d model by id.

AsyncCogniteClient.three_d.models.update(item)

Update 3d models.

Revisions

AsyncCogniteClient.three_d.revisions.create(...)

Create a revisions for a specified 3d model.

AsyncCogniteClient.three_d.revisions.delete(...)

Delete 3d model revisions.

AsyncCogniteClient.three_d.revisions.filter_nodes(...)

List nodes in a revision, filtered by node property values.

AsyncCogniteClient.three_d.revisions.list(...)

List 3d model revisions.

AsyncCogniteClient.three_d.revisions.list_ancestor_nodes(...)

Retrieves a list of ancestor nodes of a given node, including itself, in the hierarchy of the 3D model.

AsyncCogniteClient.three_d.revisions.list_nodes(...)

Retrieves a list of nodes from the hierarchy in the 3D Model.

AsyncCogniteClient.three_d.revisions.retrieve(...)

Retrieve a 3d model revision by id.

AsyncCogniteClient.three_d.revisions.update(...)

Update 3d model revisions.

AsyncCogniteClient.three_d.revisions.update_thumbnail(...)

Update a revision thumbnail.

Files

AsyncCogniteClient.three_d.files.retrieve(id)

Retrieve the contents of a 3d file by id.

Asset mappings

AsyncCogniteClient.three_d.asset_mappings.create(...)

Create 3d node asset mappings.

AsyncCogniteClient.three_d.asset_mappings.delete(...)

Delete 3d node asset mappings.

AsyncCogniteClient.three_d.asset_mappings.list(...)

List 3D node asset mappings.

Data classes

class cognite.client.data_classes.three_d.BoundingBox3D(max: list[float], min: list[float])

Bases: CogniteResource

The bounding box of the subtree with this sector as the root sector. Is null if there are no geometries in the subtree.

Parameters:
  • max (list[float]) – No description.

  • min (list[float]) – No description.

class cognite.client.data_classes.three_d.RevisionCameraProperties(target: list[float], position: list[float])

Bases: CogniteResource

Initial camera position and target.

Parameters:
  • target (list[float]) – Initial camera target.

  • position (list[float]) – Initial camera position.

class cognite.client.data_classes.three_d.ThreeDAssetMapping(
node_id: int,
asset_id: int | None = None,
tree_index: int | None = None,
subtree_size: int | None = None,
)

Bases: ThreeDAssetMappingCore

3D Asset mappings. This is the read version of ThreeDAssetMapping, which is used when retrieving 3D asset mappings.

Parameters:
  • node_id (int) – The ID of the node.

  • asset_id (int | None) – The ID of the associated asset (Cognite’s Assets API).

  • tree_index (int | None) – A number describing the position of this node in the 3D hierarchy, starting from 0. The tree is traversed in a depth-first order.

  • subtree_size (int | None) – The number of nodes in the subtree of this node (this number included the node itself).

as_write() ThreeDAssetMappingWrite

Returns this ThreedAssetMapping in a write version.

class cognite.client.data_classes.three_d.ThreeDAssetMappingCore(node_id: int, asset_id: int | None)

Bases: WriteableCogniteResource[ThreeDAssetMappingWrite], ABC

No description.

Parameters:
  • node_id (int) – The ID of the node.

  • asset_id (int | None) – The ID of the associated asset (Cognite’s Assets API).

class cognite.client.data_classes.three_d.ThreeDAssetMappingList(
resources: Sequence[T_CogniteResource],
)

Bases: WriteableCogniteResourceList[ThreeDAssetMappingWrite, ThreeDAssetMapping]

as_write() ThreeDAssetMappingWriteList

Returns this ThreedAssetMappingList in a write version.

class cognite.client.data_classes.three_d.ThreeDAssetMappingWrite(node_id: int, asset_id: int | None = None)

Bases: ThreeDAssetMappingCore

3D Asset mappings. This is the write version of ThreeDAssetMapping, which is used when creating 3D asset mappings.

Parameters:
  • node_id (int) – The ID of the node.

  • asset_id (int | None) – The ID of the associated asset (Cognite’s Assets API).

as_write() ThreeDAssetMappingWrite

Returns this ThreedAssetMappingWrite instance.

class cognite.client.data_classes.three_d.ThreeDAssetMappingWriteList(
resources: Sequence[T_CogniteResource],
)

Bases: CogniteResourceList[ThreeDAssetMappingWrite]

class cognite.client.data_classes.three_d.ThreeDModel(
name: str,
id: int,
created_time: int,
data_set_id: int | None = None,
metadata: dict[str, str] | None = None,
)

Bases: ThreeDModelCore

This class represents a 3D model in Cognite Data Fusion. This is the read version of ThreeDModel, which is used when retrieving 3D models.

Parameters:
  • name (str) – The name of the model.

  • id (int) – The ID of the model.

  • created_time (int) – The creation time of the resource, in milliseconds since January 1, 1970 at 00:00 UTC.

  • data_set_id (int | None) – The id of the dataset this 3D model belongs to.

  • metadata (dict[str, str] | None) – Custom, application-specific metadata. String key -> String value. Limits: Maximum length of key is 32 bytes, value 512 bytes, up to 16 key-value pairs.

as_write() ThreeDModelWrite

Returns this ThreedModel in a write version.

class cognite.client.data_classes.three_d.ThreeDModelCore(
name: str,
data_set_id: int | None,
metadata: dict[str, str] | None,
)

Bases: WriteableCogniteResource[ThreeDModelWrite], ABC

This class represents a 3D model in Cognite Data Fusion.

Parameters:
  • name (str) – The name of the model.

  • data_set_id (int | None) – The id of the dataset this 3D model belongs to.

  • metadata (dict[str, str] | None) – Custom, application-specific metadata. String key -> String value. Limits: Maximum length of key is 32 bytes, value 512 bytes, up to 16 key-value pairs.

class cognite.client.data_classes.three_d.ThreeDModelList(
resources: Sequence[T_CogniteResource],
)

Bases: WriteableCogniteResourceList[ThreeDModelWrite, ThreeDModel], NameTransformerMixin, InternalIdTransformerMixin

as_write() ThreeDModelWriteList

Returns this ThreedModelList in a write version.

class cognite.client.data_classes.three_d.ThreeDModelRevision(
id: int,
file_id: int,
published: bool,
status: str,
asset_mapping_count: int,
created_time: int,
rotation: list[float] | None = None,
scale: list[float] | None = None,
translation: list[float] | None = None,
camera: RevisionCameraProperties | None = None,
metadata: dict[str, str] | None = None,
thumbnail_threed_file_id: int | None = None,
thumbnail_url: str | None = None,
)

Bases: ThreeDModelRevisionCore

This class represents a 3D model revision in Cognite Data Fusion. This is the read version of ThreeDModelRevision, which is used when retrieving 3D model revisions.

Parameters:
  • id (int) – The ID of the revision.

  • file_id (int) – The file id.

  • published (bool) – True if the revision is marked as published.

  • status (str) – The status of the revision.

  • asset_mapping_count (int) – The number of asset mappings for this revision.

  • created_time (int) – The creation time of the resource, in milliseconds since January 1, 1970 at 00:00 UTC.

  • rotation (list[float] | None) – No description.

  • scale (list[float] | None) – Scale of 3D model in directions X,Y and Z. Should be uniform.

  • translation (list[float] | None) – 3D offset of the model.

  • camera (RevisionCameraProperties | None) – Initial camera position and target.

  • metadata (dict[str, str] | None) – Custom, application specific metadata. String key -> String value. Limits: Maximum length of key is 32 bytes, value 512 bytes, up to 16 key-value pairs.

  • thumbnail_threed_file_id (int | None) – The threed file ID of a thumbnail for the revision. Use /3d/files/{id} to retrieve the file.

  • thumbnail_url (str | None) – The URL of a thumbnail for the revision.

as_write() ThreeDModelRevisionWrite

Returns this ThreedModelRevision in a write version.

class cognite.client.data_classes.three_d.ThreeDModelRevisionCore(
file_id: int,
published: bool,
rotation: list[float] | None = None,
scale: list[float] | None = None,
translation: list[float] | None = None,
camera: RevisionCameraProperties | dict[str, Any] | None = None,
metadata: dict[str, str] | None = None,
)

Bases: WriteableCogniteResource[ThreeDModelRevisionWrite], ABC

No description.

Parameters:
  • file_id (int) – The file id.

  • published (bool) – True if the revision is marked as published.

  • rotation (list[float] | None) – No description.

  • scale (list[float] | None) – Scale of 3D model in directions X,Y and Z. Should be uniform.

  • translation (list[float] | None) – 3D offset of the model.

  • camera (RevisionCameraProperties | dict[str, Any] | None) – Initial camera position and target.

  • metadata (dict[str, str] | None) – Custom, application specific metadata. String key -> String value. Limits: Maximum length of key is 32 bytes, value 512 bytes, up to 16 key-value pairs.

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters:

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns:

A dictionary representation of the instance.

Return type:

dict[str, Any]

class cognite.client.data_classes.three_d.ThreeDModelRevisionList(
resources: Sequence[T_CogniteResource],
)

Bases: WriteableCogniteResourceList[ThreeDModelRevisionWrite, ThreeDModelRevision], InternalIdTransformerMixin

as_write() ThreeDModelRevisionWriteList

Returns this ThreedModelRevisionList in a write version.

class cognite.client.data_classes.three_d.ThreeDModelRevisionUpdate(id: int | None = None, external_id: str | None = None)

Bases: CogniteUpdate

No description.

Parameters:

id (int) – A server-generated ID for the object.

class cognite.client.data_classes.three_d.ThreeDModelRevisionWrite(
file_id: int,
published: bool = False,
rotation: list[float] | None = None,
scale: list[float] | None = None,
translation: list[float] | None = None,
camera: RevisionCameraProperties | dict[str, Any] | None = None,
metadata: dict[str, str] | None = None,
)

Bases: ThreeDModelRevisionCore

This class represents a 3D model revision in Cognite Data Fusion. This is the write version of ThreeDModelRevision, which is used when creating 3D model revisions.

Parameters:
  • file_id (int) – The file id to a file uploaded to Cognite’s Files API. Can only be set on revision creation, and can never be updated.

  • published (bool) – True if the revision is marked as published.

  • rotation (list[float] | None) – No description.

  • scale (list[float] | None) – Scale of 3D model in directions X,Y and Z. Should be uniform.

  • translation (list[float] | None) – 3D offset of the model.

  • camera (RevisionCameraProperties | dict[str, Any] | None) – Initial camera position and target.

  • metadata (dict[str, str] | None) – Custom, application specific metadata. String key -> String value. Limits: Maximum length of key is 32 bytes, value 512 bytes, up to 16 key-value pairs.

as_write() ThreeDModelRevisionWrite

Returns this ThreedModelRevisionWrite instance.

class cognite.client.data_classes.three_d.ThreeDModelRevisionWriteList(
resources: Sequence[T_CogniteResource],
)

Bases: CogniteResourceList[ThreeDModelRevisionWrite]

class cognite.client.data_classes.three_d.ThreeDModelUpdate(id: int | None = None, external_id: str | None = None)

Bases: CogniteUpdate

No description.

Parameters:

id (int) – A server-generated ID for the object.

class cognite.client.data_classes.three_d.ThreeDModelWrite(
name: str,
data_set_id: int | None = None,
metadata: dict[str, str] | None = None,
)

Bases: ThreeDModelCore

This class represents a 3D model in Cognite Data Fusion. This is the write version of ThreeDModel, which is used when creating 3D models.

Parameters:
  • name (str) – The name of the model.

  • data_set_id (int | None) – The id of the dataset this 3D model belongs to.

  • metadata (dict[str, str] | None) – Custom, application-specific metadata. String key -> String value. Limits: Maximum length of key is 32 bytes, value 512 bytes, up to 16 key-value pairs.

as_write() ThreeDModelWrite

Returns this ThreedModelWrite instance.

class cognite.client.data_classes.three_d.ThreeDModelWriteList(
resources: Sequence[T_CogniteResource],
)

Bases: CogniteResourceList[ThreeDModelWrite], NameTransformerMixin

class cognite.client.data_classes.three_d.ThreeDNode(
id: int,
tree_index: int,
depth: int,
name: str,
subtree_size: int,
parent_id: int | None = None,
properties: dict[str, dict[str, str]] | None = None,
bounding_box: BoundingBox3D | None = None,
)

Bases: CogniteResource

No description.

Parameters:
  • id (int) – The ID of the node.

  • tree_index (int) – The index of the node in the 3D model hierarchy, starting from 0. The tree is traversed in a depth-first order.

  • depth (int) – The depth of the node in the tree, starting from 0 at the root node.

  • name (str) – The name of the node.

  • subtree_size (int) – The number of descendants of the node, plus one (counting itself).

  • parent_id (int | None) – The parent of the node, null if it is the root node.

  • properties (dict[str, dict[str, str]] | None) – Properties extracted from 3D model, with property categories containing key/value string pairs.

  • bounding_box (BoundingBox3D | None) – The bounding box of the subtree with this sector as the root sector. Is null if there are no geometries in the subtree.

dump(camel_case: bool = True) dict[str, Any]

Dump the instance into a json serializable Python data type.

Parameters:

camel_case (bool) – Use camelCase for attribute names. Defaults to True.

Returns:

A dictionary representation of the instance.

Return type:

dict[str, Any]

class cognite.client.data_classes.three_d.ThreeDNodeList(
resources: Sequence[T_CogniteResource],
)

Bases: CogniteResourceList[ThreeDNode], InternalIdTransformerMixin