public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _identifier = value.StringVal; return; case 1: _name = value.StringVal; return; case 2: _description = value.StringVal; return; case 3: _unit = (IfcUnit)(value.EntityVal); return; case 4: _referencePath = (IfcReference)(value.EntityVal); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: base.Parse(propIndex, value, nestedIndex); return; case 7: _benchmark = (IfcBenchmarkEnum)System.Enum.Parse(typeof(IfcBenchmarkEnum), value.EnumVal, true); return; case 8: _valueSource = value.StringVal; return; case 9: _dataValue = (IfcMetricValueSelect)(value.EntityVal); return; case 10: _referencePath = (IfcReference)(value.EntityVal); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
internal static IfcFootingType generate(DatabaseIfc db, bool parametric, double length, double width, double height) { string name = parametric ? "PadFootingParametric" : "PadFooting" + length + "x" + width + "x" + height; IfcFootingType footingType = new IfcFootingType(db, name, IfcFootingTypeEnum.PAD_FOOTING); IfcRectangleProfileDef rpd = new IfcRectangleProfileDef(db, name, length, width); footingType.RepresentationMaps = new List <IfcRepresentationMap>() { new IfcRepresentationMap(new IfcExtrudedAreaSolid(rpd, new IfcAxis2Placement3D(new IfcCartesianPoint(db, 0, 0, -height)), new IfcDirection(db, 0, 0, 1), height)) }; Qto_FootingBaseQuantities baseQuantities = new Qto_FootingBaseQuantities(footingType); baseQuantities.Length = length; baseQuantities.Width = width; baseQuantities.Height = height; List <IfcPhysicalQuantity> quantities = baseQuantities.Quantities; if (parametric) { string prefix = @"RepresentationMaps[1].MappedRepresentation.Items[1]\IfcExtrudedAreaSolid."; CreateConstraint("Length", footingType, quantities[0], prefix + @"SweptArea\IfcRectangleProfileDef.XDim"); CreateConstraint("Width", footingType, quantities[1], prefix + @"SweptArea\IfcRectangleProfileDef.YDim"); CreateConstraint("Height", footingType, quantities[2], prefix + @"Depth"); IfcAppliedValue appv = new IfcAppliedValue(new IfcAppliedValue(IfcReference.ParseDescription(db, "HasPropertySets['" + baseQuantities.Name + "'].HasProperties['" + quantities[2].Name + "']")), IfcArithmeticOperatorEnum.MULTIPLY, new IfcAppliedValue(db, new IfcReal(-1))); CreateConstraint("Offset", footingType, appv, @"Position.Location.CoordinateZ"); } return(footingType); }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _typeIdentifier = value.StringVal; return; case 1: _attributeIdentifier = value.StringVal; return; case 2: _instanceName = value.StringVal; return; case 3: _listPositions.InternalAdd(value.IntegerVal); return; case 4: _innerReference = (IfcReference)(value.EntityVal); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public IfcTableColumn(IfcIdentifier? __Identifier, IfcLabel? __Name, IfcText? __Description, IfcUnit __Unit, IfcReference __ReferencePath) { this._Identifier = __Identifier; this._Name = __Name; this._Description = __Description; this._Unit = __Unit; this._ReferencePath = __ReferencePath; }
internal static IfcMetric CreateConstraint(string name, IfcElementType elementType, IfcResourceObjectSelect related, string referenceDesc) { IfcMetric metric = new IfcMetric(elementType.Database, name, IfcConstraintEnum.HARD) { ReferencePath = IfcReference.ParseDescription(elementType.Database, referenceDesc), BenchMark = IfcBenchmarkEnum.EQUALTO }; IfcResourceConstraintRelationship rcr = new IfcResourceConstraintRelationship(metric, related); new IfcRelAssociatesConstraint(elementType, metric); return(metric); }