/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef _DGN_IMPORTCOMMON_INCLUDED_ #define _DGN_IMPORTCOMMON_INCLUDED_ #define STL_USING_MAP #include #include #include #include #include #include #include #include "DgText.h" #include "OdUtilAds.h" #include "DgDimension.h" class OdDgDatabase; class OdDbDatabase; class OdDgLevelTableRecord; class OdDbLayerTableRecord; class OdDgElement; class OdDgLineStyleResource; class OdDgModel; /** \details */ namespace TD_DGN_IMPORT { /*!DOM*/ void setVisibility(OdDgGraphicsElement* src, OdDbEntity* dst); bool checkVisibility(OdDgGraphicsElement* src); void copyEntityProperties(OdDgGraphicsElement* src, OdDbEntity* dst); OdDbObjectId getDwgMaterialByDgnMaterial( const OdDgElementId& idDgnMaterial, OdDbDatabase* pDwgDb ); void applyLevelSymbologyOverrides( const OdDgElementId& idLevel, OdUInt32& uColorIndex, OdUInt32& uLineWeight, OdInt32& iLineStyleId, bool& bLineStyleIsFromLevelDatabase); OdUInt32 codePageToCharset( OdUInt32 uCodePage ); OdUInt32 getDgnElementColorIndex(OdUInt32 uBaseColorIndex, const OdDgElementId& idLevel); OdDgElementId odDgnImportGetMaterialId(OdDgGraphicsElement* src); bool odDgnImportLineStyleModifiers(const OdDgLineStyleModificationLinkage *pLStyleModLinkage, OdDgElementId ownerId, OdGiDgLinetypeModifiers &lineTypeModifiers, double &modScale); void odDgnImportSetLSModXData(OdDbEntity *pEntity, const OdGiDgLinetypeModifiers &lsMod, double lsScale); OdDb::LineWeight odDgnImportLineweightMapping(OdUInt32 mappingVal); OdString odDgnImportRscFontMapping(const OdString& strRscFontName); static double globalLinetypeScale(OdDgGraphicsElement* src); void setDwgColorByDgnIndex( OdDgDatabase* pDb, OdDbEntity* dst, OdUInt32 uColorIndex ); void setDwgColorByDgnIndex( OdDgDatabase* pDb, OdCmColor& dstClr, OdUInt32 uColorIndex ); void setDwgLineTypeIdByDgnLineTypeIndex(OdDbDatabase* pDb, OdDgDatabase* pDgnDb, OdUInt32 uDgnLineStyle, OdDbObjectId& idDwgLineType ); void getInternalGraphicsElement( OdDgElementIteratorPtr& pIter, OdDgGraphicsElementPtr& pInternalGraphics ); bool createVertexPolyline( OdGePoint3dArray arrVertices, OdDbPolylinePtr& pPolyline, double dThickness, const OdGeVector3d vrBaseNormal = OdGeVector3d::kIdentity); OdUInt32 getLineStyleEntryId( const OdDgGraphicsElementPtr& pElm ); bool createPolylineFromComplexElement( OdDgGraphicsElement* e, OdDgElementIteratorPtr& pIter, OdDbBlockTableRecord* owner, OdDbEntityPtr& pPolyline, bool bForceCloseElement = false, const OdGeVector3d vrBaseNormal = OdGeVector3d::kIdentity); bool createPolylineFromSetOfGeCurves( const OdArray& arrCurves, OdDbPolylinePtr& pDbPolyline ); bool prepareMatrixToBlockTransform( OdGeMatrix3d& matTransform, bool bUniScaleTransform = false ); OdString convertEmptyDataFieldsTo_( const OdString& strTextData, const OdDgTextEditField& textField ); double getUnitConversionScale(OdDgModelPtr& pModel, OdDbDatabase* pDb); OdString convertTextSymbolsFromRscToShx(OdDgDatabase* pDb, const OdString& strText, OdDgFontTableRecord* pFontRec); void scaleBlockDefinition(OdDbBlockTableRecord* pBlock, double dScale); bool isContinuousLineStyle(OdUInt32 uLineStyle, OdDgGraphicsElement* pGrElm); void sortElementsByPriority(OdDgElementIdArray& arrItems); OdDgElementId getDimNoteExternalContext(OdDgDimNote* pDim); } #endif // _DGN_IMPORTCOMMON_INCLUDED_