Skip to content

Commit 0d383cf

Browse files
committed
fix: adding surface data type for storing triangular surfaces
1 parent 4e93caf commit 0d383cf

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

LoopStructural/datatypes/_surface.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,13 @@ class Surface:
1515
def pyvista(self):
1616
import pyvista as pv
1717

18-
return pv.pv.PolyData.from_regular_faces(self.vertices, self.triangles)
18+
return pv.PolyData.from_regular_faces(self.vertices, self.triangles)
19+
20+
def to_dict(self):
21+
return {
22+
"vertices": self.vertices,
23+
"triangles": self.triangles,
24+
"normals": self.normals,
25+
"name": self.name,
26+
"values": self.values,
27+
}

0 commit comments

Comments
 (0)