Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

113
Vistas
viewstl giving id not found error even though the id is there

In the below code I use viewstl(https://www.viewstl.com/plugin/). but when I create a model with an id and I try to get the model information, I get the error get_model_info - id not found: 0. However, when I look at the stl log, it says the id under the model. Does anyone have an idea why this is happening?

let file = document.createElement('div');
file.setAttribute('id', 'stl_preview');
figure.insertBefore(file, figCap)
let stl = new StlViewer(document.getElementById('stl_preview'), {
    models: [{
        id:1, filename: reader.result
    }]
});
console.log(stl);
console.log(stl.get_model_info(0));

Or if anyone knows other stl viewers I can implement, I am open to suggestions.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Your id is 1 not 0, try this:

console.log(stl.get_model_info(1));
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda