Browse Source

Retouches des dessins 2D

master
Youen 6 months ago
parent
commit
91a85e0f26
  1. 26
      tools/generate-2d-drawings.py
  2. BIN
      tubes/E16.FCStd
  3. BIN
      tubes/E20.FCStd
  4. BIN
      tubes/E21.FCStd
  5. BIN
      tubes/E36.FCStd
  6. BIN
      tubes/L00.FCStd
  7. BIN
      tubes/L01.FCStd
  8. BIN
      tubes/L02.FCStd
  9. BIN
      tubes/L03.FCStd
  10. BIN
      tubes/L04.FCStd
  11. BIN
      tubes/L05.FCStd
  12. BIN
      tubes/L06.FCStd
  13. BIN
      tubes/L07.FCStd
  14. BIN
      tubes/L08.FCStd
  15. BIN
      tubes/L09.FCStd
  16. BIN
      tubes/L10.FCStd
  17. BIN
      tubes/L11.FCStd
  18. BIN
      tubes/L12.FCStd
  19. BIN
      tubes/M00.FCStd
  20. BIN
      tubes/M01.FCStd
  21. BIN
      tubes/M02.FCStd
  22. BIN
      tubes/M03.FCStd
  23. BIN
      tubes/M05.FCStd
  24. BIN
      tubes/M06.FCStd
  25. BIN
      tubes/M07.FCStd
  26. BIN
      tubes/R00.FCStd
  27. BIN
      tubes/R01.FCStd
  28. BIN
      tubes/R02.FCStd
  29. BIN
      tubes/R03.FCStd
  30. BIN
      tubes/R04.FCStd
  31. BIN
      tubes/T00.FCStd
  32. BIN
      tubes/T01.FCStd
  33. BIN
      tubes/T02.FCStd
  34. BIN
      tubes/T03.FCStd
  35. BIN
      tubes/T04.FCStd
  36. BIN
      tubes/T05.FCStd
  37. BIN
      tubes/T06.FCStd
  38. BIN
      tubes/T07.FCStd
  39. BIN
      tubes/T08.FCStd
  40. BIN
      tubes/T09.FCStd
  41. BIN
      tubes/T10.FCStd
  42. BIN
      tubes/T11.FCStd
  43. BIN
      tubes/T12.FCStd
  44. BIN
      tubes/T13.FCStd
  45. BIN
      tubes/T14.FCStd
  46. BIN
      tubes/T15.FCStd
  47. BIN
      tubes/T16.FCStd
  48. BIN
      tubes/T17.FCStd
  49. BIN
      tubes/T18.FCStd
  50. BIN
      tubes/T19.FCStd
  51. BIN
      tubes/T20.FCStd
  52. BIN
      tubes/T21.FCStd
  53. BIN
      tubes/T22.FCStd
  54. BIN
      tubes/T23.FCStd
  55. BIN
      tubes/T24.FCStd
  56. BIN
      tubes/T25.FCStd

26
tools/generate-2d-drawings.py

@ -11,15 +11,32 @@ verbose = False
project_folder = os.getcwd()
def apply_styles(page):
modified = False
dim_font_size = 3.0
for view in page.Views:
if view.TypeId == 'TechDraw::DrawViewDimension':
if view.ViewObject.Fontsize != dim_font_size:
view.ViewObject.Fontsize = dim_font_size
modified = True
return modified
async def generate_2d_drawing(file_name):
doc = App.open(project_folder + '/' + file_name)
modified = False
page_name = doc.Name + '_Drawing'
if doc.getObject(page_name) is not None:
page = doc.getObject(page_name)
if page is not None:
print('2D drawing already exists - skipped')
return
else:
modified = True
template_file_name = project_folder + '/lib/A4_Landscape_VSPT.svg'
root_objects = []
@ -249,9 +266,14 @@ async def generate_2d_drawing(file_name):
await vspt_coroutine.get_main_loop().wait(1)
await addDimensions()
if apply_styles(page):
modified = True
if modified:
if verbose: print("Saving...")
page.recompute(True)
page.ViewObject.Visibility = False # don't save the document with the page open or it will automatically reopen on load
await vspt_coroutine.get_main_loop().wait(1)
doc.save()
if verbose: print("Closing...")

BIN
tubes/E16.FCStd

Binary file not shown.

BIN
tubes/E20.FCStd

Binary file not shown.

BIN
tubes/E21.FCStd

Binary file not shown.

BIN
tubes/E36.FCStd

Binary file not shown.

BIN
tubes/L00.FCStd

Binary file not shown.

BIN
tubes/L01.FCStd

Binary file not shown.

BIN
tubes/L02.FCStd

Binary file not shown.

BIN
tubes/L03.FCStd

Binary file not shown.

BIN
tubes/L04.FCStd

Binary file not shown.

BIN
tubes/L05.FCStd

Binary file not shown.

BIN
tubes/L06.FCStd

Binary file not shown.

BIN
tubes/L07.FCStd

Binary file not shown.

BIN
tubes/L08.FCStd

Binary file not shown.

BIN
tubes/L09.FCStd

Binary file not shown.

BIN
tubes/L10.FCStd

Binary file not shown.

BIN
tubes/L11.FCStd

Binary file not shown.

BIN
tubes/L12.FCStd

Binary file not shown.

BIN
tubes/M00.FCStd

Binary file not shown.

BIN
tubes/M01.FCStd

Binary file not shown.

BIN
tubes/M02.FCStd

Binary file not shown.

BIN
tubes/M03.FCStd

Binary file not shown.

BIN
tubes/M05.FCStd

Binary file not shown.

BIN
tubes/M06.FCStd

Binary file not shown.

BIN
tubes/M07.FCStd

Binary file not shown.

BIN
tubes/R00.FCStd

Binary file not shown.

BIN
tubes/R01.FCStd

Binary file not shown.

BIN
tubes/R02.FCStd

Binary file not shown.

BIN
tubes/R03.FCStd

Binary file not shown.

BIN
tubes/R04.FCStd

Binary file not shown.

BIN
tubes/T00.FCStd

Binary file not shown.

BIN
tubes/T01.FCStd

Binary file not shown.

BIN
tubes/T02.FCStd

Binary file not shown.

BIN
tubes/T03.FCStd

Binary file not shown.

BIN
tubes/T04.FCStd

Binary file not shown.

BIN
tubes/T05.FCStd

Binary file not shown.

BIN
tubes/T06.FCStd

Binary file not shown.

BIN
tubes/T07.FCStd

Binary file not shown.

BIN
tubes/T08.FCStd

Binary file not shown.

BIN
tubes/T09.FCStd

Binary file not shown.

BIN
tubes/T10.FCStd

Binary file not shown.

BIN
tubes/T11.FCStd

Binary file not shown.

BIN
tubes/T12.FCStd

Binary file not shown.

BIN
tubes/T13.FCStd

Binary file not shown.

BIN
tubes/T14.FCStd

Binary file not shown.

BIN
tubes/T15.FCStd

Binary file not shown.

BIN
tubes/T16.FCStd

Binary file not shown.

BIN
tubes/T17.FCStd

Binary file not shown.

BIN
tubes/T18.FCStd

Binary file not shown.

BIN
tubes/T19.FCStd

Binary file not shown.

BIN
tubes/T20.FCStd

Binary file not shown.

BIN
tubes/T21.FCStd

Binary file not shown.

BIN
tubes/T22.FCStd

Binary file not shown.

BIN
tubes/T23.FCStd

Binary file not shown.

BIN
tubes/T24.FCStd

Binary file not shown.

BIN
tubes/T25.FCStd

Binary file not shown.
Loading…
Cancel
Save