Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fossils
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Boman Romain
fossils
Commits
12cb1100
Commit
12cb1100
authored
4 years ago
by
Boman Romain
Browse files
Options
Downloads
Patches
Plain Diff
add LTMJ as coordinates
parent
7a9243ed
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
models/dolicorhynchops_10k_contact.py
+1
-1
1 addition, 1 deletion
models/dolicorhynchops_10k_contact.py
models/mandiblemodel.py
+16
-10
16 additions, 10 deletions
models/mandiblemodel.py
with
17 additions
and
11 deletions
models/dolicorhynchops_10k_contact.py
+
1
−
1
View file @
12cb1100
...
...
@@ -9,7 +9,7 @@ def parms(d={}):
path
=
'
dolicorhynchops/10k
'
p
[
'
mandible
'
]
=
f
'
{
path
}
/mandible.ply
'
# p['teeth'] = f'{path}/teeth.off'
p
[
'
LTMJ
'
]
=
[
0.1458893
,
-
73.13895
,
227.3909
]
,
p
[
'
LTMJ
'
]
=
[
0.1458893
,
-
73.13895
,
227.3909
]
p
[
'
RTMJ
'
]
=
f
'
{
path
}
/RTMJ.off
'
p
[
'
muscles
'
]
=
[
{
...
...
This diff is collapsed.
Click to expand it.
models/mandiblemodel.py
+
16
−
10
View file @
12cb1100
...
...
@@ -19,8 +19,8 @@ def parms(d={}):
path
=
'
dolicorhynchops/10k
'
p
[
'
mandible
'
]
=
f
'
{
path
}
/mandible.ply
'
# mandible mesh (.ply/.geo/.msh)
p
[
'
teeth
'
]
=
f
'
{
path
}
/teeth.off
'
# one or several vertices (.ply/.off) (used if p['food']=='fixteeth')
p
[
'
LTMJ
'
]
=
f
'
{
path
}
/LTMJ.off
'
# left temporomandibular joint - 1 vertex (.ply/.off)
p
[
'
RTMJ
'
]
=
f
'
{
path
}
/RTMJ.off
'
# right temporomandibular joint - 1 vertex (.ply/.off)
p
[
'
LTMJ
'
]
=
[
0.1458893
,
-
73.13895
,
227.3909
]
# left temporomandibular joint - 1 vertex (.ply/.off
/coordinates
)
p
[
'
RTMJ
'
]
=
f
'
{
path
}
/RTMJ.off
'
# right temporomandibular joint - 1 vertex (.ply/.off
/coordinates
)
p
[
'
muscles
'
]
=
[
{
'
file
'
:
f
'
{
path
}
/Lmuscle.ply
'
,
'
force
'
:
100.
,
'
focalpt
'
:
f
'
{
path
}
/LmuscleF.off
'
,
'
method
'
:
'
T
'
},
{
'
file
'
:
f
'
{
path
}
/Rmuscle.off
'
,
'
force
'
:
100.
,
'
focalpt
'
:
f
'
{
path
}
/RmuscleF.off
'
,
'
method
'
:
'
T
'
}
...
...
@@ -275,14 +275,20 @@ def extract_nodes_from_group(group):
return
nods_no
,
nods_pos
def
create_group
(
mesh_file
,
all_no
,
all_coords
,
domain
,
groups
,
gname
=
None
):
"""
loads the mesh file
"
mesh_file
"
and identify vertices among vertices
def
create_group
(
mesh_file
_or_coord
,
all_no
,
all_coords
,
domain
,
groups
,
gname
=
None
):
"""
loads the mesh file
"
mesh_file
_or_coord
"
and identify vertices among vertices
stored in all_coords.
Then, the routine creates a group named
"
gname
"
(built from mesh_file if None)
Then, the routine creates a group named
"
gname
"
(built from mesh_file
_or_coord
if None)
"""
# load mesh file
fullpath
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
mesh_file
)
nodes
,
tris
=
boneload
.
load_msh
(
fullpath
)
# load mesh file
if
isinstance
(
mesh_file_or_coord
,
str
):
fullpath
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
mesh_file_or_coord
)
nodes
,
tris
=
boneload
.
load_msh
(
fullpath
)
else
:
nodes
=
[
mesh_file_or_coord
]
print
(
f
'
nodes=
{
nodes
}
'
)
print
(
f
'
mesh_file_or_coord=
{
mesh_file_or_coord
}
'
)
tris
=
[]
# identify nodes of the mesh among the given vertices of the main mesh
ntags
=
boneload
.
identify_nodes
(
nodes
,
all_no
,
all_coords
)
...
...
@@ -290,7 +296,7 @@ def create_group(mesh_file, all_no, all_coords, domain, groups, gname=None):
# create a metafor group
groupset
=
domain
.
getGeometry
().
getGroupSet
()
if
gname
is
None
:
gname
,
_
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
mesh_file
))
gname
,
_
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
mesh_file
_or_coord
))
group
=
groupset
.
add
(
Group
(
groupset
.
getLargestNo
()
+
1
))
groups
[
gname
]
=
group
...
...
@@ -300,7 +306,7 @@ def create_group(mesh_file, all_no, all_coords, domain, groups, gname=None):
group
.
addMeshPoint
(
nodeset
(
tag
))
print
(
f
'
group #
{
group
.
getNo
()
}
(
{
gname
}
)
'
\
f
'
created from
{
mesh_file
}
(
{
group
.
getNumberOfMeshPoints
()
}
nodes)
'
)
f
'
created from
{
mesh_file
_or_coord
}
(
{
group
.
getNumberOfMeshPoints
()
}
nodes)
'
)
return
gname
,
nodes
,
tris
,
ntags
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment