SMLib Manual

Ui_test

ui_test is a graphics viewer valuable for testing and debugging SMLib functionality. It is relatively straightforward to construct simple test programs that are used to validate customer data and reproduce potential bugs. Supplied examples can also be executed to visualize and evaluate results. This is only a simple viewer, and not a modeling tool. There is no picking and no general menu for the construction of geometric objects.

In ui_test, there are two possible drawing mathods to display objects during the execution of a test program. One is a temporary draw (pBrep->Draw()), where it is possible to control color, line thickness and many other display parameters with the intent of clarifying the changing geometric situation during an operation. Secondly, ui_test can also display the results of an operation by adding the results to the display list (UserTest::Draw( pBrep)). The display list is kept in it's original form, so that it can be repeated, only this time as a hidden-curve display, or a shaded display.

To enable HW translators:

  1. Place the distriuted HWLibs folder in the same folder with ui_test.
  2. After compiling your HW projects (core, step, for example) the resulting dlls should be present in Winlibs/Winlibs64.
  3. To link the dlls with ui_test, open the ui_test project properties C/C++ tab and add ../HWLibs/inc to your list of include directories.
  4. Add ../Winlibs64/Debug/hw_smlib_core.dll and each trandlator dll to the list of input libraires in Linker->Input.
  5. Set SM_HWLIBS_STEP and/or related definitions in user_test.h
  6. Finally in the NMTLIb project, set SM_NO_HWLIBS in iwos_config.h

To run a test program or example:

  1. Add the source .cpp file to the ui_test project
  2. Declare the main function in Test.cpp. Make sure the function is SM_EXPORT
  3. Call the function in the switch statement in Test.cpp
  4. The iBugNumber is controlled at runtime in the Test Dialog box.
  5. Click the left most icon called "Run Test Program" to execute.

ui_test menu items:

  • View Options
  • Display Options
  • File Import or Export (Read/Write)
  • Test Programs, Demos, and User application
  • Modify Data for healing
  • Boolean operations
  • Parameters (inactive)
  • Debugg
  • Tests, Specify user test number, Regression tests
  • Toggle graphics on/off
  • Demos
  • VSLib (inactive)
  • About the Version and Build Date of the Source Code

ui_test toolbar features:

  • Run User Test program
  • Get previously set View
  • Center View
  • Front View
  • Top View
  • Side View
  • Reset View
  • Rotate
  • Zoom
  • Pan
  • Display Outline
  • Display Normals
  • Display Crosshatch
  • Display Knots
  • Display Control Polygon
  • Display Tessellation
  • Display Shade
  • Display Hidden Curve
  • Display Coordinate Axes
  • Display Bounding Box
  • Erase
  • Dump
  • Continue
  • Exit from debug mode
Last updated on Apr 29, 2024.