Questions tagged [numpy-stl]
Simple library to make working with STL files (and 3D objects in general) fast and easy.
33
questions
0
votes
0
answers
78
views
Issue with numpy-stl package installation
I have python 3.10.4 and pip 22.1 on my Mac, and I'm trying to install numpy-stl, but it shows the following error:
% pip install numpy-stl
Collecting numpy-stl
Using cached numpy-stl-2.16.3.tar.gz (...
0
votes
1
answer
40
views
getting vertices and face as numpy array from a stl file using trimesh
I have an STL file, I now need to read the vertices and face value of that STL file using trimesh.
myobj = trimesh.load_mesh("file.stl", enable_post_processing=True, solid=True)
myobj....
0
votes
1
answer
361
views
How do you extract faces from a numpy-stl mesh?
I've read the documentation and searched the internet, however, couldn't reach any useful information.
I'm loading a mesh from file into python using:
import numpy
from stl import mesh
tank = mesh....
0
votes
0
answers
91
views
Assembling one stl to a big stl file
I now have one stl file as a small block and one csv of positions of x, y, and z.
The goal is to put each block to the positions and generate a combined stl file.
Now I've came to using numpy-stl ...
0
votes
1
answer
141
views
How to use numpy-stl with file uploaded with Flask request
I am writing an app, which takes a STL file as input. I want to get volume of the stl object without saving the stl file and use the volume to calculate a quote and post it back to browser. Right now ...
1
vote
2
answers
906
views
How do I convert STL file to numpy array and format it to overlay with Dicom data?
I have STL files of 3D objects and I have converted them into both mesh objects and numpy arrays using the numpy-stl package. I have also converted DCM data into numpy arrays with the pydicom package, ...
0
votes
1
answer
408
views
How to initialize a triangular mesh in vtk
I need to create a triangular mesh on vtk from a list of points that I have. The points are stored under sphere, which is a nx9 numpy array where each row represents the three points that make up one ...
1
vote
0
answers
253
views
How do I solve this issue: process finished with exit code -1066598274 (0xC06D007E)
I am trying to use the numpy-stl library to rotate a triangular mesh, but the process keeps failing. For reference, this is the code I am running:
from stl import mesh
import math
sphere = mesh.Mesh....
0
votes
0
answers
83
views
Convert .STL file to NetworkX graph object?
I was wondering if there was an easy way to convert a .STL file to a graph object. I've imported the STL file using numpy-stl and can return a vector representation of the mesh (a list of triangles) ...
1
vote
0
answers
260
views
is there a general code that can export Matplotlib plots to .stl?
I have already downloaded the Numpy-stl library but I am not sure how a general export would work for a simple code for example a cube? So, if I plot a Cube in Matplotlib, and want to export it to an ....
1
vote
2
answers
2k
views
How to get rid of "numpy.ndarray" has no attribute split?
I have try to edit one stl file. With regards to this, I read the stl file using numpy-stl. Now, when I try to split the lines present in it, it shows me an error as:
'numpy.ndarray' object has no ...
0
votes
1
answer
547
views
How to extract vertex , face from .stl file
I'm currently working on a project which use PyQt5 to be able to display 3D object using opengl.GLViewWiget
I have already download a .stl file and a base of PyQt5 module
self.Widget3D = opengl....
0
votes
1
answer
469
views
numpy-stl topological information of the stl fle read
Using the Python numpy-stl package: reading the .stl files we can get the geometrical information from the triangular mesh, vertex data, normals, areas etc, but can we access the topological ...
0
votes
2
answers
956
views
Finding intersection points between .stl (CAD drawing) file and 3D plot (matplotlib)?
I am trying to find intersection points between 3d object .stl file (that I imported to python using numpy-stl) and 3d plot(that I generated using matplotlib). The 3d object is a cad drawing and 3d ...
1
vote
2
answers
214
views
How to get .stl file from Amazon S3 by using boto3?
I have a Django Web application and i deployed it to Elastic Beanstalk environment. I also have the numpy-stl package. I'm trying to get a .stl file from Amazon S3 bucket and use this file with a stl ...
0
votes
2
answers
679
views
How to change STL colors using vtk library
I am trying to manipulate an STL file so they appear as different colours on the screen.
Here is the code I have now, I am looping through multiple STL files. I think the only issue is my syntax, as ...
1
vote
2
answers
775
views
triangulate 2d shape to get STL
I am generating 2D binary shapes in python. After that, I want them to be converted to a 3D STL file for 3D printing. This kind of works, but only with "simple" shapes like triangles and squares. For ...
0
votes
2
answers
977
views
How to get proper views of point cloud data in numpy-stl?
I am trying to get front, back, left, right, top, bottom after projecting the point clouds of 3D data. But the results are not good. Is there any better way to get the required views? I have done up ...
1
vote
1
answer
2k
views
Rotate stl file in matplotlib 3d
I'm using numpy-stl for open stl file in plot. It is open stl file. But i have a problem. I want to rotate stl file in plot like this image:
Code is here:
from stl import mesh
from mpl_toolkits ...
0
votes
0
answers
198
views
Is it possible to create Delaunay triangulation only in vertical (Z dimension)?
I'm working on plugin in QGIS which is creating 3d model from raster data.
In that case, I need to create triangulation only in the vertical plane (no connecting vertical faces with neighbour points).
...
0
votes
1
answer
344
views
remove inside information when merging two 3d objects
Hi i'm currently working on a project where we have to combine multiple 3d objects. So for example place them next to each other and some times they also intersect.
I'm looking for an algorithm/...
5
votes
1
answer
4k
views
How do you extract vertices from a numpy-stl mesh?
I am trying to use numpy-stl to extract the vertices from an stl model to use for coherent point drift registration. How do you go about extracting the vertices? I understand how to create a mesh from ...
2
votes
2
answers
500
views
Scale an .stl file using python script
I have an .stl file and I want to write a python script to scale if. So for example, if I have a file with a cube of dimensions 2x2x2mm, and I have my scale set to 10, the script should spit out an ...
-2
votes
1
answer
2k
views
Selection of Face of a STL by Face Normal value Threshold
I want to write a script in Python which can generate facegroups in a STL as per the Face Normal value condition. For example, Provided is the snap of Stl, Different colour signifies the face group ...
1
vote
1
answer
2k
views
Python- STL File Reduction
I want to make a python script that reduces number of triangles in a STL file while preserving shape in python. Is there some module which can do this operation?
4
votes
2
answers
9k
views
Rendering 2D images from STL file in Python
I would like to load an STL file and produce a set of 2D images in different rotations.
I got the basics working with numpy-stl based on this example, ended up with this code -
from stl import ...
0
votes
1
answer
538
views
Install Numpy-stl on WIN10
I am trying to use the package "numpy-stl" and as you see i am a beginner in programming.
I don't know how to install this package. I tried it with pip but I don't know even understand how to do that....
0
votes
1
answer
577
views
matplotlib shows only partial mesh from stl file
So I have this cute little model of a jeep stored in my stl file:
To display its 3D mesh in my jupyter notebook, I used the following code segment:
from stl import mesh
from mpl_toolkits import ...
0
votes
1
answer
652
views
numpy-stl edges not visible
I'm plotting STL files using numpy-stl (2.4.1) line by line according to the doc on https://github.com/WoLpH/numpy-stl
My problem is, that the edges of the triangles are not visible. Hence, I cannot ...
5
votes
1
answer
3k
views
How to save multiple meshes in python using numpy-stl
I am working on a piece of python code that will take in an image in grey scale, scale it, and output a 3d model with the height of each pixel being determined by the value of the grey scale. I have ...
2
votes
0
answers
188
views
Load from ZipFile stl files by numpy-stl
is there a way how to load a stl files from zip by numpy-stl?
I can read stl files normaly from file system by numpy-stl but Im not able to connect it to opened zip file.
It is python 2.7
For ...
4
votes
2
answers
5k
views
Convert Stl into numpy array
Is there way to convert the stl file content into a numpy array or a set of numpy arrays?
I know that I can always read stl as file and then assign variables, but I was wondering if there is an ...
2
votes
2
answers
13k
views
Importing of 3D STL Image in Python (ImportError: No module named ascii)
I am planning to write a program in Python for raspberrypi, to import a 3D STL image.
For that purpose, I googled and got a Python library called "numpy-stl" which is suitable for my requirement. I ...