User Tools

Site Tools


freecad

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
freecad [2023/09/12 16:05] – [Techdraw] ssm2017freecad [2024/02/14 00:39] (current) ssm2017
Line 1: Line 1:
 ====== freecad ====== ====== freecad ======
 +===== blender 3 to freecad 19 =====
 + blender :
 +  obj
 +   include :
 +    selection only
 +    onjects as onj objects
 +   transform :
 +    scale 1000
 +    forward y forward
 +    up z up
 +    geometry :
 +    triangulate faces
 +
 + freecad :
 +  file / import
 +   alias mesh = 1 object
 +   wavefront obj = multiple objects
 +  select all
 +  part workbench :
 +   menu part / create shape from mesh
 +   tolerance : 0.10
 +   delete selection
 +   select all
 +   menu part / create a copy / refine shape
 +   select copied
 +   menu part / convert to solid
 +   delete others
 ====== Techdraw ====== ====== Techdraw ======
 Update cartridge Update cartridge
Line 90: Line 117:
 # ==================== # ====================
  
-fixtures list +def deleteSheets(): 
-if doc.getObjectsByLabel("Fixtures Count"): + sheets = {"fixturesCount":"Fixtures Count", 
- doc.removeObject("fixturesCount")+ "gelsCount": "Gels Count", 
 + "fixturesListByChannel": "Fixtures List By Channel", 
 + "fixturesListByDimmer": "Fixtures List By Dimmer"
 + delete old spreadsheets 
 + for sheet_name, sheet_label in sheets.items(): 
 + if doc.getObject(sheet_name): 
 + doc.removeObject(sheet_name) 
 + App.Console.PrintMessage("Old "+ sheet_name+ " sheeet deleted\n")
  doc.recompute()  doc.recompute()
- App.Console.PrintMessage("Old 'fixtures count' sheet deleted\n") 
- 
-fixtures_count_sheet = doc.addObject('Spreadsheet::Sheet','fixturesCount') 
-fixtures_count_sheet.Label = "Fixtures Count" 
-App.Console.PrintMessage("New 'Fixtures Count' sheet created\n") 
  
 +# fixtures list
 +fixtures_count_sheet = doc.getObject('fixturesCountSheet')
 +if not fixtures_count_sheet:
 + fixtures_count_sheet = doc.addObject('Spreadsheet::Sheet','fixturesCountSheet')
 + fixtures_count_sheet.Label = "Fixtures Count"
 + App.Console.PrintMessage("New 'Fixtures Count' sheet created\n")
 +# empty the sheet
 +fixtures_count_sheet.clearAll()
 # build first line # build first line
 fixtures_count_sheet.set("A1", "Type") fixtures_count_sheet.set("A1", "Type")
 fixtures_count_sheet.set("B1", "Qty") fixtures_count_sheet.set("B1", "Qty")
 fixtures_count_sheet.setStyle('A1:B1', 'bold', 'add') fixtures_count_sheet.setStyle('A1:B1', 'bold', 'add')
-doc.recompute()+#doc.recompute()
  
 # gels list # gels list
-if doc.getObjectsByLabel("Gels Count"): +gels_count_sheet = doc.getObject('gelsCountSheet') 
- doc.removeObject("gelsCount"+if not gels_count_sheet: 
- doc.recompute() + gels_count_sheet = doc.addObject('Spreadsheet::Sheet','gelsCountSheet') 
- App.Console.PrintMessage("Old 'gels countsheet deleted\n"+ gels_count_sheet.Label = "Gels Count" 
- + App.Console.PrintMessage("New 'Gels Count' sheet created\n"
-gels_count_sheet = doc.addObject('Spreadsheet::Sheet','gelsCount') +# empty the sheet 
-gels_count_sheet.Label = "Gels Count" +gels_count_sheet.clearAll()
-App.Console.PrintMessage("New 'Gels Count' sheet created\n"+
 # build first line # build first line
 gels_count_sheet.set("A1", "Type") gels_count_sheet.set("A1", "Type")
 gels_count_sheet.set("B1", "Qty") gels_count_sheet.set("B1", "Qty")
 gels_count_sheet.setStyle('A1:B1', 'bold', 'add') gels_count_sheet.setStyle('A1:B1', 'bold', 'add')
-doc.recompute()+#doc.recompute()
  
 # fixtures list by channel # fixtures list by channel
-if doc.getObjectsByLabel("Fixtures List By Channel"): +fixtures_list_by_channel_sheet = doc.getObject('fixturesListByChannelSheet') 
- doc.removeObject("fixturesListByChannel"+if not fixtures_list_by_channel_sheet: 
- doc.recompute() + fixtures_list_by_channel_sheet = doc.addObject('Spreadsheet::Sheet','fixturesListByChannelSheet') 
- App.Console.PrintMessage("Old 'fixtures list by channelsheet deleted\n"+ fixtures_list_by_channel_sheet.Label = "Fixtures List By Channel" 
- + App.Console.PrintMessage("New 'Fixtures List By Channel' sheet created\n"
-fixtures_list_by_channel_sheet = doc.addObject('Spreadsheet::Sheet','fixturesListByChannel') +# empty the sheet 
-fixtures_list_by_channel_sheet.Label = "Fixtures List By Channel" +fixtures_list_by_channel_sheet.clearAll()
-App.Console.PrintMessage("New 'Fixtures List By Channel' sheet created\n"+
 # build first line # build first line
 fixtures_list_by_channel_sheet.set("A1", "Channel") fixtures_list_by_channel_sheet.set("A1", "Channel")
Line 139: Line 172:
 fixtures_list_by_channel_sheet.set("E1", "Label") fixtures_list_by_channel_sheet.set("E1", "Label")
 fixtures_list_by_channel_sheet.setStyle('A1:E1', 'bold', 'add') fixtures_list_by_channel_sheet.setStyle('A1:E1', 'bold', 'add')
-doc.recompute()+#doc.recompute()
  
 # fixtures list by dimmer # fixtures list by dimmer
-if doc.getObjectsByLabel("Fixtures List By Dimmer"): +fixtures_list_by_dimmer_sheet = doc.getObject('fixturesListByDimmerSheet') 
- doc.removeObject("fixturesListByDimmer"+if not fixtures_list_by_dimmer_sheet: 
- doc.recompute() + fixtures_list_by_dimmer_sheet = doc.addObject('Spreadsheet::Sheet','fixturesListByDimmerSheet') 
- App.Console.PrintMessage("Old 'fixtures list by dimmersheet deleted\n"+ fixtures_list_by_dimmer_sheet.Label = "Fixtures List By Dimmer" 
- + App.Console.PrintMessage("New 'Fixtures List By Dimmer' sheet created\n"
-fixtures_list_by_dimmer_sheet = doc.addObject('Spreadsheet::Sheet','fixturesListByDimmer') +# empty the sheet 
-fixtures_list_by_dimmer_sheet.Label = "Fixtures List By Dimmer" +fixtures_list_by_dimmer_sheet.clearAll()
-App.Console.PrintMessage("New 'Fixtures List By Dimmer' sheet created\n"+
 # build first line # build first line
 fixtures_list_by_dimmer_sheet.set("A1", "Dimmer") fixtures_list_by_dimmer_sheet.set("A1", "Dimmer")
Line 159: Line 190:
 fixtures_list_by_dimmer_sheet.setStyle('A1:E1', 'bold', 'add') fixtures_list_by_dimmer_sheet.setStyle('A1:E1', 'bold', 'add')
 doc.recompute() doc.recompute()
- 
  
 # ==================== # ====================
freecad.1694527554.txt.gz · Last modified: by ssm2017