Skip to content

Commit

Permalink
revert back to old file list for config
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecVercruysse committed Jul 16, 2020
1 parent b02cde7 commit 2fedf5b
Showing 10 changed files with 64 additions and 63 deletions.
12 changes: 6 additions & 6 deletions CAD/ASSEMBLY_Baseplate_v2/config.json
Original file line number Diff line number Diff line change
@@ -22,39 +22,39 @@
"fixedFiles": [],
"dynamicFiles": [
{
"path": "CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_base_4x4.stl",
"path": "STL/Assembly_base_4x4.stl",
"conditions": {
"dimensions": [
"4x4"
]
}
},
{
"path": "CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_base_4x2.stl",
"path": "STL/Assembly_base_4x2.stl",
"conditions": {
"dimensions": [
"4x2"
]
}
},
{
"path": "CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_base_4x1.stl",
"path": "STL/Assembly_base_4x1.stl",
"conditions": {
"dimensions": [
"4x1"
]
}
},
{
"path": "CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_10_Base_v2.stl",
"path": "STL/10_Base_v2.stl",
"conditions": {
"dimensions": [
"1x1"
]
}
},
{
"path": "CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_00_Connector_Baseplate.stl",
"path": "STL/00_Connector_Baseplate.stl",
"conditions": {
"include3DAdapter": [
"true"
@@ -65,7 +65,7 @@
}
},
{
"path": "CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_Base_Connector_4.stl",
"path": "STL/Assembly_Base_Connector_4.stl",
"conditions": {
"include3DAdapter": [
"true"
4 changes: 2 additions & 2 deletions CAD/ASSEMBLY_CUBE_Base_v2/config.json
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@
"description": "The basic building unit cube, with no inserts.",
"options": {},
"fixedFiles": [
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_10_Cube_1x1_v2.stl",
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_10_Lid_1x1_v2.stl"
"STL/10_Cube_1x1_v2.stl",
"STL/10_Lid_1x1_v2.stl"
],
"dynamicFiles": [],
"githubLink": "",
12 changes: 6 additions & 6 deletions CAD/ASSEMBLY_CUBE_Dichroic_Beamsplitter_v2/config.json
Original file line number Diff line number Diff line change
@@ -3,12 +3,12 @@
"description": "Cube to hold an emission and excitation filter as well as a dicrhoic mirror (for flourescence microscopic imaging)",
"options": {},
"fixedFiles": [
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_10_Cube_1x1_v2.stl",
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_10_Lid_1x1_v2.stl",
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_20_Cube_Insert_Beamsplittercube_Base.stl",
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_20_Cube_Insert_Beamsplittercube_Dichroicmirror_Retainplate.stl",
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_20_Cube_Insert_Beamsplittercube_Retainring_25mm.stl",
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_20_Cube_Insert_Beamsplittercube_Retainring_25mm.stl"
"STL/10_Cube_1x1_v2.stl",
"STL/10_Lid_1x1_v2.stl",
"STL/20_Cube_Insert_Beamsplittercube_Base.stl",
"STL/20_Cube_Insert_Beamsplittercube_Dichroicmirror_Retainplate.stl",
"STL/20_Cube_Insert_Beamsplittercube_Retainring_25mm.stl",
"STL/20_Cube_Insert_Beamsplittercube_Retainring_25mm.stl"
],
"dynamicFiles": [],
"githubLink": "",
15 changes: 4 additions & 11 deletions CAD/ASSEMBLY_CUBE_LED_Matrix_v2/config.json
Original file line number Diff line number Diff line change
@@ -3,18 +3,11 @@
"description": "This parts adapt a LED matrix to the UC2 cubes. Electric control is done by an ESP32.",
"options": {},
"fixedFiles": [
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_10_Lid_1x1_el_v2.stl",
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_30_Cube_LED_Array_v0.stl"
"STL/10_Lid_1x1_el_v2.stl",
"STL/30_Cube_LED_Array_v0.stl"
],
"dynamicFiles": [],
"githubLink": "https://github.com/bionanoimaging/UC2-GIT/tree/master/CAD/ASSEMBLY_CUBE_LED_v2",
"githubLink": "",
"imageLink": "",
"extraParts": [
"ASSEMBLY_CUBE_empty_1\u00d71",
"Hi-Power LED 1W/3W UV STAR Blue",
"wire",
"Resistor",
"USB-microUSB cable",
"Wago binder"
]
"extraParts": []
}
9 changes: 7 additions & 2 deletions CAD/ASSEMBLY_CUBE_Laser_v2/config.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,12 @@
"options": {},
"fixedFiles": [],
"dynamicFiles": [],
"githubLink": "",
"githubLink": "https://github.com/bionanoimaging/UC2-GIT/tree/master/CAD/ASSEMBLY_CUBE_Laser_v2",
"imageLink": "",
"extraParts": []
"extraParts": [
"ASSEMBLY_CUBE_empty_1\u00d71",
"00_Laser_Clamp_OnOffSwitch",
"Blue laser pointer, 445 nm",
"Screws M3\u00d718"
]
}
8 changes: 4 additions & 4 deletions CAD/ASSEMBLY_CUBE_Mirror_45_v2/config.json
Original file line number Diff line number Diff line change
@@ -12,20 +12,20 @@
}
},
"fixedFiles": [
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_10_Cube_1x1_v2.stl",
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_10_Lid_1x1_v2.stl"
"STL/10_Cube_1x1_v2.stl",
"STL/10_Lid_1x1_v2.stl"
],
"dynamicFiles": [
{
"path": "CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_20_Cube_Insert_Mirror_Holder_v2.stl",
"path": "STL/20_Cube_Insert_Mirror_Holder_v2.stl",
"conditions": {
"mirrorType": [
"1 inch diameter"
]
}
},
{
"path": "CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_20_Cube_Insert_Mirror_Holder_30x30Mirror_v2.stl",
"path": "STL/20_Cube_Insert_Mirror_Holder_30x30Mirror_v2.stl",
"conditions": {
"mirrorType": [
"30mm x 30mm square"
10 changes: 6 additions & 4 deletions CAD/ASSEMBLY_CUBE_Mirror_Kinematic_v2/config.json
Original file line number Diff line number Diff line change
@@ -4,12 +4,14 @@
"options": {},
"fixedFiles": [],
"dynamicFiles": [],
"githubLink": "https://github.com/bionanoimaging/UC2-GIT/tree/master/CAD/ASSEMBLY_CUBE_Laser_v2",
"githubLink": "https://github.com/bionanoimaging/UC2-GIT/tree/master/CAD/ASSEMBLY_CUBE_LED_v2",
"imageLink": "",
"extraParts": [
"ASSEMBLY_CUBE_empty_1\u00d71",
"00_Laser_Clamp_OnOffSwitch",
"Blue laser pointer, 445 nm",
"Screws M3\u00d718"
"Hi-Power LED 1W/3W UV STAR Blue",
"wire",
"Resistor",
"USB-microUSB cable",
"Wago binder"
]
}
6 changes: 3 additions & 3 deletions CAD/ASSEMBLY_CUBE_RaspiCam_v2/config.json
Original file line number Diff line number Diff line change
@@ -3,9 +3,9 @@
"description": "Camera Holder for the RaspiCam v2",
"options": {},
"fixedFiles": [
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_10_Cube_1x1_v2.stl",
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_10_Lid_1x1_v2.stl",
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_20_Cube_Insert_RaspiCam.stl"
"STL/10_Cube_1x1_v2.stl",
"STL/10_Lid_1x1_v2.stl",
"STL/20_Cube_Insert_RaspiCam.stl"
],
"dynamicFiles": [],
"githubLink": "https://github.com/bionanoimaging/UC2-GIT/tree/master/CAD/ASSEMBLY_CUBE_Lens_v2",
16 changes: 8 additions & 8 deletions CAD/ASSEMBLY_CUBE_Z-STAGE_v2/config.json
Original file line number Diff line number Diff line change
@@ -11,31 +11,31 @@
}
},
"fixedFiles": [
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_10_Cube_2x1_v2.stl",
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_10_Lid_el_2x1_v2.stl",
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_20_focus_inlet_linearflexure_v0.stl",
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_30_Coupling_Screw_28BYJ_M3.stl",
"CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_30_focus_inlet_objective_mount_v7.stl"
"STL/10_Cube_2x1_v2.stl",
"STL/10_Lid_el_2x1_v2.stl",
"STL/20_focus_inlet_linearflexure_v0.stl",
"STL/30_Coupling_Screw_28BYJ_M3.stl",
"STL/30_focus_inlet_objective_mount_v7.stl"
],
"dynamicFiles": [
{
"path": "CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_30_Z_Stage_Adapterplate_11.stl",
"path": "STL/30_Z_Stage_Adapterplate_11.stl",
"conditions": {
"includeFluomodule": [
"yes"
]
}
},
{
"path": "CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_30_Z_Stage_Fluomodule_12.stl",
"path": "STL/30_Z_Stage_Fluomodule_12.stl",
"conditions": {
"includeFluomodule": [
"yes"
]
}
},
{
"path": "CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_40_XY_Stage_Clamp_Slide_9.stl",
"path": "STL/40_XY_Stage_Clamp_Slide_9.stl",
"conditions": {
"includeFluomodule": [
"yes"
35 changes: 18 additions & 17 deletions DOCUMENTS/UC2-Configurator/generate_config_from_database.py
Original file line number Diff line number Diff line change
@@ -280,23 +280,24 @@ def print(self):
module_config[
'description'] += " TODO:NEEDS options,fixedFiles,dynamicFiles CONFIGURED" # we need to create the config manually!

# update paths if the config is out of date
if (len(module_config['fixedFiles']) != 0
and "Assembly_ALL_PARTS_FOR_EXPORT_"
not in module_config['fixedFiles'][0]):
print("updating fixedFile config paths...")
for i in range(len(module_config['fixedFiles'])):
module_config['fixedFiles'][i] = module_config['fixedFiles'][
i].replace("Assembly_", "").replace('STL/',
'CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_')
if (len(module_config['dynamicFiles']) != 0
and "Assembly_ALL_PARTS_FOR_EXPORT_"
not in module_config['dynamicFiles'][0]['path']):
print("updating dynamicFile config paths...")
for i in range(len(module_config['dynamicFiles'])):
module_config['dynamicFiles'][i]['path'] = module_config[
'dynamicFiles'][i]['path'].replace("Assembly_", "").replace(
'STL/', 'CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_')
# # update paths if the config is out of date
# TODO: THIS IS NOT DONE, SINCE the ALL_PARTS_FOR_EXPORT list DOES NOT MATCH THE LIST OF ALL STL FILES IN /STL
# if (len(module_config['fixedFiles']) != 0
# and "Assembly_ALL_PARTS_FOR_EXPORT_"
# not in module_config['fixedFiles'][0]):
# print("updating fixedFile config paths...")
# for i in range(len(module_config['fixedFiles'])):
# module_config['fixedFiles'][i] = module_config['fixedFiles'][
# i].replace("Assembly_", "").replace('STL/',
# 'CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_')
# if (len(module_config['dynamicFiles']) != 0
# and "Assembly_ALL_PARTS_FOR_EXPORT_"
# not in module_config['dynamicFiles'][0]['path']):
# print("updating dynamicFile config paths...")
# for i in range(len(module_config['dynamicFiles'])):
# module_config['dynamicFiles'][i]['path'] = module_config[
# 'dynamicFiles'][i]['path'].replace("Assembly_", "").replace(
# 'STL/', 'CAD/RAW/STL/Assembly_ALL_PARTS_FOR_EXPORT_')

module_config['githubLink'] = module.githublink
module_config['imageLink'] = module.image

1 comment on commit 2fedf5b

@AlecVercruysse
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately, I had to revert back for now since the whole Assembly_ALL_PARTS_FOR_EXPORT_ list in CAD/RAW/STL does not contain the same files, as the the STL/ file list I created by moving all module stl files: /CAD/Application_*/STL, using find CAD/ -type f -iname "*.stl" -print0 | xargs -0 mv -t STL/.

This discrepancy needs to be fixed somehow, or the already written configs updated. Ultimately, the the list of Assembly_ALL_PARTS_FOR_EXPORT_ files does not contain things like the 4x4 baseplate however, which is critical to many applications. Other files are missing too, such as 30_Z_Stage_Fluomodule_12.stl. Needs to be discussed in openUC2#32.

Please sign in to comment.