Institut de Robòtica i Informàtica Industrial
KRD Group

The CuikSuite Project

cuikunsimplify.c File Reference

Main body of the cuikunsimplify application. More...

#include "cuiksystem.h"
#include "parameters.h"
#include "defines.h"
#include "error.h"
#include "box_list.h"
#include "filename.h"
#include <string.h>
#include <stdlib.h>
#include <time.h>

Go to the source code of this file.

Functions

int main (int argc, char **arg)
 Main body of the cuikunsimplify application.

Detailed Description

A utility to recover original solution boxes from the solution boxes of a simplified cuiksystem.
The simplification of a cuiksystem can be obtained with cuiksimplify and the solution boxes for the simplified cuiksystem can be obtained using cuik.
Up to now we use this basically for silhouettes: cuiksimplify generates a system where variables are not trivially constant (and thus, where silhouettes are well defined). The resulting silhouettes are transformed to the original system using this application. With the the solutions in the original form we can, for instance animate the mechanism along the silhouette.
This application is developed mainly for debugging purposes since, in a final stage, the simplification and unsimplificatin should be included and hidden in all CuikSuite application.
CAUTION
The strenght of the simplification depends on the SIMPLIFICATION_LEVEL parameter. Here we suppose this parameter has the same value as that when the simplified file was generated. Otherwise the behavior of the un-simplification process is undefined.

See also:
cuiksystem.h cuiksystem.c

Definition in file cuikunsimplify.c.


Function Documentation

int main ( int  argc,
char **  arg 
)

Main body of the cuikunsimplify application.

Use:

  • cuikunsimplify problem_name.cuik solution_name.sol

where

  • problem_name contains the un-simplified (i.e., original) kinematic equations, that is, the equations from where the simplified system was derived..
  • solution_name contains the kinematic equations for the simplified system.

The .cuik and .sol extensions are optional.

The output is stores in a .sol file with the same name as the cuik file.

Parameters:
argc Number of elements in the command line that starts the application (i.e., the cuiksimplify command itself and its arguments).
arg Strings with the arguments.
Returns:
EXIT_SUCCESS (0) if the execution worked out fine and EXIT_FAILURE if not.

Definition at line 73 of file cuikunsimplify.c.

References Advance(), CreateFileName(), CUIK_EXT, DeleteBox(), DeleteCuikSystem(), DeleteFileName(), DeleteListOfBoxes(), DeleteParameters(), EndOfList(), Error(), First(), GetCSSystemVars(), GetCurrent(), GetFileFullName(), InitCuikSystemFromFile(), InitIterator(), InitParametersFromFile(), PARAM_EXT, PrintBoxSubset(), ReadListOfBoxes(), ReGenerateOriginalBox(), and SOL_EXT.

Here is the call graph for this function: