Global

Methods

add_buttons_to_select_entities_popup()

Description:
  • Add buttons to the 'popup_select_entities' popup for selecting database history nodes/beams/discretes and database cross sections directly, rather than having to pick/select them in the graphics window
Source:

add_edit_occupant()

Description:
  • onclick callback for add and edit buttons
Source:

add_new_occupant()

Description:
  • Open the occupant window to add a new occupant
Source:

are_occupant_entity_ids_valid(occupant) → {boolean}

Description:
  • Checks if all the entity IDs in the occupant are valid
Source:
Parameters:
Name Type Description
occupant WorkflowOccupant WorkflowOccupant instance to check
Returns:
Type
boolean

are_structure_entity_ids_valid(structure) → {boolean}

Description:
  • Checks if all the entity IDs in the structure are valid
Source:
Parameters:
Name Type Description
structure Structure Structure instance to check
Returns:
Type
boolean

b_pillar_callback()

Description:
  • Callback function for B-Pillar widgets
Source:

b_pillar_on_popup()

Description:
  • Set which widget the B-Pillar popup was opened from
Source:

browse_dir(textbox)

Description:
  • Allows the user to browse for a directory. Updates the appropriate textbox.
Source:
Parameters:
Name Type Description
textbox Widget The directory textbox associated with this browse button

browse_keyword_file()

Description:
  • Allows user to browse for a keyword file
Source:

browse_output_dir()

Description:
  • Allows user to browse for an output directory
Source:

browse_results_dir()

Description:
  • Allows user to browse for a results directory
Source:

calculate_irtracc_length(occupant, entity_tag) → {number}

Description:
  • Calculate the irtracc length for a given occupant and rib spring If it doesn't exist in the occupant, returns 0.0
Source:
Example
let length = calculate_irtracc_length(occupant, OccupantEntity.CHEST_UPPER_RIB_SPRING_TRANS);
Parameters:
Name Type Description
occupant WorkflowOccupant Occupant
entity_tag string Rib spring tag, e.g. OccupantEntity.CHEST_UPPER_RIB_SPRING_TRANS
Returns:
Type
number

cancel_clicked()

Description:
  • If user clicks `Cancel`, set JOB_CONTROL to "Abort" so that template generation is aborted ASAP.
Source:

check_job_inputs()

Description:
  • #AAW REPORTER check job inputs Performs the check of user inputs. REPORTER variables for KEYWORD_FILE and DEFAULT_DIR/DEFAULT_JOB might already be defined if: 1. They have been hardwired (possibly) 2. They have been passed through as arguments in batch 3. The template is being re-run. The template only needs one of KEYWORD_FILE or (DEFAULT_DIR and DEFAULT_JOB) to proceed. By default, RESULTS_DIR and OUTPUT_DIR can be inferred from the keyword file location. However, the user may wish to specify different locations for RESULTS_DIR and OUTPUT_DIR, in which case these are configured by the subsequent `#AAW PRIMER job control GUI` item. Depending on the user's preference, this script activates/deactivates that item.
Source:

check_report_contents(output_dir, drive_side) → {string}

Description:
  • Checks whether image filenames in REPORTER template are valid, and checks whether user data has required information. Returns job control action (JobControl.RUN, JobControl.SKIP, JobControl.ABORT).
Source:
Parameters:
Name Type Description
output_dir string REPORTER output directory for images etc.
drive_side string VehicleOccupant.LHD or VehicleOccupant.RHD
Returns:
Type
string

check_valid()

Description:
  • Checks whether the textbox entries for KEYWORD_FILE, RESULTS_DIR, and OUTPUT_DIR are valid. Controls whether `Run` button is active.
Source:

clear_the_current_structure()

Description:
  • clear/remove the input fields for the current structure and reset the values of the corresponding structure in gui.structures (i.e set to zero/undefined)
Source:

close_occupant_window()

Description:
  • Close the occupant window
Source:

close_structure_window()

Description:
  • Close the structure window
Source:

collate_report_contents()

Description:
  • Collates items and creates a list of report contents for processing.
Source:

copy_node_to_new_model_return_nid(n, m) → {number}

Description:
  • Copies a node to a new model and returns the new node id
Source:
Parameters:
Name Type Description
n Node Node to copy
m Model model to copy node to
Returns:
Type
number

crash_test_changed()

Description:
  • callback to trigger changes crash test changes
Source:

create_b_pillar_widgets(window, start_top, start_bottom) → {number}

Description:
  • Creates the B-Pillar widgets, returning the bottom position of the last widget created
Source:
Parameters:
Name Type Description
window Window Window to create widgets in
start_top number Starting top position of widgets
start_bottom number Starting bottom position of widgets
Returns:
Type
number

create_head_excursion_widgets(window, start_top, start_bottom) → {number}

Description:
  • Creates the Head Excursion widgets, returning the bottom position of the last widget created
Source:
Parameters:
Name Type Description
window Window Window to create widgets in
start_top number Starting top position of widgets
start_bottom number Starting bottom position of widgets
Returns:
Type
number

create_occupant_widgets()

Description:
  • Creates the widgets in the occupant window
Source:

create_structures_widgets()

Description:
  • Creates the widgets in the structures window and the structures stored on gui.structures
Source:

create_zones_ptf(args)

Description:
  • Creates the head excursion zone bands as null shell parts in car model space and writes them to a ptf file.
Source:
Parameters:
Name Type Description
args Array.<string> Arguments passed to this script from the D3PLOT script

deactivate_aaw_items()

Description:
  • Deactivates #AAW (Automotive Assessment Workflow) items so that only the set of items on the first page is generated (duplicate sets on subsequent pages are skipped).
Source:

delete_all_occupants()

Description:
  • Delete all the occupants
Source:

delete_occupant()

Description:
  • Delete the associated occupant
Source:

determine_appropriate_font_size() → {number}

Description:
  • Determines the choice of font point size that will give consistent absolute font height independent of the screen resolution
Source:
Returns:
Type
number

disable_invalid_filter_options()

Description:
  • on click callback for filters to grey out invalid options
Source:

display_image(image_filename)

Description:
  • Displays an image in the image widget
Source:
Parameters:
Name Type Description
image_filename string Filename of image to display

draw_b_pillar_image()

Description:
  • Draw the B-pillar image Also calculates the B-pillar deformation rating
Source:

edit_occupant()

Description:
  • Open the occupant window to edit the current occupant
Source:

edit_structure()

Description:
  • Open the structure window to edit the current structure (that user clicked)
Source:

entity_on_popup(entity_type)

Description:
  • Set the currently selected entity when the entity popup is mapped from the textbox and map the appropriate database history items for the entity type
Source:
Parameters:
Name Type Description
entity_type string The entity type, e.g. BaseEntity.NODE

filter_version_drop_down() → {Array.<string>}

Description:
  • filter the name drop-down based on the selected supplier, model and physiology filters. All versions will be returned if none are selected already. i.e. their value is 'ALL'
Source:
Returns:
occupant name names
Type
Array.<string>

find_all_json_files(root, file_listopt) → {Array.<string>}

Description:
  • returns an array of JSON files in and below root directory path
Source:
Parameters:
Name Type Attributes Default Description
root string path to start recursive seach for files
file_list Array.<string> <optional>
[] the list of files found so far (iterative call)
Returns:
Type
Array.<string>

find_lsdyna_files(dir, job_name, file_type) → (nullable) {string}

Description:
  • Searches a directory for filenames matching either Arup or LSTC filename conventions. Searches for files in directory of type , possibly containing , and returns the first match in the priority lists below.
Source:
Example
let absolute_filename = find_lsdyna_files("C:/my/results/directory", "job_001", "D3PLOT");
Parameters:
Name Type Description
dir string Directory to search
job_name string Root filename to search for
file_type string File type to search for (can be "PRIMER", "D3PLOT", "T/HIS", "OTF")
Returns:
Type
string

find_lsdyna_files(dir, job_name, file_type) → (nullable) {string}

Description:
  • Searches a directory for filenames matching either Arup or LSTC filename conventions. Searches for files in directory of type , possibly containing , and returns the first match in the priority lists below.
Source:
Example
let absolute_filename = find_lsdyna_files("C:/my/results/directory", "job_001", "D3PLOT");
Parameters:
Name Type Description
dir string Directory to search
job_name string Root filename to search for
file_type string File type to search for (can be "PRIMER", "D3PLOT", "T/HIS", "OTF")
Returns:
Type
string

finish_script(template, can_generate, msgopt)

Description:
  • Common function for finishing the script. Complete the generation of the template if we have all the required information.
Source:
Example
finish_script(Template.GetCurrent(), false, `Keyword file not provided`);
Parameters:
Name Type Attributes Description
template Template Current template object
can_generate Boolean Whether or not to generate the template
msg string <optional>
Error message (provide when not generating)

flip_occupants()

Description:
  • Flip all the occupant seats right/left all the occupants and correctly set driver
Source:

FormatPath(path) → {string}

Description:
  • format path by changing all backslashes to forward slashes, remove any double slashes and resolve any ../ directories
Source:
Parameters:
Name Type Description
path string
Returns:
formatted_path
Type
string

generate_item(item_name)

Description:
  • Finds the first item in the template with the specified and generates it.
Source:
Example
generate_item(`#AAW REPORTER read variables from PRIMER job control`);
Parameters:
Name Type Description
item_name string The name of the item to be generated

get_defined_structures() → {Array.<Structure>}

Description:
  • returns only the structures which are defined and supported by the current protocol they are then written out as user_data
Source:
Returns:
Type
Array.<Structure>

get_extra_data() → {WriteToFileArgument_extra}

Description:
  • Get the extra data object
Source:
Returns:
extra data object
Type
WriteToFileArgument_extra

get_keyword_file(template) → {Boolean}

Description:
  • Gets the keyword file and sets %DEFAULT_DIR% and %DEFAULT_JOB%. Returns whether successful (true/false).
Source:
Example
let success = get_keyword_file(template);
Parameters:
Name Type Description
template Template Current Template object
Returns:
Type
Boolean

get_occupant_entity_id_from_widget_by_tag(name, tag) → {string|number}

Description:
  • Returns the id on the entity widget by occupant name and entity tag
Source:
Parameters:
Name Type Description
name string Occupant name
tag string Entity tag
Returns:
Type
string | number

get_occupant_from_position(position) → (nullable) {WorkflowOccupant}

Description:
  • returns the workflow occupant for that seat positoin or null if not found
Source:
Parameters:
Name Type Description
position string
Returns:
Type
WorkflowOccupant

get_occupant_widgets(name) → {OccupantWidgets}

Description:
  • Returns the entity widgets for an occupant name
Source:
Parameters:
Name Type Description
name string Occupant name
Returns:
Type
OccupantWidgets

get_seat_position(side, front_rear, drive_side) → {string}

Description:
  • returns the workflow occupant for that seat positoin or null if not found
Source:
Parameters:
Name Type Description
side string
front_rear string
drive_side string
Returns:
Type
string

get_selected_assessment_types() → {Array.<string>}

Description:
  • Returns an array of the selected assessment types
Source:
Returns:
Type
Array.<string>

get_selected_assessment_types(what) → {Array.<string>}

Description:
  • Returns an array of the selected assessment types for occupants or structures
Source:
Parameters:
Name Type Description
what string "occupants" or "structures"
Returns:
Type
Array.<string>

get_selected_body_parts() → {Array.<string>}

Description:
  • Returns an array of the selected body parts
Source:
Returns:
Type
Array.<string>

get_selected_crash_test_protocol() → {string}

Description:
  • get the currently selected crash test protocol
Source:
Returns:
Type
string

get_selected_occupants_data() → {Array.<DoOccupantAssessmentOccupantData>}

Description:
  • Returns an array of the selected occupants
Source:
Returns:
Type
Array.<DoOccupantAssessmentOccupantData>

get_selected_regulation() → {string}

Description:
  • get the currently selected regulation
Source:
Returns:
Type
string

get_selected_structures_data() → {Array.<DoStructureAssessmentStructureData>}

Description:
  • Returns an array of the selected structures
Source:
Returns:
Type
Array.<DoStructureAssessmentStructureData>

get_selected_structures_data() → {Array.<DoStructureAssessmentStructureData>}

Description:
  • Returns an array of the selected structures
Source:
Returns:
Type
Array.<DoStructureAssessmentStructureData>

get_selected_version() → {string}

Description:
  • get the currently selected version
Source:
Returns:
Type
string

get_structure_entity_id_from_widget_by_tag(structure_type, tag) → {string|number}

Description:
  • Returns the id on the entity widget by structure type and entity tag
Source:
Parameters:
Name Type Description
structure_type string Structure type
tag string Entity tag
Returns:
Type
string | number

get_structure_from_type(structure_type) → (nullable) {Structure}

Description:
  • get structure from gui.structures
Source:
Parameters:
Name Type Description
structure_type string
Returns:
Type
Structure

get_structure_widgets(structure_type) → {StructureWidgets}

Description:
  • Returns the entity widgets for an structure name
Source:
Parameters:
Name Type Description
structure_type string Structure type
Returns:
Type
StructureWidgets

get_user_data() → (nullable) {UserData}

Description:
  • Get the user data object
Source:
Returns:
User data object
Type
UserData

get_user_occupant(position, user_data) → (nullable) {WorkflowOccupant}

Source:
Parameters:
Name Type Description
position string
user_data UserData
Returns:
Type
WorkflowOccupant

get_user_structure(component_type, user_data) → (nullable) {WorkflowOccupant}

Source:
Parameters:
Name Type Description
component_type string
user_data UserData
Returns:
Type
WorkflowOccupant

GetOccupantFromGUI() → {WorkflowOccupant}

Description:
  • get occupant from the current gui inputs
Source:
Returns:
Type
WorkflowOccupant

GetProtocolVehicle() → (nullable) {ProtocolVehicle}

Description:
  • return the vehicle based on the currently selected version or if in REPORTER mode gui.reporter_protocol_vehicle should be set and its value is returned instead
Source:
Returns:
Type
ProtocolVehicle

head_excursion_callback()

Description:
  • Callback function for B-Pillar widgets
Source:

head_excursion_on_popup()

Description:
  • Set which widget the Head Excursion popup was opened from
Source:

initialise_b_pillar_entities()

Description:
  • Sets the initial values for the B-Pillar entities
Source:

initialise_head_excursion_entities()

Description:
  • Sets the initial values for the Head Excursion entities
Source:

initialise_occupant_window()

Description:
  • Initialise the occupant window with the data from the current occupant
Source:

initialise_structure_window(structure_type)

Description:
  • Initialise the structure window with the data from the current structure
Source:
Parameters:
Name Type Description
structure_type string

is_entity_id_valid(entity_id, entity_type) → {boolean}

Description:
  • Checks if an entity ID is valid (exists in the model)
Source:
Parameters:
Name Type Description
entity_id string Entity ID to check
entity_type string Entity type
Returns:
Type
boolean

is_entity_widget_id_valid(entity_widgets) → {boolean}

Description:
  • Returns whether the value in the textbox is a valid entity ID, i.e. does it exists in any of the models currently loaded
Source:
Parameters:
Name Type Description
entity_widgets BaseEntityWidgets
Returns:
Type
boolean

occupant_entity_on_popup()

Description:
  • Store what the occupant entity pick is for so it can process it correctly
Source:

OccupantButtonOnClick()

Description:
  • update the filters on the occupant window to only allow valid occupants
Source:

offset_changed()

Description:
  • When the offset is changed in the textbox, check it's an integer If it's not, then reset it to the original value
Source:

on_load_script()

Description:
  • #AAW REPORTER on load script Prompts the user to select a keyword file. This script deactivates itself so that: 1. When it triggers template generation, we don't end up in an infinite loop 2. If you generate the script again, this script is skipped and keyword file is checked in subsequent `#AAW REPORTER check job inputs` item.
Source:

pick_entity()

Description:
  • Pick an entity
Source:

pixels_to_font_size(desired_pixel_height_upper_case_I) → {number}

Description:
  • Converts a desired pixel height of upper case I to a font point size
Source:
Parameters:
Name Type Description
desired_pixel_height_upper_case_I number Desired height of upper case I in pixels
Returns:
Type
number

plot()

Description:
  • Carries out an assessment on the selected body part according to the selected regulation and occupant, plotting the results as curves in T/HIS.
Source:

read_model_data() → {boolean}

Description:
  • Reads user data from the selected model and stores it on the gui object and populates the widgets with the data
Source:
Returns:
successfully read data or not
Type
boolean

ReadJSON(filename) → {object}

Description:
  • read json string representation (with 4 space indent)
Source:
Parameters:
Name Type Description
filename string
Returns:
Type
object

refresh_job_control_status()

Description:
  • #AAW REPORTER run PRIMER rerun T/HIS Refreshes the value of JOB_CONTROL and checks for Abort.
Source:

regulation_changed()

Description:
  • callback to trigger changes when regulation changes
Source:

reporter_assessment(job_control, reporter_temp, output_dir, drive_side)

Description:
  • Carries out an assessment on the types specified by the REPORTER template, according to the specified regulation and occupant/structure, plotting the results in T/HIS and capturing images that can be loaded by the REPORTER template.
Source:
Parameters:
Name Type Description
job_control string Overall job control
reporter_temp string REPORTER_TEMP directory
output_dir string REPORTER output directory for images etc.
drive_side string VehicleOccupant.LHD or VehicleOccupant.RHD

reporter_job_control(keyword_file, results_dir, output_dir, reporter_temp, job_control)

Description:
  • GUI to allow user to specify keyword file, results directory and output directory for REPORTER template "job".
Source:
Parameters:
Name Type Description
keyword_file string Keyword file
results_dir string Directory containing LS-DYNA results (can be different from keyword file directory)
output_dir string Directory where images and other output files will be written
reporter_temp string REPORTER's temporary directory, used for exchanging REPORTER variables
job_control string Overall job control

rerun_this()

Description:
  • #AAW REPORTER run PRIMER rerun T/HIS Reruns the `#AAW T/HIS check and do assessment` item if necessary. Rerunning is necessary if the check of report contents against user data failed the first time and the PRIMER GUI was launched to give the user the opportunity to update the user data.
Source:

reset_structure_widgets_entity_fields(structure_type)

Description:
  • this (re)sets the structure widget entity fields to be those stored on matching structure_type in gui.structures array
Source:
Parameters:
Name Type Description
structure_type string

reset_the_current_structure()

Description:
  • reset the input fields for the current structure (to match those stored in corresponding structure in gui.structures)
Source:

run()

Description:
  • Carries out assessments on the selected structures according to the selected regulation
Source:

run_clicked()

Description:
  • When user clicks `Run`, write KEYWORD_FILE, RESULTS_DIR, and OUTPUT_DIR to a temporary CSV file that can be picked up by REPORTER in the subsequent `#AAW REPORTER read variables from PRIMER job control` item. Set JOB_CONTROL to "Check", ready for `#AAW T/HIS check and do assessment` item.
Source:

run_primer()

Description:
  • #AAW REPORTER run PRIMER rerun T/HIS Runs the `#AAW PRIMER user data GUI` item if necessary.
Source:

RunAutomotiveAssessmentTool(reporter_user_data_fileopt) → {string}

Description:
  • this function runs the PRIMER automotive assessments tool GUI and returns a JobControl status for use in REPORTER
Source:
Parameters:
Name Type Attributes Default Description
reporter_user_data_file string <optional>
"PRIMER" either "PRIMER" or "REPORTER"
Returns:
job_control
Type
string

save_occupant_to_file()

Description:
  • Saves the selected data to a workflow JSON file
Source:

save_to_file()

Description:
  • Saves the selected data to a workflow JSON file
Source:

save_to_model()

Description:
  • Saves the selected data to the keyword file
Source:

select_database_item()

Description:
  • Select a database item
Source:

select_entity()

Description:
  • Select an entity
Source:

set_occupant_widget_entity_id_by_tag(name, tag, id)

Description:
  • Set the id on the occupant entity widget by entity tag
Source:
Parameters:
Name Type Description
name string Occupant name
tag string Entity tag
id number | string Entity id

set_selected_widget_item(cbx, value) → {boolean}

Description:
  • Set the combobox/listbox selected item from a value
Source:
Parameters:
Name Type Description
cbx Widget Combobox
value string Value of the selected item
Returns:
true if the widget was successfully set
Type
boolean

set_selected_widget_items(lbx, values)

Description:
  • Set the listbox selected items from a list of values
Source:
Parameters:
Name Type Description
lbx Widget listbox
values Array.<string> Values of the selected items

set_structure_widget_entity_id_by_tag(structure_type, tag, id)

Description:
  • Set the id on the structure entity widget by entity tag
Source:
Parameters:
Name Type Description
structure_type string Structure type
tag string Entity tag
id number | string Entity id

set_structures_page(page)

Description:
  • used to set the page (subset of the list) for the structures widgets
Source:
Parameters:
Name Type Description
page number

set_up_occupant_window()

Description:
  • update the filters on the occupant window to only allow valid occupants
Source:

set_vehicle_drive_side(drive_side)

Description:
  • set the gui.drive_side and the radio button to the specified hand drive (if valid) defaults to LHD if not valid and prints a warning message
Source:
Parameters:
Name Type Description
drive_side string

set_widget_entity_id_by_tag(type, id)

Description:
  • Set the id on the structure or occupant entity widget by entity tag
Source:
Parameters:
Name Type Description
type string Either "occupant" or "structure"
id string | number | Array.<number> Enitity id

setup_gui()

Description:
  • Sets the GUI up with things not set in the GUI Builder, e.g. combobox items are added dynamically here using the list of possible values from the Protocol class and the user data passed to the script from the framework.
Source:

setup_gui()

Description:
  • Sets the GUI up with things not set in the GUI Builder, e.g. combobox items are added dynamically here using the list of possible values from the WorkflowOccupant class.
Source:

setup_vehicle_occupants()

Description:
  • this is used to set up the initial display of the vehicle occupants selection area adding onClicks and hiding initially disabled buttons and moving 'Add' buttons to the correct location
Source:

SetUpGUIFromREPORTERUserData(reporter_user_data)

Source:
Parameters:
Name Type Description
reporter_user_data ReporterUserData

structure_entity_on_popup()

Description:
  • Store what the structure entity pick is for so it can process it correctly
Source:

structures_page_switchers_on_click()

Description:
  • onclick callback for switching structures page
Source:

toggle_all_widget_items()

Description:
  • Selects or deselect all the widget items in a listbox depending on the button that is pressed.
Source:

toggle_all_widget_items()

Description:
  • Selects or deselect all the widget items in a listbox depending on the button that is pressed.
Source:

update_all_structure()

Description:
  • Update the all the structureS with the data selected by the user (i.e. widget text fields)
Source:

update_all_structures_and_close()

Description:
  • Update the current structure with the data selected by the user and then close the structure window
Source:

update_and_toggle_ids_between_num_and_dbhistitle()

Description:
  • callback to toggle between using id numbers and database history titles (if they exisit in JSON or can be extracted from model using IDs)
Source:

update_assessment_types()

Description:
  • Update the list of assessment types in the occcupant assessment type and structure assessment type listboxes. For the occupant assessment types it's based on the selected regulation, body part type and selected occupants. For the structure assessment types it's based on the selected regulation and selected structures
Source:

update_b_pillar_widgets()

Description:
  • Updates the B-Pillar widgets
Source:

update_body_part_types()

Description:
  • Update the list of body part types in the listbox based on the selected regulation and selected occupants.
Source:

update_current_occupant() → {boolean}

Description:
  • Update the current occupant with the data selected by the user Returns true if the occupant was updated, false otherwise
Source:
Returns:
Type
boolean

update_current_occupant_and_close()

Description:
  • Update the current occupant with the data selected by the user and then close the occupant window
Source:

update_entity_ids()

Description:
  • update the ids in the gui to use the numbers
Source:

update_filters()

Description:
  • on change callback for supplier, model and physiology callbacks to filter the name drop-down to make it easier to pick a name from a long list
Source:

update_head_excursion_widgets()

Description:
  • Updates the Head Excursion widgets
Source:

update_image()

Description:
  • Callback function when the user selects an image from the combobox
Source:

update_main_window()

Description:
  • Update the main window This updates the structures widget list based on the currently selected protocol The widget category/colours are set to latent if the structure is not (fully) defined (i.e. valid). In REPORTER mode only the required structures are latent if undefined. The other structures appear as not required (as per occupant styling) It also calls an update to the vehicle GUI
Source:

update_menu()

Description:
  • Update the menu
Source:

update_menu()

Description:
  • Update the menu
Source:

update_occupant_entity_ids_from_gui(occupant)

Description:
  • update the ids for the occupant
Source:
Parameters:
Name Type Description
occupant WorkflowOccupant | Occupant

update_occupant_names_combobox(occupant_names)

Description:
  • occupant_names is an array of strings of occupant names
Source:
Parameters:
Name Type Description
occupant_names Array.<string>

update_occupant_window()

Description:
  • Update the occupant window
Source:

update_occupants_column()

Description:
  • function to update vehicle gui when regulation/crash_test/version change
Source:

update_regulations()

Description:
  • update regulation combobox based on current crash test selection - try to keep regulation the same if it exists in new list
Source:

update_selected_assessment_types()

Description:
  • Update the gui.selected_assessment_types object based on the selected assessment types in the listbox
Source:

update_selected_assessment_types()

Description:
  • Update the gui.selected_assessment_types object based on the selected assessment types in the listbox
Source:

update_selected_body_part_types()

Description:
  • Update the gui.selected_body_part_types object based on the selected body part types in the listbox
Source:

update_structure_window()

Description:
  • Update the structure window - show widgets for current structure type and hide others
Source:

update_structures_column()

Description:
  • Update the structures column widgets on the main window This updates the structures widget list based on the currently selected protocol The widget category/colours are set to latent if the structure is not (fully) defined (i.e. valid). In REPORTER mode only the required structures are latent if undefined. The other structures appear as not required (as per occupant styling)
Source:

update_structures_combobox(structure_types)

Description:
  • clear the combobox and then add the structure types as widget items to the combobox (in alphabetical order). This is mainly used when the protocol changes
Source:
Parameters:
Name Type Description
structure_types Array.<string>

update_vehicle_hand_drive()

Description:
  • callback to toggle between using id numbers and database history titles (if they exisit in JSON or can be extracted from model using IDs)
Source:

update_vehicle_image()

Description:
  • update the vehicle image based on the global_theme
Source:

update_vehicle_occupants(vehicle, drive_side)

Description:
  • update the vehicle occupant gui based on the passed vehicle and hand drive
Source:
Parameters:
Name Type Description
vehicle ProtocolVehicle
drive_side string

update_versions()

Description:
  • Updates the combobox versions based on the currently selected regulation
Source:

update_versions()

Description:
  • Updates the combobox versions based on the currently selected regulation
Source:

update_versions()

Description:
  • update version combobox based on current crash test selection - try to keep version the same if it exists in new list
Source:

version_changed()

Description:
  • callback to trigger changes when version changes
Source:

WriteJSON(filename, object)

Description:
  • write json string representation (with 4 space indent)
Source:
Parameters:
Name Type Description
filename string
object any

Type Definitions

BPillarStructure

Description:
  • Object to store data for B-Pillar
Source:
Properties:
Name Type Description
cut_section_method string Cut section method
cut_section_nodes Array.<number> Cut section nodes
pre_crash_parts Array.<number> Pre-crash parts
post_crash_parts Array.<number> Post-crash parts
shift_deform_nodes Array.<number> Shift deform nodes
ground_z number Ground Z coordinate
seat_centre_y number Seat centre Y coordinate
h_point_z number H-Point Z coordinate
Object to store data for B-Pillar
Type:
  • Object

BPillarStructure

Description:
  • Object B-Pillar data
Source:
Properties:
Name Type Description
cut_section_method string Cut section method
cut_section_nodes Array.<number> Cut section nodes
pre_crash_parts Array.<number> Pre-crash parts
post_crash_parts Array.<number> Post-crash parts
shift_deform_nodes Array.<number> Shift deform nodes
ground_z number Ground Z coordinate
seat_centre_y number Seat centre Y coordinate
h_point_z number H-Point Z coordinate
Object B-Pillar data
Type:
  • Object

BPillarStructure

Description:
  • Object to store data for B-Pillar
Source:
Properties:
Name Type Description
cut_section_method string Cut section method
cut_section_nodes Array.<number> Cut section nodes
pre_crash_parts Array.<number> Pre-crash parts
post_crash_parts Array.<number> Post-crash parts
shift_deform_nodes Array.<number> Shift deform nodes
ground_z number Ground Z coordinate
seat_centre_y number Seat centre Y coordinate
h_point_z number H-Point Z coordinate
Object to store data for B-Pillar
Type:
  • Object

Filters

Description:
  • The user data object in the workflow file
Source:
Properties:
Name Type Description
suppliers Array.<string> list of valid suppliers
products Array.<string> list of valid products
physiologies Array.<string> list of valid physiologies
The user data object in the workflow file
Type:
  • Object

GetLocalDatumReturn

Description:
  • Object to return from the get_local_datum function
Source:
Properties:
Name Type Description
origin Array.<number> Origin coordinate
y_axis Array.<number> Y-axis vector
Object to return from the get_local_datum function

HeadExcursionStructure

Description:
  • Object to store data for Head Excursion
Source:
Properties:
Name Type Description
cut_section_thickness number Cut section thickness
cut_section_node number Cut section node
vehicle_direction string Vehicle direction (either 'positive X' or 'negative X')
head_parts Array.<number> Head parts
barrier_parts Array.<number> Barrier parts
shift_deform_nodes Array.<number> Shift deform nodes
seat_centre_y number Seat centre Y coordinate
intrusion_from_seat_centre_y number Intrusion From Seat centre Y coordinate
countermeasure string Countermeasure (either 'Yes' or 'No')
keyword_file string Keyword filename
Object to store data for Head Excursion
Type:
  • Object

HeadExcursionStructure

Description:
  • Object to store data for Head Excursion
Source:
Properties:
Name Type Description
cut_section_thickness number Cut section thickness
cut_section_node number Cut section node
vehicle_direction string Vehicle direction (either 'positive X' or 'negative X')
head_parts Array.<number> Head parts
barrier_parts Array.<number> Barrier parts
shift_deform_nodes Array.<number> Shift deform nodes
seat_centre_y number Seat centre Y coordinate
intrusion_from_seat_centre_y number Intrusion From Seat centre Y coordinate
countermeasure string Countermeasure (either 'Yes' or 'No')
keyword_file string Keyword filename
Object to store data for Head Excursion
Type:
  • Object

HeadExcursionStructure

Description:
  • Object to store data for Head Excursion
Source:
Properties:
Name Type Description
cut_section_thickness number Cut section thickness
cut_section_node number Cut section node
vehicle_direction string Vehicle direction (either 'positive X' or 'negative X')
head_parts Array.<number> Head parts
barrier_parts Array.<number> Barrier parts
shift_deform_nodes Array.<number> Shift deform nodes
seat_centre_y number Seat centre Y coordinate
intrusion_from_seat_centre_y number Intrusion From Seat centre Y coordinate
countermeasure string Countermeasure (either 'Yes' or 'No')
keyword_file string Keyword filename
Object to store data for Head Excursion
Type:
  • Object

NameMeasurement

Description:
  • The NameMeasurement object returned by GetNameAndMeasurements and used in OccupantEntity.FromTagAndType
Source:
Properties:
Name Type Description
name string measurement name (appears in gui label)
measurements Array.<Measurement> measurements
The NameMeasurement object returned by GetNameAndMeasurements and used in OccupantEntity.FromTagAndType
Type:
  • Object

NIJCriticalLoads

Source:
Properties:
Name Type Description
tension number Critical tension (kN)
compression number Critical compression (kN)
flexion number Critical flexion (Nm)
extension number Critical extension (Nm)
Type:
  • Object

ProtocolVehicleJSON

Description:
  • an array of VehicleOccupant-like objects
Source:
Properties:
Name Type Description
occupants Array.<VehicleOccupantJSON>
structures Array.<string>
an array of VehicleOccupant-like objects
Type:
  • Object

ProtocolVehicleJSON

Description:
  • an array of VehicleOccupant-like objects
Source:
Properties:
Name Type Description
occupants Array.<VehicleOccupantJSON>
structures Array.<string>
an array of VehicleOccupant-like objects
Type:
  • Object

ReadStructureOutput

Description:
  • Object to return from the structure Read functions
Source:
Properties:
Name Type Attributes Description
curves Array.<Curve> <nullable>
Output curves
values Object Object with values for the output
graph_title string Graph title (also used in curve labels)
Object to return from the structure Read functions

ReporterUserData

Description:
  • The user data object in the workflow file
Source:
Properties:
Name Type Description
regulation string Regulation
crash_test string Crash test
version string Protocol version
description Array.<string> Protocol version
vehicle ProtocolVehicleJSON Protocol version
The user data object in the workflow file
Type:
  • Object

ReporterVariable

Description:
  • Object to store Reporter variables
Source:
Properties:
Name Type Description
name string
description string
value string
Object to store Reporter variables
Type:
  • Object

StructureAssessmentOutput

Description:
  • Object to return from the structure assesment functions
Source:
Properties:
Name Type Description
values Object Object with values for the output
image_filename string Filename of an image
Object to return from the structure assesment functions

TibiaIndexCriticalLoads

Source:
Properties:
Name Type Description
compression number Critical compression (kN)
bending number Critical bending (Nm)
Type:
  • Object

UserData

Description:
  • The user data object in the workflow file
Source:
Properties:
Name Type Description
crash_test string Crash test
regulations Array.<string> Regulations
version string Version
drive_side string either 'LHD' or 'RHD' vehicle
occupants Array.<WorkflowOccupant> Array of WorkflowOccupants
structures Array.<Structure> Array of Structures
b_pillar BPillarStructure B-Pillar structure
head_excursion HeadExcursionStructure Head Excursion structure
The user data object in the workflow file
Type:
  • Object

UserData

Description:
  • The user data object in the workflow file
Source:
Properties:
Name Type Description
crash_test string Crash test
regulations Array.<string> Regulations
occupants Array.<WorkflowOccupant> Array of WorkflowOccupants
structures Array.<Structure> Array of Structures
The user data object in the workflow file
Type:
  • Object

UserData

Description:
  • The user data object in the workflow file
Source:
Properties:
Name Type Description
occupants Array.<WorkflowOccupant> Array of WorkflowOccupants
The user data object in the workflow file
Type:
  • Object

UserData

Description:
  • The user data object in the workflow file
Source:
Properties:
Name Type Description
crash_test string Crash test
regulations Array.<string> Regulations
version string Protocol version
occupants Array.<WorkflowOccupant> Array of WorkflowOccupants
The user data object in the workflow file
Type:
  • Object

UserData

Description:
  • The user data object in the workflow file
Source:
Properties:
Name Type Description
crash_test string Crash test
regulations Array.<string> Regulations
version string Version
drive_side string either 'LHD' or 'RHD' vehicle
occupants Array.<WorkflowOccupant> Array of WorkflowOccupants
structures Array.<Structure> Array of Structures
b_pillar BPillarStructure B-Pillar structure
head_excursion HeadExcursionStructure Head Excursion structure
The user data object in the workflow file
Type:
  • Object

VehicleOccupantJSON

Description:
  • VehicleOccupant-like object
Source:
Properties:
Name Type Description
position string Occupant position
product string Occupant product type
physiology string Occupant physiology
VehicleOccupant-like object
Type:
  • Object

VehicleOccupantJSON

Description:
  • VehicleOccupant-like object
Source:
Properties:
Name Type Description
position string Occupant position
product string Occupant product type
physiology string Occupant physiology
VehicleOccupant-like object
Type:
  • Object

ViscousCriterionConstants

Source:
Properties:
Name Type Description
A number Viscous Criterion Constant A (for m/s)
B number Viscous Criterion Constant B (for m/s)
Type:
  • Object