diff --git a/index.html b/index.html
index e2ede46..d7f5e19 100644
--- a/index.html
+++ b/index.html
@@ -1221,14 +1221,16 @@
function isInteractiveMesh(object) {
if (!object) return false;
- const norm = object.name.toUpperCase();
- if (norm.includes('CILINDRO') || norm.includes('CERRADURA') || norm.includes('SOLID1_102')) return true;
- if (norm.includes('SOLID1_114') || norm.includes('SOLID1_37') || norm.includes('SOLID1_41') ||
- norm.includes('SOLID1_40') || norm.includes('SOLID1_39') ||
- norm.includes('HUELLERO') || norm.includes('LECTOR') || norm.includes('BIOMETRICO')) return true;
- if (norm.includes('SOLID1_103')) return true;
- if (norm.includes('MESHFEATURE1') || norm.includes('SOLID1_105')) return true;
- if (norm.includes('SOLID1_81')) return true;
+ let combinedNorm = object.name.toUpperCase();
+ object.traverseAncestors(a => { if (a.name) combinedNorm += " " + a.name.toUpperCase(); });
+
+ if (combinedNorm.includes('CILINDRO') || combinedNorm.includes('CERRADURA') || combinedNorm.includes('SOLID1_70')) return true;
+ if (combinedNorm.includes('SOLID1_82') || combinedNorm.includes('SOLID1_37') || combinedNorm.includes('SOLID1_41') ||
+ combinedNorm.includes('SOLID1_40') || combinedNorm.includes('SOLID1_39') ||
+ combinedNorm.includes('HUELLERO') || combinedNorm.includes('LECTOR') || combinedNorm.includes('BIOMETRICO')) return true;
+ if (combinedNorm.includes('SOLID1_71')) return true;
+ if (combinedNorm.includes('MESHFEATURE1') || combinedNorm.includes('SOLID1_73')) return true;
+ if (combinedNorm.includes('SOLID1_81') || combinedNorm.includes('SOLID1_43') || combinedNorm.includes('PANTALLANUEVA')) return true;
let isDoor = false;
object.traverseAncestors((ancestor) => {
if (ancestor.name && (
@@ -1304,7 +1306,10 @@
console.log('Clicked:', object.name);
lastClickedPart = object.name;
if (debugPartName) debugPartName.textContent = object.name || 'unnamed';
- const normName = object.name.toUpperCase();
+
+ // Get full hierarchical name for matching (helps when mesh name is just "Solid1")
+ let combinedName = object.name.toUpperCase();
+ object.traverseAncestors(a => { if (a.name) combinedName += " " + a.name.toUpperCase(); });
// Check if clicking door or hinge area (traverse ancestors including pivot)
let isDoorClick = false;
@@ -1318,32 +1323,38 @@
}
});
- if (normName.includes('CILINDRO') || normName.includes('CERRADURA') || normName.includes('SOLID1_102')) {
+ if (combinedName.includes('CILINDRO') || combinedName.includes('CERRADURA') || combinedName.includes('SOLID1_70')) {
zoomToLock(object);
- showAnnotation(object, "Abrir con llave.
Ante cortes de energía, la maquina permanece cerrada");
- } else if (normName.includes('SOLID1_114') || normName.includes('SOLID1_37') || normName.includes('SOLID1_41') || normName.includes('SOLID1_40') || normName.includes('SOLID1_39') || normName.includes('HUELLERO') || normName.includes('LECTOR') || normName.includes('BIOMETRICO')) {
+ showAnnotation(object, "Abrir con llave
Ante cortes de energía, la máquina pertenece cerrada,");
+ } else if (combinedName.includes('SOLID1_82') || combinedName.includes('SOLID1_37') || combinedName.includes('SOLID1_41') || combinedName.includes('SOLID1_40') || combinedName.includes('SOLID1_39') || combinedName.includes('HUELLERO') || combinedName.includes('LECTOR') || combinedName.includes('BIOMETRICO')) {
zoomToBiometric(object);
showAnnotation(object, `
- Apertura biométrica
- Funcionalidades acorde a rol del usuario
-