| 107 | |
| 108 | template <typename Schema> |
| 109 | typename Schema::IfcProject* IfcHierarchyHelper<Schema>::addProject(typename Schema::IfcOwnerHistory* owner_hist) { |
| 110 | typename Schema::IfcRepresentationContext::list::ptr rep_contexts(new typename Schema::IfcRepresentationContext::list); |
| 111 | |
| 112 | typename Schema::IfcUnit::list::ptr units(new typename Schema::IfcUnit::list); |
| 113 | typename Schema::IfcDimensionalExponents* dimexp = new typename Schema::IfcDimensionalExponents(0, 0, 0, 0, 0, 0, 0); |
| 114 | typename Schema::IfcSIUnit* unit1 = new typename Schema::IfcSIUnit(Schema::IfcUnitEnum::IfcUnit_LENGTHUNIT, |
| 115 | Schema::IfcSIPrefix::IfcSIPrefix_MILLI, |
| 116 | Schema::IfcSIUnitName::IfcSIUnitName_METRE); |
| 117 | typename Schema::IfcSIUnit* unit2a = new typename Schema::IfcSIUnit(Schema::IfcUnitEnum::IfcUnit_PLANEANGLEUNIT, |
| 118 | boost::none, |
| 119 | Schema::IfcSIUnitName::IfcSIUnitName_RADIAN); |
| 120 | typename Schema::IfcMeasureWithUnit* unit2b = new typename Schema::IfcMeasureWithUnit( |
| 121 | new typename Schema::IfcPlaneAngleMeasure(0.017453293), unit2a); |
| 122 | typename Schema::IfcConversionBasedUnit* unit2 = new typename Schema::IfcConversionBasedUnit(dimexp, |
| 123 | Schema::IfcUnitEnum::IfcUnit_PLANEANGLEUNIT, |
| 124 | "Degrees", |
| 125 | unit2b); |
| 126 | |
| 127 | units->push(unit1); |
| 128 | units->push(unit2); |
| 129 | |
| 130 | typename Schema::IfcUnitAssignment* unit_assignment = new typename Schema::IfcUnitAssignment(units); |
| 131 | |
| 132 | typename Schema::IfcProject* project = new typename Schema::IfcProject(IfcParse::IfcGlobalId(), |
| 133 | owner_hist, |
| 134 | boost::none, |
| 135 | boost::none, |
| 136 | boost::none, |
| 137 | boost::none, |
| 138 | boost::none, |
| 139 | rep_contexts, |
| 140 | unit_assignment); |
| 141 | |
| 142 | addEntity(dimexp); |
| 143 | addEntity(unit1); |
| 144 | addEntity(unit2a); |
| 145 | addEntity(unit2b); |
| 146 | addEntity(unit2); |
| 147 | addEntity(unit_assignment); |
| 148 | addEntity(project); |
| 149 | |
| 150 | return project; |
| 151 | } |
| 152 | |
| 153 | template <typename Schema> |
| 154 | void IfcHierarchyHelper<Schema>::relatePlacements(typename Schema::IfcProduct* parent, typename Schema::IfcProduct* product) { |
no test coverage detected