Action:
|
Creates a law from a string and an optional array of law data.
|
|
Prototype:
|
outcome api_str_to_law (
|
|
|
const char* str,
|
// string of law to be
|
|
|
|
|
// created
|
|
|
law** answer,
|
// array of supporting
|
|
|
|
|
// data used in the law
|
|
|
|
|
// creation
|
|
|
law_data** data
|
// size of the law
|
|
|
|
= NULL,
|
// data array
|
|
|
int size
|
// returns created law
|
|
|
|
= 0,
|
|
|
AcisOptions* ao = NULL
|
// acis options
|
|
|
);
|
|
Includes:
|
#include "kernel/acis.hxx"
|
|
#include "kernel/kernapi/api/api.hxx"
|
|
#include "kernel/kernapi/api/kernapi.hxx"
|
|
#include "lawutil/law_base.hxx"
|
|
#include "lawutil/law_data.hxx"
|
|
#include "kernel/kernapi/api/acis_options.hxx"
|
|
Description:
|
This API parses a character string (str), generates the associated law classes, and returns a pointer to the top-level law that was created (answer). Deriving the
law class and all associated classes individually is possible. However, it is more likely that
api_str_to_law and law string parsing will be employed, because it is easier and more straightforward to implement.
|
|
|
The valid syntax for the character strings (str) in the law mathematical functions are given in the law symbol templates. The law mathematical functions support nesting of law symbols. Once the character string (str) has been created, it is passed to
api_str_to_law along with a pointer to an output law (answer), an array of law data (data), and the size of the law data array (size).
|
|
|
The
unary_law,
binary_law, and
multiple_law classes are used if the application is passing only laws into a law class, in which case it becomes a pointer to a law or an array of pointers to laws, respectively. Numbers, positions, parametric positions, vectors, and vector fields, in addition to the law symbols, are passed as input to the
api_str_to_law and become laws for these purposes.
|
|
|
On the other hand, the
unary_data_law and
multiple_data_law classes are used if the application is passing more complicated structures into a law class. These could be curves, wires, surfaces, transforms, or even laws. Instead of having a pointer to a law or an array of pointers to laws, the
unary_data_law and
multiple_data_law classes have a pointer to a
law_data class or an array of pointers to
law_data classes, respectively.
|
|
Library:
|
kernel
|
|
Filename:
|
kern/kernel/kernapi/api/kernapi.hxx
|
|
Effect:
|
Read-only
|