Skip to content

Commit

Permalink
fix: adding datatypes module
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlangrose committed Oct 3, 2023
1 parent e203b4d commit 2102c72
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 0 deletions.
Empty file.
Empty file.
Empty file.
18 changes: 18 additions & 0 deletions LoopStructural/datatypes/_surface.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from dataclasses import dataclass
from typing import Optional, Union
import numpy as np


@dataclass
class Surface:
vertices: np.ndarray
triangles: np.ndarray
normals: np.ndarray
name: str
values: Optional[np.ndarray] = None

@property
def pyvista(self):
import pyvista as pv

return pv.pv.PolyData.from_regular_faces(self.vertices, self.triangles)
Empty file.
7 changes: 7 additions & 0 deletions LoopStructural/datatypes/_value.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from dataclasses import dataclass


@dataclass
class Value:


6 changes: 6 additions & 0 deletions LoopStructural/datatypes/_value_set.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# import numpy as np


# class ValueSet:
# def __init__(self, values: np.ndarray):
# self.values = values

0 comments on commit 2102c72

Please sign in to comment.