# Surface

The term surface has multiple meanings. In ACIS this term is most frequently used in its geometrical or mathematical sense, to describe a two-dimensional manifold in a three-dimensional space, with a single geometrical definition. For instance, if a face lies in a plane, the underlying geometry may be described as a "planar surface". This definition for surface is the basis of this article. However, the term "surface" is occasionally used (particularly in the discussion of non-manifold topology) to describe the complete boundary of a solid region with a two-manifold boundary. You might describe a point as lying on the surface of an object, even though the definition of the object's boundaries uses many geometric surfaces.

In ACIS surfaces can be planar, cylindrical, conical, spherical, toroidal, or sculptured. Cylindrical and conical surfaces can be circular or elliptical.

## Surface Types

ACIS supports two types of surfaces: analytic and spline. These are analogous to the two types of curves: analytic and interpolated.

### Analytic Surface

An analytic surface represents a simple surface. These surfaces can be represented explicitly by an equation (algebraic formula). ACIS implements analytic surfaces with the construction geometry classes plane, cone, sphere, and torus. Other types of analytic surfaces, such as an ellipsoid, are implemented with the spline construction geometry class. The corresponding model geometry classes are PLANE, CONE, SPHERE, and TORUS.

### Spline Surface

In ACIS, a spline surface may represent a procedural surface, where a "closed-form" representation is not available, or a B-spline surface. The construction geometry class for spline surfaces is the spline class. The corresponding model geometry class is the SPLINE class.

## Concepts and Terminology

### Parametric Surfaces

A parametric surface maps a rectangle defined within a 2D real vector space (called parameter space) into a 3D real vector space (often called object space), as shown in the following figure. A spline surface is a true parametric surface. This mapping must be continuous and one-to-one, except possibly at the boundary of the rectangle in parameter space. It must be differentiable twice, and the normal direction should be continuous, though the derivatives need not be.

Mapping a Parametric Surface Between Object Space and Parameter Space

For more information on parameter space representations of surfaces, refer to The Parameter Space of a Surface.

### Right-Handed and Left-Handed Surfaces

The handedness of a surface describes the direction of the surface normals with respect to the u and v parameter directions. If a surface is right-handed, then the surface normal is in the direction of the cross product of the partial derivatives with respect to u and v, in that order. If a surface is left-handed, the surface direction would be in the opposite direction. In other words, if a surface is right-handed, the direction of the surface normal at any given point on the surface follows the right-hand rule with respect to the u and v parameter directions at that point. If a surface is left-handed, the direction of its normals follow the left-hand rule. At any point on the surface, the normal points toward the part of the neighborhood that is outside the surface.

### Surface Forms

If all of the object space points on the boundaries of a surface are distinct, then the surface is said to be open in both parametric directions. A pair of opposite sides of the rectangle may map into identical curves in object space. In this case, the surface is closed in the parameter direction normal to those boundaries. For instance, if the high and low u-parameter boundaries map into the same curve, a surface is closed in the u-direction. Examples of open and closed surfaces are depicted in Surface Open in Both Directions and Surface Closed in One Direction.

 Surface Open in Both Directions Surface Closed in One Direction

If the parameterization and tangent direction match along the coincident boundaries, the surface is periodic in the parameter direction. The curve in object space corresponding to the coincident boundaries of a periodic surface is referred to as the seam. An example of a surface that is periodic in one direction, but not in the other, is presented in Figure. Surface Periodic in One Direction. An example of a surface that is periodic in both directions is a toroidal surface. A doubly-periodic, spline surface with two seam curves is depicted in Figure. Surface Periodic in Both Directions.

 Surface Periodic in One Direction Surface Periodic in Both Directions

A surface that is periodic in one parameter direction is defined for all values of that parameter. A parameter value outside the domain rectangle is brought within the rectangle by adding a multiple of the rectangle's width (the period) in that parameter direction. If the surface is periodic in both parameters, it is defined for all parametric locations(u, v) and both parameters may be mapped into principal range.

### Singularities

One side of the rectangle may map into a single point in object space (refer to the following figure). This point is a parametric singularity of the surface. The poles of a sphere are examples of parametric singularities. The surface normal directions at these points are defined, but there are an infinite number of v-parameter values associated with these points. If the surface normal is not continuous at this point, it is a geometric singularity. The apex of a cone is an example of geometric singularity. There are an infinite number of v-parameter values associated with this point and the direction of the surface normal at this point depends upon the v-parameter value.

Important: The only types of singularities that are permissible in ACIS are those in which one side of the (parameter space) rectangle maps to a single point.

One End Mapped to a Single Point

A surface may have such singularities at opposite ends of the rectangle, but not along adjacent sides of the rectangle. A closed surface may have such a singularity at one or both of its open boundaries, or along its closed boundary. A conical surface is an example of a periodic surface with a singularity at one open boundary. A football shaped surface is an example of a periodic surface with singularities at both open boundaries. The following figure depicts a surface closed in both directions, with a singularity in one of the closed directions.

A Closed Surface with a Singularity

## Surface Classes

The surface class is the base class for construction geometry surfaces. The surface class is an abstract base class, whereas its children are specific classes. The following five classes are derived from surface:

 plane Defines a planar surface. cone Defines a cylindrical or a conic surface, either of which can also be circular or elliptical. sphere Defines a spherical surface. torus Defines a toroidal surface. spline Defines a sculpted surface. A spline may be either a procedural surface or a B-spline surface.

The primary data elements of these classes (those that define the shape and parameterization) are enumerated in the diagram below.

Surface Class Derivation

The construction geometry classes described above are not persistent. There are model geometry classes (with UPPERCASE names) that correspond to these construction geometry classes. The SURFACE class is the base class for model geometry surfaces, and other surface model geometry classes are derived from it. The SURFACE class is the abstract base class for model geometry surface; whereas its children are specific model geometry classes. Classes derived from SURFACE include PLANE, CONE, SPHERE, TORUS, and SPLINE. Each specific model geometry surface class contains an instance of its corresponding specific construction geometry surface class. Thus, the non-persistent, specific construction geometry surface classes function as data containers for the persistent classes. The SURFACE class is derived from the ENTITY class; therefore, SURFACEs are part of the persistent model and inherit all of the Model Management capabilities of the ENTITY class.

## Continuity Requirements

Main article: Continuity

ACIS prefers that curves and surfaces generally be G2 continuous, but will allow G1 continuity at the knots of curves and surfaces. The C++ class discontinuity_info records discontinuity information. It is used internally by ACIS in the curve and surface extension and intersection algorithms.

Certain iterative processes use the derivatives for estimating the next test value, and may converge slowly, or not at all, if there are significant discontinuities in the derivatives, or if there are large and/or rapid variations in the magnitude of the derivatives. As a rule of thumb, avoid variations of more than an order of magnitude in the magnitude of first derivatives across the surface. Some modeling operations (such as offsetting, shelling, and blending) may fail on surfaces that are not G1 continuous. The evaluation of mass properties in ACIS requires that curves be C1 continuous.

## Other Restrictions

Parametric singularities should be avoided, because they are likely to cause problems. Surface singularities that interfere with ACIS topological entities must not exist.

ACIS correctly handles faces that span the seam(s) of a periodic surface, but not those that form a complete band around the (distorted) cylinder or torus.

No assumption is made about the relationship between parameter values and object space distances, and parameterization is transformation-independent. Nevertheless, it is advantageous for the parameterization to be as homogeneous as possible, because various iterative processes are likely to be more reliable and faster. In addition, it is advantageous for the parameterization in the two directions be of similar scale.

## Surface Sense

When dealing with surfaces there are only two senses that must be taken into account. A FACE may be reversed with respect to its underlying surface, and a spline may be reversed with respect to its spl_sur. The latter reversal also implies that a spline may be reversed with respect to its underlying bs3_surface.

The reversal flag in a FACE specifies whether the FACE's normal is in the same direction as the underlying surface's normal, or in the opposite direction. The reversal flag does not affect the parameterization of the FACE. (As explained in Curve Sense, the reversal flag in an EDGE does affect the parameterization of EDGEs with respect to their underlying curves.) The simplest way to determine the normal of a FACE at a given point is by calling sg_get_face_normal.

The reversal flag in a spline implies that if you are obtaining a normal by evaluating its underlying bs3_surface, you may have to reverse the direction of the normal based upon the value of the reversal flag. (Typically, you do not evaluate a bs3_surface directly.) You must also be aware of this reversal flag if you set or modify the definition of a bs3_surface.

## B-spline Surface Interface

The Spline Interface is low-level functionality that models complex curves, and surfaces using B-splines. It contains utilities for construction, manipulation, evaluation, querying, and destruction of NURBS surfaces which appear in ACIS as bs3_surfaces.

The spline interface functions form a subset of the Direct Interface (DI) functions. The spline functions are implemented in the Kernel Component (KERN), and have names that begin with the following string:

• bs3_surface_* : Operate on 3D B-spline surfaces.