Skip to content

Commit 2102c72

Browse files
committed
fix: adding datatypes module
1 parent e203b4d commit 2102c72

File tree

7 files changed

+31
-0
lines changed

7 files changed

+31
-0
lines changed

LoopStructural/datatypes/_inequality.py

Whitespace-only changes.

LoopStructural/datatypes/_normal.py

Whitespace-only changes.

LoopStructural/datatypes/_structured_grid.py

Whitespace-only changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from dataclasses import dataclass
2+
from typing import Optional, Union
3+
import numpy as np
4+
5+
6+
@dataclass
7+
class Surface:
8+
vertices: np.ndarray
9+
triangles: np.ndarray
10+
normals: np.ndarray
11+
name: str
12+
values: Optional[np.ndarray] = None
13+
14+
@property
15+
def pyvista(self):
16+
import pyvista as pv
17+
18+
return pv.pv.PolyData.from_regular_faces(self.vertices, self.triangles)

LoopStructural/datatypes/_tangent.py

Whitespace-only changes.

LoopStructural/datatypes/_value.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from dataclasses import dataclass
2+
3+
4+
@dataclass
5+
class Value:
6+
7+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# import numpy as np
2+
3+
4+
# class ValueSet:
5+
# def __init__(self, values: np.ndarray):
6+
# self.values = values

0 commit comments

Comments
 (0)