refactored getJarvisEnvelopeConvexe getPaddedRoundedSegments & setPaperContour

displaying proximites concernement contours around the entite ref point
This commit is contained in:
2023-10-25 11:56:55 +02:00
parent ecc838abbb
commit 8aa8403f76
4 changed files with 253 additions and 63 deletions

View File

@@ -316,7 +316,7 @@ export default {
// cercles
for (let i = 1; i < 9; i++) {
let sw = i === 4 || i === 8 ? 0.5 : 0.25; // width
let sw = i === 4 || i === 8 ? 0.25 : 0.1; // width
let da = i === 4 || i === 8 ? null : [5,5]; // dash array
if (!da) { // draw only 2 main non-dashed circles
children.push(new paper.Path.Circle({
@@ -335,14 +335,14 @@ export default {
from: [pos.x, pos.y - ray],
to: [pos.x, pos.y + ray],
strokeColor: '#fff',
strokeWidth: 0.5
strokeWidth: 0.25
}));
// horizontal
children.push(new paper.Path.Line({
from: [pos.x - ray, pos.y],
to: [pos.x + ray, pos.y],
strokeColor: '#fff',
strokeWidth: 0.5
strokeWidth: 0.25
}))
// fleches
@@ -353,7 +353,7 @@ export default {
[pos.x, pos.y - ray],
[pos.x + 8, pos.y - ray + 8],
],
strokeWidth: 0.5,
strokeWidth: 0.25,
strokeColor: '#fff',
}));
// milieu
@@ -363,7 +363,7 @@ export default {
[pos.x, pos.y],
[pos.x + 8, pos.y + 8],
],
strokeWidth: 0.5,
strokeWidth: 0.25,
strokeColor: '#fff',
}));
@@ -1138,14 +1138,8 @@ export default {
// console.log('concernementB', concernementB);
// console.log('superposition', superposition_id, superposition);
let mapitemA_id, mapitemB_id;
// if (i === 1) {
// mapitemA_id = superposition[0].cid
// mapitemB_id = superposition[1].cid
// } else {
mapitemA_id = `${superposition[0].cid}___${superposition_id}`
mapitemB_id = `${superposition[1].cid}___${superposition_id}`
// }
let mapitemA_id = `${superposition[0].cid}___${superposition_id}`
let mapitemB_id = `${superposition[1].cid}___${superposition_id}`
// get the concernement matter bodies with id
@@ -1318,7 +1312,7 @@ export default {
<li>
<a
title="proximite" href="#proximite" @click="setMapMode('proximite')"
:class="{ disabled: opened_concernement && !opened_concernement.has_proximite, active: map_mode === 'proximité'}"
:class="{ disabled: opened_concernement && !opened_concernement.has_proximites, active: map_mode === 'proximite'}"
>
<span class="icon proximite"/> <span class="label"> proximité</span>
</a>