MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / TclFeViewer_displayModel

Function TclFeViewer_displayModel

SRC/tcl/TclFeViewer.cpp:877–939  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

875}
876
877int
878TclFeViewer_displayModel(ClientData clientData, Tcl_Interp *interp, int argc,
879 TCL_Char **argv)
880{
881#ifdef _NOGRAPHICS
882 // if no graphics .. just return 0
883 return TCL_OK;
884#else
885
886 // check destructor has not been called
887 if (theTclFeViewer == 0)
888 return TCL_OK;
889
890 // check number of args
891 if (argc < 3 || argc > 5) {
892 opserr << "WARNING args incorrect - display eleMode <nodeMode> displayFact <lineWidth>\n";
893 return TCL_ERROR;
894 }
895
896 if (argc == 3) {
897 int displayMode;
898 double displayFact;
899 if (Tcl_GetInt(interp, argv[1], &displayMode) != TCL_OK) {
900 opserr << "WARNING invalid displayMode - display displayMode displayFact\n";
901 return TCL_ERROR;
902 }
903 if (Tcl_GetDouble(interp, argv[2], &displayFact) != TCL_OK) {
904 opserr << "WARNING invalid displayFact - display displayMode displayFact\n";
905 return TCL_ERROR;
906 }
907
908 theTclFeViewer->displayModel(displayMode, -1, float(displayFact));
909 return TCL_OK;
910 } else {
911 int eleMode, nodeMode;
912 double displayFact;
913 if (Tcl_GetInt(interp, argv[1], &eleMode) != TCL_OK) {
914 opserr << "WARNING invalid eleMode - display eleMode nodeMode displayFact\n";
915 return TCL_ERROR;
916 }
917 if (Tcl_GetInt(interp, argv[2], &nodeMode) != TCL_OK) {
918 opserr << "WARNING invalid nodeMode - display eleMode nodeMode displayFact\n";
919 return TCL_ERROR;
920 }
921 if (Tcl_GetDouble(interp, argv[3], &displayFact) != TCL_OK) {
922 opserr << "WARNING invalid displayFact - display eleMode nodeMode displayFact\n";
923 return TCL_ERROR;
924 }
925 // line width
926 if (argc == 5) {
927 int lineWidth;
928 if (Tcl_GetInt(interp, argv[4], &lineWidth) != TCL_OK) {
929 opserr << "WARNING invalid lineWidth - display eleMode nodeMode displayFact lineWidth\n";
930 return TCL_ERROR;
931 }
932 theTclFeViewer->displayModel(eleMode, nodeMode, float(displayFact), lineWidth);
933 return TCL_OK;
934 }

Callers

nothing calls this directly

Calls 1

displayModelMethod · 0.80

Tested by

no test coverage detected