api_make_rails
List of: Functions
Subjects: Laws, Sweeping
Contents: Kernel

Action: Creates the default rail laws for sweeping along a wire.

Prototype: outcome api_make_rails (


ENTITY* path, // a WIRE or EDGE


law**& rails, // array of rail




// laws returned


int& number_of_rails, // number of rail




// laws returned


law** axis // optional axis



= NULL, // in an array


FACE** faces // optional faces



= NULL, // in an array


law** user_rails // optional user



= NULL, // defined rails


law* twist_law // optional twist



= NULL, // law


AcisOptions* ao = NULL // acis options


);

Includes: #include "kernel/acis.hxx"

#include "kernel/kernapi/api/api.hxx"

#include "kernel/kernapi/api/kernapi.hxx"

#include "kernel/kerndata/data/entity.hxx"

#include "kernel/kerndata/top/face.hxx"

#include "lawutil/law_base.hxx"

#include "kernel/kernapi/api/acis_options.hxx"

Description: This produces an array of rail laws that can be used by sweeping in the sweep options. A single rail law is produced if the path is a single edge or a wire with a single underlying edge. Otherwise, it creates multiple rail laws, one for each underlying edge in the path.


The only required argument is the path. If no other arguments are supplied, then the default rails are created. The default for the creation of rails is:


- If the path is planar, the rail law is the planar normal. A constant vector law is returned

- If the path is a helix, the rail law points towards the axis. The Frenet law is returned.

- If all edges in the wire are planar, then an array of rail laws is created, whereby each law in the array corresponds to an edge in the wire. The rail laws correspond to the planar normal of edges.

- If the wire has surfaces, then the surface normal laws are returned.

- If the path isn't one of the above cases, the rail uses minimum rotation.


If the input path is composed of multiple pieces, such as a wire with more than one underlying edge, then array arguments must supply the same number of elements as the number of path elements. They may pad their array with NULL arguments.


The axis argument is used for path segments that have an implied center axis. An example of this might be a helix, an expanding helix, or the coil of a telephone handset cable. The axis argument is the derivative of the implied center axis, which tells the implied axis direction. When the axis is supplied, then its cross product with the path is returned. The axis array can be padded with NULL for sections of the path that do not have an implied axis.


The face argument is used when a portion of the path segments borders a non-analytic face. The coedge of the wire provided as path must actually belong to the face entity supplied. The face must be non-analytic. The resulting rail is oriented to the face normal. The face array can be padded with NULL for sections of the path that do not have such a face.


The user-rails argument permits any default rail for a given section of the path to be overridden by the user-supplied law in the array. The user-rails array can be padded with NULL for sections of the path that are to use the default.


The twist argument works on the whole rail array. After the other rail parameters have been input and calculated, the law provided by twist operates on the whole set of rails. This takes in an angle of twist per distance along the path.

Limitations: When faces are supplied, the coedge of the wire must actually belong to the face. The face must be non-analytic. The face argument is not supported for analytic geometry in the face.

Library: kernel

Filename: kern/kernel/kernapi/api/kernapi.hxx

Effect: Read-only
PDF/KERN/16FNA.PDF
HTM/DATA/KERN/KERN/16FNA/0095.HTM