Skip to content

Commit

Permalink
EditTSReader
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderJuestel committed Oct 16, 2024
1 parent 38ea999 commit 01bce2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion gemgis/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1915,7 +1915,10 @@ def read_ts(path: Union[str, Path]) -> Tuple[list, list]:
if line_type == "PROPERTIES":
columns += values

elif line_type == "TFACE":
# Deleting duplicate column names
columns = list(dict.fromkeys(columns))

elif line_type == "TFACE" or line_type == "END":
# Creating array for faces
faces = np.array(faces, dtype=np.int32)

Expand Down
2 changes: 1 addition & 1 deletion gemgis/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ def create_polydata_from_ts(
for i in range(len(data[0])):
# Creating faces for PyVista PolyData
faces = np.hstack(
np.pad(data[1][i], ((0, 0), (1, 0)), "constant", constant_values=3)
np.pad(data[1][i]-1, ((0, 0), (1, 0)), "constant", constant_values=3)
)

# Creating vertices for PyVista Polydata
Expand Down

0 comments on commit 01bce2e

Please sign in to comment.