Table of Contents

22. Contact Pairs, Surfaces - CPair,ASurf

The CPair module is designed to manage contacting surface and co-simulation surface pairs. All real load, constraint, contact pair and initial condition values are stored internally in double precision. The user may define and query load, constraint, contact pair and initial condition values in either single or double precision. The ASurf module is designed to manage analytic surface information.

Note that all contact pair and surfaces hold floating point data internally in double precision.

Table of Contents

22.1 Contact Pair - CPair

The CPair module manages pairs of contacting surfaces, co-simulation or cyclic surfaces. The term "surface" is used loosely here in that a surface can be set of nodes or element faces or element edges or an analytic surface. The contact surfaces are termed a master or a slave surface. Master surfaces may only be defined as element faces or edges or analytic surfaces. Slave surfaces may be defined as nodes or element faces or edges. In addition to the surface entities a set of properties may also be associated with a contact pair.

The functions associated with a CPair object are the following.

Instance a CPair object initially using vis_CPairBegin. Set the master and slave surface entity types using vis_CPairDef. By default, the CPair type is contact surface. Use vis_CPairSetType to set the type to a cyclic or co-simulation surface. At this point a GridFun object must be set as an attribute object using vis_CPairSetObject so that the CPair object can access finite element model information and verify element entity specifications. The master surface entity type must be element face or edge. The slave surface entity type may be node or element face or edge. Master element entities are specified using vis_CPairSetMaster. Slave node entities are specified using vis_CPairSetSlaveNode, and slave element entities are specified using vis_CPairSetSlaveElem. Slave node entities may have an effective area associated with each node.

For the special case of self-contact set the slave entity type to SYS_NONE and define only the master surface. The slave surface is assumed to be the master surface.

Generate a face list of master or slave surface entities using vis_CPairFaceIdTran. Generate an edge list of master or slave surface entities using vis_CPairEdgeIdTran. Generate a node list of all nodes on a slave surface using vis_CPairNodeIdTran.

A set of property types is supported for a contact pair. Specify integer or real valued properties using vis_CPairSetValuei, vis_CPairSetValuef or vis_CPairSetValued. Each property type is identified by a defined constant. The user may query for the number and type of properties defined using vis_CPairValueType. The data type and number of components associated with a property type is queried using vis_CPairValueParams. A long descriptive name which is hard-wired to each property type may be queried using vis_CPairValueName. Finally the property values themselves may be recovered using vis_CPairValueInteger, vis_CPairValueFloat or vis_CPairValueDouble. The function vis_CPairValueFlag is used to determine how a property has been defined, if at all. The full set of contact pair properties are the following:

The full set of cyclic pair properties are the following: Table of Contents

22.2 Function Descriptions

The currently available CPair functions are described in detail in this section.


Table of Contents , CPair

NAME

*vis_CPairBegin - create an instance of a CPair object

C SPECIFICATION

vis_CPair *vis_CPairBegin ()

ARGUMENTS

None

FUNCTION RETURN VALUE

The function returns a pointer to the newly created CPair object. If the object creation fails, NULL is returned.

DESCRIPTION

Create an instance of a CPair object. Memory is allocated for the object private data and the pointer to the data is returned.

Destroy an instance of a CPair object using

     void vis_CPairEnd (vis_CPair *cpair)

Return the current value of a CPair object error flag using

     Vint vis_CPairError (vis_CPair *cpair)


Table of Contents , CPair

NAME

vis_CPairDef - define master and slave entity types

C SPECIFICATION

void vis_CPairDef (vis_CPair *cpair,
                   Vint mastent,
                   Vint slavent)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
mastent      Master entity type
             =SYS_EDGE     Element edge
             =SYS_FACE     Element face
             =SYS_ASURF    Analytic surface
slavent      Slave entity type
             =SYS_NONE     None
             =SYS_NODE     Node
             =SYS_EDGE     Element edge
             =SYS_FACE     Element face

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_ENUM is generated if an improper mastent or slavent is specified.

DESCRIPTION

Set the master and slave surface entity types. The master entity type may be an element edge or face or an analytic surface. Master element entities are specified using vis_CPairSetMaster. Master analytic surface entities are specified using vis_CPairSetMasterASurf. The slave entity type may be node or element edge or face. If the slave entity type is SYS_NODE then slave node entities are specified using vis_CPairSetSlaveNode otherwise slave element entities are defined using vis_CPairSetSlaveElem.

For the special case of self-contact set the slave entity type to SYS_NONE and define only the master surface. The slave surface is assumed to be the master surface.

Inquire of defined mastent and slavent as output arguments using

     void vis_CPairInq (vis_CPair *cpair,
                        Vint *mastent,
                        Vint *slavent)


Table of Contents , CPair

NAME

vis_CPairSetType - set contact or co-simulation type

C SPECIFICATION

void vis_CPairSetType (vis_CPair *cpair,
                       Vint ctype)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
ctype        Contact or co-simulation surface type
             =CPAIR_CONTACT           Contact pair
             =CPAIR_COSIM             Co-simulation pair
             =CPAIR_CYCLIC            Cyclic symmetry pair

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_ENUM is generated if an improper ctype is specified.

DESCRIPTION

Set contact, cyclic or co-simulation surface type. By default the surface type is CPAIR_CONTACT.

Inquire of specified ctype as an output argument using

     void vis_CPairGetType (vis_CPair *cpair,
                            Vint *ctype)


Table of Contents , CPair

NAME

vis_CPairMasterFlag - query master entity defined

C SPECIFICATION

void vis_CPairMasterFlag (vis_CPair *cpair,
                          Vint index,
                          Vint *flags)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
index        Element number

OUTPUT ARGUMENTS

flags        Element edge or face flags

ERRORS

SYS_ERROR_VALUE is generated if an improper index is specified.

DESCRIPTION

Return element edge or face flags given an element index. If no element entities have been specified for the given index then flags is returned as zero.


Table of Contents , CPair

NAME

vis_CPairSlaveFlag - query slave entity defined

C SPECIFICATION

void vis_CPairSlaveFlag (vis_CPair *cpair,
                         Vint index,
                         Vint *flags)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
index        Node or element number

OUTPUT ARGUMENTS

flags        Node or element edge or face flags.

ERRORS

SYS_ERROR_VALUE is generated if an improper index is specified.

DESCRIPTION

If the slave entity type is node then index must be a node index, otherwise it is an element index. If it is a node index, then flags will be returned set to 1 if the node has been specified as a slave node, otherwise it is returned as 0. If it is an element index then flags is set to the edge or face flags.


Table of Contents , CPair

NAME

vis_CPairSlaveNode - query slave node area

C SPECIFICATION

void vis_CPairSlaveNode (vis_CPair *cpair,
                         Vint index,
                         Vfloat *area)

void vis_CPairSlaveNodedv (vis_CPair *cpair,
                           Vint index,
                           Vdouble *area)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
index        Node index

OUTPUT ARGUMENTS

area         Node area

ERRORS

SYS_ERROR_VALUE is generated if an improper index is specified.

DESCRIPTION

Return slave node area. If the slave node has not been specified then area is returned as zero.


Table of Contents , CPair

NAME

vis_CPairSlaveNodeMaster - get slave node master contacts

C SPECIFICATION

void vis_CPairSlaveNodeMaster (vis_CPair *cpair,
                               Vint index,
                               Vint *ix,
                               Vint *no)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
index        Node index

OUTPUT ARGUMENTS

ix           Element number
no           Element face or edge number

ERRORS

SYS_ERROR_VALUE is generated if an improper index is specified.

DESCRIPTION

Return the master element contacting slave node index. If no master element is found then ix and no are set to zero. The CPAIR_POSITIONTOL is queried and if specified is used to filter out any master element which is greater that the specified distance from the slave node. Otherwise the closest master element to the slave node is returned.


Table of Contents , CPair

NAME

vis_CPairSetObject - set pointers to attribute objects.

C SPECIFICATION

void vis_CPairSetObject (vis_CPair *cpair,
                         Vint objecttype,
                         Vobject *object)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
objecttype   The name of the object type to be set.
             =VIS_GRIDFUN            GridFun object
object       Pointer to the object to be set.

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_OBJECTTYPE is generated if an improper objecttype is specified.

DESCRIPTION

Set a pointer to an attribute object.


Table of Contents , CPair

NAME

vis_CPairSetMaster - set master element entity

C SPECIFICATION

void vis_CPairSetMaster (vis_CPair *cpair,
                         Vint index,
                         Vint no)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
index        Element index
no           Element edge or face number

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_VALUE is generated if an improper index or no is specified.

DESCRIPTION

Set master element index and face or edge number, no.


Table of Contents , CPair

NAME

vis_CPairSetMasterASurf - set master analytic surface

C SPECIFICATION

void vis_CPairSetMasterASurf (vis_CPair *cpair,
                              Vint asid)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
asid         Analytic surface index

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_VALUE is generated if an improper index or no is specified.

DESCRIPTION

Set master analytic surface asid.

Inquire of master analytic surface asid as an output argument using

     void vis_CPairMasterASurf (vis_CPair *cpair,
                                Vint *asid)


Table of Contents , CPair

NAME

vis_CPairSetSlaveElem - set slave element entity

C SPECIFICATION

void vis_CPairSetSlaveElem (vis_CPair *cpair,
                            Vint index,
                            Vint no)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
index        Element index
no           Element edge or face number

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_VALUE is generated if an improper index or no is specified.

DESCRIPTION

Set slave element index and face or edge number, no.


Table of Contents , CPair

NAME

vis_CPairSetSlaveNode - set slave node entity and area

C SPECIFICATION

void vis_CPairSetSlaveNode (vis_CPair *cpair,
                            Vint index,
                            Vfloat area)

void vis_CPairSetSlaveNodedv (vis_CPair *cpair,
                              Vint index,
                              Vdouble area)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
index        Node index
area         Node area

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_VALUE is generated if an improper index is specified.

DESCRIPTION

Set slave node index and area.


Table of Contents , CPair

NAME

vis_CPairSetValuei - set integer property

C SPECIFICATION

void vis_CPairSetValuei (vis_CPair *cpair,
                         Vint type,
                         Vint ivalue)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
type         Property type
             =CPAIR_CID               Cyclic cylindrical system Id
             =CPAIR_PID               Property Id
             =CPAIR_NUMSECTOR         Number of cyclic sectors
             =CPAIR_SMALLSLIDING      Small sliding option
             =CPAIR_SYMMETRIC         Symmetric contact option
             =CPAIR_SURFTOSURF        Surface to surface technology
ivalue       Property value

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified. SYS_ERROR_OPERATION is generated if a non integer valued type is specified.

DESCRIPTION

Set an integer valued property. Use vis_CPairValueInteger to return integer valued properties.


Table of Contents , CPair

NAME

vis_CPairSetValuef - set real valued property

C SPECIFICATION

void vis_CPairSetValuef (vis_CPair *cpair,
                         Vint type,
                         Vfloat rvalue)

void vis_CPairSetValued (vis_CPair *cpair,
                         Vint type,
                         Vdouble rvalue)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
type         Property type
             =CPAIR_ADJUST            Adjust zone distance
             =CPAIR_SMOOTH            Smooth factor
             =CPAIR_HCRIT             HCrit factor
             =CPAIR_EXTENSIONZONE     Extension zone factor
             =CPAIR_POSITIONTOL       Position tolerance
rvalue       Property value

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified. SYS_ERROR_OPERATION is generated if a non real valued type is specified.

DESCRIPTION

Set a real valued property. Use vis_CPairValueFloat or vis_CPairValueDouble to return real valued properties.


Table of Contents , CPair

NAME

vis_CPairValueFlag - query property type defined

C SPECIFICATION

void vis_CPairValueFlag (vis_CPair *cpair,
                         Vint type,
                         Vint *flag)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
type         Property type

OUTPUT ARGUMENTS

flag         Flag indicating if property type defined or not
             =CPAIR_UNDEFINED         Property value not defined
             =CPAIR_VALUE             Property real value defined

ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified.

DESCRIPTION

Query for property definition. If a property value is not defined, CPAIR_UNDEFINED is returned, if the property has been defined by value then CPAIR_VALUE is returned.


Table of Contents , CPair

NAME

vis_CPairValueType - query property types

C SPECIFICATION

void vis_CPairValueType (vis_CPair *cpair,
                         Vint *ntypes,
                         Vint type[])

INPUT ARGUMENTS

cpair        Pointer to CPair object.

OUTPUT ARGUMENTS

ntypes       Number of types of property values
type         Array of property types

DESCRIPTION

Return number of property types, ntypes, and types, type, of all defined property types. The maximum number of types which may be returned is CPAIR_MAX.


Table of Contents , CPair

NAME

vis_CPairValueParams - query property parameters

C SPECIFICATION

void vis_CPairValueParams (vis_CPair *cpair,
                           Vint type,
                           Vint *nval,
                           Vint *dtyp)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
type         Property type

OUTPUT ARGUMENTS

nval         Number of components
dtyp         Data type
             =SYS_CHAR     Character
             =SYS_INTEGER  Integer
             =SYS_FLOAT    Float

ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified.

DESCRIPTION

Query for the number of components and the data type associated with a property type.


Table of Contents , CPair

NAME

vis_CPairValueName - query property name

C SPECIFICATION

void vis_CPairValueName (vis_CPair *cpair,
                         Vint type,
                         Vchar name[])

INPUT ARGUMENTS

cpair        Pointer to CPair object.
type         Property type

OUTPUT ARGUMENTS

name         Property name

ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified.

DESCRIPTION

Query for the built-in name associated with a property type. The character string will not exceed 64 characters including the terminating NULL character.


Table of Contents , CPair

NAME

vis_CPairValueInteger - query property integer value

C SPECIFICATION

void vis_CPairValueInteger (vis_CPair *cpair,
                            Vint type,
                            Vint iparam[])

INPUT ARGUMENTS

cpair        Pointer to CPair object.
type         Property type

OUTPUT ARGUMENTS

iparam       Integer property.

ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified. specified.

DESCRIPTION

Return a defined integer valued property. If the value has not been defined or the value type is not integer, nothing is returned.


Table of Contents , CPair

NAME

vis_CPairValueFloat - query property float value

C SPECIFICATION

void vis_CPairValueFloat (vis_CPair *cpair,
                          Vint type,
                          Vfloat fparam[])

INPUT ARGUMENTS

cpair        Pointer to CPair object.
type         Property type

OUTPUT ARGUMENTS

fparam       Float property.

ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified.

DESCRIPTION

Return a defined real valued property as float. The number of values returned is equal to the number of components associated with the specified type. If the value has not been defined or the value type is not real, nothing is returned.


Table of Contents , CPair

NAME

vis_CPairValueDouble - query property double value

C SPECIFICATION

void vis_CPairValueDouble (vis_CPair *cpair,
                           Vint type,
                           Vdouble dparam[])

INPUT ARGUMENTS

cpair        Pointer to CPair object.
type         Property type

OUTPUT ARGUMENTS

dparam       Double property.

ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified. specified.

DESCRIPTION

Return a defined real valued property as double. The number of values returned is equal to the number of components associated with the specified type. If the value has not been defined or the value type is not real, nothing is returned.


Table of Contents , CPair

NAME

vis_CPairEdgeIdTran - edge list of master or slave elements

C SPECIFICATION

void vis_CPairEdgeIdTran (vis_CPair *cpair,
                          Vint oper,
                          vis_IdTran *idtran)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
oper         Surface type
             =CPAIR_MASTER            Master surface
             =CPAIR_SLAVE             Slave surface

OUTPUT ARGUMENTS

idtran       Pointer to derived IdTran object of element edges.

ERRORS

VIS_ERROR_ENUM is generated if an improper oper is specified.

DESCRIPTION

Derive a list of element edges which have been defined as a master or slave surface. Note that idtran is not cleared by this function, the derived element edge entities are added to any existing element edges in the output idtran.


Table of Contents , CPair

NAME

vis_CPairFaceIdTran - face list of master or slave elements

C SPECIFICATION

void vis_CPairFaceIdTran (vis_CPair *cpair,
                          Vint oper,
                          vis_IdTran *idtran)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
oper         Surface type
             =CPAIR_MASTER            Master surface
             =CPAIR_SLAVE             Slave surface

OUTPUT ARGUMENTS

idtran       Pointer to derived IdTran object of element faces.

ERRORS

VIS_ERROR_ENUM is generated if an improper oper is specified.

DESCRIPTION

Derive a list of element faces which have been defined as a master or slave surface.

Note that idtran is not cleared by this function, the derived element face entities are added to any existing element faces in the output idtran.


Table of Contents , CPair

NAME

vis_CPairNodeIdTran - node idtran of slave nodes

C SPECIFICATION

void vis_CPairNodeIdTran (vis_CPair *cpair,
                          vis_IdTran *idtran)

INPUT ARGUMENTS

cpair        Pointer to CPair object.

OUTPUT ARGUMENTS

idtran       Pointer to derived IdTran object of nodes

DESCRIPTION

Derive a list of nodes which have been defined as a slave surface.

Note that idtran is not cleared by this function, the derived node entities are added to any existing node in the output idtran.


Table of Contents , CPair

NAME

vis_CPairSpecFlag - query any master or slave specifications

C SPECIFICATION

void vis_CPairSpecFlag (vis_CPair *cpair,
                        Vint *flag)

INPUT ARGUMENTS

cpair        Pointer to CPair object.

OUTPUT ARGUMENTS

flag         Flag indicating if any master or slave set

DESCRIPTION

Query if any master or slave specifications of any type have been made. The return value, flag, will be zero only if no masters or slaves have been specified of any type.


Table of Contents , CPair

NAME

vis_CPairSetName - set name string

C SPECIFICATION

void vis_CPairSetName (vis_CPair *cpair,
                       Vchar *name)

INPUT ARGUMENTS

cpair        Pointer to CPair object.
name         Name string

OUTPUT ARGUMENTS

None

DESCRIPTION

Set a name string. The name string can contain up to 81 characters including the terminating NULL. If the name is not specified it is returned as a single NULL character using vis_CPairGetName.

Get name as an output argument.

     void vis_CPairGetName (const vis_CPair *cpair,
                            Vchar name[])


Table of Contents

22.3 Analytic Surface - ASurf

The ASurf module manages an analytic surface. An analytic surface is defined by its shape and parameters. For example, a spherical surface is defined by its center and radius. ASurf allows for the definition of ruled surfaces, surfaces of revolution, standard geometric shapes such as a sphere, faceted surfaces and surfaces defined by trimmed NURBS.

The functions associated with a ASurf object are the following.

Instance an ASurf object initially using vis_ASurfBegin. Specify the surface type using vis_ASurfDef. Three types of surfaces can be defined: pre-defined shapes such as planes, spheres, cones and cylinders, or surfaces generated from segments or surfaces generated from collections of facets or NURBS. Parameters for pre-defined surfaces are defined using their specific functions such as vis_ASurfSetPlane, vis_ASurfSetSphere, or vis_ASurfSetCylinder.

Surfaces created from segments are defined in two steps. First, a curve profile must be defined in the x-y plane. Then the surface is defined from the two-dimensional profile by either extruding it about an axis - a ruled surface - or by revolving it about an axis - a surface of revolution. Profile points are defined with vis_ASurfSetPoint. Segments are defined with vis_ASurfSetSegment. Supported segment types are a straight line (ASURF_SEG_LINE), an circular arc (ASURF_SEG_ARC), or a parabola (ASURF_SEG_PARAB).

Once the profile is defined a ruled surface is created with vis_ASurfSetSegmentRule. A surface of revolution is created with vis_ASurfSetSegmentRev. A fillet radius can be defined on the two-dimensional profile using vis_ASurfSetSegmentFillet.

The functions vis_ASurfSetSegmentRule, vis_ASurfSetSegmentRev, vis_ASurfSetPlane, vis_ASurfSetBox, vis_ASurfSetCone, and vis_ASurfSetCylinder all require three points, a, b, and c, in addition to parameters that are specific to each of them. These three points define a local coordinate system as follows: the local x direction is given by the vector a-b; the vector a-c lies in the local x-y plane so that the local z-direction is given by the cross product a-b X a-c.

Surfaces which are defined as a collection of facets or NURBS require the defining points in 3D space to be input using vis_ASurfSetPoint. Facets are defined using vis_ASurfSetFacet and may be linear or parabolic triangles or quadrilaterls. NURBS surfaces are defined using vis_ASurfSetNURBS with optional trimming loops defined by vis_ASurfSetNURBSTrim. Query functions exist to return the number of facets or NURBS defined and the individual facet and NURBS definitions.

Table of Contents

22.4 Function Descriptions

The currently available ASurf functions are described in detail in this section.


Table of Contents , ASurf

NAME

*vis_ASurfBegin - create an instance of a ASurf object

C SPECIFICATION

vis_ASurf *vis_ASurfBegin ()

ARGUMENTS

None

FUNCTION RETURN VALUE

The function returns a pointer to the newly created ASurf object. If the object creation fails, NULL is returned.

DESCRIPTION

Create an instance of a ASurf object. Memory is allocated for the object private data and the pointer to the data is returned.

Destroy an instance of a ASurf object using

     void vis_ASurfEnd (vis_ASurf *asurf)

Return the current value of a ASurf object error flag using

     Vint vis_ASurfError (vis_ASurf *asurf)


Table of Contents , ASurf

NAME

vis_ASurfDef - define surface type

C SPECIFICATION

void vis_ASurfDef (vis_CPair *cpair,
                   Vint type)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
type         Surface type
             =ASURF_SEGMENT       Two-dimensional segmented surface
             =ASURF_SEGMENT_RULE  Segmented ruled surface
             =ASURF_SEGMENT_REV   Segmented surface of revolution
             =ASURF_PLANE         Planar surface
             =ASURF_BOX           Box surface
             =ASURF_SPHERE        Spherical surface
             =ASURF_CYLINDER      Cylindrical surface
             =ASURF_CONE          Conical surface
             =ASURF_FACET         Facetted surface
             =ASURF_NURBS         NURBS surface

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified.

DESCRIPTION

Set the surface type. Segmented, facetted and NURBS types require points defined with vis_ASurfSetPoint and specific surface definitions defined by vis_ASurfSetSegment, vis_ASurfSetFacet and vis_ASurfSetNURBS respectively. All other surfaces only require the parameters defined by their own functions.

Inquire of defined type as output argument using

     void vis_ASurfInq (vis_ASurf *asurf,
                        Vint *type)


Table of Contents , ASurf

NAME

vis_ASurfSetName - set name string

C SPECIFICATION

void vis_ASurfSetName (vis_ASurf *asurf,
                       Vchar name[])

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
name         String with surface name

OUTPUT ARGUMENTS

None

ERRORS

None

DESCRIPTION

Attach a name to the surface.

Inquire of specified name as an output argument using

     void vis_ASurfGetName (vis_ASurf *asurf,
                            Vchar name[])


Table of Contents , ASurf

NAME

vis_ASurfSetPoint - set segment or NURBS point

C SPECIFICATION

void vis_ASurfSetPoint (vis_ASurf *asurf,
                        Vint id,
                        Vfloat x[3])

void vis_ASurfSetPointdv (vis_ASurf *asurf,
                          Vint id,
                          Vdouble x[3])

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
id           Point id
x            Point coordinates

OUTPUT ARGUMENTS

None

ERRORS

A SYS_ERROR_OPERATION is generated if points are not defined in ascending order in increments of 1.

DESCRIPTION

Specify the location of a point in the two-dimensional segmented profile or NURBS. For segments Only the first two coordinates are used.

Inquire of specified x as an output argument using

     void vis_ASurfGetPoint (vis_ASurf *asurf,
                             Vint id
                             Vfloat x[3])

     void vis_ASurfGetPointdv (vis_ASurf *asurf,
                               Vint id
                               Vdouble x[3])


Table of Contents , ASurf

NAME

vis_ASurfNumPoints - query number of points

C SPECIFICATION

void vis_ASurfNumPoints (vis_ASurf *asurf,
                         Vint *numpnt)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.

OUTPUT ARGUMENTS

numpnt       Number of defined points

ERRORS

None

DESCRIPTION

Query for the number of points defined with vis_ASurfSetPoint.


Table of Contents , ASurf

NAME

vis_ASurfSetSegment - set segment type and connectivity

C SPECIFICATION

void vis_ASurfSetSegment (vis_ASurf *asurf,
                          Vint id,
                          Vint type,
                          Vint ix[])

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
id           Segment id
type         Segment type
             =ASURF_SEG_LINE  Straight line
             =ASURF_SEG_ARC   Circular arc
             =ASURF_SEG_PARAB Parabolic line
ix           Segment connectivity

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_ENUM is generated if an invalid type is entered.

DESCRIPTION

Specify the type and connectivity for each segment in the two-dimensional profile. A segment of type ASURF_SEG_LINE requires two point ids in the connectivity array ix. ASURF_SEG_ARC requires three point ids: the first point, the center of the circular arc, and the end point. Finally, the parabolic segment requires three point ids: the first, a middle point, and the last point.

Inquire of specified type and connectivity ix as an output argument using

     void vis_ASurfGetSegment (vis_ASurf *asurf,
                               Vint id
                               Vint *type,
                               Vint ix[])


Table of Contents , ASurf

NAME

vis_ASurfNumSegments - query number of segments

C SPECIFICATION

void vis_ASurfNumSegments (vis_ASurf *asurf,
                           Vint *numseg)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.

OUTPUT ARGUMENTS

numseg       Number of defined segments

ERRORS

None

DESCRIPTION

Query for the number of profile segments defined with vis_ASurfSetSegment.


Table of Contents , ASurf

NAME

vis_ASurfSetSegmentRule - set ruled surface direction

C SPECIFICATION

void vis_ASurfSetSegmentRule (vis_ASurf *asurf,
                              Vfloat a[3],
                              Vfloat b[3],
                              Vfloat c[3])

void vis_ASurfSetSegmentRuledv (vis_ASurf *asurf,
                                Vdouble a[3],
                                Vdouble b[3],
                                Vdouble c[3])

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
a            Origin of local coordinate system
b            Point such that a-b defines the local x-axis
c            Point such that a-c defines a vector in the local x-y plane

OUTPUT ARGUMENTS

NONE

ERRORS

SYS_ERROR_OPERATION is generated if a-b is parallel to a-c.

DESCRIPTION

Sets the local coordinate system information for a ruled surface. The ruled surface extrudes the planar profile in the z-direction.

Inquire of specified a, b, and c points for a ruled surface using

     void vis_ASurfGetSegmentRule (vis_ASurf *asurf,
                                   Vfloat a[3],
                                   Vfloat b[3],
                                   Vfloat c[3])

     void vis_ASurfGetSegmentRuledv (vis_ASurf *asurf,
                                     Vdouble a[3],
                                     Vdouble b[3],
                                     Vdouble c[3])


Table of Contents , ASurf

NAME

vis_ASurfSetSegmentRev - set surface of revolution direction

C SPECIFICATION

void vis_ASurfSetSegmentRev (vis_ASurf *asurf,
                             Vfloat a[3],
                             Vfloat b[3],
                             Vfloat c[3])
void vis_ASurfSetSegmentRevdv (vis_ASurf *asurf,
                               Vdouble a[3],
                               Vdouble b[3],
                               Vdouble c[3])

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
a            Origin of local coordinate system
b            Point such that a-b defines the local x-axis
c            Point such that a-c defines a vector in the local x-y plane

OUTPUT ARGUMENTS

NONE

ERRORS

SYS_ERROR_OPERATION is generated if a-b is parallel to a-c.

DESCRIPTION

Sets the local coordinate system information for a surface of revolution. The revolution is about the z-direction.

Inquire of specified a, b, and c points for a surface of revolution using

     void vis_ASurfGetSegmentRev (vis_ASurf *asurf,
                                  Vfloat a[3],
                                  Vfloat b[3],
                                  Vfloat c[3])

     void vis_ASurfGetSegmentRevdv (vis_ASurf *asurf,
                                    Vdouble a[3],
                                    Vdouble b[3],
                                    Vdouble c[3])


Table of Contents , ASurf

NAME

vis_ASurfSetSegmentFillet - set fillet radius

C SPECIFICATION

void vis_ASurfSetSegmentFillet (vis_ASurf *asurf,
                                Vfloat r)

void vis_ASurfSetSegmentFilletdv (vis_ASurf *asurf,
                                  Vdouble r)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
r            Fillet radius

OUTPUT ARGUMENTS

None

ERRORS

None

DESCRIPTION

Sets the fillet radius to be used between two consecutive segments in the two-dimensional profile in order to generate a smoother contact surface. The revolution is about the z-direction.

Inquire of specified r using

     void vis_ASurfGetFillet (vis_ASurf *asurf,
                              Vfloat *r)

     void vis_ASurfGetFilletdv (vis_ASurf *asurf,
                                Vdouble *r)


Table of Contents , ASurf

NAME

vis_ASurfSetPlane - set planar surface parameters

C SPECIFICATION

void vis_ASurfSetPlane (vis_ASurf *asurf,
                        Vfloat a[3],
                        Vfloat b[3],
                        Vfloat c[3])
                        Vfloat length,
                        Vfloat width)

void vis_ASurfSetPlanedv (vis_ASurf *asurf,
                          Vdouble a[3],
                          Vdouble b[3],
                          Vdouble c[3])
                          Vdouble length,
                          Vdouble width)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
a            Origin of local coordinate system
b            Point such that a-b defines the local x-axis
c            Point such that a-c defines a vector in the local x-y plane
length       Length along the local x-axis
width        Length along the local y-axis

OUTPUT ARGUMENTS

NONE

ERRORS

SYS_ERROR_OPERATION is generated if a-b is parallel to a-c.

DESCRIPTION

Sets the local coordinate system information for a planar surface, as well as its dimensions, length and width, in the local x and y axes, respectively.

Inquire of specified a, b, and c points, and the dimensions length and width for a planar surface using

     void vis_ASurfGetPlane (vis_ASurf *asurf,
                             Vfloat a[3],
                             Vfloat b[3],
                             Vfloat c[3],
                             Vfloat *length,
                             Vfloat *width)

     void vis_ASurfGetPlanedv (vis_ASurf *asurf,
                               Vdouble a[3],
                               Vdouble b[3],
                               Vdouble c[3],
                               Vdouble *length,
                               Vdouble *width)


Table of Contents , ASurf

NAME

vis_ASurfSetSphere - set spherical surface parameters

C SPECIFICATION

void vis_ASurfSetSphere (vis_ASurf *asurf,
                         Vfloat c[3],
                         Vfloat r)

void vis_ASurfSetSpheredv (vis_ASurf *asurf,
                           Vdouble c[3],
                           Vdouble r)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
c            Center of sphere
r            Sphere radius

OUTPUT ARGUMENTS

NONE

ERRORS

NONE

DESCRIPTION

Defines the center and the radius of a spherical surface.

Inquire of specified c and r using

     void vis_ASurfGetSphere (vis_ASurf *asurf,
                              Vfloat c[3],
                              Vfloat *r)

     void vis_ASurfGetSpheredv (vis_ASurf *asurf,
                                Vdouble c[3],
                                Vdouble *r)


Table of Contents , ASurf

NAME

vis_ASurfSetBox - set box surface parameters

C SPECIFICATION

void vis_ASurfSetBox (vis_ASurf *asurf,
                      Vfloat a[3],
                      Vfloat b[3],
                      Vfloat c[3])
                      Vfloat length,
                      Vfloat width,
                      Vfloat height)

void vis_ASurfSetBoxdv (vis_ASurf *asurf,
                        Vdouble a[3],
                        Vdouble b[3],
                        Vdouble c[3])
                        Vdouble length,
                        Vdouble width,
                        Vdouble height)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
a            Origin of local coordinate system
b            Point such that a-b defines the local x-axis
c            Point such that a-c defines a vector in the local x-y plane
length       Length along the local x-axis
width        Length along the local y-axis
height       Length along the local z-axis

OUTPUT ARGUMENTS

NONE

ERRORS

SYS_ERROR_OPERATION is generated if a-b is parallel to a-c.

DESCRIPTION

Sets the local coordinate system information for a box surface, as well as its dimensions, length, width, and height, in the local x, y, and z axes, respectively.

Inquire of specified a, b, and c points, and the dimensions length, width, and height for a box surface using

     void vis_ASurfGetBox (vis_ASurf *asurf,
                           Vfloat a[3],
                           Vfloat b[3],
                           Vfloat c[3],
                           Vfloat *length,
                           Vfloat *width,
                           Vfloat *height)

     void vis_ASurfGetBoxdv (vis_ASurf *asurf,
                             Vdouble a[3],
                             Vdouble b[3],
                             Vdouble c[3],
                             Vdouble *length,
                             Vdouble *width,
                             Vdouble *height)


Table of Contents , ASurf

NAME

vis_ASurfSetCone - set conical surface parameters

C SPECIFICATION

void vis_ASurfSetCone (vis_ASurf *asurf,
                       Vfloat a[3],
                       Vfloat b[3],
                       Vfloat c[3])
                       Vfloat r1, Vfloat r2,
                       Vfloat height)
void vis_ASurfSetConedv (vis_ASurf *asurf,
                         Vdouble a[3],
                         Vdouble b[3],
                         Vdouble c[3],
                         Vdouble r1, Vdouble r2,
                         Vdouble height)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
a            Origin of local coordinate system
b            Point such that a-b defines the local x-axis
c            Point such that a-c defines a vector in the local x-y plane
r1           Cone radius at origin
r2           Cone radius at height
height       Cone height along local z-axis

OUTPUT ARGUMENTS

NONE

ERRORS

SYS_ERROR_OPERATION is generated if a-b is parallel to a-c.

DESCRIPTION

Sets the local coordinate system information for a conical surface, as well as the cone radii, r1 and r2 and height. The axis of the cone is aligned with the local z-axis. The cone height dimension is along the cone axis.

Inquire of specified a, b, and c points, and the radii r1, r2 and height using

     void vis_ASurfGetCone (vis_ASurf *asurf,
                            Vfloat a[3],
                            Vfloat b[3],
                            Vfloat c[3],
                            Vfloat *r1, Vfloat *r2,
                            Vfloat *height)
     void vis_ASurfGetConedv (vis_ASurf *asurf,
                              Vdouble a[3],
                              Vdouble b[3],
                              Vdouble c[3],
                              Vfloat *r1, Vfloat *r2,
                              Vdouble *height)


Table of Contents , ASurf

NAME

vis_ASurfSetCylinder - set cylindrical surface parameters

C SPECIFICATION

void vis_ASurfSetCylinder (vis_ASurf *asurf,
                           Vfloat a[3],
                           Vfloat b[3],
                           Vfloat c[3])
                           Vfloat radius,
                           Vfloat height)
void vis_ASurfSetCylinderdv (vis_ASurf *asurf,
                             Vdouble a[3],
                             Vdouble b[3],
                             Vdouble c[3],
                             Vdouble radius,
                             Vdouble height)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
a            Origin of local coordinate system
b            Point such that a-b defines the local x-axis
c            Point such that a-c defines a vector in the local x-y plane
radius       Cylinder radius
height       Cylinder height along z-axis

OUTPUT ARGUMENTS

NONE

ERRORS

SYS_ERROR_OPERATION is generated if a-b is parallel to a-c.

DESCRIPTION

Sets the local coordinate system information for a cylindrical surface, as well as the cylinder radius and height. The axis of the cylinder is aligned with the local z-axis.

Inquire of specified a, b, and c points, and the radius and height using

     void vis_ASurfGetCylinder (vis_ASurf *asurf,
                                Vfloat a[3],
                                Vfloat b[3],
                                Vfloat c[3],
                                Vfloat *radius,
                                Vfloat *height)
     void vis_ASurfGetCylinderdv (vis_ASurf *asurf,
                                  Vdouble a[3],
                                  Vdouble b[3],
                                  Vdouble c[3],
                                  Vdouble *radius,
                                  Vdouble *height)


Table of Contents , ASurf

NAME

vis_ASurfSetFacet - set facet type and connectivity

C SPECIFICATION

void vis_ASurfSetFacet (vis_ASurf *asurf,
                        Vint id,
                        Vint type,
                        Vint ix[])

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
id           Facet id
type         Facet type
             =ASURF_FACET_TRI       Linear triangle
             =ASURF_FACET_PARATRI   Parabolic triangle
             =ASURF_FACET_QUAD      Linear quadrilateral
             =ASURF_FACET_QUADTRI   Parabolic quadrilateral
ix           Facet connectivity

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_ENUM is generated if an invalid type is entered.

DESCRIPTION

Specify the type and connectivity for each facet. The connectivity rules are identical to linear and parabolic Serendipity triangle and quadrilateral elements.

Inquire of specified type and connectivity ix as an output argument using

     void vis_ASurfGetFacet (vis_ASurf *asurf,
                             Vint id
                             Vint *type,
                             Vint ix[])


Table of Contents , ASurf

NAME

vis_ASurfNumFacets - query number of facets

C SPECIFICATION

void vis_ASurfNumFacets (vis_ASurf *asurf,
                         Vint *numfacet)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.

OUTPUT ARGUMENTS

numfacet     Number of defined facets

ERRORS

None

DESCRIPTION

Query for the number of facets defined with vis_ASurfSetFacet.


Table of Contents , ASurf

NAME

vis_ASurfSetNURBS - set NURBS surface

C SPECIFICATION

void vis_ASurfSetNURBS (vis_ASurf *asurf,
                        Vint id,
                        Vint type,
                        Vint nptu,
                        Vint nordu,
                        Vint nptv,
                        Vint nordv,
                        Vint ix[],
                        Vfloat homos[],
                        Vfloat knots[],
                        Vint ntrim,
                        Vint trimlist[])

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
id           NURBS id
type         NURBS type
             =ASURF_NURBS_LINE      NURBS line
             =ASURF_NURBS_SURF      NURBS surface
nptu         Number of points in u
nordu        Order in u
nptv         Number of points in v
nordv        Order in v
ix           NURBS connectivity
homo         Homogeneous weights
knots        Knot values
ntrim        Number of trimming loops
trimlist     List of trimming loops

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_ENUM is generated if an invalid type is entered.

DESCRIPTION

Specify the type, norders, connectivity, weights, knot values and trimming loops for each NURBS. If the NURBS is a line then the number of points and weights is nptu. The number of knot values is nptu+nordu. If the NURBS is a surface then the number of points and weights is nptu*nptv. The number of knot values is nptu+nordu+nptv+nordv.

Inquire of specified type, etc. as output arguments using

     void vis_ASurfGetNURBS (vis_ASurf *asurf,
                             Vint id,
                             Vint *type,
                             Vint *nptu,
                             Vint *nordu,
                             Vint *nptv,
                             Vint *nordv,
                             Vint ix[],
                             Vfloat homos[],
                             Vfloat knots[],
                             Vint *ntrim,
                             Vint trimlist[])


Table of Contents , ASurf

NAME

vis_ASurfNumNURBS - query number of NURBS

C SPECIFICATION

void vis_ASurfNumNURBS (vis_ASurf *asurf,
                        Vint *numnurbs)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.

OUTPUT ARGUMENTS

numnurbs     Number of defined NURBS

ERRORS

None

DESCRIPTION

Query for the number of NURBS defined with vis_ASurfSetNURBS.


Table of Contents , ASurf

NAME

vis_ASurfMaxNURBSOrder - get maximum NURBS order

C SPECIFICATION

void vis_ASurfMaxNURBSOrder (vis_ASurf *asurf,
                             Vint *maxord)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.

OUTPUT ARGUMENTS

maxord       Maximum order defined in a NURBS direction

ERRORS

None

DESCRIPTION

Query for the maximum order of NURBS defined in u or v direction with vis_ASurfSetNURBS.


Table of Contents , ASurf

NAME

vis_ASurfGetNURBSNum - get number of NURBS points and trim loop

C SPECIFICATION

void vis_ASurfGetNURBSNum (vis_ASurf *asurf,
                           Vint id,
                           Vint *type,
                           Vint *nptu,
                           Vint *nordu,
                           Vint *nptv,
                           Vint *nordv,
                           Vint *ntrim)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
id           NURBS id

OUTPUT ARGUMENTS

type         NURBS type
             =ASURF_NURBS_LINE      NURBS line
             =ASURF_NURBS_SURF      NURBS surface
nptu         Number of points in u
nordu        Order in u
nptv         Number of points in v
nordv        Order in v
ntrim        Number of trimming loops

ERRORS

SYS_ERROR_ENUM is generated if an invalid type is entered.

DESCRIPTION

Return the type, number of points and order and number of trimming loops for each NURBS.


Table of Contents , ASurf

NAME

vis_ASurfSetNURBSTrim - set NURBS surface trimming loop

C SPECIFICATION

void vis_ASurfSetNURBSTrim (vis_ASurf *asurf,
                            Vint id,
                            Vint npts,
                            Vint ix[])

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
id           Trimming loop id
npts         Number of points
ix           Loop connectivity

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_VALUE is generated if id entry in not in strict ascending order.

DESCRIPTION

Specify the number of points and point connectivity of a trimming loop.

Inquire of specified npts, etc. as output arguments using

     void vis_ASurfGetNURBSTrim (vis_ASurf *asurf,
                                 Vint id,
                                 Vint *npts,
                                 Vint ix[])


Table of Contents , ASurf

NAME

vis_ASurfNumNURBSTrim - query number of NURBS trimming loops

C SPECIFICATION

void vis_ASurfNumNURBSTrim (vis_ASurf *asurf,
                            Vint *numtrim)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.

OUTPUT ARGUMENTS

numtrim      Number of defined trimming loops

ERRORS

None

DESCRIPTION

Query for the number of trimming loops defined with vis_ASurfSetNURBSTrim.


Table of Contents , ASurf

NAME

vis_ASurfGetNURBSTrimNum - get number of NURBS trimming loop points

C SPECIFICATION

void vis_ASurfGetNURBSTrimNum (vis_ASurf *asurf,
                               Vint id,
                               Vint *npts)

INPUT ARGUMENTS

asurf        Pointer to ASurf object.
id           Trimming loop id

OUTPUT ARGUMENTS

npts         Number of points

ERRORS

SYS_ERROR_VALUE is generated if an invalid id is entered.

DESCRIPTION

Return the number of points in a trimming loop.