formZ SDK | 5.0 API Reference | Project | File Formats | Structured File Translator | Data Model

fz_ffmt_data_model_read_finish

Description

Completes object import. This function processes imported objects. If an error occurred during import, (err != FZRT_NOERR) this function deletes and imported objects and in the case of "Add to Project", returns the project to it's pre- import state.


If no error occurred during import, The imported objects are processed as defined by several import options. This processing includes, transforming the object as defined by the transform, formZ units and file units options; forming solids and joining faces as defined by the Composition options; splitting solids into separate objects as defined by the Separate Objects By Volume option; and performs object validity checking and repairs bad object when possible.


The objects may be further transformed by this function by passing in either a transformation matrix or a scale. If a transformation matrix is passed in, it is concatenated with the matrix derived from the transform options and the file and formZ units options. The imported objects are transformed by the concatenated matrix. If a scale is passed in, the matrix derived from the transform options and the file and formZ units options is scaled and the resulting matrix is used to transform the imported objects.


NOTE: If importing a vector image file as modeling objects, there are no units or tform options. Therefore, all units scaling and any other transform must be included in either the mat or scale parameters.

Plugin Prototype

fzrt_error_td fz_ffmt_data_model_read_finish(

fzrt_int

windex,

fz_ffmt_ref_td

ffmt_id,

fzrt_error_td

err,

fz_mat4x4_td *

mat,

const fz_xyz_td *const

scale )

Parameters

windex [Input]

project window index

ffmt_id [Input]

The file format reference id.

err [Input]

The id of the last error encountered. If not FZRT_NOERR, this function cancels the import and cleans up (deletes created objects).

mat [Input, Optional]

A 4x4 matrix to transform all imported objects by. If not NULL, this matrix is concatenated with the tform matrix (from tform opts and the units scaling). The resulting matrix is applied to all imported objects. If NULL, only the tform and units scaling are applied to all imported objects.

scale [Input, Optional]

A scale factor to scale all imported objects by. If mat is not NULL, this parameter is ignored. If not NULL, this scale is concatenated with the tform matrix and units scaling. The resulting matrix is applied to all imported objects. If NULL, only the tform and units scaling are applied to all imported objects.

Returns

FZRT_NOERR on success. An error otherwise.

Availability

5.0.0.0

Function Set

fz_ffmt_data_model_fset


Defined in

fz_ffmt_api.h