STL Viewer in Python - Part 2 || the STL File

Поділитися
Вставка
  • Опубліковано 2 лют 2025

КОМЕНТАРІ • 9

  • @robduquette1736
    @robduquette1736 Рік тому +1

    Really good content! Learned a lot from this! Only suggestion would be to increase the audio volume, I had to turn my volume up all the way and could just barely hear you.

    • @YounesLab
      @YounesLab  Рік тому

      Thank you for your feedback and for letting me know, i will fix it!

  • @adelishaktoumi626
    @adelishaktoumi626 Рік тому +1

    interesting!

  • @uniqueramya3632
    @uniqueramya3632 3 місяці тому +2

    Thanks for the wonderful explanation. Can we convert the Binary file to ASCII STL file?

    • @YounesLab
      @YounesLab  2 місяці тому +1

      Thank you! :)
      Yes, you can convert a binary STL file to an ASCII STL file using the numpy-stl library in Python. You can read the binary file with mesh.Mesh.from_file(), then save it as an ASCII file using mesh_data.save(output_file, mode=mesh.Mesh.ASCII).
      ```python
      def binary_to_ascii_stl(binary_file, ascii_file):
      # Read the binary STL file using numpy-stl
      mesh_data = mesh.Mesh.from_file(binary_file)
      # Write the mesh data to an ASCII STL file
      mesh_data.save(ascii_file, mode=mesh.Mesh.ASCII)
      ```

    • @uniqueramya3632
      @uniqueramya3632 2 місяці тому +1

      @ Thank you so much. Really appreciate it. I saw that u mentioned for larger data it’s better to go with binary form. But with the birnary form it’s not easy to get the coordinates. Is there any way to do that ?

  • @subhashcm3002
    @subhashcm3002 9 місяців тому +1

    Hello.
    Thank you for the informative Video
    Can we convert STL into HTML file in python., if so can you please guide me .

    • @YounesLab
      @YounesLab  9 місяців тому +1

      Hello! Thank you for your comment :)
      I am not familiar with HTML, however I can maybe share with you what I know maybe it will help you out.
      In its root, an STL file is made out of coordinates, You group three coordinate-points together to get a triangle, and you get an STL file by combining triangle together. If you are able to convert an X, Y and Z coordinate, it would be theoritically entirely possible.
      Maybe these links will help you out:
      1. tonybox.net/posts/simple-stl-viewer/
      2. stackoverflow.com/questions/12880980/need-js-and-html-example-for-displaying-stl-3d-objects-in-a-web-page

    • @AngusBro
      @AngusBro Місяць тому

      a stl and html are completely different, there is ways of viewing 3d models in a html site tho