cuikunsimplify.c File Reference

Detailed Description

dot_inline_dotgraph_62.png

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.

Functions

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

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
argcNumber of elements in the command line that starts the application (i.e., the cuiksimplify command itself and its arguments).
argStrings with the arguments.
Returns
EXIT_SUCCESS (0) if the execution worked out fine and EXIT_FAILURE if not.

Definition at line 94 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(), SOL_EXT, and SOL_WITH_DUMMIES_EXT.