Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/862'
Browse files Browse the repository at this point in the history
  • Loading branch information
1fifoto committed Oct 21, 2023
2 parents de55783 + ddc6858 commit 0f13bca
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 46 deletions.
29 changes: 14 additions & 15 deletions client/src/designtypes/Spring/Compression/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,21 +310,7 @@ export function migrate(design) {
// Remove ioclass from all Symbol Table entries
design.symbol_table.forEach((element) => { // For each Symbol Table entry
delete element.ioclass;
// Added to migration on 10/15/2023 after finding #862 Issue
if (element.value === null) {
element.value = 1;
}
if (element.cmin === null) {
element.cmin = element.value;
}
if (element.cmax === null) {
element.cmax = element.value;
}
});
// Added to migration on 10/15/2023 after finding #862 Issue
if (design.result.objective_value === null) {
design.result.objective_value = 0.0;
}
// #609 Add standard size table for metric Outside Diameters
// Update Material_Type = 31 table and Material_File = 34 value
// console.log('Material_File.value=',design.symbol_table[34].value,'Material_Type.table=',design.symbol_table[31].table)
Expand Down Expand Up @@ -375,8 +361,8 @@ export function migrate(design) {
case '12':
// Current model version
// console.log('Convert from 12 to 13');
// Added to migration on 10/21/2023 after finding #855 Issue
design.symbol_table.forEach((element) => { // For each Symbol Table entry
// Added to migration on 10/21/2023 after finding #855 Issue
if (element.lmin === undefined) {
element.lmin = 0;
}
Expand All @@ -389,7 +375,20 @@ export function migrate(design) {
if (element.cmax === undefined) {
element.cmax = element.value;
}
// Added to migration on 10/15/2023 after finding #862 Issue
if (element.value === null) {
element.value = 1;
}
if (element.cmin === null) {
element.cmin = element.value;
}
if (element.cmax === null) {
element.cmax = element.value;
}
});
if (design.result.objective_value === null) {
design.result.objective_value = 0.0;
}
// migrated_design.version = '13'; // last thing... set the migrated model version

break; // Do not copy this break
Expand Down
29 changes: 14 additions & 15 deletions client/src/designtypes/Spring/Extension/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,21 +257,7 @@ export function migrate(design) {
// Remove ioclass from all Symbol Table entries
design.symbol_table.forEach((element) => { // For each Symbol Table entry
delete element.ioclass;
// Added to migration on 10/15/2023 after finding #862 Issue
if (element.value === null) {
element.value = 1;
}
if (element.cmin === null) {
element.cmin = element.value;
}
if (element.cmax === null) {
element.cmax = element.value;
}
});
// Added to migration on 10/15/2023 after finding #862 Issue
if (design.result.objective_value === null) {
design.result.objective_value = 0.0;
}
// #609 Add standard size table for metric Outside Diameters
// Update Material_Type = 37 table and Material_File = 40 value
// console.log('Material_File.value=',design.symbol_table[40].value,'Material_Type.table=',design.symbol_table[37].table)
Expand Down Expand Up @@ -322,8 +308,8 @@ export function migrate(design) {
case '8':
// Current model version
// console.log('Convert from 8 to 9');
// Added to migration on 10/21/2023 after finding #855 Issue
design.symbol_table.forEach((element) => { // For each Symbol Table entry
// Added to migration on 10/21/2023 after finding #855 Issue
if (element.lmin === undefined) {
element.lmin = 0;
}
Expand All @@ -336,7 +322,20 @@ export function migrate(design) {
if (element.cmax === undefined) {
element.cmax = element.value;
}
// Added to migration on 10/15/2023 after finding #862 Issue
if (element.value === null) {
element.value = 1;
}
if (element.cmin === null) {
element.cmin = element.value;
}
if (element.cmax === null) {
element.cmax = element.value;
}
});
if (design.result.objective_value === null) {
design.result.objective_value = 0.0;
}
// migrated_design.version = '9'; // last thing... set the migrated model version

break; // Do not copy this break
Expand Down
30 changes: 15 additions & 15 deletions client/src/designtypes/Spring/Torsion/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,21 +229,7 @@ export function migrate(design) {
// Remove ioclass from all Symbol Table entries
design.symbol_table.forEach((element) => { // For each Symbol Table entry
delete element.ioclass;
// Added to migration on 10/15/2023 after finding #862 Issue
if (element.value === null) {
element.value = 1;
}
if (element.cmin === null) {
element.cmin = element.value;
}
if (element.cmax === null) {
element.cmax = element.value;
}
});
// Added to migration on 10/15/2023 after finding #862 Issue
if (design.result.objective_value === null) {
design.result.objective_value = 0.0;
}
// #609 Add standard size table for metric Outside Diameters
// Update Material_Type = 31 table and Material_File = 36 value
// console.log('Material_File.value=',design.symbol_table[36].value,'Material_Type.table=',design.symbol_table[31].table)
Expand Down Expand Up @@ -300,8 +286,8 @@ export function migrate(design) {
case '8':
// Current model version
// console.log('Convert from 8 to 9');
// Added to migration on 10/21/2023 after finding #855 Issue
design.symbol_table.forEach((element) => { // For each Symbol Table entry
// Added to migration on 10/21/2023 after finding #855 Issue
if (element.lmin === undefined) {
element.lmin = 0;
}
Expand All @@ -314,7 +300,21 @@ export function migrate(design) {
if (element.cmax === undefined) {
element.cmax = element.value;
}
// Added to migration on 10/15/2023 after finding #862 Issue
if (element.value === null) {
element.value = 1;
}
if (element.cmin === null) {
element.cmin = element.value;
}
if (element.cmax === null) {
element.cmax = element.value;
}
});
if (design.result.objective_value === null) {
design.result.objective_value = 0.0;
}
>>>>>>> refs/remotes/origin/862
// migrated_design.version = '9'; // last thing... set the migrated model version

break; // Do not copy this break
Expand Down
2 changes: 1 addition & 1 deletion client/src/menus/View/ViewSymbolTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class ViewSymbolTable extends Component {
<tr key={element.name}>
<td>{i}</td>
<td>{element.name}</td>
<td>{element.value}</td>
<td>{String(element.value)}</td>
<td>{element.oldvalue}</td>
<td>{element.units}</td>
<td>{element.type}</td>
Expand Down

0 comments on commit 0f13bca

Please sign in to comment.