/// <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(IfcSweptDiskSolidClause clause) { var retVal = false; try { switch (clause) { case IfcSweptDiskSolidClause.DirectrixDim: retVal = Directrix.Dim == 3; break; case IfcSweptDiskSolidClause.InnerRadiusSize: retVal = (!Functions.EXISTS(InnerRadius)) || (Radius > InnerRadius); break; case IfcSweptDiskSolidClause.DirectrixBounded: retVal = (Functions.EXISTS(StartParam) && Functions.EXISTS(EndParam)) || (Functions.SIZEOF(Functions.NewTypesArray("IFC4.IFCCONIC", "IFC4.IFCBOUNDEDCURVE") * Functions.TYPEOF(Directrix)) == 1); break; } } catch (Exception ex) { var log = Validation.ValidationLogging.CreateLogger <Xbim.Ifc4.GeometricModelResource.IfcSweptDiskSolid>(); log?.LogError(string.Format("Exception thrown evaluating where-clause 'IfcSweptDiskSolid.{0}' for #{1}.", clause, EntityLabel), ex); } return(retVal); }
/// <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(IfcSweptDiskSolidClause clause) { var retVal = false; try { switch (clause) { case IfcSweptDiskSolidClause.WR1: retVal = Directrix.Dim == 3; break; case IfcSweptDiskSolidClause.WR2: retVal = (!Functions.EXISTS(InnerRadius)) || (Radius > InnerRadius); break; } } catch (Exception ex) { var log = Validation.ValidationLogging.CreateLogger <Xbim.Ifc2x3.GeometricModelResource.IfcSweptDiskSolid>(); log?.LogError(string.Format("Exception thrown evaluating where-clause 'IfcSweptDiskSolid.{0}' for #{1}.", clause, EntityLabel), ex); } return(retVal); }