Synopsis

PDX_MSGT lpir_Read2(long option, int lint_model, char *file_name, LPIR_ENT_FUNC *func, ENTITY_LIST *ent_list)

Purpose

Read an ACIS file into an MDA ACIS model.

Description

The specified ACIS file is read into an ACIS model. If an entity list is specified, it will be used instead of the file. This module will do the following:

Calls the ACIS function api_start_modeller. This initializes the ACIS API.

It will set the SPAresabs in the ACIS model from the MODEL_SPACE_PNT_TOL in the MDA ACIS model.

It will the open the file and cycle the bodies in the file calling api_restore_entity_list.

-

If the option LPIR_BINARY_FILE is specified, it will read in an ACIS Binary File

It will then cycle the entity list of bodies.

For each body it will do the following:

-

Call the function api_flatten_body. This will get rid of the subshells in the body.

-

Call the function api_split_periodic_faces. This will split face that cross parametric seams of surfaces.

-

If the option LPIR_CONV_SPL is set this function will do the following:

o

Call the function api_convert_to_spline. This will convert all analytical faces to spline faces.

o

Call the function trim_body_faces. This will trim the spline faces.

o

If the option LPIR_CHECK_BODY is set the function will then call api_check_entity. This will perform a ACIS check on the current body.

-

If the option is LPIR_MODELLER_RUNNING set this function will do the following:

o

Will not call the ACIS api_start/end_modeller, and the ACIS intialize/terminate functions since the calling application has already done this.

-

If the option LPIR_CONV_SPL is not set this function will do the following:

o

If the option LPIR_CHECK_BODY is set the function will then call api_check_entity. This will perform a ACIS check on the current body.

-

This function will then call lpir_ProcessBody. This function will process the body into the ACIS MDA model.

The func argument specifies a function to be called for each entity as it is processed and may be set to NULL. If specified, this function must have declared as:

      PDX_MSGT foo (MDA_PTR db_ptr, void *entity, ENTITY *acis_entity)

When called, the entity with database pointer db_ptr will be locked at the address specified by entity. The function should return a value of MDA_NOERR. Changes to the acis_entity will be made permenant.

Input

option

LPIR_CONV_SPL

Convert ACIS surfaces to splines before processing.

LPIR_CHECK_BODY

Check body after call to api_split_periodic_faces, and api_convert_to_splines if the above option was also set.

LPIR_TRIM_NURB_SURF

Trim the nurb surface created when analyticals can not be handled by GDX. Only valid when LPIR_CONV_SPL is not set.

LPIR_NO_WIRE

Do not process wire bodies.

LPIR_APPLY_TRANS

Apply the transform to the ACIS BODY.

LPIR_MODELLER_RUNNING

Do not start/stop the acis modeller. It is already running from the calling application

lint_model

MDA Model to place the ACIS entities in. The model must already be allocated with mda_AllocateModel.

file_name

Name of the file to be read.

func

Function to be invoked for each entity or NULL

ent_list

Entity list to process instead of a file or NULL

Output

none

Tolerances

      MODEL_SPACE_PNT_TOL
      .fi

Return

      LPIR_NOERR
      Low level error return
      .fi