\hypertarget{pageHbmPreparation_introduction}{}\subsection{Introduction}\label{pageHbmPreparation_introduction}
The followings steps are typically required to import a Finite Element Human Body model (H\+B\+M) in the P\+I\+P\+E\+R application\+: \begin{DoxyItemize}
\item Step 1\+: check that a format rules file (.pfr) exists for the considered finite element format (if not, see \hyperlink{pageMultiformatParser}{Multi Finite Element Format Parser} to define a new one). This is required to parse the finite element files. \item Step 2\+: prepare the Finite Element Human Body Model. Typically, the preparation consists in creating groups of finite element entities corresponding to anatomical or P\+I\+P\+E\+R components. For example, the user could create a group of all F\+E parts constituting the femur. These are stored in the native finite element format. \item Step 3\+: define model metadata in the description model file (\hyperlink{pageHbmPreparation_modeldescr}{Preparing the model and metadata}). Typically, groups prepared in the previous step are associated to P\+I\+P\+E\+R entities (.pmr file).\end{DoxyItemize}
Step 2 and Step 3 are detailed after the summary table below.

Summary of files needed to import a F\+E H\+B\+M and build the internal representation of the H\+B\+M (P\+I\+P\+E\+R model) \begin{TabularC}{3}
\hline
\rowcolor{lightgray}{\bf Contents }&{\bf Format }&{\bf Defined  }\\\cline{1-3}
Rules to parse the F\+E format (1) &.pfr (X\+M\+L based) &once per F\+E format \\\cline{1-3}
Groups corresponding to anatomical or P\+I\+P\+E\+R components &native F\+E format &once per H\+B\+M \\\cline{1-3}
Association between P\+I\+P\+E\+R components and F\+E groups/entities&.pmr (X\+M\+L based) &once per H\+B\+M \\\cline{1-3}
\end{TabularC}
(1) available pfr files are stored in the Piper/bin directory



 \hypertarget{pageHbmPreparation_modeldescr}{}\subsection{Preparing the model and metadata}\label{pageHbmPreparation_modeldescr}
The Model description file (xml based format with extension .pmr) is defined to\+: \begin{DoxyItemize}
\item provide information about model units, location of file to be parsed and identification of \hyperlink{pageMultiformatParser_genstruct}{Format rule file} to be used for parsing \item describe the structure of the Human Body Model according to the description of the \hyperlink{pageFramework_secFrameworkMetadata}{Metadata} of the model.~\newline
 The following P\+I\+P\+E\+R components can be described\+: \item \hyperlink{pageHbmPreparation_entity}{\char`\"{}entity\char`\"{} element} \item \hyperlink{pageHbmPreparation_joint}{\char`\"{}joint\char`\"{} element} \item \hyperlink{pageHbmPreparation_landmark}{\char`\"{}landmark\char`\"{} element} \item \hyperlink{pageHbmPreparation_secHbmControlpoints}{\char`\"{}\+Control Points\char`\"{} element} \item \hyperlink{pageHbmPreparation_parameter}{\char`\"{}parameter\char`\"{} element}\end{DoxyItemize}
If groups or F\+E entity are created specifically to be associated with these P\+I\+P\+E\+R components, it is suggested to store them in separate include files of the F\+E format (see the example of the child model).\hypertarget{pageHbmPreparation_pmrstructure}{}\subsubsection{Structure of the model description file}\label{pageHbmPreparation_pmrstructure}
A typical overall structure of a model description file (.pmr) is shown below, with detailed descriptions of the components in the following subsections. The pmr file of the P\+I\+P\+E\+R child model can also be used as an example.


\begin{DoxyCode}
1 <?\textcolor{keyword}{xml} \textcolor{keyword}{version}=\textcolor{stringliteral}{"1.0"} \textcolor{keyword}{encoding}=\textcolor{stringliteral}{"UTF-8"} \textcolor{keyword}{standalone}=\textcolor{stringliteral}{"no"}?>
2 <!\textcolor{keyword}{DOCTYPE} \textcolor{keyword}{format\_description} \textcolor{keyword}{SYSTEM} \textcolor{stringliteral}{"ModelRules.dtd"}>
3 
4 <-- \textcolor{keyword}{Root} \textcolor{keyword}{element} \textcolor{keyword}{of} \textcolor{keyword}{the} \textcolor{keyword}{description} \textcolor{keyword}{document} -->
5 <\textcolor{keywordtype}{model\_description}>
6     
7     <-- \textcolor{keyword}{model} \textcolor{keyword}{units} (\textcolor{keyword}{required}) -->
8     <\textcolor{keywordtype}{units} \textcolor{keyword}{length}=\textcolor{stringliteral}{"mm"} \textcolor{keyword}{mass}=\textcolor{stringliteral}{"kg"} \textcolor{keyword}{age}=\textcolor{stringliteral}{"year"} />
9     <-- \textcolor{keyword}{source} \textcolor{keyword}{file} \textcolor{keyword}{or} \textcolor{keyword}{source} \textcolor{keyword}{directory} (\textcolor{keyword}{required}) -->
10     <\textcolor{keywordtype}{source}>\textcolor{keyword}{model\_01\_separator.dyn}</\textcolor{keywordtype}{source}>
11     <-- \textcolor{keyword}{source} \textcolor{keyword}{format} \textcolor{keyword}{rule} \textcolor{keyword}{file} (\textcolor{keyword}{required}) -->
12     <\textcolor{keywordtype}{format\_rules} \textcolor{keyword}{format}=\textcolor{stringliteral}{"LSDyna\_separator"}>../\textcolor{keyword}{formatrules}/\textcolor{keyword}{Formatrules\_LSDyna\_Separator.pfr}</\textcolor{keywordtype}{format\_rules}>
13 
14 
15     <-- \textcolor{keyword}{define} \textcolor{keyword}{entity:} \textcolor{keyword}{repeat} \textcolor{keyword}{for} \textcolor{keyword}{each} \textcolor{keyword}{entity} \textcolor{keyword}{in} \textcolor{keyword}{the} \textcolor{keyword}{model} -->
16     <\textcolor{keywordtype}{entity} \textcolor{keyword}{name}=\textcolor{stringliteral}{"entityname"}>
17     ...
18     </\textcolor{keywordtype}{entity}>   
19 
20     <-- \textcolor{keyword}{define} \textcolor{keyword}{landmark:} \textcolor{keyword}{repeat} \textcolor{keyword}{for} \textcolor{keyword}{each} \textcolor{keyword}{landmark} \textcolor{keyword}{in} \textcolor{keyword}{the} \textcolor{keyword}{model} -->
21     <\textcolor{keywordtype}{landmarks} \textcolor{keyword}{name}=\textcolor{stringliteral}{"landmarkname"} \textcolor{keyword}{type}=\textcolor{stringliteral}{"landmark type"}>
22     ...
23     </\textcolor{keywordtype}{landmarks}>
24 
25     <-- \textcolor{keyword}{define} \textcolor{keyword}{a} \textcolor{keyword}{set} \textcolor{keyword}{control} \textcolor{keyword}{point:} \textcolor{keyword}{repeat} \textcolor{keyword}{for} \textcolor{keyword}{each} \textcolor{keyword}{joint} \textcolor{keyword}{in} \textcolor{keyword}{the} \textcolor{keyword}{model} -->
26     <\textcolor{keywordtype}{controlPoint} \textcolor{keyword}{name}=\textcolor{stringliteral}{"control\_point\_0"} \textcolor{keyword}{role}=\textcolor{stringliteral}{"source"}>
27     ...
28     </\textcolor{keywordtype}{controlPoint}>
29 
30     <-- \textcolor{keyword}{define} \textcolor{keyword}{joint:} \textcolor{keyword}{repeat} \textcolor{keyword}{for} \textcolor{keyword}{each} \textcolor{keyword}{joint} \textcolor{keyword}{in} \textcolor{keyword}{the} \textcolor{keyword}{model} -->
31     <\textcolor{keywordtype}{joint} \textcolor{keyword}{name}=\textcolor{stringliteral}{"jointname"}> 
32     ...
33     </\textcolor{keywordtype}{joint}>
34 
35     <\textcolor{keywordtype}{contact} \textcolor{keyword}{name}=\textcolor{stringliteral}{"contactname"} \textcolor{keyword}{type}=\textcolor{stringliteral}{"sliding"}>
36     ...
37     </\textcolor{keywordtype}{contact}>      
38 
39     <-- \textcolor{keyword}{define} \textcolor{keyword}{parameter:} \textcolor{keyword}{repeat} \textcolor{keyword}{for} \textcolor{keyword}{each} \textcolor{keyword}{parameter} \textcolor{keyword}{in} \textcolor{keyword}{the} \textcolor{keyword}{model} -->
40     <\textcolor{keywordtype}{parameter} \textcolor{keyword}{name}=\textcolor{stringliteral}{"parametername"}>
41     ...
42     </\textcolor{keywordtype}{parameter}>
43     
44 </\textcolor{keywordtype}{model\_description}>
\end{DoxyCode}
\hypertarget{pageHbmPreparation_modelunits}{}\subsubsection{\char`\"{}model units\char`\"{} element}\label{pageHbmPreparation_modelunits}
Length units\+: m, dm, cm, mm~\newline
Mass unit\+: kg, dg, cg, mg~\newline
Age unit\+: year, month~\newline
 
\begin{DoxyCode}
1 <-- \textcolor{keyword}{model} \textcolor{keyword}{units} (\textcolor{keyword}{required}) -->
2 <\textcolor{keywordtype}{units} \textcolor{keyword}{length}=\textcolor{stringliteral}{"mm"} \textcolor{keyword}{mass}=\textcolor{stringliteral}{"kg"} \textcolor{keyword}{age}=\textcolor{stringliteral}{"year"} />
\end{DoxyCode}
\hypertarget{pageHbmPreparation_source}{}\subsubsection{\char`\"{}source\char`\"{} element}\label{pageHbmPreparation_source}
The path of the main file to be imported to create the piper H\+B\+M need to be specified as follow. The path can be absolute or relative\+: 
\begin{DoxyCode}
1 <-- \textcolor{keyword}{source} \textcolor{keyword}{file} \textcolor{keyword}{or} \textcolor{keyword}{source} \textcolor{keyword}{directory} (\textcolor{keyword}{required}) -->
2 <\textcolor{keywordtype}{source}>\textcolor{keyword}{model\_01\_separator.dyn}</\textcolor{keywordtype}{source}>
\end{DoxyCode}
\hypertarget{pageHbmPreparation_formatrule}{}\subsubsection{\char`\"{}\+Format\char`\"{} element}\label{pageHbmPreparation_formatrule}
For the L\+S\+Dyna and pam\+Crash F\+E formats, format rule files are provided with P\+I\+P\+E\+R application, so only format name is required. The following format names are available;
\begin{DoxyItemize}
\item L\+S\+Dyna\+\_\+fix\+: for F\+E files in L\+S\+Dyna fix (or block) format 
\begin{DoxyCode}
1 <-- \textcolor{keyword}{source} \textcolor{keyword}{format} \textcolor{keyword}{rule} \textcolor{keyword}{file} (\textcolor{keyword}{required}) -->
2 <\textcolor{keywordtype}{format\_rules} \textcolor{keyword}{format}=\textcolor{stringliteral}{"LSDyna\_fix"}/>
\end{DoxyCode}

\item L\+S\+Dyna\+\_\+separator\+: for F\+E files in L\+S\+Dyna format with comma separator 
\begin{DoxyCode}
1 <-- \textcolor{keyword}{source} \textcolor{keyword}{format} \textcolor{keyword}{rule} \textcolor{keyword}{file} (\textcolor{keyword}{required}) -->
2 <\textcolor{keywordtype}{format\_rules} \textcolor{keyword}{format}=\textcolor{stringliteral}{"LSDyna\_separator"}/>
\end{DoxyCode}

\item Pam\+Crash\+: for F\+E files in pamcrash format 
\begin{DoxyCode}
1 <-- \textcolor{keyword}{source} \textcolor{keyword}{format} \textcolor{keyword}{rule} \textcolor{keyword}{file} (\textcolor{keyword}{required}) -->
2 <\textcolor{keywordtype}{format\_rules} \textcolor{keyword}{format}=\textcolor{stringliteral}{"PamCrash"}/>
\end{DoxyCode}

\end{DoxyItemize}

If format rules required for parsing is not one of those provided with P\+I\+P\+E\+R application, the format rule path (relative or absolute) can be specified\+: 
\begin{DoxyCode}
1 <-- \textcolor{keyword}{source} \textcolor{keyword}{format} \textcolor{keyword}{rule} \textcolor{keyword}{file} (\textcolor{keyword}{required}) -->
2 <\textcolor{keywordtype}{format\_rules} \textcolor{keyword}{format}=\textcolor{stringliteral}{"myFormatName"}>../\textcolor{keyword}{myformatrules}/\textcolor{keyword}{Formatrules\_myformat.pfr}</\textcolor{keywordtype}{format\_rules}>
\end{DoxyCode}
\hypertarget{pageHbmPreparation_componentid}{}\subsubsection{\char`\"{}\+F\+E component identification\char`\"{} element}\label{pageHbmPreparation_componentid}
Depending on the F\+E format of the input Human Body model, a F\+E component (nodes, groups, material...) is associated with an unique identifier which can be an integer or a name. To specify which F\+E component is involved in a association, the \char`\"{}keyword\char`\"{} element is used as follows (example considering L\+S-\/\+Dyna format and Pamcrash format)\+:


\begin{DoxyCode}
1 <-- \textcolor{keyword}{FE} \textcolor{keyword}{component} \textcolor{keyword}{identified} \textcolor{keyword}{by} \textcolor{keyword}{an} \textcolor{keyword}{integer} \textcolor{keyword}{identifier} (\textcolor{keyword}{example} \textcolor{keyword}{for} \textcolor{keyword}{LS} \textcolor{keyword}{Dyna} \textcolor{keyword}{format}):  -->
2 <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"*SET\_SOLID"}>
3     <\textcolor{keywordtype}{id}>10</\textcolor{keywordtype}{id}>
4 </\textcolor{keywordtype}{keyword}>
5 <-- \textcolor{keyword}{FE} \textcolor{keyword}{component} \textcolor{keyword}{identified} \textcolor{keyword}{by} \textcolor{keyword}{a} \textcolor{keyword}{name} (\textcolor{keyword}{example} \textcolor{keyword}{for} \textcolor{keyword}{Pam-Crash} \textcolor{keyword}{format}) -->
6 <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"GROUP"}>
7     <\textcolor{keywordtype}{name}>\textcolor{keyword}{femur}</\textcolor{keywordtype}{name}>
8 </\textcolor{keywordtype}{keyword}>
\end{DoxyCode}


In the first example, the F\+E component corresponding to the keyword $\ast$\+S\+E\+T\+\_\+\+S\+O\+L\+I\+D (a group of solid elements in L\+S-\/\+Dyna) with an identifier equal to 10 is selected and used for the association rule. In the second one, the F\+E component corresponding to the keyword G\+R\+O\+U\+P (a group in Pam-\/\+Crash) with an identifier name equal to groupname is selected and used for the association rule.\hypertarget{pageHbmPreparation_entity}{}\subsubsection{\char`\"{}entity\char`\"{} element}\label{pageHbmPreparation_entity}
Entities are typically used to describe anatomical entities such as bones, skin, ligaments, etc. The list of available anatomical entities is provided in \hyperlink{pageAppendixEntity}{Appendix\+: List of entities} .

The \char`\"{}entity\char`\"{} element defines association between group(s) of elements (or group(s) of part) in the F\+E Human Body Model and a \hyperlink{pageFramework_secFrameworkMetadataEntity}{Entity} identified by {\ttfamily name} .

Example of \char`\"{}entity\char`\"{} element, the \char`\"{}entity\char`\"{} named Entity\+\_\+1 is associated with F\+E components identified by\+: \begin{DoxyItemize}
\item the keyword \char`\"{}kw\+\_\+for\+\_\+group\+\_\+of\+\_\+element3d\char`\"{} and Id 10 and 101 \item the keyword \char`\"{}kw\+\_\+for\+\_\+group\+\_\+of\+\_\+element2\+D\char`\"{} and Id 5\end{DoxyItemize}

\begin{DoxyCode}
1 <\textcolor{keywordtype}{entity} \textcolor{keyword}{name}=\textcolor{stringliteral}{"Entity\_1"}>
2     <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"kw\_for\_group\_of\_element3d"}>
3         <\textcolor{keywordtype}{id}>10 101</\textcolor{keywordtype}{id}>
4     </\textcolor{keywordtype}{keyword}>
5     <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"kw\_for\_group\_of\_element2D"}>
6         <\textcolor{keywordtype}{id}>5</\textcolor{keywordtype}{id}>
7     </\textcolor{keywordtype}{keyword}>
8 </\textcolor{keywordtype}{entity}>
\end{DoxyCode}
\hypertarget{pageHbmPreparation_prepareentity2}{}\paragraph{Model preparation for entities}\label{pageHbmPreparation_prepareentity2}
The user has to first define group(s) of elements or a group(s) of parts in the Finite Element Model using their finite element pre-\/processor. All elements composing the anatomical entity must be included. For example, if the femur is modelled with 3d element for trabecular bone with an overlay of 2\+D elements for cortical bone, group(s) must include all 3\+D and 2\+D elements.

If 2\+D elements are included in the entity definition, normal orientation and topology must be carefully checked (the envelope should be closed, manifold, oriented coherently with normals pointing out). If this is not the case, the user can either modify their H\+B\+M or, as a workaround, add a part composed with null elements respecting these criteria to describe the outside boundary of the entity. The P\+I\+P\+E\+R child model is an example of model with properly oriented normals.

If the original Finite Element format allows defining a group name, association between group and entity can be made in \char`\"{}auto\char`\"{} mode if the group name correspond to an entity name following P\+I\+P\+E\+R dictionary.

To be able to use the auto mode, the group name must be parsed in the description of the rule to parse keyword corresponded to group in the considered F\+E format (\hyperlink{pageMultiformatParser}{Multi Finite Element Format Parser}).

Example of \char`\"{}entity\char`\"{} element with \char`\"{}auto\char`\"{} mode\+: In this example, two F\+E group components identified by the keyword \char`\"{}kw\+\_\+for\+\_\+group\+\_\+of\+\_\+element3d\char`\"{} and ids 10 and 101 are considered and the name defined for each group is used to identified \hyperlink{pageFramework_secFrameworkMetadataEntity}{Entity} to be associated with. If the group name identified by keyword \char`\"{}kw\+\_\+for\+\_\+group\+\_\+of\+\_\+element3d\char`\"{} and ids 10 is Left\+\_\+femur, then this group is associated with \hyperlink{pageFramework_secFrameworkMetadataEntity}{Entity} left femur.


\begin{DoxyCode}
1 <\textcolor{keywordtype}{entity} \textcolor{keyword}{name}=\textcolor{stringliteral}{"auto"}>
2     <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"kw\_for\_group\_of\_element3d"}>
3         <\textcolor{keywordtype}{id}>10 101</\textcolor{keywordtype}{id}>
4     </\textcolor{keywordtype}{keyword}>
5 </\textcolor{keywordtype}{entity}>
\end{DoxyCode}
\hypertarget{pageHbmPreparation_joint}{}\subsubsection{\char`\"{}joint\char`\"{} element}\label{pageHbmPreparation_joint}
Joints are typically used to articulate two bones with a robotic joint (which can match an anatomical convention or not).

To define a joint between two \hyperlink{pageMultiformatParser_meshcomponent}{piper components}, a frame is associated with each entity involved. This can be achieved using the \char`\"{}set\+Frame\char`\"{} element that identify the proper F\+E frame component using the \char`\"{}keyword\char`\"{} element. The \char`\"{}set\+Dof\char`\"{} element is defined to specify degrees of freedom of the joint (relatively to frame defined for entity\+\_\+1 of the frame).

{\bfseries Example 1\+:} 
\begin{DoxyCode}
1 <\textcolor{keywordtype}{joint} \textcolor{keyword}{name}=\textcolor{stringliteral}{"Joint\_1"}> 
2     <\textcolor{keywordtype}{entity\_1} \textcolor{keyword}{name}=\textcolor{stringliteral}{"Entiyname1"}>
3         <\textcolor{keywordtype}{setFrame}>
4             <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"kw\_frame"}>
5                 <\textcolor{keywordtype}{id}>60010</\textcolor{keywordtype}{id}>
6             </\textcolor{keywordtype}{keyword}>
7         </\textcolor{keywordtype}{setFrame}>
8     </\textcolor{keywordtype}{entity\_1}>
9     <\textcolor{keywordtype}{entity\_2} \textcolor{keyword}{name}=\textcolor{stringliteral}{"Entiyname2"}>
10         <\textcolor{keywordtype}{setFrame}>
11             <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"kw\_frame"}>
12                 <\textcolor{keywordtype}{id}>5050</\textcolor{keywordtype}{id}>
13             </\textcolor{keywordtype}{keyword}>
14         </\textcolor{keywordtype}{setFrame}>
15     </\textcolor{keywordtype}{entity\_2}>
16     <\textcolor{keywordtype}{setDof}>0 0 0 1 0 1</\textcolor{keywordtype}{setDof}>
17 </\textcolor{keywordtype}{joint}>
\end{DoxyCode}


In the example, a \hyperlink{pageFramework_secFrameworkMetadataJoint}{Joint} named {\ttfamily Joint\+\_\+1} is defined between entity {\ttfamily Entiyname1} and {\ttfamily Entiyname2}. Frame defined in the keyword \char`\"{}kw\+\_\+frame\char`\"{} with id equal to 60010 is associated with {\ttfamily Entiyname1} and Frame defined in the keyword \char`\"{}kw\+\_\+frame\char`\"{} with id equal to 5050 is associated with {\ttfamily Entiyname2}. The degree of freedom of the joint are rotation relative to the X axis of the {\ttfamily Entiyname1} frame and rotation relative to the Z axis of the {\ttfamily Entiyname1} frame.

The global frame axis of the F\+E model can be used to define a joint frame (see example 2)~\newline
. {\bfseries Example 2\+:} 
\begin{DoxyCode}
1 <\textcolor{keywordtype}{joint} \textcolor{keyword}{name}=\textcolor{stringliteral}{"Joint\_1"}> 
2     <\textcolor{keywordtype}{entity\_1} \textcolor{keyword}{name}=\textcolor{stringliteral}{"Entiyname1"}>
3         <\textcolor{keywordtype}{setFrame} \textcolor{keyword}{type}=\textcolor{stringliteral}{"global"}>
4             <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"*NODE"}>
5                 <\textcolor{keywordtype}{id}>2056046</\textcolor{keywordtype}{id}>
6             </\textcolor{keywordtype}{keyword}>              
7         </\textcolor{keywordtype}{setFrame}>
8     </\textcolor{keywordtype}{entity\_1}>
9     <\textcolor{keywordtype}{entity\_2} \textcolor{keyword}{name}=\textcolor{stringliteral}{"Entiyname2"}>
10         <\textcolor{keywordtype}{setFrame} \textcolor{keyword}{type}=\textcolor{stringliteral}{"global"}>
11             <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"*NODE"}>
12                 <\textcolor{keywordtype}{id}>2056046</\textcolor{keywordtype}{id}>
13             </\textcolor{keywordtype}{keyword}>              
14         </\textcolor{keywordtype}{setFrame}>
15     </\textcolor{keywordtype}{entity\_2}>
16     <\textcolor{keywordtype}{setDof}>0 0 0 1 0 1</\textcolor{keywordtype}{setDof}>
17 </\textcolor{keywordtype}{joint}>
\end{DoxyCode}


In example, a \hyperlink{pageFramework_secFrameworkMetadataJoint}{Joint} named {\ttfamily Joint\+\_\+1} is defined between entity {\ttfamily Entiyname1} and {\ttfamily Entiyname2}. Frame defined in the keyword \char`\"{}kw\+\_\+frame\char`\"{} and its orientation are identical to the global model frame ({\ttfamily type=\char`\"{}global\char`\"{}}). The origin of the joint frame is defined by setting a node id. The degree of freedom of the joint are rotation relative to the X axis of the {\ttfamily Entiyname1} frame and rotation relative to the Z axis of the {\ttfamily Entiyname1} frame.\hypertarget{pageHbmPreparation_preparejoint2}{}\paragraph{Model preparation for joint}\label{pageHbmPreparation_preparejoint2}
When springs or 6 d.\+o.\+f. joints are already used in the F\+E model to articulate bones, it is suggested to use that definition as the basis for the joint entity.\hypertarget{pageHbmPreparation_landmark}{}\subsubsection{\char`\"{}landmark\char`\"{} element}\label{pageHbmPreparation_landmark}
Landmarks are typically

The \char`\"{}landmark\char`\"{} element is used to associate F\+E groups of nodes and a \hyperlink{pageFramework_secFrameworkMetadataLandmark}{Landmark} identified by its {\ttfamily name} and {\ttfamily type} (point, barycenter, sphere). In the following example, a landmark with {\ttfamily name} Landmark\+\_\+2 is defined by the group of node identified by the \char`\"{}keyword\char`\"{} element. 
\begin{DoxyCode}
1 <\textcolor{keywordtype}{landmarks} \textcolor{keyword}{name}=\textcolor{stringliteral}{"Landmark\_2"} \textcolor{keyword}{type}=\textcolor{stringliteral}{"sphere"}>
2     <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"ground\_node\_keyword"}>
3         <\textcolor{keywordtype}{id}>10002</\textcolor{keywordtype}{id}>
4     </\textcolor{keywordtype}{keyword}>
5 </\textcolor{keywordtype}{landmarks}>
\end{DoxyCode}
\hypertarget{pageHbmPreparation_prepareland2}{}\paragraph{Prepare H\+B\+M Landmarks}\label{pageHbmPreparation_prepareland2}
To define a landmark, the user has to define a group of nodes in the Finite Element Human Body Model in the Finite Element Model using their finite element pre-\/processor. The node number can also be used directly if only one node is needed.

If the original Finite Element format allows to define a group name, association between group and landmark can be made in \char`\"{}auto\char`\"{} mode if the group name correspond to an landmark name following the Anatomy\+D\+B definition for landmarks. To be able to use the auto mode, the group name must be parsed in the description of the rule to parse keyword corresponded to group in the considered F\+E format ( see \hyperlink{pageMultiformatParser}{Multi Finite Element Format Parser}).\hypertarget{pageHbmPreparation_contact}{}\subsubsection{Contact element}\label{pageHbmPreparation_contact}
In order to describe a contact between {\itshape entity1} and {\itshape entity2}, groups of nodes have to be defined to identify the contact region on both entities. In theory a contact is symmetric, but the way it is implemented in the \hyperlink{modulePhysPosiInter}{Pre-\/\+Positioning Module} it is not. {\itshape entity1} shall be the entity which has its contact region always in contact.

Contacts are defined between groups of nodes. Their property includes a thickness parameter which can maintain the contact between the objects. An example of contact is provided below.


\begin{DoxyCode}
1 <\textcolor{keywordtype}{contact} \textcolor{keyword}{name}=\textcolor{stringliteral}{"Left\_hip"} \textcolor{keyword}{type}=\textcolor{stringliteral}{"sliding"}>        
2     <\textcolor{keywordtype}{thickness} \textcolor{keyword}{keep}=\textcolor{stringliteral}{"true"} />
3     <\textcolor{keywordtype}{entity\_contact\_1} \textcolor{keyword}{name}=\textcolor{stringliteral}{"Pelvic\_skeleton"}>
4         <\textcolor{keywordtype}{setGroup}>
5             <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"*SET\_NODE\_LIST\_TITLE"}>
6                 <\textcolor{keywordtype}{id}>9903818</\textcolor{keywordtype}{id}>
7             </\textcolor{keywordtype}{keyword}>              
8         </\textcolor{keywordtype}{setGroup}>
9     </\textcolor{keywordtype}{entity\_contact\_1}>
10     <\textcolor{keywordtype}{entity\_contact\_2} \textcolor{keyword}{name}=\textcolor{stringliteral}{"Left\_femur"}>
11         <\textcolor{keywordtype}{setGroup}>
12             <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"*SET\_NODE\_LIST\_TITLE"}>
13                 <\textcolor{keywordtype}{id}>9901621</\textcolor{keywordtype}{id}>
14             </\textcolor{keywordtype}{keyword}>              
15         </\textcolor{keywordtype}{setGroup}>
16     </\textcolor{keywordtype}{entity\_contact\_2}>
17 </\textcolor{keywordtype}{contact}>  
\end{DoxyCode}
\hypertarget{pageHbmPreparation_parameter}{}\subsubsection{\char`\"{}parameter\char`\"{} element}\label{pageHbmPreparation_parameter}
The parameter element is typically used for finite element parameters which are not described by nodes or elements (e.\+g. material properties, shell thickness).

The \char`\"{}hbm\+\_\+parameter\char`\"{} element allows to gather parameters parsed with keyword format rules (\hyperlink{pageMultiformatParser_piperparam}{P\+I\+P\+E\+R Parameter operation}) in a set. The {\ttfamily parameternamesource} corresponds to the name of the parameter defined in the rule to parse each keywords.


\begin{DoxyCode}
1 <\textcolor{keywordtype}{hbm\_parameter} \textcolor{keyword}{name}=\textcolor{stringliteral}{"parametername"} \textcolor{keyword}{source}=\textcolor{stringliteral}{"parameternamesource"}>
2     <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"kw1"}>
3         <\textcolor{keywordtype}{id}>7000014 7000016</\textcolor{keywordtype}{id}>
4     </\textcolor{keywordtype}{keyword}>
5     <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"kw2"}>
6         <\textcolor{keywordtype}{id}>7000015</\textcolor{keywordtype}{id}>
7     </\textcolor{keywordtype}{keyword}>  
8 </\textcolor{keywordtype}{hbm\_parameter}>
\end{DoxyCode}


There is no specific model preparation for this element.\hypertarget{pageHbmPreparation_secHbmControlpoints}{}\subsubsection{\char`\"{}\+Control Points\char`\"{} element}\label{pageHbmPreparation_secHbmControlpoints}
To define an ordered set of control points to be used as source control points in \hyperlink{modulekriging}{Kriging Module}. Each set of control points must have a name (any unique string) and role (\char`\"{}source\char`\"{} or \char`\"{}target\char`\"{}) attributes. There are several allowed formats for defining the coordinates of the control points, as shown on the example below\+: they can be defined either by a keyword or directly as a set of point coordinates, with or without I\+Ds. Regardless of the coordinate definition, each set can also have a weight (\hyperlink{modulekriging_secKrigingNugget}{Nugget}) and a \hyperlink{modulekriging_secKrigingAssociation}{Skin/bone association} parameters, as shown on the \char`\"{}control\+\_\+points\+\_\+2\char`\"{} set. 
\begin{DoxyCode}
1 <\textcolor{keywordtype}{controlPoint} \textcolor{keyword}{name}=\textcolor{stringliteral}{"control\_point\_0"} \textcolor{keyword}{role}=\textcolor{stringliteral}{"source"}>
2     <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"*NODE"}>
3         <\textcolor{keywordtype}{id}>5207268 33002334 33003064</\textcolor{keywordtype}{id}>
4     </\textcolor{keywordtype}{keyword}>
5 </\textcolor{keywordtype}{controlPoint}>
6 <\textcolor{keywordtype}{controlPoint} \textcolor{keyword}{name}=\textcolor{stringliteral}{"control\_point\_1"} \textcolor{keyword}{role}=\textcolor{stringliteral}{"source"}>
7     <\textcolor{keywordtype}{keyword} \textcolor{keyword}{kw}=\textcolor{stringliteral}{"*NODE"}>
8         <\textcolor{keywordtype}{id}>6120127 5106751 5106946 35000357</\textcolor{keywordtype}{id}>
9     </\textcolor{keywordtype}{keyword}>
10 </\textcolor{keywordtype}{controlPoint}> 
11 <\textcolor{keywordtype}{controlPoint} \textcolor{keyword}{name}=\textcolor{stringliteral}{"control\_point\_2"} \textcolor{keyword}{role}=\textcolor{stringliteral}{"source"}>
12     <\textcolor{keywordtype}{coord}>
13     23        -43.3839         20.0958         225.346
14     24         -65.291               0         229.255
15     25        -21.7513               0         222.236
16     26        -43.3839        -20.0958         225.346
17     27        -26.8911               0         193.384
18     </\textcolor{keywordtype}{coord}>
19     <\textcolor{keywordtype}{weight}>-20 -20 -20 -45 -45</\textcolor{keywordtype}{weight}>
20     <\textcolor{keywordtype}{as\_bones}>1 1 1 0 0</\textcolor{keywordtype}{as\_bones}>
21     <\textcolor{keywordtype}{as\_skin}> 0 0 0 1 1</\textcolor{keywordtype}{as\_skin}>
22 </\textcolor{keywordtype}{controlPoint}> 
23 <\textcolor{keywordtype}{controlPoint} \textcolor{keyword}{name}=\textcolor{stringliteral}{"control\_point\_3"} \textcolor{keyword}{role}=\textcolor{stringliteral}{"target"}>
24     <\textcolor{keywordtype}{coordfix}>
25     -10 20 30
26     -20 30 40
27     -10 38 74
28     -20 12 11
29     -12 23 42
30     </\textcolor{keywordtype}{coordfix}>
31 </\textcolor{keywordtype}{controlPoint}>
\end{DoxyCode}
 