.. role:: blue :class: blue IConvertorProperty3D Converter Property ======================================== .. _IConvertorProperty3D_Converter_Property_: .. версия ядра: 118061 The :blue:`IConvertorProperty3D` converter property is one of the parameters of data exchange methods. Since the same :blue:`IConvertorProperty3D` interface is used to control the operation of converters for all formats, it contains both methods common to all formats and methods specific to a particular format. In addition, the set of data that controls the operation of export and import differs. The methods that are called when exporting to any format are responsible for providing a number of information about the document as a whole, about the coordinate system relative to which the geometric model should be oriented, and also request whether the exchange format objects should be forcibly transformed so that their shape and relative position are preserved, but only right-handed coordinate systems and the scale factor of length units are used, by which all linear dimensions are multiplied during export: .. code-block:: cpp bool GetPropertyString( MbeConverterStrings nString, std::string & propertyString ); MbPlacement3D GetOriginLocation(); bool ReplaceLocationsToRight() (for formats with left-handed coordinate systems); double LengthUnitsFactor(). The method .. code-block:: cpp void SetIoPermission( MbeIOPermiss nPermission, bool setF ) allows setting a filter for the transferred objects. The method that is called when importing from any format and is used to request the scale factor of length units in the user model, by which all linear dimensions are multiplied: .. code-block:: cpp double AppLengthUnitsFactor(); The method that is called when importing from the STEP format and is used to control the import of instance attributes: .. code-block:: cpp virtual bool ImportInstanceAttributes() const { return true; } The method that is called when importing from SAT, X_T, X_B, STEP and IGES formats, as well as when importing proprietary formats through plugins, provides a prohibition or permission for automatic stitching of individual surfaces into solids and specifies the stitching precision: .. code-block:: cpp bool EnableAutoStitch( double& stitchPrecision ); When importing from IGES and SAT, a method is called that allows or prohibits the converter from accessing the requester: .. code-block:: cpp bool CanShowMessages(); When exporting to STL, a method is called that determines whether the data will be provided in text or binary form: .. code-block:: cpp bool IsFileAscii(); When exporting to STEP, a method is called that has a default implementation and is used to specify the text representation in annotation elements and the STEP application protocol that will be used: .. code-block:: cpp eTextForm GetAnnotationTextRepresentation(); When exporting to IGES, a method is called that determines whether topology information will be exported: .. code-block:: cpp bool IsOutOnlySurfaces(); When exporting to polygonal formats (STL and VRML), methods are called that have a default implementation and control the parameters of triangulation calculation: .. code-block:: cpp MbStepData TesselationParameters(); bool DualSeams(); void DualSeams( bool dSeams ); When exporting to STEP and SAT, a method is called that has a default implementation and returns the format version. To specify the version, it is recommended to use predefined values. .. code-block:: cpp long int GetFormatVersion(); When exporting to the ACIS format, the method that has a default implementation and controls the removal of seams from loops is called: .. code-block:: cpp virtual bool ExportWithSeamRemoval() const { return false; } The method .. code-block:: cpp virtual bool ImportMeshesWithTopology() imports polygonal objects as objects with topological information. The method .. code-block:: cpp virtual bool RepairInconsistentMesh( MbRepairInconsistentMeshParams & ) enables post-processing of meshes. The C3D geometric kernel provides a standard implementation of the :blue:`IConvertorProperty3D` interface. The :blue:`ConvConvertorProperty3D` class represents the standard implementation of the converter property. The property inherits the interface of the :blue:`IConvertorProperty3D` class. In its publicly accessible fields, the :blue:`ConvConvertorProperty3D` class stores the following information: - **fileName** -- the path to the exchange format file (by default an empty string); - **fileASCII** -- the flag for export to a text file STL (by default true); - **formatVersion** -- the format version during export (by default EXPORT_DEFAULT); - **exportIGESTopology** -- the flag for exporting topology to IGES format (by default true); - **ioPermission** -- the object filter by types (provides permission to export and import objects of any type); - **propertyStrings** -- special information about the document (an empty container); - **annotTextReprSTEP** -- the text representation of annotation elements (by default exf_TextOnly); - **originLocation** -- the local coordinate system of the model; - **enableAutostitch** -- the flag for enabling auto-stitching when importing a model (by default true); - **autostitchPrecision** -- the precision of face stitching (by default 0.3); - **tesseleationStepData** -- the triangulation parameters; - **showMessages** -- the control of accessing the requester (by default false); - **dualSeams** -- the flag for preserving coincident seam points (for STL and VRML converter); - **lengthUnitsFactor** -- the scale factor of length units during import and export; - **appUnitsFactor** -- the scale factor of length units of the user application model; - **logRecords** -- the container of messages for the user during import/export. The :blue:`IConvertorProperty3D` interface and the :blue:`ConvConvertorProperty3D` class are declared in the *conv_exchange_settings.h* file. **Character Encoding Transformation** The :blue:`IC3DCharEncodingTransformer` interface is responsible for character encoding transformation, the implementation of which is returned by the :blue:`GetUserCharEncodingTransformer`\() method. The method has standard implementations: - IC3DCharEncodingTransformerUTF8 - transformation according to utf-8 rules; - IC3DCharEncodingTransformerWindows1251 – transformation corresponding to cp-1251 encoding (Windows Cyrillic); - C3DCharEncodingTransformerLocale - transformation according to the specified localization rules; - IC3DCharEncodingTransformerStep - transformation according to STEP notation. If the transformation is not explicitly specified, then for the STEP format the :blue:`IC3DCharEncodingTransformerStep` transformation is used by default, and for other formats :blue:`C3DCharEncodingTransformerLocale`.