Ask Your Question

How to load stl files into sage math

asked 2021-07-06 12:45:09 +0100

Krishna Sai gravatar image

I want to work upon FEM in sage math, so i just want to import stl files and mesh it. Any help on how to start.

edit retag flag offensive close merge delete


Welcome to Ask Sage! Thank you for your question!

slelievre gravatar imageslelievre ( 2021-07-06 15:47:37 +0100 )edit

Please describe your Sage installation. Did you install it yourself, or is it system-wide? I'm asking because if you installed it yourself, you should be able to install a package like Python STL ( and use that in Sage.

John Palmieri gravatar imageJohn Palmieri ( 2021-07-06 18:39:11 +0100 )edit

Hi John Thanks for the comment. I installed Sage myself in Linux on anaconda package manager. How to install the stl package on Python? Is there any documentation on how I can slice and mesh the object and display the mesh.

Krishna Sai gravatar imageKrishna Sai ( 2021-07-07 05:53:38 +0100 )edit

1 Answer

Sort by » oldest newest most voted

answered 2021-07-07 06:45:11 +0100

updated 2021-07-07 06:47:03 +0100

Maybe "NumPy-stl" is the right package to use:, documentation here: I don't know exactly how anaconda works, but try to make sure that anaconda is activated and run pip install numpy-stl. Test it by running Sage and seeing if

from stl import mesh


(The package has not been updated recently — last in 2014. So probably not the right choice.)

edit flag offensive delete link more


Thank You.

Krishna Sai gravatar imageKrishna Sai ( 2021-07-07 14:48:26 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2021-07-06 12:45:09 +0100

Seen: 100 times

Last updated: Jul 07 '21