예제 #1
0
        /// <summary>
        /// Tests the express where-clause specified in param 'clause'
        /// </summary>
        /// <param name="clause">The express clause to test</param>
        /// <returns>true if the clause is satisfied.</returns>
        public bool ValidateClause(IfcSweptSurfaceClause clause)
        {
            var retVal = false;

            try
            {
                switch (clause)
                {
                case IfcSweptSurfaceClause.SweptCurveType:
                    retVal = SweptCurve.ProfileType == IfcProfileTypeEnum.CURVE;
                    break;
                }
            } catch (Exception ex) {
                var log = Validation.ValidationLogging.CreateLogger <Xbim.Ifc4.GeometryResource.IfcSweptSurface>();
                log?.LogError(string.Format("Exception thrown evaluating where-clause 'IfcSweptSurface.{0}' for #{1}.", clause, EntityLabel), ex);
            }
            return(retVal);
        }
예제 #2
0
        /// <summary>
        /// Tests the express where-clause specified in param 'clause'
        /// </summary>
        /// <param name="clause">The express clause to test</param>
        /// <returns>true if the clause is satisfied.</returns>
        public bool ValidateClause(IfcSweptSurfaceClause clause)
        {
            var retVal = false;

            try
            {
                switch (clause)
                {
                case IfcSweptSurfaceClause.WR1:
                    retVal = !(Functions.TYPEOF(SweptCurve).Contains("IFC2X3.IFCDERIVEDPROFILEDEF"));
                    break;

                case IfcSweptSurfaceClause.WR2:
                    retVal = SweptCurve.ProfileType == IfcProfileTypeEnum.CURVE;
                    break;
                }
            } catch (Exception ex) {
                var log = Validation.ValidationLogging.CreateLogger <Xbim.Ifc2x3.GeometryResource.IfcSweptSurface>();
                log?.LogError(string.Format("Exception thrown evaluating where-clause 'IfcSweptSurface.{0}' for #{1}.", clause, EntityLabel), ex);
            }
            return(retVal);
        }