applied matter constraints to superposed concernements clones
This commit is contained in:
15
src/App.vue
15
src/App.vue
@@ -33,18 +33,23 @@ export default {
|
||||
// loop through all superposition grouped by concernements couples
|
||||
for(let [couple_id, superpositions] of Object.entries(this.allSuperpositions_byid)){
|
||||
// if one concernement couple has more than one superposition
|
||||
if (superpositions.length > 1) {
|
||||
let superpositions_ids = Object.keys(superpositions);
|
||||
if (superpositions_ids.length > 1) {
|
||||
// loop through these superpositions for one concernement couple starting with the second
|
||||
for (let i = 1; i < superpositions.length; i++) {
|
||||
let superposition_id = `${superpositions[i][0].cid}-${superpositions[i][0].eid}--${superpositions[i][1].cid}-${superpositions[i][1].eid}`
|
||||
let i = 0;
|
||||
for(let [superposition_id, superposition] of Object.entries(superpositions)){
|
||||
i++
|
||||
if (i === 1) {
|
||||
continue;
|
||||
}
|
||||
// first concernement of the couple
|
||||
clones.push({
|
||||
concernement: this.concernementsByID[superpositions[i][0].cid],
|
||||
concernement: this.concernementsByID[superposition[0].cid],
|
||||
superposition_id: superposition_id
|
||||
})
|
||||
// second concernement of the couple
|
||||
clones.push({
|
||||
concernement: this.concernementsByID[superpositions[i][1].cid],
|
||||
concernement: this.concernementsByID[superposition[1].cid],
|
||||
superposition_id: superposition_id
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user