Skip to main content

Module validator

Module validator 

Source
Expand description

Validation logic for 3MF models

This module contains functions to validate 3MF models according to the 3MF Core Specification requirements. Validation ensures that:

  • All object IDs are unique and positive
  • Triangle vertex indices reference valid vertices
  • Triangles are not degenerate (all three vertices must be distinct)
  • Build items reference existing objects
  • Material, color group, and base material references are valid

Functions§

detect_circular_components
Detects circular component references using depth-first search
get_property_resource_size
Gets the size (number of properties) in a property resource group
validate_beam_lattice
Validates beam lattice structures in model objects
validate_boolean_operations
Validates boolean operation shapes and their references
validate_build_references
Validates that all build items reference valid objects
validate_color_formats
Validates color formats in color groups
validate_component_chain
N_XPX_0803_01: Validate no component reference chains across multiple model parts
validate_component_properties
Validates that objects with components don’t have pid/pindex attributes
validate_component_references
Validates that all component references are valid and non-circular
validate_displacement_extension
Validates displacement extension resources and references
validate_duplicate_resource_ids
Validate that resource IDs are unique within their namespaces
validate_duplicate_uuids
Validates that all UUIDs in the model are unique
validate_material_references
Validates material property group references and uniqueness
validate_mesh_geometry
Validates mesh geometry for all objects in the model
validate_mesh_manifold
Validates that mesh edges are manifold (each edge shared by at most 2 triangles)
validate_model
Validate a parsed 3MF model
validate_model_with_config
Validate a parsed 3MF model with custom extension validation
validate_multiproperties_references
Validate color formats in color groups
validate_object_triangle_materials
Validates triangle material properties for a specific object
validate_planar_transform
Validate that a transform is planar (no Z-axis rotation or shear)
validate_production_extension
Validates production extension path format and usage
validate_production_extension_with_config
Validate production extension requirements with parser configuration
validate_production_paths
Validate displacement extension usage
validate_production_uuids_required
Validate transform matrices for build items
validate_resource_ordering
Validate resource ordering
validate_slice
Validates a single slice’s polygons and vertices
validate_slice_extension
Validate slice extension requirements
validate_slices
Validates slice stacks and their slice data
validate_texture_paths
Validate boolean operation references
validate_triangle_properties
Validate triangle property attributes
validate_uuid_formats
Validate UUID format per RFC 4122
validate_volumetric_extension
Validates volumetric extension resources and references