Skip to content

Commit

Permalink
Add fn interface, troubleshooting with sectionprop
Browse files Browse the repository at this point in the history
  • Loading branch information
m-clare committed May 2, 2024
1 parent 1ae8523 commit 3db87b9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cytriangle/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .functional_interface import triangulate
19 changes: 19 additions & 0 deletions src/cytriangle/functional_interface.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from cytriangle.cytriangle import CyTriangle


def triangulate(input_dict, flags):
# parse regions
raw_regions = input_dict["regions"]
parsed_regions = []
for region in raw_regions:
parsed_regions.append(
{
"vertex": [region[0], region[1]],
"marker": region[2],
"max_area": region[3],
}
)
input_dict["regions"] = parsed_regions
input = CyTriangle(input_dict)
input.triangulate(triswitches=flags)
return input.out.to_dict()

0 comments on commit 3db87b9

Please sign in to comment.