Journalling API calls of the GCM solver

C3D Solver enables recording of the history of API GCM calls for their further recreation during debugging and testing. For example, if you need a consultation or encounter an application issue when using C3D Solver, you can enable the journalling mode for a while and execute the scenario of interest. The recorded journal can be forwarded to C3D Labs technical support with a description of your situation. When the error is fixed, the corresponding log is added to the test case base.

API calls for the three-dimensional geometric solver are logged in the same manner as journalling for the 2D solver (API call journalling). When the journalling mode is enabled using the following call:

bool GCM_SetJournal(GCM_system gSys, const char * fName)    

the solver records the history of API calls with respect to the gSys constraint system. Then, the recorded journal can be used by C3D Solver developers to analyze or update the test database.

Warning! The journal file will be ready only when a session of work with the constraint system is finished, i.e. immediately after calling the GCE_RemoveSystem method. To correctly record the journal, the GCM_SetJournal call must immediately follow GCM_CreateSystem. Example:

GCM_system gSys = GCM_CreateSystem();
#ifdef C3D_DEBUG
GCM_SetJournal( gSys,"d:\\Logs\\gcm_sample2.jrn");
#endif // C3D_DEBUG
/*
Vertexes of the triangle A-B-C.
*/
GCM_geom A = GCM_AddPoint(gSys, MbCartPoint3D(138.0, -38.0, -31.0));
GCM_geom B = GCM_AddPoint(gSys, MbCartPoint3D(67.0, -44.0, 51.0));
GCM_geom C = GCM_AddPoint(gSys, MbCartPoint3D(20,30,10));
/*
Set distance constraints of the sides of the triangle.
*/
GCM_constraint d1 = GCM_AddDistance(gSys, A, B, 100.0, GCM_CLOSEST);
GCM_constraint d2 = GCM_AddDistance(gSys, B, C, 100.0, GCM_CLOSEST);
GCM_constraint d3 = GCM_AddDistance(gSys, C, A, 100.0, GCM_CLOSEST);
GCM_Evaluate(gSys);
/*
Finalize the constraint system. The journal file is written.
*/
GCM_RemoveSystem(gSys);

Warning! Journalling is required only for debugging, so it is recommended to enable it only in debug mode. It is not recommended to leave journalling enabled for the application release version or product version, as it can result in extra time and memory overheads.