Export Polygon C3DFile

From Software Product Documentation
Jump to navigation Jump to search

Export a file from the Workspace to a C3D file suitable for Vicon's Polygon program. Sample files can be found on the Polygon Example Export page.

NOTE: This is an area in which HAS-Motion and Vicon agree to disagree. A few Visual3D customers have requested that we export C3D files containing information pertinent to Polygon. If it weren't for these requests, we would not have done so because we do not approve of putting PROCESSED data into the C3D file. Polygon requires additional information than that contained in a typical C3D file. Visual3D exports LINK_MODEL_BASED signals, and context dependent EVENT LABELS to POLYGON allowing Kinematic and Kinetic data to be reported in POLYGON. Animating objects in POLYGON requires additional data and an additional file to be created by Visual3D. Visual3D, therefore, creates additional landmarks for defining the position and orientation of a segment, and an MKR file defining which wireframe objects are associated with the segments.

Command Syntax

Export_Polygon_C3DFile
! /OLD_FILE_NAME= Exports ALL_FILES, TAGS, or Wildcards (*)
! /NEW_FILE_NAME= If NEW_FILE_NAME is empty, SUFFIX is added
! /DESTINATION_FOLDER= If DESTINATION_FOLDER is empty, the user is prompted for a folder
! /Polygon_Segment_Array=
! /V3D_SEGMENT_ARRAY=
! /SEGMENT_DESCRIPTION=
! /POLYGON_EVENT_CONTEXT=
! /POLYGON_EVENT_ICON=
! /POLYGON_EVENT_NAME=
! /POLYGON_EVENT_SUBJECT=
! /V3D_EVENT_NAME=
! /EVENT_DESCRIPTIONS=
! /POLYGON_SIGNAL_ITEMS_ARRAY=
! /V3D_SIGNAL_TYPES_ARRAY=
! /V3D_SIGNAL_FOLDERS_ARRAY=
! /V3D_SIGNAL_NAMES_ARRAY=
! /SUFFIX=_ If a new filename is not specified, Visual3D will add the suffix to the old filename.
! /Export_Endian=2
! /REPLACE_POLY_TARGETS=FALSE
;

NOTE: Visual3D NEVER recommends over writing original data files. For this reason the NEW_FILE_NAME parameter should be different from the original file name, or the SUFFIX parameter should be used.

Polygon_Segment_Array

This is linked tightly with V3D_Segment_Array

These parameters contain the name of the Polygon segment (these are hardcoded by Polygon) and the corresponding segment name in Visual3D.

This is needed because Visual3D allows multiple versions of a segment, and it may be that the segment used for Visual3D processing is different than the segment definition needed for Polygon animation.

Note that Polygon doesn't do any substantial processing, so this means that the model based definitions in Visual3D might not be consistent with a signal of the same name computed by Plugin Gait.

V3D_Segment_Array

Default Segment Arrays

Polygon Segment Visual3D Segment Visual3D 3 letter acronym
PELPelvisRPV
RFERight ThighRTH
RTIRight ShankRSK
RFORight FootRFT
LFELeft ThighLTH
LTILeft ShankLSK
LFOLeft FootLFT
HEDHeadRHE
RHURight ArmRAR
RRARight ForearmRFA
RHNRight HandRHA
LHULeft ArmLAR
LRALeft ForearmLFA
LHNLeft HandLHA
TRXThoraxRTA

Edit Dialog

Map Visual3D Segments to Polygon Segments
The default Polygon segment names are listed in the drop down menu and should correspond to the correct Visual3D segment names. The default list of Visual3D segment names is listed here. The description is a label for the user to identify the segment names.

Map Visual3D Events to Polygon Events
The events used to identify heel strike and toe off in Visual3D should correspond to the default Polygon labels. The default labels in Visual3D are ON/OFF.

Map Visual3D Items to Polygon Items
The Polygon item list should correspond to the name of the relevant signal. For example, the RAnkleAngle will correspond to the ankle angle created in the Compute Model Based dialog. In this case, the Visual3D Type will be "Link_Model_Based", the Visual3D Folders will be "Original" and the Visual3D signals parameter is the signal name (which is user defined).

Segment Scaling

In Polygon the segment graphic is scaled based on the length of the segment. The length of the segment in Visual3D is determined by the distance between the proximal and distal ends of the segment.

Trunk Segment

Polygon defines the trunk differently from the other segments. If you export from Visual3D into Polygon, and the trunk appears upside down, backwards and scaled larger than expected, the following steps can be used to modify the trunk orientation and scale.

Explanation

Upside Down Trunk

In Visual3D user's are free to define segments using their own convention, however, many users define the proximal end of the trunk as the end closest to the shoulders. Polygon defines the proximal end of the trunk as the end closest to the waist. The Polygon convention will need to be followed when exporting to Polygon.

Backwards Trunk

In Visual3D user's are free to define segments using their own convention, however, many users define the lateral side of the trunk as the RIGHT side. Polygon defines the lateral side of the trunk as LEFT side. The Polygon convention will need to be followed when exporting to Polygon.

Large Trunk

In Visual3D user's are free to define segments using their own convention, however, many users define the ends of the trunk from the shoulders to the waist. Polygon defines the ends of the trunk from the shoulders to the abdomen (bottom of the ribs). The Polygon convention will need to be followed when exporting to Polygon.

Trunk Modifications

To define a trunk segment which follows the normal convention and will appear correctly in the Polygon skeleton viewer you will need to:

  1. Modify to the definition of the trunk segment:
    1. Define the proximal end of the trunk at the mid thorax
    2. Define the distal end at the shoulders
    3. Define the lateral side of the trunk as the left side
  2. In the Segment Properties tab, modify the segment coordinate system to follow the convention of the other segments

NOTE: Modifying the trunk coordinate system in the Segment Properties tab will not affect the orientation of the trunk in Polygon. This step is necessary to calculate any kinematics/kinetics involving the trunk segment.

An Example (with sample files) can be found here.


Back to Pipeline Commands Reference

Retrieved from ""