The vmathpp library contains classes for general-purpose math operations, particularly for points, vectors, and matrices. Objects of these classes are needed when calling various methods for NX objects. Many of the standard math operators are overloaded in these classes, which often results in code that is more concise and readable.
Point3 pt1 ( 0, 2, 4 );
Vector3 offset ( 1, 2, 3 );
Point3 pt2 = pt1 + offset;
UgLine *pLine = UgLine::create ( pt1, pt2 );
Another feature of the vmathpp library is that the classes it contains are completely independent of NX. You can use this library and its classes in other applications that are outside of NX.
A Open C++ Sample Application
The Open C++ distribution CD contains a sample application called ufx_cycle that can be used as an introduction to Open C++ programming. This sample application illustrates how to use Open C++ to:
?Open a part file
?Access information about the part, including filing history, attributes, and status
?Cycle through all objects in a part
?Access basic object information, such as type and layer