Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

372
Views
How to read triangles and vertices of the model from the STL format?

I need to get information about the vertices and triangles of the STL format model, please tell me how to extract this data in ThreeJS

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use the STLLoader class for this task. So you define an instance of the loader and use it to load a STL asset from a specific path. In the onLoad() callback, you get an instance of BufferGeometry representing the geometry data from the STL file.

const loader = new STLLoader();
loader.load( './models/stl/ascii/slotted_disk.stl', function ( geometry ) {

    const material = new THREE.MeshBasicMaterial();
    const mesh = new THREE.Mesh( geometry, material );

    scene.add( mesh );

} );

Keep in mind that the geometry is non-indexed. So the faces/triangles are defined by three consecutive vertices in the position buffer attribute.

Full example: https://threejs.org/examples/webgl_loader_stl

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!