Home

Others
[Constructors APIs]

Collaboration diagram for Others:
Defined at <cstrapi.hxx>, SPAcstr. More...

Functions

outcome api_closed_wire (WIRE *wire, logical &is_closed, AcisOptions *ao=NULL)
 Determines if a wire or a single-wire body is closed.
outcome api_closed_wire (WIRE *wire, AcisOptions *ao=NULL)
 Determines if a wire or a single-wire body is closed.
outcome api_closed_wire (BODY *body, AcisOptions *ao=NULL)
 Determines if a wire or a single-wire body is closed.
outcome api_compute_pcurve_tightness (COEDGE *coed, double &tol, logical use_approx_surf=FALSE, logical approx_ok=TRUE, AcisOptions *ao=NULL)
 Calculates a pcurve's bs2_curve tolerance.
outcome api_edge_approx_line_arc (EDGE *firstEdge, EDGE *secondEdge, SPA_edge_line_arc_options *inputOpts, ENTITY_LIST &edgeList1, ENTITY_LIST &edgeList2, double *&actualFirstTol, double *&actualSecondTol, AcisOptions *ao=NULL)
 Approximates the input EDGE(s) with a series of straight or circular edges.
outcome api_edge_arclength_metric (EDGE *edge, double &metric, AcisOptions *ao=NULL)
 Computes and returns the value of the arclength metric for the given edge.
outcome api_ent_area (ENTITY *ent, double req_rel_accy, double &area, double &est_rel_accy_achieved, AcisOptions *ao=NULL)
 Determines the area of a face, shell, lump, or body.
outcome api_find_face (BODY *body, const SPAunit_vector &direction, FACE *&face, AcisOptions *ao=NULL)
 Finds a planar face with the given normal direction.
outcome api_find_vertex (BODY *body, const SPAposition &pos, VERTEX *&vertex, AcisOptions *ao=NULL)
 Finds the vertex closest to given position.
outcome api_loop_external (LOOP *loop, logical *if_external, AcisOptions *ao=NULL)
 Determines if a loop is internal or external.
outcome api_manifold_class (BODY *body, ENTITY_LIST *&mani_shells, ENTITY_LIST *&mani_sheets, ENTITY_LIST &wire_edges, ENTITY_LIST &lamina_faces, ENTITY_LIST *&edge_arcs, ENTITY_LIST *&vertex_arcs, AcisOptions *ao=NULL)
 Classifies regions on a given body as being either manifold or nonmanifold.
outcome api_planar_face_pr (FACE *face, double req_rel_accy, double &area, SPAposition &centre, double &moment_a, double &moment_b, SPAunit_vector &axis_a, SPAunit_vector &axis_b, double &est_rel_accy_achieved, AcisOptions *ao=NULL)
 Locates area, center of area, second moments, and principal axes of a planar face.
outcome api_q_edges_around_vertex (VERTEX *vertex, ENTITY_LIST *edge_list, AcisOptions *ao=NULL)
 Gets a list of edges that share a given vertex.
outcome api_shell_external (SHELL *shell, int &external, AcisOptions *ao=NULL)
 Determines whether a shell is internal or external.
outcome api_wire_len (WIRE *wire, double &length, AcisOptions *ao=NULL)
 Determines the length of a wire.
outcome api_wire_len (BODY *body, double &length, AcisOptions *ao=NULL)
 Determines the length of a wire body.
outcome api_wire_to_chain (BODY *body, ENTITY_LIST &list, AcisOptions *ao=NULL)
 Gets a list of the coedges of a body that is a single unbranched wire.

Detailed Description

Defined at <cstrapi.hxx>, SPAcstr.


Function Documentation

outcome api_closed_wire ( WIRE wire,
logical &  is_closed,
AcisOptions ao = NULL 
)

Determines if a wire or a single-wire body is closed.



Role: The API function returns TRUE via the is_closed argument if the wire is closed. It does not alter the model.

The wire body is considered to be closed if it contains no terminal vertices. Accordingly, a wire with a "tadpole" topology is considered to be open.

Errors: The pointer to a body is NULL or does not point to a wire body.

Effect: Read-only

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
wire wire to be examined.
is_closed logical used to return result
ao ACIS options.

include <cstrapi.hxx>

outcome api_closed_wire ( WIRE wire,
AcisOptions ao = NULL 
)

Determines if a wire or a single-wire body is closed.



Role: The API function returns a successful outcome if the wire is closed. It does not alter the model.

The wire body is considered to be closed if it contains no terminal vertices. Accordingly, a wire with a "tadpole" topology is considered to be open.

This function is overloaded. This signature of the API function will persist in the future and should be used instead of the one that takes a BODY.

Errors: The pointer to a body is NULL or does not point to a wire body.

Effect: Read-only

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
wire wire to be examined.
ao ACIS options.

include <cstrapi.hxx>

outcome api_closed_wire ( BODY body,
AcisOptions ao = NULL 
)

Determines if a wire or a single-wire body is closed.



Role: The API function returns a successful outcome if the wire is closed. It does not alter the model.

The wire is considered to be closed if it contains no terminal vertices. Accordingly, a wire with a "tadpole" topology is considered to be open.

This function is overloaded. This signature of the API function will be removed in a future release. The signature of api_closed_wire that takes a WIRE instead of a BODY should be used instead.

Errors: The pointer to a body is NULL or does not point to a wire body.

Effect: Read-only

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
body wire body to be examined.
ao ACIS options.

include <cstrapi.hxx>

outcome api_compute_pcurve_tightness ( COEDGE coed,
double &  tol,
logical  use_approx_surf = FALSE,
logical  approx_ok = TRUE,
AcisOptions ao = NULL 
)

Calculates a pcurve's bs2_curve tolerance.



Role: Calculates the fit tolerance of a pcurve's bs2_curve to the pcurve. This API function returns the fit tolerance of a pcurve's bs2_curve to the exact pcurve as a distance in 3-space. The logical use_approx_surf controls when the bs2_curve is evaluated through the face's approximating surface to compute the tolerance. The logical approx_ok can be set to TRUE to use a quicker but less accurate computation.

Effect: Changes model

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
coed input coedge.
tol computed fit tolerance.
use_approx_surf use surface approx.
approx_ok for quick tolerance calculation.
ao ACIS options.

include <cstrapi.hxx>

outcome api_edge_approx_line_arc ( EDGE firstEdge,
EDGE secondEdge,
SPA_edge_line_arc_options inputOpts,
ENTITY_LIST edgeList1,
ENTITY_LIST edgeList2,
double *&  actualFirstTol,
double *&  actualSecondTol,
AcisOptions ao = NULL 
)

Approximates the input EDGE(s) with a series of straight or circular edges.



NOTE: The signature of this API function may change in future releases of ACIS.

Role: This API function generates a series of straight or circular edges that approximate the given input edge. It also returns the tolerances achieved with each output edge with respect to the original edge. The function supports two distinct workflows:

1. A single edge can be approximated by the function. The output edges will span the length of the input edge from start to end.
2. When two edges are used as input, the function returns matching lists of approximating edges. The number of edges returned will be the same for both edges. Also, the normalized (0 to 1) parameter values at which each edge is split will match. Additionally, when two edges are used as input, the direction of the approximation for the second edge will be reversed if the function checks and detects that the second edge needs reversal. The check for edge reversal is performed only if it is specified in the options object.

The approximating direction for the second edge will be reversed in the following cases:

1. If the two input edges belong to the same FACE on the original BODY, the function uses the coedge sense bits to check if the second edge is oriented in the same direction as the first edge. If it is not oriented correctly, the function will reverse the approximation direction of the second edge.
2. If the two input edges do not belong to the same face, then two checks are performed to see if the second edge needs to be reversed. First, if either edge is closed, the start direction and end direction of the second edge is compared to the start direction of the first edge. If both edges are not closed, then the start position and end position of the second edge is compared to the start position of the first edge.

When the approximating direction is reversed, the sequence of approximating edges will stretch from the end of the second edge to the start.
The actual achieved tolerances are also returned in two arrays of doubles. The length of these arrays will match the number of edges returned in the ENTITY_LIST objects. The user is responsible for deleting the memory referenced by these pointers using ACIS_DELETE [].

Errors:


Limitations: Returns zero edges if there is any error condition.

Effect: Read-only

Journal: Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
firstEdge first input Edge to be approximated.
secondEdge optional second input Edge to be approximated. The parameter values at the splits for the second edge will match the param values for the splits for the first edge.
inputOpts options object that specifies the behavior of the API function.
edgeList1 output list of edges created by approximating firstEdge.
edgeList2 output list of edges created by approximating secondEdge (if it was provided).
actualFirstTol list of doubles specifying the approximation error of each edge in edgeList1 with respect to firstEdge.
actualSecondTol list of doubles specifying the approximation error of each edge in edgeList2 with respect to secondEdge (if it was provided).
ao ACIS options.

include <cstrapi.hxx>

outcome api_edge_arclength_metric ( EDGE edge,
double &  metric,
AcisOptions ao = NULL 
)

Computes and returns the value of the arclength metric for the given edge.



Role: This API function computes and returns the value of the arclength metric.

A metric value of zero indicates 100% arc length parameterized. A metric value greater than one may cause unpredictable results. A metric value over 100 is typically a bad curve.

Errors: Pointer to edge is NULL, pointer is not to an EDGE, or EDGE is not part of a BODY.

Effect: Read-only

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
edge input edge.
metric returned edge geometry metric value.
ao ACIS options.

include <cstrapi.hxx>

outcome api_ent_area ( ENTITY ent,
double  req_rel_accy,
double &  area,
double &  est_rel_accy_achieved,
AcisOptions ao = NULL 
)

Determines the area of a face, shell, lump, or body.



Role: Calculates the area of a face, shell, lump, or body. The req_rel_accy is passed as a fractional number greater than zero.

Errors: The pointer to the entity is NULL or does not point to a body, lump, shell, or face. Negative accuracy requested.

Effect: Read-only

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
ent face, shell, lump, or body.
req_rel_accy requested relative accuracy.
area returned area of the entity.
est_rel_accy_achieved estimate of relative accuracy returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_find_face ( BODY body,
const SPAunit_vector direction,
FACE *&  face,
AcisOptions ao = NULL 
)

Finds a planar face with the given normal direction.



Role: Given a direction d, finds the planar face with normal n so that d.n is positive and has greatest value for any face of the body. If several faces have equal greatest value of d.n, it returns the face with greatest value of p.d, where p is a point on the face. Takes account of the body transformation.

Retrieves NULL if no face found with d.n positive.

Errors: Pointer to body is NULL or not to a BODY.  Zero length direction vector specified.


Effect: Read-only

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
body body containing face sought.
direction approximate direction of face normal.
face found face returned or NULL returned if no face found.
ao ACIS options.

include <cstrapi.hxx>

outcome api_find_vertex ( BODY body,
const SPAposition pos,
VERTEX *&  vertex,
AcisOptions ao = NULL 
)

Finds the vertex closest to given position.



Role: Given a position and a body, finds the vertex of the body closest to that position. If several vertices are equidistant from the given position, any one may be returned.

Returns NULL if no vertex found.

Errors: Pointer to body is NULL or not to a BODY.

Effect: Read-only

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
body body containing vertex sought.
pos given position in global coordinates.
vertex found vertex returned or NULL returned if no vertex found.
ao ACIS options.

include <cstrapi.hxx>

outcome api_loop_external ( LOOP loop,
logical *  if_external,
AcisOptions ao = NULL 
)

Determines if a loop is internal or external.



Role: Sets if_external to FALSE if the loop is a hole loop. Sets it to TRUE if the loop is not a hole loop.

For more information on the clasification of loops refer to the Classification of Loops section in the Technical Article Loop.

Errors: Pointer to loop is NULL or not to a LOOP.

Effect: Read-only

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
loop loop to be examined.
if_external TRUE returned if external loop.
ao ACIS options.

include <cstrapi.hxx>

outcome api_manifold_class ( BODY body,
ENTITY_LIST *&  mani_shells,
ENTITY_LIST *&  mani_sheets,
ENTITY_LIST wire_edges,
ENTITY_LIST lamina_faces,
ENTITY_LIST *&  edge_arcs,
ENTITY_LIST *&  vertex_arcs,
AcisOptions ao = NULL 
)

Classifies regions on a given body as being either manifold or nonmanifold.



Role: Returns all nonmanifold edges and vertices.

Definition of Nonmanifold

Formally, a nonmanifold edge has more than two faces around it, and a nonmanifold vertex has elements that can only be connected topologically through that vertex. For example, two cones meeting at their apexes, or a vertex of a block with a dangling edge. For the purposes of this API function, three or more wire edges meeting at a vertex are also defined as nonmanifold.

Information Returned

The first three output arguments (mani_shells, mani_sheets, wire_edges) return the detected manifold shells, manifold sheets and the wire edges. Wire edges are returned in an entity list. Manifold sheets and shells are returned in arrays of entity lists, one list for each shell or sheet that contains its faces. Each array is terminated by an empty list.

The next output argument, lamina_faces, returns all laminar (covered on both sides) faces. Only planar laminar faces or laminar faces that use the same geometry are detected. The entity list stores them in pairs (first two are one face, next two are the second face, etc.). Detects laminar faces of opposing and same orientation.

The next two output arguments (edge_arcs, vertex_arcs) return all detected nonmanifold edges and nonmanifold vertices and all elements connected to them, whether sheets, lamina, manifold shells, or wire edges. Each list in either array begins with the nonmanifold edge or vertex, followed by the elements connected to them. The manifold shells and sheets are represented by a pointer that references the first face field to the entity list (in either return argument) that represents the shell or sheet. Before using this pointer, cast the contained face pointer to an ENTITY_LIST. The wire edges are stored in the list. Each lamina is stored as two sequential faces in the list. The arrays are terminated by empty lists.

Note that arguments mani_shells, mani_sheets, edge_arcs, and vertex_arcs are allocated by the API function and must be deleted via ACIS_DELETE at some point.

Locates all entities if connected to coedge graph, even if not in any shell or wire.

Errors: Pointer to body is NULL or not to a BODY.

Limitations: This API function assumes that the input body is more or less sane other than nonmanifold regions. Internal dangling sheet faces attached to a shell cause the shell to be interpreted as a sheet. Void shells that touch their peripheral shell or other void shells in a nonmanifold edge will be interpreted as part of the adjacent shell.

Effect: Read-only

Journal: Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
body Body to examine for manifold pieces.
mani_shells Array of lists of faces returned (each list represents a manifold shell) Terminated by an empty list.
mani_sheets Array of lists of manifold sheets returned Terminated by an empty list.
wire_edges List of wire edges detected and returned.
lamina_faces List of lamina (doubly covered) faces in pairs returned.
edge_arcs Array of lists returned, each containing one nonmanifold edge followed by all elements connected to it. Terminated by an empty list.
vertex_arcs Array of lists returned, each containing one nonmanifold vertex followed by all elements connected to it Terminated by an empty list.
ao ACIS options.

include <cstrapi.hxx>

outcome api_planar_face_pr ( FACE face,
double  req_rel_accy,
double &  area,
SPAposition centre,
double &  moment_a,
double &  moment_b,
SPAunit_vector axis_a,
SPAunit_vector axis_b,
double &  est_rel_accy_achieved,
AcisOptions ao = NULL 
)

Locates area, center of area, second moments, and principal axes of a planar face.



Role: Results are given in the local coordinate space of the body.

Errors: Pointer to face is NULL or not to a planar face.  Negative accuracy requested.


Effect: Read-only

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
face planar face to be examined.
req_rel_accy requested relative accuracy.
area area of face returned.
centre center of face returned.
moment_a moment of inertia about axis a returned.
moment_b moment of inertia about axis b returned.
axis_a axis a returned.
axis_b axis b returned.
est_rel_accy_achieved estimate of relative accuracy returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_q_edges_around_vertex ( VERTEX vertex,
ENTITY_LIST edge_list,
AcisOptions ao = NULL 
)

Gets a list of edges that share a given vertex.



Role: This API function returns a list of edges that share a specified vertex.

Errors: Pointer to vertex is NULL or not to a VERTEX.

Effect: Read-only

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
vertex vertex to be examined.
edge_list list of edges returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_shell_external ( SHELL shell,
int &  external,
AcisOptions ao = NULL 
)

Determines whether a shell is internal or external.



Role: The returned external argument will be set to: 0 for void, 1 for external, or 2 for unknown.

Errors: Pointer to shell is NULL or not to a SHELL.

Effect: Read-only

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
shell shell to be examined.
external internal or external flag returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_wire_len ( WIRE wire,
double &  length,
AcisOptions ao = NULL 
)

Determines the length of a wire.



Role: This API function is overloaded. The signature of api_wire_len that takes a BODY instead of a WIRE may also be used.

Errors: Pointer to wire is NULL or not to a wire.

Limitations: Returns zero length if there is any error condition.

Effect: Read-only

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
wire given wire.
length length of wire returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_wire_len ( BODY body,
double &  length,
AcisOptions ao = NULL 
)

Determines the length of a wire body.



Role: This API function is overloaded. The signature of api_wire_len that takes a WIRE instead of a BODY may also be used.

Errors: Pointer to body is NULL or not to a wire body.

Limitations: Returns zero length if there is any error condition. If the given body has more than one wire, the function considers only the first wire.

Effect: Read-only

Journal: Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
body given wire body.
length length of the wire returned.
ao ACIS options.

include <cstrapi.hxx>

outcome api_wire_to_chain ( BODY body,
ENTITY_LIST list,
AcisOptions ao = NULL 
)

Gets a list of the coedges of a body that is a single unbranched wire.



Role: This API function returns a list of the coedges of a body that is a single unbranched wire in a list supplied by the caller.

The sequence of the edges and coedges of the wire can be forward or backward.

Errors: Pointer to body is NULL or not to a wire body.

Effect: Read-only

Journal: Not Available

Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler

Parameters:
body wire body to be examined.
list list of coedges returned.
ao ACIS options.

include <cstrapi.hxx>