Mickael Peyrot 2 years ago
parent
commit
5085652d4a
  1. BIN
      chaudronnerie/CHO04.FCStd
  2. BIN
      chaudronnerie/CHO05.FCStd
  3. BIN
      chaudronnerie/CHO08.FCStd
  4. BIN
      chaudronnerie/CHO09.FCStd
  5. BIN
      chaudronnerie/CHO51.FCStd
  6. BIN
      chaudronnerie/CHO59.FCStd
  7. BIN
      chaudronnerie/CHO5x.FCStd
  8. BIN
      cycle/TSM16.FCStd
  9. BIN
      dessins/assemblage/dessins_assemblage_tubes.FCStd
  10. BIN
      dessins/assemblage/dessins_assemblage_tubes_raster/View003.png
  11. BIN
      dessins/assemblage/dessins_assemblage_tubes_raster/View022.png
  12. BIN
      dessins/assemblage/dessins_assemblage_tubes_raster/View024.png
  13. BIN
      dessins/assemblage/dessins_assemblage_tubes_raster/View026.png
  14. BIN
      quincaillerie/QIN59.FCStd
  15. BIN
      quincaillerie/QIN93.FCStd
  16. BIN
      quincaillerie/visserie/QIN15.FCStd
  17. BIN
      quincaillerie/visserie/QIN16.FCStd
  18. BIN
      quincaillerie/visserie/QIN57.FCStd
  19. BIN
      quincaillerie/visserie/QIN58.FCStd
  20. BIN
      quincaillerie/visserie/QIN91.FCStd
  21. BIN
      quincaillerie/visserie/QIN92.FCStd
  22. BIN
      sous-assemblages/MoteurM400.FCStd
  23. BIN
      sous-assemblages/SiegeAdulteLowCost.FCStd
  24. BIN
      sous-assemblages/StructureSiege.FCStd
  25. 39
      tools/export-all-parts.py
  26. BIN
      tubes/L02.FCStd
  27. BIN
      tubes/M04.FCStd
  28. BIN
      vheliotech.FCStd

BIN
chaudronnerie/CHO04.FCStd

Binary file not shown.

BIN
chaudronnerie/CHO05.FCStd

Binary file not shown.

BIN
chaudronnerie/CHO08.FCStd

Binary file not shown.

BIN
chaudronnerie/CHO09.FCStd

Binary file not shown.

BIN
chaudronnerie/CHO51.FCStd

Binary file not shown.

BIN
chaudronnerie/CHO59.FCStd

Binary file not shown.

BIN
chaudronnerie/CHO5x.FCStd

Binary file not shown.

BIN
cycle/TSM16.FCStd

Binary file not shown.

BIN
dessins/assemblage/dessins_assemblage_tubes.FCStd

Binary file not shown.

BIN
dessins/assemblage/dessins_assemblage_tubes_raster/View003.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

BIN
dessins/assemblage/dessins_assemblage_tubes_raster/View022.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

BIN
dessins/assemblage/dessins_assemblage_tubes_raster/View024.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

BIN
dessins/assemblage/dessins_assemblage_tubes_raster/View026.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

BIN
quincaillerie/QIN59.FCStd

Binary file not shown.

BIN
quincaillerie/QIN93.FCStd

Binary file not shown.

BIN
quincaillerie/visserie/QIN15.FCStd

Binary file not shown.

BIN
quincaillerie/visserie/QIN16.FCStd

Binary file not shown.

BIN
quincaillerie/visserie/QIN57.FCStd

Binary file not shown.

BIN
quincaillerie/visserie/QIN58.FCStd

Binary file not shown.

BIN
quincaillerie/visserie/QIN91.FCStd

Binary file not shown.

BIN
quincaillerie/visserie/QIN92.FCStd

Binary file not shown.

BIN
sous-assemblages/MoteurM400.FCStd

Binary file not shown.

BIN
sous-assemblages/SiegeAdulteLowCost.FCStd

Binary file not shown.

BIN
sous-assemblages/StructureSiege.FCStd

Binary file not shown.

39
tools/export-all-parts.py

@ -24,7 +24,7 @@ def convert_file(file_name, output_format):
if len(obj.Parents) == 0:
#print(obj.Label)
root_objects.append(obj)
if obj.Label == doc.Name:
if obj.Label == doc.Name or obj.Label == doc.Name + ' (experimental)':
main_object = obj
if main_object is None and len(root_objects) == 1:
@ -33,6 +33,11 @@ def convert_file(file_name, output_format):
if main_object is None:
raise Exception("Can't find main object in file " + file_name + " (found " + str(len(root_objects)) + " root object(s), none named like the document " + doc.Name + ")")
if 'experimental' in main_object.Label or 'expérimental' in main_object.Label:
print('Document ' + doc.Name + ' is marked as experimental and will be ignored')
close_all_docs()
return
secondary_objects = []
code_obj = doc.getObjectsByLabel('Code_Tube_Draft')
if len(code_obj) == 1:
@ -67,11 +72,7 @@ def convert_file(file_name, output_format):
close_all_docs()
def convert_assembly(file_name, output_format):
print("Exporting assembly " + file_name + "...")
doc = App.open(project_folder + '/' + file_name)
def export_assembly(doc, file_name, output_format):
root_objects = []
main_object = None
@ -110,17 +111,27 @@ def convert_assembly(file_name, output_format):
else:
ImportGui.export([main_object], output_path)
def convert_assembly(file_name, output_format):
print("Exporting assembly " + file_name + "...")
doc = App.open(project_folder + '/' + file_name)
export_assembly(doc, file_name, output_format)
close_all_docs()
def export_configuration(doc, config_name, output_filename):
def export_configuration(file_name, config_name, output_filename, output_format):
print('Generating assembly for configuration '+config_name+'...')
doc = App.open(project_folder + '/' + file_name)
Gui.Selection.clearSelection()
Gui.Selection.addSelection('vheliotech','Model','Configurations.'+doc.getObjectsByLabel(config_name)[0].Name+'.')
Gui.runCommand('Asm4_applyConfiguration')
Gui.Selection.clearSelection()
doc.saveAs(assemblies_output_folder + '/' + output_filename + '.FCStd')
export_assembly(doc, output_filename, output_format)
#doc.saveAs(assemblies_output_folder + '/' + output_filename + '.FCStd')
close_all_docs()
try:
folders = [
@ -136,14 +147,12 @@ try:
print(source_path)
convert_file(source_path, 'step')
convert_assembly('vheliotech.FCStd', 'step')
#convert_assembly('vheliotech.FCStd', 'step')
'''doc = App.open(project_folder + '/vheliotech.FCStd')
export_configuration(doc, 'Config_Integrale', 'vheliotech-config-integrale')
export_configuration(doc, 'Config_Solaire', 'vheliotech-config-solaire')
export_configuration(doc, 'Config_Motorisee', 'vheliotech-config-motorisee')
export_configuration(doc, 'Config_Basique', 'vheliotech-config-basique')
close_all_docs()'''
export_configuration('vheliotech.FCStd', 'Config_Integrale', 'vheliotech-integral', 'step')
export_configuration('vheliotech.FCStd', 'Config_Solaire', 'vheliotech-solaire', 'step')
export_configuration('vheliotech.FCStd', 'Config_Motorisee', 'vheliotech-motorise', 'step')
export_configuration('vheliotech.FCStd', 'Config_Basique', 'vheliotech-basique', 'step')
except Exception as e:
print(e)

BIN
tubes/L02.FCStd

Binary file not shown.

BIN
tubes/M04.FCStd

Binary file not shown.

BIN
vheliotech.FCStd

Binary file not shown.
Loading…
Cancel
Save