User Tools

Site Tools


visual3d:documentation:modeling:segments:segment_properties_example

This is an old revision of the document!


this example specifies segment properties from pipeline commands. for a variety of legacy reasons, visual3d does not allow users to specify the segment depth as an expression. this limitation means that the command set_model_metric cannot be used for segment depth.

prompted by a customer that wanted to use a pipeline command to modify segment depth we documented this in several pipeline examples.

note: as of visual3dv5.01.20, user's are able to enter equations into the depth measurements for the pelvis and thorax.


specifying segment properties from a value

this example is for the pelvis and assumes that the pelvis segment has been constructed.

! first set a pipeline parameter for the segment depth
! this value could be obtained by prompting the user or in this case is set to 0.12 
set_pipeline_parameter 
/parameter_name=depth 
/parameter_value=0.12 
;

! explicitly set the mass and inertial properties for an elliptical cylinder
! this example is for the pelvis segment
set_segment_properties 
/calibration_file= 
/segment_name=rpv 
/mass=0.142*mass 
/cg_from_prox_axial=0.5*rpv_seg_length 
/cg_from_prox_ml=0 
/cg_from_prox_ap=0 
/inertia_xx=0.142*mass*(3*&::depth&^2+rpv_seg_length^2)/12 
/inertia_yy=0.142*mass*(3*rpv_distal_radius^2+rpv_seg_length^2)/12 
/inertia_zz=0.142*mass*(&::depth&^2+rpv_distal_radius^2)/4 
! /ap_direction= 
! /axial_direction= 
! /model_file= 
! /material_file= 
;

specifying segment properties from a metric

there are two examples: one for the pelvis segment and one for the thorax.

pelvis

create a metric to compute the depth as the distance between two markers/landmarks. this example is for the pelvis and assumes that the pelvis segment has ben constructed. in addition, the landmark mid_asis has been created.

! set global active
select_active_file
/file_name=global
! /query=
;

metric_explicit
/result_metric_name=pelvic_depth
/result_metric_folder=processed
/metric_value=distance(model::target::sacr,model::landmark::mid_asis)
;

! first set a pipeline parameter for the segment depth
set_pipeline_parameter
/parameter_name=depth
/parameter_value=global::metric::processed::pelvic_depth
;

! explicitly set the mass and inertial properties for an elliptical cylinder
! this example is for the pelvis segment
set_segment_properties 
/calibration_file= 
/segment_name=rpv 
/mass=0.142*mass 
/cg_from_prox_axial=0.5*rpv_seg_length 
/cg_from_prox_ml=0 
/cg_from_prox_ap=0 
/inertia_xx=0.142*mass*(3*&::depth&^2+rpv_seg_length^2)/12 
/inertia_yy=0.142*mass*(3*rpv_distal_radius^2+rpv_seg_length^2)/12 
/inertia_zz=0.142*mass*(&::depth&^2+rpv_distal_radius^2)/4 
! /ap_direction= 
! /axial_direction= 
! /model_file= 
! /material_file= 
;

thorax

this example is for the thorax and assumes that the thorax segment has ben constructed. since visual3d does not allow users to specify the segment depth as an expression, a user could construct the thorax segment with a “dummy” depth number (0.12) and use the pipeline below to calculate a depth value based on targets/landmarks on the segment.

! set thorax depth 

select_active_file
/file_name=global
! /query=
;

! the cylindrical depth is equal to one-half the distance from anterior to posterior.
metric_explicit
/result_metric_name=thorax_depth
/result_metric_folder=processed
/metric_value=distance(model::target::t10,model::landmark::strn)/2
;

! first set a pipeline parameter for the segment depth
set_pipeline_parameter
/parameter_name=depth
/parameter_value=global::metric::processed::thorax_depth
;

! explicitly set the mass and inertial properties for an elliptical cylinder for the thorax segment
set_segment_properties
/calibration_file=
/segment_name=rta
/mass=0.355*mass
/cg_from_prox_axial=0.5*rta_seg_length
/cg_from_prox_ml=0
/cg_from_prox_ap=0
/inertia_xx=0.355*mass*(3*&::depth&^2+rta_seg_length^2)/12
/inertia_yy=0.355*mass*(3*rta_distal_radius^2+rta_seg_length^2)/12
/inertia_zz=0.355*mass*(&::depth&^2+rta_distal_radius^2)/4
! /ap_direction=
! /axial_direction=
! /model_file=
! /material_file=
;
visual3d/documentation/modeling/segments/segment_properties_example.1718804187.txt.gz · Last modified: 2024/06/19 13:36 by sgranger