# Synopsis

PDX_MSGT s041_CreateRprCnt(long option, int gmrpcn_coor_space_dim, char *rprcnt_cnt_id, char *rprcnt_cnt_type, int len_units, int plane_ang_units, int solid_ang_units, double len_uncertainty, int step_model, MDA_PTR *rprcnt_ptr)

# Purpose

Create a STEP (part 41) representation_context entity.

# Description

Create the context for a shape representation. This includes the representation_context and all the related unit and uncertainty entities (geometric_representation_context, global_unit_assigned_context and global_uncertainty_assigned_context). Note that the uncertainty creation is optional. See the len_uncertainty parameter description.

Following is an example physical file format of the entities created: .RS 3 .nf #102=(NAMED_UNIT($)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); #103=DIMENSIONAL_EXPONENTS(0.0,0.0,0.0,0.0,0.0,0.0,0.0); #104=PLANE_ANGLE_MEASURE_WITH_UNIT(MEASURE_VALUE( PLANE_ANGLE_MEASURE(0.017453292500000)),#102); #108=(CONVERSION_BASED_UNIT('DEGREE',#104) NAMED_UNIT(#103) PLANE_ANGLE_UNIT());

#112=(NAMED_UNIT($)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); #116=(LENGTH_UNIT()NAMED_UNIT($)SI_UNIT(.CENTI.,.METRE.)); #117=DIMENSIONAL_EXPONENTS(1.0,0.0,0.0,0.0,0.0,0.0,0.0); #118=LENGTH_MEASURE_WITH_UNIT(MEASURE_VALUE( LENGTH_MEASURE(2.540000000000000)),#116); #122=(CONVERSION_BASED_UNIT('INCH',#118) LENGTH_UNIT() NAMED_UNIT(#117)); #123=UNCERTAINTY_MEASURE_WITH_UNIT (LENGTH_MEASURE(0.001000000000000),#122,'','');

#125=(GEOMETRIC_REPRESENTATION_CONTEXT(3) GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#123)) GLOBAL_UNIT_ASSIGNED_CONTEXT((#108,#112,#122)) REPRESENTATION_CONTEXT('','3D')); .fi .RE

# Input

## option

Options (not used).

## gmrpcn_coor_space_dim

The coordinate space dimension attribute of the geometric_representation_rep. entity.

## rprcnt_cnt_id

The context_identifier attribute of the representation_context entity. If NULL is entered, then a default value will be used.

## rprcnt_cnt_type

The context_type attribute of the representation_context entity. If NULL is entered, then a default value will be used.

## len_units

Length unit code. If an invalid unit type is specified, millimeter will be created. .nf S041_INCH S041_MILLIMETER S041_FEET S041_MILE S041_METER S041_KILOMETER S041_MIL S041_MICRON S041_CENTIMETER S041_MICRO_INCH S041_HECTOMETER S041_DECAMETER S041_DECIMETER .fi

## plane_ang_units

Plane angle unit code. If an invlaid type is specified, degrees will be used. .nf S041_DEGREE S041_RADIAN .fi

## solid_ang_units

Not used at this time.

## len_uncertainty

Length uncertainty value (coincident point tol.) To suppress the creation of the uncertainty entity, pass the constant S041_NO_UNCERTAINTY, otherwise, a positive value must be supplied.

## step_model

The model number to add new entities to.

# Output

## rprcnt_ptr

Pointer to MDA_PTR of representation_context entity.

# Return

          S041_NOERR
          S041_BAD_UNIT
          S041_INTERNAL_ERR
          Other return codes.
          .fi