git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1046 67173fc5-114c-0410-ac8e-9d2fd5bffc1f

This commit is contained in:
aramis_acg
2011-07-17 01:09:56 +00:00
parent d6b557dcc0
commit a7e43173db
11 changed files with 902 additions and 61 deletions

View File

@@ -65,14 +65,21 @@ void ProcessPolyLine(const IfcPolyline& def, TempMesh& meshout, ConversionData&
// ------------------------------------------------------------------------------------------------
bool ProcessCurve(const IfcCurve& curve, TempMesh& meshout, ConversionData& conv)
{
if(const IfcPolyline* poly = curve.ToPtr<IfcPolyline>()) {
ProcessPolyLine(*poly,meshout,conv);
}
else {
boost::scoped_ptr<const Curve> cv(Curve::Convert(curve,conv));
if (!cv) {
IFCImporter::LogWarn("skipping unknown IfcCurve entity, type is " + curve.GetClassName());
return false;
}
return true;
// we must have a bounded curve at this point
if (const BoundedCurve* bc = dynamic_cast<const BoundedCurve*>(cv.get())) {
bc->SampleDiscrete(meshout);
meshout.vertcnt.push_back(meshout.verts.size());
return true;
}
IFCImporter::LogError("cannot use unbounded curve as profile");
return false;
}
// ------------------------------------------------------------------------------------------------