예제 #1
0
        /// <summary>
        /// Clear all caches contained in this manager.
        /// </summary>
        public static void Clear()
        {
            if (m_AllocatedGeometryObjectCache != null)
            {
                m_AllocatedGeometryObjectCache.DisposeCache();
            }
            ParameterUtil.ClearParameterCache();

            m_AllocatedGeometryObjectCache = null;
            m_AreaSchemeCache       = null;
            m_AssemblyInstanceCache = null;
            m_BeamSystemCache       = null;
            m_CanExportBeamGeometryAsExtrusionCache = null;
            m_CategoryClassNameCache       = null;
            m_CategoryTypeCache            = null;
            m_CeilingSpaceRelCache         = null;
            m_ClassificationCache          = null;
            m_ClassificationLocationCache  = null;
            m_ClassificationReferenceCache = null;
            //m_ConditionalPropertySetsForTypeCache = null;
            m_ContainmentCache     = null;
            m_CurveAnnotationCache = null;
            m_DBViewsToExport      = null;
            m_DefaultCartesianTransformationOperator3D = null;
            m_DoorWindowDelayedOpeningCreatorCache     = null;
            m_DummyHostCache              = null;
            m_ElementsInAssembliesCache   = null;
            m_ElementToHandleCache        = null;
            m_ElementTypeToHandleCache    = null;
            m_ExportOptionsCache          = null;
            m_FabricAreaHandleCache       = null;
            m_FamilySymbolToTypeInfoCache = null;
            m_Global3DOriginHandle        = null;
            m_GridCache                     = null;
            m_GroupCache                    = null;
            m_GUIDCache                     = null;
            m_GUIDsToStoreCache             = null;
            m_HandleToElementCache          = null;
            m_HostObjectsLevelIndex         = null;
            m_HostPartsCache                = null;
            m_IsExternalParameterValueCache = null;
            m_LevelInfoCache                = null;
            m_MaterialIdToStyleHandleCache  = null;
            m_MaterialSetUsageCache         = null;
            m_MaterialSetCache              = null;
            //m_MaterialConstituentCache = null;
            m_MaterialConstituentSetCache = null;
            m_MaterialHandleCache         = null;
            m_MaterialRelationsCache      = null;
            m_MEPCache                      = null;
            m_OwnerHistoryHandle            = null;
            m_ParameterCache                = null;
            m_PartExportedCache             = null;
            m_PresentationLayerSetCache     = null;
            m_PresentationStyleCache        = null;
            m_ProjectHandle                 = null;
            m_PropertyInfoCache             = null;
            m_PropertyMapCache              = null;
            m_PropertySetsForTypeCache      = null;
            m_RailingCache                  = null;
            m_RailingSubElementCache        = null;
            m_SiteHandle                    = null;
            m_SpaceBoundaryCache            = null;
            m_SpaceInfoCache                = null;
            m_SpaceOccupantInfoCache        = null;
            m_StairRampContainerInfoCache   = null;
            m_SystemsCache                  = null;
            m_TrussCache                    = null;
            m_TypePropertyInfoCache         = null;
            m_TypeRelationsCache            = null;
            m_ViewScheduleElementCache      = null;
            m_WallConnectionDataCache       = null;
            m_UnitsCache                    = null;
            m_ZoneCache                     = null;
            m_ZoneInfoCache                 = null;
            BuildingHandle                  = null;
            m_CertifiedEntitiesAndPsetCache = null;
            m_HandleToDelete                = null;
            m_Object2DCurves                = null;
            ComplexPropertyCache.Clear();
        }
예제 #2
0
        /// <summary>
        /// Clear all caches contained in this manager.
        /// </summary>
        public static void Clear()
        {
            if (m_AllocatedGeometryObjectCache != null)
                m_AllocatedGeometryObjectCache.DisposeCache();
            ParameterUtil.ClearParameterCache();

            m_AllocatedGeometryObjectCache = null;
            m_AreaSchemeCache = null;
            m_AssemblyInstanceCache = null;
            m_BeamSystemCache = null;
            m_CategoryClassNameCache = null;
            m_CategoryTypeCache = null;
            m_CeilingSpaceRelCache = null;
            m_ClassificationCache = null;
            m_ClassificationLocationCache = null;
            m_ConditionalPropertySetsForTypeCache = null;
            m_ContainmentCache = null;
            m_CurveAnnotationCache = null;
            m_DBViewsToExport = null;
            m_DefaultCartesianTransformationOperator3D = null;
            m_DoorWindowDelayedOpeningCreatorCache = null;
            m_DummyHostCache = null;
            m_ElementToHandleCache = null;
            m_ElementsInAssembliesCache = null;
            m_ExportOptionsCache = null;
            m_FabricAreaHandleCache = null;
            m_GridCache = null;
            m_GroupCache = null;
            m_GroupElementGeometryCache = null;
            m_GUIDCache = null;
            m_GUIDsToStoreCache = null;
            m_HandleToElementCache = null;
            m_HostObjectsLevelIndex = null;
            m_HostPartsCache = null;
            m_IsExternalParameterValueCache = null;
            m_LevelInfoCache = null;
            m_MaterialIdToStyleHandleCache = null;
            m_MaterialLayerRelationsCache = null;
            m_MaterialLayerSetCache = null;
            m_MaterialHandleCache = null;
            m_MaterialRelationsCache = null;
            m_MEPCache = null;
            m_ParameterCache = null;
            m_PartExportedCache = null;
            m_PresentationLayerSetCache = null;
            m_PresentationStyleCache = null;
            m_PropertyInfoCache = null;
            m_PropertyMapCache = null;
            m_PropertySetsForTypeCache = null;
            m_RailingCache = null;
            m_RailingSubElementCache = null;
            m_SpaceBoundaryCache = null;
            m_SpaceInfoCache = null;
            m_SpaceOccupantInfoCache = null;
            m_StairRampContainerInfoCache = null;
            m_SystemsCache = null;
            m_TrussCache = null;
            m_TypeObjectsCache = null;
            m_TypePropertyInfoCache = null;
            m_TypeRelationsCache = null;
            m_ViewScheduleElementCache = null;
            m_WallConnectionDataCache = null;
            m_WallTypeCache = null;
            m_UnitsCache = null;
            m_ZoneCache = null;
            m_ZoneInfoCache = null;
        }
예제 #3
0
        /// <summary>
        /// Clear all caches contained in this manager.
        /// </summary>
        public static void Clear()
        {
            if (m_AllocatedGeometryObjectCache != null)
            {
                m_AllocatedGeometryObjectCache.DisposeCache();
            }
            ParameterUtil.ClearParameterCache();

            m_AllocatedGeometryObjectCache = null;
            m_AreaSchemeCache                          = null;
            m_AssemblyInstanceCache                    = null;
            m_BeamSystemCache                          = null;
            m_CategoryClassNameCache                   = null;
            m_CategoryTypeCache                        = null;
            m_CeilingSpaceRelCache                     = null;
            m_ClassificationCache                      = null;
            m_ClassificationLocationCache              = null;
            m_ConditionalPropertySetsForTypeCache      = null;
            m_ContainmentCache                         = null;
            m_CurveAnnotationCache                     = null;
            m_DBViewsToExport                          = null;
            m_DefaultCartesianTransformationOperator3D = null;
            m_DoorWindowDelayedOpeningCreatorCache     = null;
            m_DummyHostCache            = null;
            m_ElementToHandleCache      = null;
            m_ElementsInAssembliesCache = null;
            m_ExportOptionsCache        = null;
            m_FabricAreaHandleCache     = null;
            m_GridCache  = null;
            m_GroupCache = null;
            m_GroupElementGeometryCache = null;
            m_GUIDCache                     = null;
            m_GUIDsToStoreCache             = null;
            m_HandleToElementCache          = null;
            m_HostObjectsLevelIndex         = null;
            m_HostPartsCache                = null;
            m_IsExternalParameterValueCache = null;
            m_LevelInfoCache                = null;
            m_MaterialIdToStyleHandleCache  = null;
            m_MaterialLayerRelationsCache   = null;
            m_MaterialLayerSetCache         = null;
            m_MaterialHandleCache           = null;
            m_MaterialRelationsCache        = null;
            m_MEPCache                    = null;
            m_ParameterCache              = null;
            m_PartExportedCache           = null;
            m_PresentationLayerSetCache   = null;
            m_PresentationStyleCache      = null;
            m_PropertyInfoCache           = null;
            m_PropertyMapCache            = null;
            m_PropertySetsForTypeCache    = null;
            m_RailingCache                = null;
            m_RailingSubElementCache      = null;
            m_SpaceBoundaryCache          = null;
            m_SpaceInfoCache              = null;
            m_SpaceOccupantInfoCache      = null;
            m_StairRampContainerInfoCache = null;
            m_SystemsCache                = null;
            m_TrussCache                  = null;
            m_TypeObjectsCache            = null;
            m_TypePropertyInfoCache       = null;
            m_TypeRelationsCache          = null;
            m_ViewScheduleElementCache    = null;
            m_WallConnectionDataCache     = null;
            m_WallTypeCache               = null;
            m_UnitsCache                  = null;
            m_ZoneCache                   = null;
            m_ZoneInfoCache               = null;
        }
예제 #4
0
        /// <summary>
        /// Creates IfcPresentationStyleAssignment for text element type.
        /// </summary>
        /// <param name="exporterIFC">
        /// The ExporterIFC object.
        /// </param>
        /// <param name="textElemType">
        /// The text note element type.
        /// </param>
        /// <param name="cache">
        /// The cache of IfcPresentationStyleAssignment.
        /// </param>
        static void CreatePresentationStyleAssignmentForTextElementType(ExporterIFC exporterIFC, TextElementType textElemType, PresentationStyleAssignmentCache cache)
        {
            IFCFile file = exporterIFC.GetFile();

            string fontName;
            if (ParameterUtil.GetStringValueFromElement(textElemType, BuiltInParameter.TEXT_FONT, out fontName) == null)
                fontName = null;

            double fontSize;
            if (ParameterUtil.GetDoubleValueFromElement(textElemType, BuiltInParameter.TEXT_SIZE, out fontSize) == null)
                fontSize = -1.0;

            double viewScale = 100.0;  // currently hardwired.
            fontSize = UnitUtil.ScaleLength(fontSize * viewScale);

            string ifcPreDefinedItemName = "Text Font";

            IList<string> fontNameList = new List<string>();
            fontNameList.Add(fontName);

            IFCAnyHandle textSyleFontModelHnd = IFCInstanceExporter.CreateTextStyleFontModel(file, ifcPreDefinedItemName, fontNameList, null, null, null, IFCDataUtil.CreateAsPositiveLengthMeasure(fontSize));

            int color;
            ParameterUtil.GetIntValueFromElement(textElemType, BuiltInParameter.LINE_COLOR, out color);

            double blueVal = ((double)((color & 0xff0000) >> 16)) / 255.0;
            double greenVal = ((double)((color & 0xff00) >> 8)) / 255.0;
            double redVal = ((double)(color & 0xff)) / 255.0;

            IFCAnyHandle colorHnd = IFCInstanceExporter.CreateColourRgb(file, null, redVal, greenVal, blueVal);
            IFCAnyHandle fontColorHnd = IFCInstanceExporter.CreateTextStyleForDefinedFont(file, colorHnd, null);

            string ifcAttrName = textElemType.Name;
            IFCAnyHandle textStyleHnd = IFCInstanceExporter.CreateTextStyle(file, textElemType.Name, fontColorHnd, null, textSyleFontModelHnd);

            if (IFCAnyHandleUtil.IsNullOrHasNoValue(textStyleHnd))
                return;

            HashSet<IFCAnyHandle> presStyleSet = new HashSet<IFCAnyHandle>();
            presStyleSet.Add(textStyleHnd);

            IFCAnyHandle presStyleHnd = IFCInstanceExporter.CreatePresentationStyleAssignment(file, presStyleSet);
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(presStyleHnd))
                return;

            cache.Register(textElemType.Id, presStyleHnd);
        }