from models.freecad_meta_model import FreeCadMetaModel
from repository.freecad_repository import (
    FreeCadRepository,
)


class InitPartsParseUseCase:
    """Initialisation of parsing geometry models info"""

    def call(self):
        product_details = []
        for part in FreeCadRepository().getAllSolids():
            if part is not None:
                model = FreeCadMetaModel(part.Label, part.Shape.Vertexes)
                if model is not None:
                    product_details.append(model)
        return product_details
