Component:Laws

Laws Component

The Laws Component (LAWS) provides symbolic representations of equations, called "laws", that are parsed in much the same way that equations are. It provides users a means of solving complex, global mathematical problems, and is also used extensively within ACIS to represent mathematical functions.

A law is represented internally by a tree of C++ classes that know their dimensions, how to evaluate themselves, and how to take their exact (symbolic) derivatives with respect to any combination of variables. Law utility functions numerically integrate, differentiate, and find roots and extrema.

Just as importantly, laws can also be used to define geometry and to solve mathematical problems in solid modeling:

• The offset distance for a wire offset can use a law instead of a constant value.
• One-dimensional space can be mapped to three-dimensional space as a vector field on a curve to define the orientation of a swept surface along a non-planar path.
• The location on a curve can be found where the radius of curvature is equal to a specified value.

Laws are functions from any finite dimensional Euclidean space to any finite dimensional Euclidean space, for example:

• An ACIS surface may be considered to be a function from two dimensional space to three dimensional space.
• An ACIS curve may be considered to be a function from one dimensional space to three dimensional space.
• An ACIS transformation may be considered to be a function from three dimensional space to three dimensional space.
• The radius of curvature of a curve may be considered to be a function from one dimensional space to one dimensional space.

Laws are parsed the same way that equations are. For example, the equation:

$f(x,y) = x^2+\cos{x}-\sin{y}\,\!$

becomes the law:

X^2+COS(X)-SIN(Y)


with a two-dimensional domain and a one-dimensional range.

Note: Discussions of ACIS laws often use the term mathematical function to differentiate this meaning of the word function from the use of the word function meaning a computer program routine (such as an API, a class method, and a direct interface function).

Laws Interface

Laws can be implemented in two ways:

• Through direct interface to the classes.
• Through the APIs, which use law string parsing.

Laws Topics

Law Symbols

Main article: Category:Law Symbols

In ACIS, law mathematical functions (laws) can be used to define geometry and solve mathematical problems. A law is a character string made up of valid law symbols enclosed within quotation marks. The law symbols used in law functions are very similar to common mathematical notation and to the adaptation of mathematical notation for use in computers.

Accessing Laws

Main article: Accessing Laws through Classes
Main article: Accessing Laws through String Parsing

Laws can be directly created or through functions which parse string representations of laws into class objects.

Using law_data to Pass Classes to Laws

Main article: Using law_data to Pass Classes to Laws

Complicated structures like curves, wires, and surfaces that can be passed into the law class using law_data.

Passing Simple Input into Laws

Main article: Passing Simple Input into Laws

The integers passed to the identity_law at creation specify the index of its argument from an input list given in a later operation.

Numerical Tools for Laws

Main article: Numerical Tools for Laws

Laws provide numerical tools to find extrema, roots, or to perform integration/differentiation.

Creating Geometry with Laws

Main article: Creating Geometry with Laws

Curves and surfaces can be created using laws.

Vector Fields (Hedgehogs)

Main article: Vector Fields (Hedgehogs)

Laws may be viewed as vector fields, which are illustrated as hedgehog markings.

Using Laws for Analysis

Main article: Using Laws for Analysis

Laws can be used to answer questions about entities, such as locating maxima or minima of a curve, what is the closest point between two non-intersecting lines, or where all the roots are.

Skinning, Lofting, and Net Surface Singularities

Main article: Skinning, Lofting, and Net Surface Singularities

Laws are used by skinning, lofting and net surfaces in numerous ways such as generating the surfaces, and testing for self-intersections.

Main article: Deriving Your Own Law

You can derive your own law. Refer to the main article for more details.