Synopsis
(macro) PDX_MSGT lpiw_Write(long option, char *acis_filename, int lint_model, ENTITY_LIST *&passed_ent_list, LPIW_ENT_FUNC *func)
Purpose
Format the entities in the ACIS model into a multi bodied ACIS file.
Description
This module is the user entry point to write out an ACIS save file. This will doing the following:
Opens the acis_filename for write.
Starts the ACIS modeller
Sets the ACIS version
Sets the ACIS tolerances based on the lint_model MODEL_SPACE_PNT_TOL
Sets the millimeters per model unit
Traverses the lint_model calling the function lpiw__CreatEntityList for each entity.
Cycles the lpiw__EntityList calling the function lpiw__ProcessBody to process the ACIS_BODIES to ACIS.
Calls the ACIS function api_save_entity_list with the ACIS BODY(s) on the save list.
The passed_ent_list argument is used if the passed func argument needs access to the list of entities already processed, or to add more ACIS entities the list, such as during assembly processing, when bodies are copied and rotated and translated, and have to be added to the entity list. This list is used when the ACIS file is formatted using the function api_save_entity_list.
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
LPIW_NO_PCURVES
Not create pcurves for the ACIS model.
LPIW_TRIM_NURB_SURF
Upon input it trims a nurb surface face.
LPIW_SAVE_AS_BINARY
Save ACIS File as a Binary file
LPIW_SET_ENTITY_COUNT
Set the entity count field in the header of the output file
LPIW_DO_NOT_WRITE_FILE
When passing in an entity list, do not write out the resulting ACIS file to disk
LPIW_MODELLER_RUNNING
Do not start/stop the acis modeller. It is already running from the calling application
acis_filename
Pointer to a character that is name of ACIS file to create
lint_model
ACIS model number
passed_ent_list
Reference to the list of ACIS entities.
func
Function to be invoked for each entity or NULL
Output
none
Return
LPIW_NOERR
.fi