Экспорт подсборок с мешами (SDF) и плана сборки (PDDL) из FreeCAD в виде архива zip

This commit is contained in:
IDONTSUDO 2023-04-18 14:01:46 +00:00 committed by Igor Brylyov
parent 7f13c0056f
commit e65236aab6
37 changed files with 1022 additions and 176 deletions

View file

@ -0,0 +1,16 @@
import importDAE
import FreeCAD as App
from model.files_generator import FolderGenerator
from helper.is_solid import is_object_solid
class ExportUseCase:
def call(path):
meshes = {}
for el in App.ActiveDocument.Objects:
if (is_object_solid(el)):
importDAE.export([el], path + '/' + FolderGenerator.SDF.value +
'/' + FolderGenerator.MESHES.value + '/' + el.Label + '.dae')
meshes[el.Label] = '/' + FolderGenerator.MESHES.value + \
'/' + el.Label + '.dae'
return meshes