Skip to content
Snippets Groups Projects
Commit 5bee4f5c authored by Boman Romain's avatar Boman Romain
Browse files

add focalpt as an array or tuple

parent 12cb1100
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,6 @@
# Dolicorhynchops osborni FHSM VP404
# 10k faces on the mandible surface
def parms(d={}):
p = {}
path = 'dolicorhynchops/10k'
......@@ -15,7 +14,7 @@ def parms(d={}):
{
'file': f'{path}/Lmuscle.ply',
'force': 100.,
'focalpt': f'{path}/LmuscleF.off',
'focalpt': [-100.1458893, -173.13895, 227.3909], #f'{path}/LmuscleF.off',
'method': 'U' # 'U', 'T', 'T+N'
},
{
......
......@@ -93,8 +93,12 @@ def getMetafor(p={}):
mgroups = {} # stores muscle group data and loads
for muscle in p['muscles']:
# load focal point
fullpath = os.path.join(os.path.dirname(__file__), muscle['focalpt'])
focalnodes, _ = boneload.load_msh(fullpath)
if isinstance(muscle['focalpt'], str):
fullpath = os.path.join(os.path.dirname(__file__), muscle['focalpt'])
focalnodes, _ = boneload.load_msh(fullpath)
else: # coordinates in array or tuple
focalnodes = [ muscle['focalpt'] ]
# load surface mesh => groups[name (from filename)]
name, nodes, tris, ntags = \
create_group(muscle['file'], nods_no, nods_pos, domain, groups)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment