Beispiel #1
0
        public override string GetStepParameters()
        {
            var parameters = new List <string>();

            parameters.Add(Name != null ? Name.ToStepValue() : "$");
            parameters.Add(CurveFont != null ? CurveFont.ToStepValue() : "$");
            parameters.Add(CurveWidth != null ? CurveWidth.ToStepValue() : "$");
            parameters.Add(CurveColour != null ? CurveColour.ToStepValue() : "$");
            parameters.Add(ModelOrDraughting != null ? ModelOrDraughting.ToStepValue() : "$");

            return(string.Join(", ", parameters.ToArray()));
        }
Beispiel #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(IfcCurveStyleClause clause)
        {
            var retVal = false;

            try
            {
                switch (clause)
                {
                case IfcCurveStyleClause.WR11:
                    retVal = (!(Functions.EXISTS(CurveWidth))) || (Functions.TYPEOF(CurveWidth).Contains("IFC2X3.IFCPOSITIVELENGTHMEASURE")) || ((Functions.TYPEOF(CurveWidth).Contains("IFC2X3.IFCDESCRIPTIVEMEASURE")) && (CurveWidth.AsIfcDescriptiveMeasure() == "by layer"));
                    break;
                }
            } catch (Exception ex) {
                var log = Validation.ValidationLogging.CreateLogger <Xbim.Ifc2x3.PresentationAppearanceResource.IfcCurveStyle>();
                log?.LogError(string.Format("Exception thrown evaluating where-clause 'IfcCurveStyle.{0}' for #{1}.", clause, EntityLabel), ex);
            }
            return(retVal);
        }