- Ifc: implement IfcIShapeProfileDef entity.

pull/16/merge
Alexander Gessler 2013-01-24 15:16:03 +01:00
parent 3b30a39fe1
commit 5ac2354da0
4 changed files with 7611 additions and 7560 deletions

View File

@ -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 Load Diff

File diff suppressed because it is too large Load Diff

View File

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