コード例 #1
0
        public IfcConversionBasedUnit(IfcDimensionalExponents dimensions, IfcUnitEnum unitType, IfcLabel name, IfcMeasureWithUnit conversionFactor) : base(dimensions, unitType)
        {
            HasExternalReference = new List <IfcExternalReferenceRelationship>();

            Name             = name;
            ConversionFactor = conversionFactor;
        }
コード例 #2
0
ファイル: IfcAppliedValue.g.cs プロジェクト: vdubya/IFC-gen
        public IfcAppliedValue(IfcLabel name, IfcText description, IfcAppliedValueSelect appliedValue, IfcMeasureWithUnit unitBasis, IfcDate applicableDate, IfcDate fixedUntilDate, IfcLabel category, IfcLabel condition, IfcArithmeticOperatorEnum arithmeticOperator, List <IfcAppliedValue> components) : base()
        {
            HasExternalReference = new List <IfcExternalReferenceRelationship>();

            Name               = name;
            Description        = description;
            AppliedValue       = appliedValue;
            UnitBasis          = unitBasis;
            ApplicableDate     = applicableDate;
            FixedUntilDate     = fixedUntilDate;
            Category           = category;
            Condition          = condition;
            ArithmeticOperator = arithmeticOperator;
            Components         = components;
        }
コード例 #3
0
 public IfcMetricValueSelect(IfcMeasureWithUnit choice)
 {
     this.choice = choice;
 }
コード例 #4
0
ファイル: Model.cs プロジェクト: italobechepeche/IFC-gen
        public Model(IDictionary <Guid, BaseIfc> storage, string name, string description, IfcAddress address, IfcPerson user, IfcOrganization owner)
        {
            this.storage = storage;

            this.storage.Add(address.Id, address);
            this.storage.Add(user.Id, user);
            this.storage.Add(owner.Id, owner);

            // Create an organization for app creation.
            var appOrg = new IfcOrganization(APPNAME);

            this.storage.Add(appOrg.Id, appOrg);

            // Create an authoring application.
            var v   = owner.GetType().Assembly.GetName().Version.ToString();
            var app = new IfcApplication(appOrg, v, APPNAME, APPNAME);

            this.storage.Add(app.Id, app);

            // Create an person and history for the owner history.
            var personAndOrg = new IfcPersonAndOrganization(user, owner);

            this.storage.Add(personAndOrg.Id, personAndOrg);

            // Create an owner history for the project.
            var history = new IfcOwnerHistory(personAndOrg, app, UnixNow());

            this.storage.Add(history.Id, history);

            var lu = new IfcSIUnit(null, IfcUnitEnum.LENGTHUNIT, IfcSIUnitName.METRE);

            this.storage.Add(lu.Id, lu);
            var lengthUnit = new IfcUnit(lu);

            var au = new IfcSIUnit(null, IfcUnitEnum.AREAUNIT, IfcSIUnitName.SQUARE_METRE);

            this.storage.Add(au.Id, au);
            var areaUnit = new IfcUnit(au);

            var vu = new IfcSIUnit(null, IfcUnitEnum.VOLUMEUNIT, IfcSIUnitName.CUBIC_METRE);

            this.storage.Add(vu.Id, vu);
            var volumeUnit = new IfcUnit(vu);

            var sau = new IfcSIUnit(null, IfcUnitEnum.SOLIDANGLEUNIT, IfcSIUnitName.STERADIAN);

            this.storage.Add(sau.Id, sau);
            var solidAngleUnit = new IfcUnit(sau);

            var mu = new IfcSIUnit(null, IfcUnitEnum.MASSUNIT, IfcSIUnitName.GRAM);

            this.storage.Add(mu.Id, mu);
            var massUnit = new IfcUnit(mu);

            var tu = new IfcSIUnit(null, IfcUnitEnum.TIMEUNIT, IfcSIUnitName.SECOND);

            this.storage.Add(tu.Id, tu);
            var timeUnit = new IfcUnit(tu);

            var thu = new IfcSIUnit(null, IfcUnitEnum.THERMODYNAMICTEMPERATUREUNIT, IfcSIUnitName.DEGREE_CELSIUS);

            this.storage.Add(thu.Id, thu);
            var thermUnit = new IfcUnit(thu);

            var lmu = new IfcSIUnit(null, IfcUnitEnum.LUMINOUSINTENSITYUNIT, IfcSIUnitName.LUMEN);

            this.storage.Add(lmu.Id, lmu);
            var lumUnit = new IfcUnit(lmu);

            var pau = new IfcSIUnit(null, IfcUnitEnum.PLANEANGLEUNIT, IfcSIUnitName.RADIAN);

            this.storage.Add(pau.Id, pau);
            var planeAngleUnit = new IfcUnit(pau);

            var measure = new IfcMeasureWithUnit(new IfcValue(new IfcMeasureValue(new IfcPlaneAngleMeasure(1.745e-2))), planeAngleUnit);

            this.storage.Add(measure.Id, measure);

            var dimExp = new IfcDimensionalExponents(0, 0, 0, 0, 0, 0, 0);

            this.storage.Add(dimExp.Id, dimExp);

            var du = new IfcConversionBasedUnit(dimExp, IfcUnitEnum.PLANEANGLEUNIT, "DEGREE", measure);

            this.storage.Add(du.Id, du);
            var degree = new IfcUnit(du);

            var units = new List <IfcUnit> {
                lengthUnit, areaUnit, volumeUnit, solidAngleUnit, massUnit, timeUnit, thermUnit, lumUnit, planeAngleUnit, degree
            };
            var unitAss = new IfcUnitAssignment(units);

            this.storage.Add(unitAss.Id, unitAss);

            // Create the project.
            var proj = new IfcProject(IfcGuid.ToIfcGuid(Guid.NewGuid()), history, name, description, null, null, null, null, unitAss);

            this.storage.Add(proj.Id, proj);
        }
コード例 #5
0
 public IfcRelAssignsToProcess(IfcGloballyUniqueId globalId, IfcOwnerHistory ownerHistory, IfcLabel name, IfcText description, List <IfcObjectDefinition> relatedObjects, IfcObjectTypeEnum relatedObjectsType, IfcProcessSelect relatingProcess, IfcMeasureWithUnit quantityInProcess) : base(globalId, ownerHistory, name, description, relatedObjects, relatedObjectsType)
 {
     RelatingProcess   = relatingProcess;
     QuantityInProcess = quantityInProcess;
 }
コード例 #6
0
ファイル: IfcCostValue.g.cs プロジェクト: vdubya/IFC-gen
 public IfcCostValue(IfcLabel name, IfcText description, IfcAppliedValueSelect appliedValue, IfcMeasureWithUnit unitBasis, IfcDate applicableDate, IfcDate fixedUntilDate, IfcLabel category, IfcLabel condition, IfcArithmeticOperatorEnum arithmeticOperator, List <IfcAppliedValue> components) : base(name, description, appliedValue, unitBasis, applicableDate, fixedUntilDate, category, condition, arithmeticOperator, components)
 {
 }
コード例 #7
0
 public IfcAppliedValueSelect(IfcMeasureWithUnit choice)
 {
     this.choice = choice;
 }
コード例 #8
0
ファイル: Document.cs プロジェクト: vserge/IFC-gen
        /// <summary>
        /// Create an IfcUnitAssignment.
        /// </summary>
        /// <returns></returns>
        private IfcUnitAssignment AddUnitAssignment()
        {
            var lu = new IfcSIUnit(null, IfcUnitEnum.LENGTHUNIT, IfcSIUnitName.METRE);

            this.AddEntity(lu);
            var lengthUnit = new IfcUnit(lu);

            var au = new IfcSIUnit(null, IfcUnitEnum.AREAUNIT, IfcSIUnitName.SQUARE_METRE);

            this.AddEntity(au);
            var areaUnit = new IfcUnit(au);

            var vu = new IfcSIUnit(null, IfcUnitEnum.VOLUMEUNIT, IfcSIUnitName.CUBIC_METRE);

            this.AddEntity(vu);
            var volumeUnit = new IfcUnit(vu);

            var sau = new IfcSIUnit(null, IfcUnitEnum.SOLIDANGLEUNIT, IfcSIUnitName.STERADIAN);

            this.AddEntity(sau);
            var solidAngleUnit = new IfcUnit(sau);

            var mu = new IfcSIUnit(null, IfcUnitEnum.MASSUNIT, IfcSIUnitName.GRAM);

            this.AddEntity(mu);
            var massUnit = new IfcUnit(mu);

            var tu = new IfcSIUnit(null, IfcUnitEnum.TIMEUNIT, IfcSIUnitName.SECOND);

            this.AddEntity(tu);
            var timeUnit = new IfcUnit(tu);

            var thu = new IfcSIUnit(null, IfcUnitEnum.THERMODYNAMICTEMPERATUREUNIT, IfcSIUnitName.DEGREE_CELSIUS);

            this.AddEntity(thu);
            var thermUnit = new IfcUnit(thu);

            var lmu = new IfcSIUnit(null, IfcUnitEnum.LUMINOUSINTENSITYUNIT, IfcSIUnitName.LUMEN);

            this.AddEntity(lmu);
            var lumUnit = new IfcUnit(lmu);

            var pau = new IfcSIUnit(null, IfcUnitEnum.PLANEANGLEUNIT, IfcSIUnitName.RADIAN);

            this.AddEntity(pau);
            var planeAngleUnit = new IfcUnit(pau);

            var measure = new IfcMeasureWithUnit(new IfcValue(new IfcMeasureValue(new IfcPlaneAngleMeasure(1.745e-2))), planeAngleUnit);

            this.AddEntity(measure);

            var dimExp = new IfcDimensionalExponents(0, 0, 0, 0, 0, 0, 0);

            this.AddEntity(dimExp);

            var du = new IfcConversionBasedUnit(dimExp, IfcUnitEnum.PLANEANGLEUNIT, "DEGREE", measure);

            this.AddEntity(du);
            var degree = new IfcUnit(du);

            var units = new List <IfcUnit> {
                lengthUnit, areaUnit, volumeUnit, solidAngleUnit, massUnit, timeUnit, thermUnit, lumUnit, planeAngleUnit, degree
            };
            var unitAss = new IfcUnitAssignment(units);

            this.AddEntity(unitAss);

            return(unitAss);
        }
コード例 #9
0
 public IfcConversionBasedUnitWithOffset(IfcDimensionalExponents dimensions, IfcUnitEnum unitType, IfcLabel name, IfcMeasureWithUnit conversionFactor, IfcReal conversionOffset) : base(dimensions, unitType, name, conversionFactor)
 {
     ConversionOffset = conversionOffset;
 }