Skip to main content

Scene and artifacts

Validated Scene documents, resources, portable archives, and renderable artifact compilation.

This catalog contains 65 public symbols. Select a symbol for its exact signature, parameters, return contract, errors, members, aliases, and behavior notes.

Modules

SymbolImportSummary
scenefrom cadflow import sceneScene compilation and archive domain facade.

Classes

SymbolImportSummary
ArchiveInfofrom cadflow.scene import ArchiveInfoArchiveInfo(members: 'Mapping[str, bytes]', input_size: 'int | None', canonical_size: 'int', used_deflate: 'bool')
CanonicalEdgeBlockfrom cadflow import CanonicalEdgeBlockCanonicalEdgeBlock(entity_id: 'str', render_key: 'bytes', block_bytes: 'bytes', position_keys: 'tuple[bytes, ...]', positions: 'tuple[tuple[float, float, float], ...]', segments: 'tuple[tuple[int, int], ...]')
CanonicalTriangleBlockfrom cadflow import CanonicalTriangleBlockCanonicalTriangleBlock(entity_id: 'str', render_key: 'bytes', block_bytes: 'bytes', vertex_keys: 'tuple[bytes, ...]', positions: 'tuple[tuple[float, float, float], ...]', normals: 'tuple[tuple[float, float, float], ...]', triangles: 'tuple[tuple[int, int, int], ...]')
CompiledScenePackagefrom cadflow import CompiledScenePackageCompiledScenePackage(manifest: 'Mapping[str, Any]', blobs: 'Mapping[str, bytes]')
EntityDocumentfrom cadflow.scene import EntityDocumentEntityDocument(value: 'DocumentValue | Mapping[str, Any]') -> 'None'
GlbInfofrom cadflow.scene import GlbInfoGlbInfo(kind: "Literal['triangle', 'line']", vertex_count: 'int', index_count: 'int', primitive_count: 'int', decoded_buffer_bytes: 'int', position_bounds: 'tuple[tuple[float, float, float], tuple[float, float, float]]')
NormalizedProductDocumentfrom cadflow.scene import NormalizedProductDocumentNormalizedProductDocument(value: 'DocumentValue | Mapping[str, Any]') -> 'None'
PresentationDocumentfrom cadflow.scene import PresentationDocumentPresentationDocument(value: 'DocumentValue | Mapping[str, Any]') -> 'None'
RenderEdgeMeshfrom cadflow import RenderEdgeMeshRenderEdgeMesh(positions: 'tuple[tuple[float, float, float], ...]', indices: 'tuple[int, ...]', groups: 'tuple[RenderGroup, ...]', bounds: 'tuple[tuple[float, float, float], tuple[float, float, float]]', blocks: 'tuple[CanonicalEdgeBlock, ...]', degenerate_entity_ids: 'tuple[str, ...]')
RenderGroupfrom cadflow import RenderGroupRenderGroup(entity_id: 'str', first_index: 'int', index_count: 'int')
RenderMeshfrom cadflow import RenderMeshRenderMesh(positions: 'tuple[tuple[float, float, float], ...]', normals: 'tuple[tuple[float, float, float], ...]', indices: 'tuple[int, ...]', groups: 'tuple[RenderGroup, ...]', bounds: 'tuple[tuple[float, float, float], tuple[float, float, float]]', blocks: 'tuple[CanonicalTriangleBlock, ...]')
SceneCompileOptionsfrom cadflow import SceneCompileOptionsSceneCompileOptions(linear_tolerance: 'float' = 0.1, angular_tolerance: 'float' = 0.08, embed_source: 'bool' = False, embed_presentation: 'bool' = False)
SceneDocumentfrom cadflow.scene import SceneDocumentSceneDocument(value: 'DocumentValue | Mapping[str, Any]') -> 'None'
SceneResourceLimitsfrom cadflow.scene import SceneResourceLimitsSceneResourceLimits(zip_members: 'int' = 50000, input_archive_bytes: 'int' = 268435456, canonical_archive_bytes: 'int' = 268435456, total_uncompressed_bytes: 'int' = 1073741824, one_member_bytes: 'int' = 268435456, scene_json_bytes: 'int' = 33554432, entity_json_bytes: 'int' = 67108864, model_json_bytes: 'int' = 67108864, presentation_json_bytes: 'int' = 8388608, compression_ratio: 'int' = 100, json_depth: 'int' = 64, json_string_bytes: 'int' = 1048576, uri_bytes: 'int' = 1024, structural_id_bytes: 'int' = 4096, definitions: 'int' = 25000, nodes: 'int' = 100000, assets_per_kind: 'int' = 25000, appearances: 'int' = 25000, connectors: 'int' = 100000, cameras: 'int' = 1000, hierarchy_depth: 'int' = 256, forwarded_connector_depth: 'int' = 64, entities_per_sidecar: 'int' = 500000, entities_total: 'int' = 2000000, triangle_vertices_per_asset: 'int' = 2000000, triangle_vertices_total: 'int' = 10000000, triangles_per_asset: 'int' = 2000000, triangles_total: 'int' = 10000000, line_vertices_per_asset: 'int' = 2000000, line_vertices_total: 'int' = 10000000, line_segments_per_asset: 'int' = 2000000, line_segments_total: 'int' = 10000000, static_decoded_buffer_bytes: 'int' = 536870912)
SceneRootfrom cadflow import SceneRootSceneRoot(root_id: 'str', value: 'Solid | Compound | Part | Assembly', transform: 'Placement' = <factory>, source_element_id: 'str | None' = None)
SceneSourcefrom cadflow import SceneSourceSceneSource(kind: 'str', source_id: 'str | None' = None, graph_id: 'str | None' = None, artifact_hash: 'str | None' = None, format: 'str | None' = None, artifact_bytes: 'bytes | None' = None, _graph: 'OperationGraph | None' = None, _source_files: "tuple['_EmbeddedSourceFile', ...]" = ())
SceneValidationIssuefrom cadflow.scene import SceneValidationIssueSceneValidationIssue(severity: 'str', code: 'str', path: 'str', message: 'str', phase: 'str')
SceneValidationReportfrom cadflow.scene import SceneValidationReportSceneValidationReport(issues: 'tuple[SceneValidationIssue, ...]' = ())

Exceptions

SymbolImportSummary
SceneContractErrorfrom cadflow.scene import SceneContractErrorRaised by assert helpers with the complete deterministic report.

Functions

SymbolImportSummary
assert_entity_assetfrom cadflow.scene import assert_entity_assetPublic function in this domain.
assert_normalized_productfrom cadflow.scene import assert_normalized_productPublic function in this domain.
assert_presentationfrom cadflow.scene import assert_presentationPublic function in this domain.
assert_scene_manifestfrom cadflow.scene import assert_scene_manifestPublic function in this domain.
assert_scene_packagefrom cadflow.scene import assert_scene_packagePublic function in this domain.
build_edge_meshfrom cadflow import build_edge_meshPublic function in this domain.
build_render_meshfrom cadflow import build_render_meshPublic function in this domain.
cad_direction_to_gltffrom cadflow import cad_direction_to_gltfPublic function in this domain.
cad_to_gltffrom cadflow import cad_to_gltfConvert CAD mm/+Z coordinates to glTF m/+Y coordinates.
canonical_archive_sizefrom cadflow.scene import canonical_archive_sizeCompute the exact stored ZIP envelope size from names and payload sizes.
canonical_json_bytesfrom cadflow.scene import canonical_json_bytesReturn RFC 8785 JCS bytes, rejecting values outside the JCS domain.
canonical_json_hashfrom cadflow.scene import canonical_json_hashReturn a lowercase Scene content hash over canonical JSON bytes.
canonical_zip_bytesfrom cadflow.scene import canonical_zip_bytesEncode exact canonical stored ZIP bytes for a validated member mapping.
compile_scenefrom cadflow import compile_scenePublic function in this domain.
compute_scene_revisionfrom cadflow.scene import compute_scene_revisionCompute the two-pass Scene revision with the top-level field omitted.
export_scenefrom cadflow import export_scenePublic function in this domain.
json_resource_issuesfrom cadflow.scene import json_resource_issuesReturn deterministic JSON-domain resource issues for boundary probes.
load_contract_artifactfrom cadflow.scene import load_contract_artifactLoad exact packaged contract bytes by a safe package-relative path.
parse_canonical_jsonfrom cadflow.scene import parse_canonical_jsonParse JSON and require the input bytes to already be exact JCS bytes.
parse_strict_jsonfrom cadflow.scene import parse_strict_jsonParse one strict UTF-8 JSON value while rejecting duplicate keys.
preflight_aggregate_compression_ratiofrom cadflow.scene import preflight_aggregate_compression_ratioValidate the aggregate compression-ratio predicate without inflating data.
preflight_archive_member_sizesfrom cadflow.scene import preflight_archive_member_sizesValidate declared archive sizes before allocating or reading payloads.
preflight_glbfrom cadflow.scene import preflight_glbValidate exact Scene GLB JSON/BIN layout before a renderer sees bytes.
preflight_glb_countsfrom cadflow.scene import preflight_glb_countsValidate kind-specific accessor counts before decoding GLB buffers.
preflight_input_archive_sizefrom cadflow.scene import preflight_input_archive_sizeValidate a transported archive length before reading that many bytes.
preflight_member_compression_ratiofrom cadflow.scene import preflight_member_compression_ratioValidate one member compression-ratio predicate before inflation.
preflight_resource_countfrom cadflow.scene import preflight_resource_countValidate one non-negative resource count against the named profile limit.
preflight_unpacked_scenefrom cadflow.scene import preflight_unpacked_scenePreflight and immutably read an unpacked scene without following links.
preflight_zip_bytesfrom cadflow.scene import preflight_zip_bytesValidate and decode an allowlisted stored/deflate Scene ZIP archive.
profile_crossfrom cadflow.scene import profile_crossEvaluate the profile cross product in fixed binary64 operation order.
profile_f32from cadflow.scene import profile_f32Convert one value with the profile's binary32 and zero-sign rules.
profile_f32_bitsfrom cadflow.scene import profile_f32_bitsConvert one binary64 value to canonical profile binary32 bits.
profile_normalizefrom cadflow.scene import profile_normalizeNormalize a vector using the profile's fixed binary64/binary32 steps.
resource_count_issuesfrom cadflow.scene import resource_count_issuesReturn early collection and graph-depth resource issues.
solid_asset_boundsfrom cadflow import solid_asset_boundsPublic function in this domain.
validate_entity_assetfrom cadflow.scene import validate_entity_assetPublic function in this domain.
validate_normalized_productfrom cadflow.scene import validate_normalized_productPublic function in this domain.
validate_presentationfrom cadflow.scene import validate_presentationPublic function in this domain.
validate_scene_manifestfrom cadflow.scene import validate_scene_manifestPublic function in this domain.
validate_scene_packagefrom cadflow.scene import validate_scene_packagePublic function in this domain.
with_scene_revisionfrom cadflow.scene import with_scene_revisionReturn a deep copy carrying its computed Scene revision.
write_line_glbfrom cadflow import write_line_glbPublic function in this domain.
write_triangle_glbfrom cadflow import write_triangle_glbPublic function in this domain.

Constants

SymbolImportSummary
BASE_LIMITSfrom cadflow.scene import BASE_LIMITSSceneResourceLimits(zip_members: 'int' = 50000, input_archive_bytes: 'int' = 268435456, canonical_archive_bytes: 'int' = 268435456, total_uncompressed_bytes: 'int' = 1073741824, one_member_bytes: 'int' = 268435456, scene_json_bytes: 'int' = 33554432, entity_json_bytes: 'int' = 67108864, model_json_bytes: 'int' = 67108864, presentation_json_bytes: 'int' = 8388608, compression_ratio: 'int' = 100, json_depth: 'int' = 64, json_string_bytes: 'int' = 1048576, uri_bytes: 'int' = 1024, structural_id_bytes: 'int' = 4096, definitions: 'int' = 25000, nodes: 'int' = 100000, assets_per_kind: 'int' = 25000, appearances: 'int' = 25000, connectors: 'int' = 100000, cameras: 'int' = 1000, hierarchy_depth: 'int' = 256, forwarded_connector_depth: 'int' = 64, entities_per_sidecar: 'int' = 500000, entities_total: 'int' = 2000000, triangle_vertices_per_asset: 'int' = 2000000, triangle_vertices_total: 'int' = 10000000, triangles_per_asset: 'int' = 2000000, triangles_total: 'int' = 10000000, line_vertices_per_asset: 'int' = 2000000, line_vertices_total: 'int' = 10000000, line_segments_per_asset: 'int' = 2000000, line_segments_total: 'int' = 10000000, static_decoded_buffer_bytes: 'int' = 536870912)
SCHEMA_FILESfrom cadflow.scene import SCHEMA_FILESdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)