Commit 5299155e authored by Jayant Khatkar's avatar Jayant Khatkar
Browse files

minor changes

parent 71561489
......@@ -7,6 +7,7 @@ In progress
#### Requirements
- `sudo apt install libspatialindex-dev`
- `pip3 install rtree`
- `pip3 install trimesh`
- `pip3 install shapely`
- `conda install rtree`
- `conda install trimesh`
- `conda install shapely`
-
#!/usr/bin/python3
import trimesh
import numpy as np
from shapely.geometry import LineString
#import numpy as np
#from shapely.geometry import LineString
mesh = trimesh.load_mesh('models/benchy.stl')
layer = mesh.section(plane_origin = (0,0,20), plane_normal=[0,0,1])
layer = mesh.section(plane_origin=(0, 0, 20), plane_normal=[0, 0, 1])
# This shows the intersections with the plane in 3d
layer.show()
# this converts it into 2d
s2,s3 = layer.to_planar()
s2, s3 = layer.to_planar()
s2.show()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment