Component:Constructors
From DocR21
ACIS is a solid modeler that can combine wireframe, surface, and solid models. A wireframe model defines an object only by its edges and vertices. A surface model is similar to a wireframe model, but defines an object by its visible surfaces, including faces. A solid model defines an object in terms of its size, shape, density, and physical properties (for example, weight, volume, and center of gravity). A body corresponding to one of these three types of models is commonly referred to as a wire body, a sheet body, or a solid body, respectively.
Regardless of its type, the starting point for handling any model is the Constructors Component (CSTR), one of the most important and frequently used components in ACIS. It contains API functions to both create and edit geometry, including geometric primitives. Lines, curves, arcs, planes, wires, prisms, cuboids, pyramids, spheres, splines, and tori, for example, are all made available by these functions.
Beyond being useful in-and-of themselves, geometric objects provided by the Constructors Component may form the basis for more complex operations that may be used in the construction of models. For example, both solid and surface models may be made by Sweeping, Skinning, Lofting, Covering, or Net Surfaces. For details regarding operations such as these, refer to the relevant component.
Construction
| Operation | Description |
|---|---|
| Make a Solid Body | Construct a sphere, block, cylinder, torus, for example. |
| Make a Wire Body | Construct a planar or non-planar wire, polygonal or arbitrary. |
| Make a Face/Surface | Construct a spherical, planar, spline face, for example. |
| Make an Edge/Curve | Construct a straight, elliptical, helical, spline edge, for example. |
| Make Other Entities | Construct a point entity or a text entity. |
Modification
| Operation | Description |
|---|---|
| Modify a Body | Reverse an entity, add a wire, make sheet-body single- or double-sided. |
| Modify a Face/Surface | Reverse a face, enclose a void. |
| Modify an Edge/Curve | Redefine a straight or elliptical edge, trim one or more edges. |
| Modify a Wire | Reverse or orient a wire. |
| Modify Other Entities | Set a pcurve's tightness; fillet a vertex. |
Queries
| Operation | Description |
|---|---|
| Miscellaneous Entity Queries | Model properties, closure, and so forth. |
Spline
- Main article: Spline
Within the ACIS interface, the word spline is used in two ways.
- In the names of APIs such as api_curve_spline2, its usage is the conventional one. That is, this function constructs a B-spline curve from input data, as one would naturally assume.
- However, in the case of the class spline (as used in the signature of api_make_spline, for example), its meaning is not what one might expect. This is the ACIS class to which all non-analytic surfaces are attached, and although these surfaces may possess B-spline approximations, in all but one case their primary definitions are procedural. That exception is the spline type "exactsur", for which the B-spline representation is primary.
In the case of curves, intcurve replaces spline as the class that is used for non-analytic curves, but it likewise may represent both B-spline and procedural curves. With intcurves, an "exactcur" precisely represents a B-spline curve.
Sphere
- Main article: Sphere
In geometry, a sphere is the set of all points in three-dimensional space which are at distance from a fixed point of that space. Spheres are represented in ACIS by the sphere class.
Cone
- Main article: Cone
The cone class defines an elliptical single cone. It is defined by a base ellipse and the sine and cosine of the major half-angle of the cone. The normal of the base ellipse represents the axis of the cone.
Torus
- Main article: Torus
In geometry, a torus (pl. tori) is a surface of revolution generated by revolving a circle in three dimensional space about an axis coplanar with the circle. Examples of tori include the surfaces of doughnuts and inner tubes. Tori are represented in ACIS by the torus class.
Plane
- Main article: Plane
In geometry, a plane is an infinite surface that is perfectly flat. In ACIS, the plane class represents an infinite planar surface or a bounded region on such a surface.
Journaling and Versioning
Journaling and Versioning are available for Constructors through the standard AcisOptions mechanism.
C++ APIs
The Constructors APIs fall into several categories. The majority creates solid bodies, wire bodies, faces, or edges. An example is
api_solid_sphere(center, radius, return body)
which constructs a sphere according to its center and radius. Other APIs modify existing bodies in fairly basic ways, among which are a few that create a new body if none is supplied. For instance,
api_make_wire(given body, number of positions, positions, return body)
creates a new wire from an array of positions and adds it to the given body if the latter is given as input. Otherwise, a new body is created to act as the wire's owner. In both cases, however, the return body is the one containing the new wire. Lastly, a number of APIs may be used to query the model, perhaps to aid in analysis. The following API, which finds the vertex closest to a specified position, may serve as an example of that:
api_find_vertex(given body, position, return vertex)
Finally, because the Constructors Component is involved in the creation of new entities, it is important to have a means of deleting them from memory when they are no longer being used. The API api_del_entity takes a single entity as its argument and deletes both it and all connected entities (for example, if a body is supplied, all its lumps, surfaces, and attributes are deleted by this function). By contrast, api_delent deletes only the entity and its sub-entities, so that passing it a face, for example, does not delete the owning body.
Annotations
- Main article: Feature Naming and Annotations
The Constructors component supports a single annotation class: PRIMITIVE_ANNOTATION. An object of this class maintains lists of all faces, edges, and vertices associated with the creation of a geometric primitive. Specifically, such annotations are created by the following Constructors APIs:
- api_make_cuboid, api_solid_block
- api_make_sphere, api_solid_sphere
- api_make_frustum, api_solid_cylinder_cone
- api_make_prism
- api_make_pyramid
- api_make_torus, api_solid_torus
Options
Important: For historical reasons, there are some global options that also affect the behavior of Constructor operations. Refer to Constructor global options.
Error Codes
- Main article: Constructors Error Codes
Upon failure of a Constructors API, Constructors error codes will be returned that explain the failure and suggest possible actions for correction.
