Exemplo n.º 1
0
 public static IfcTransform NewRemovePropertySetsRequest(Logger logInstance, IfcAuthorMetadata newMetadata,
                                                         string[] removePropertySets, string[] keepPropertySets, bool?caseSensitiveMatching)
 {
     return(new IfcTransform(new ModelPropertySetRemovalTransform(logInstance?.LoggerFactory, defaultLogFilter)
     {
         ExludePropertySetByName = removePropertySets,
         IncludePropertySetByName = keepPropertySets,
         IsNameMatchingCaseSensitive = caseSensitiveMatching ?? false,
         FilterRuleStrategy = FilterRuleStrategyType.IncludeBeforeExclude,
         EditorCredentials = newMetadata?.MetaData.ToEditorCredentials(),
     }));
 }
Exemplo n.º 2
0
        public static IfcTransform NewTransformPlacementRequest(Logger logInstance, IfcAuthorMetadata newMetadata, Alignment alignment, object placementStrategy)
        {
            ModelPlacementStrategy strategy = default(ModelPlacementStrategy);

            if (!DynamicArgumentDelegation.TryCastEnum(placementStrategy, out strategy))
            {
                log.LogWarning("Unable to cast '{0}' to type {1}. Using '{2}'.", placementStrategy, nameof(ModelPlacementStrategy), strategy);
            }

            return(new IfcTransform(new ModelPlacementTransform(logInstance?.LoggerFactory, defaultLogFilter)
            {
                AxisAlignment = alignment.TheAxisAlignment,
                PlacementStrategy = strategy,
                EditorCredentials = newMetadata?.MetaData.ToEditorCredentials()
            }));
        }
Exemplo n.º 3
0
        public static IfcTransform NewRepresentationRefactorTransform(Logger logInstance, IfcAuthorMetadata newMetadata, string[] contexts, object refactorStrategy)
        {
            ProductRefactorStrategy strategy = default(ProductRefactorStrategy);

            if (!DynamicArgumentDelegation.TryCastEnum(refactorStrategy, out strategy))
            {
                log.LogWarning("Unable to cast '{0}' to type {1}. Using '{2}'.", refactorStrategy, nameof(ProductRefactorStrategy), strategy);
            }

            return(new IfcTransform(new ProductRepresentationRefactorTransform(logInstance?.LoggerFactory, defaultLogFilter)
            {
                ContextIdentifiers = contexts,
                Strategy = strategy,
                EditorCredentials = newMetadata?.MetaData.ToEditorCredentials()
            }));
        }