There are 7 categories of HWAT functions, of which one is specific to Tk and the other 6 are for general Tcl usage. These categories are:

1) Core Function: Primarily helper functions and are not used directly in most cases. They are usually called from within other functions.
2) I/O Functions: Provide assistance for working with files.
3) Math Functions: Provide for vector and matrix math calculations.
4) Solver Functions: Provide automations for solver specific operations aimed at setting up crash models.
5) Utility Functions: Functions for performing commonly required automations.
6) Widget Functions: Tk functions to create widgets.
7) XML Functions: Use a SAX-based parser and provide functionality for working with XML files.

An example of a procedure that uses an HWAT command to find an angle between two vectors and return the value in a popup window:

package require hwat;
proc GetAngle { vect1 vect2 } {
    package require hwat;

    set angle [::hwat::math::AngleBetweenVectors $vect1 $vect2];
    tk_messageBox -message "The angle between the vectors is $angle";
}

GetAngle [list 1.0 2.0 3.0] [list 4.0 5.0 6.0]

Discover more from Tips and Hints for Aerospace Engineers

Subscribe now to keep reading and get access to the full archive.

Continue reading