Ask Your Question
1

How to load stl files into sage math

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

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

Comments

Welcome to Ask Sage! Thank you for your question!

slelievre gravatar imageslelievre ( 2021-07-06 15:47:37 +0200 )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 (https://python-stl.readthedocs.io/en/...) and use that in Sage.

John Palmieri gravatar imageJohn Palmieri ( 2021-07-06 18:39:11 +0200 )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 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

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

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

Maybe "NumPy-stl" is the right package to use: https://pypi.org/project/numpy-stl/, documentation here: https://numpy-stl.readthedocs.io/en/l.... 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

works.

(The package https://python-stl.readthedocs.io/en/... has not been updated recently — last in 2014. So probably not the right choice.)

edit flag offensive delete link more

Comments

Thank You.

Krishna Sai gravatar imageKrishna Sai ( 2021-07-07 14:48:26 +0200 )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

Stats

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

Seen: 59 times

Last updated: Jul 07 '21