2023-04-24 19:42:48 +00:00
|
|
|
# import importDAE
|
2023-04-18 14:01:46 +00:00
|
|
|
import FreeCAD as App
|
|
|
|
from model.files_generator import FolderGenerator
|
|
|
|
from helper.is_solid import is_object_solid
|
2023-04-24 19:42:48 +00:00
|
|
|
import Mesh
|
2023-04-18 14:01:46 +00:00
|
|
|
|
|
|
|
class ExportUseCase:
|
|
|
|
def call(path):
|
|
|
|
meshes = {}
|
|
|
|
for el in App.ActiveDocument.Objects:
|
|
|
|
if (is_object_solid(el)):
|
2023-04-24 19:42:48 +00:00
|
|
|
Mesh.export([el], path + '/' + FolderGenerator.SDF.value +
|
2023-04-18 14:01:46 +00:00
|
|
|
'/' + FolderGenerator.MESHES.value + '/' + el.Label + '.dae')
|
|
|
|
meshes[el.Label] = '/' + FolderGenerator.MESHES.value + \
|
|
|
|
'/' + el.Label + '.dae'
|
|
|
|
return meshes
|