Browse Source

- Ifc: implement IfcIShapeProfileDef entity.

Alexander Gessler 12 years ago
parent
commit
5ac2354da0
4 changed files with 2114 additions and 2114 deletions
  1. 21 0
      code/IFCProfile.cpp
  2. 897 897
      code/IFCReaderGen.cpp
  3. 1195 1216
      code/IFCReaderGen.h
  4. 1 1
      scripts/IFCImporter/entitylist.txt

+ 21 - 0
code/IFCProfile.cpp

@@ -129,6 +129,27 @@ void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh&
 
 
 		meshout.vertcnt.push_back(segments);
 		meshout.vertcnt.push_back(segments);
 	}
 	}
+	else if( const IfcIShapeProfileDef* const ishape = def.ToPtr<IfcIShapeProfileDef>()) {
+		// construct simplified IBeam shape
+		const IfcFloat offset = (ishape->OverallWidth - ishape->WebThickness) / 2;
+		const IfcFloat inner_height = ishape->OverallDepth - ishape->FlangeThickness * 2;
+
+		meshout.verts.reserve(12);
+		meshout.verts.push_back(IfcVector3(0,0,0));
+		meshout.verts.push_back(IfcVector3(0,ishape->FlangeThickness,0));
+		meshout.verts.push_back(IfcVector3(offset,ishape->FlangeThickness,0));
+		meshout.verts.push_back(IfcVector3(offset,ishape->FlangeThickness + inner_height,0));
+		meshout.verts.push_back(IfcVector3(0,ishape->FlangeThickness + inner_height,0));
+		meshout.verts.push_back(IfcVector3(0,ishape->OverallDepth,0));
+		meshout.verts.push_back(IfcVector3(ishape->OverallWidth,ishape->OverallDepth,0));
+		meshout.verts.push_back(IfcVector3(ishape->OverallWidth,ishape->FlangeThickness + inner_height,0));
+		meshout.verts.push_back(IfcVector3(offset+ishape->WebThickness,ishape->FlangeThickness + inner_height,0));
+		meshout.verts.push_back(IfcVector3(offset+ishape->WebThickness,ishape->FlangeThickness,0));
+		meshout.verts.push_back(IfcVector3(ishape->OverallWidth,ishape->FlangeThickness,0));
+		meshout.verts.push_back(IfcVector3(ishape->OverallWidth,0,0));
+
+		meshout.vertcnt.push_back(12);
+	}
 	else {
 	else {
 		IFCImporter::LogWarn("skipping unknown IfcParameterizedProfileDef entity, type is " + def.GetClassName());
 		IFCImporter::LogWarn("skipping unknown IfcParameterizedProfileDef entity, type is " + def.GetClassName());
 		return;
 		return;

File diff suppressed because it is too large
+ 897 - 897
code/IFCReaderGen.cpp


File diff suppressed because it is too large
+ 1195 - 1216
code/IFCReaderGen.h


+ 1 - 1
scripts/IFCImporter/entitylist.txt

@@ -100,4 +100,4 @@ IfcTrimmedCurve
 IfcUnit
 IfcUnit
 IfcUnitAssignment
 IfcUnitAssignment
 IfcVector
 IfcVector
-
+IfcIShapeProfileDef

Some files were not shown because too many files changed in this diff