Skip to content

Commit d85c906

Browse files
committed
- updated Python examples
1 parent 515ca6c commit d85c906

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

Changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
2.2.2
2+
- updated Python examples
23
- added documentation files
34
- moved build directory for lib files
45
- fixed encoding of some source files

pyPBD/examples/armadillo.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313

1414
# 1 = distance constraints (PBD)
1515
# 2 = FEM tet constraints (PBD)
16-
# 3 = strain tet constraints (PBD)
17-
# 4 = shape matching
18-
# 5 = distance constraints (XPBD)
19-
simModel = 2
16+
# 3 = FEM tet constraints (XPBD)
17+
# 4 = strain tet constraints (PBD)
18+
# 5 = shape matching
19+
# 6 = distance constraints (XPBD)
20+
simModel = 3
2021

2122

2223
def buildModel():
@@ -76,7 +77,9 @@ def createMesh(simModel):
7677

7778
# init constraints
7879
stiffness = 1.0
79-
if (simModel == 5):
80+
if (simModel == 3):
81+
stiffness = 1000000
82+
if (simModel == 6):
8083
stiffness = 100000
8184
poissonRatio = 0.3
8285

pyPBD/examples/beam_model.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ def buildModel():
1919

2020
# 1 = distance constraints (PBD)
2121
# 2 = FEM tet constraints (PBD)
22-
# 3 = strain tet constraints (PBD)
23-
# 4 = shape matching
24-
# 5 = distance constraints (XPBD)
25-
simModel = 2
22+
# 3 = FEM tet constraints (XPBD)
23+
# 4 = strain tet constraints (PBD)
24+
# 5 = shape matching
25+
# 6 = distance constraints (XPBD)
26+
simModel = 3
2627

2728
createMesh(simModel)
2829

@@ -46,7 +47,9 @@ def createMesh(simModel):
4647

4748
# init constraints
4849
stiffness = 1.0
49-
if (simModel == 5):
50+
if (simModel == 3):
51+
stiffness = 1000000
52+
if (simModel == 6):
5053
stiffness = 100000
5154
poissonRatio = 0.3
5255
model.addSolidConstraints(tetModel, simModel, stiffness, poissonRatio, stiffness, False, False)

0 commit comments

Comments
 (0)