Creating a Solid from User Objects

The ImportSolid() function is intended for creating a solid from data stored in a custom object container ObContainer. The function constructs the imported solid solid based on a set of ob-structures describing solid geometry and topology and returns an operation completion code of type MbeConvResType. The function signature is as follows:

CONV_FUNC( MbeConvResType ) ImportSolid( c3d::SolidSPtr &                   solid,
                                         std::shared_ptr<ObContainer const> obContainer,
                                         IConvertorProperty3D *             prop,
                                         IProgressIndicator *               indicator = nullptr );

Function parameters:

solid – the imported solid body created from the data stored in the container;

obContainer – the custom object container ObContainer;

prop – a pointer to the converter properties interface implementation IConvertorProperty3D;

indicator – a pointer to the process progress indicator IProgressIndicator (can be nullptr if progress tracking is not required).

The ObContainer container is filled with user data represented by a set of ob-structures describing solid geometry and topology. After it is filled, the container is passed to the ImportSolid() function, which creates a solid model from the source data. The function fixes some typical errors specific to import from various formats and also performs stitching and merging of similar faces; the behavior is configured in the standard way through IConvertorProperty3D.

If questions or errors arise on the user side when using this functionality, the source data can be transferred to the technical support team as a debug text file generated by the ObContainer::WriteIntoFile() method.