hoops_ai.ml.embeddings.ShapeEmbeddingsModel

class hoops_ai.ml.embeddings.ShapeEmbeddingsModel

Bases: ABC

INTERFACE Shape Embeddings for CAD search and similarity matching..

abstract embed_shape(cad_path, storage=None)

Compute a part embedding directly from a CAD file path.

Parameters:
  • cad_path (str) – Path to the CAD file

  • storage (DataStorage) – Optional DataStorage instance. If provided, embeddings will be automatically saved with the correct schema and key.

Returns:

Embedding object containing the vector representation

Return type:

Embedding

abstract embed_shape_batch(cad_path_list, max_workers=None, show_progress=True)

Compute embeddings for multiple CAD files in parallel.

Parameters:
  • cad_path_list (List[str]) – List of CAD file paths to process

  • max_workers (int) – Number of worker processes (default: CPU count)

  • show_progress (bool) – Show progress bar during processing (default: True)

Returns:

EmbeddingBatch object containing the vector representations

Return type:

EmbeddingBatch

abstract schema()

Return the schema definition for storing embeddings.

Returns:

Schema object compatible with DataStorage.set_schema()

abstract property embedding_dim: int

Return the dimensionality of embeddings produced by this model.

Returns:

Embedding dimension (e.g., 256, 512, 1024)

Return type:

int

abstract property model_id: str
abstract property model_name: str